fix(examples): isolate headless agent example

This commit is contained in:
Tianyi Cui
2026-07-16 16:12:27 +08:00
parent ae73ef774d
commit 8d35092e26
38 changed files with 410 additions and 140 deletions
+4 -4
View File
@@ -1,10 +1,10 @@
import tsconfigPaths from 'vite-tsconfig-paths'
import { defineConfig } from 'vitest/config'
// Replay is the keyless default: boot the real ACP subprocess from recorded model scripts and diff
// normalized transcript plus persisted-log goldens. `record` calls the real API and updates fixtures
// and goldens; `refresh` replays committed scripts and updates only current goldens. Replay/refresh
// never load `.env`; only record reads a key from the environment or gitignored root `.env`.
// Replay is the keyless default: boot real example subprocesses from recorded model scripts and diff
// normalized protocol/event output plus persisted-log goldens. ACP `record` calls the real API and
// updates fixtures and goldens; `refresh` replays committed scripts and updates current goldens.
// Replay/refresh never load `.env`; only record reads a key from the environment or root `.env`.
if (process.env.DSH_SNAPSHOT === 'record') {
try {
process.loadEnvFile(new URL('.env', import.meta.url).pathname)