AGENTS.md@packages/client · git:20261014.e43c0cd · 2026-10-14 · sha256 b6cd3e476c5cbc78
AGENTS.md@packages/client git:20261014.e43c0cdA
Immutable. This exact content never changes and is served at /api/v1/blob/b6cd3e476c5cbc78.
# DOX — packages/client Files in this directory. One row per source file. | File | Purpose | |------|---------| | `README.md` | Package overview. React + Tailwind web client, published as a prebuilt `dist/`. Documents the `./chat-embed` export. | | `vite.config.ts` | Vite config for client package. Resolves dashboard port via `PI_DASHBOARD_PORT` env → `/tmp/dash-dev-port` marker → `~/.pi/dashboard/config.json` → fallback `8000`. Aliases shared + client-utils sources. `viteDashboardPluginsPlugin` loads dashboard plugins from repo root. `manualChunks` splits react-vendor, markdown, syntax, diff, xterm, dnd, util, monaco chunks. Dev server proxies `/api` + `/ws` to dashboard port. D1: npm `diff` split into its own `jsdiff` chunk so the chat path stops pinning `@git-diff-view/*`. See change: add-lazy-terminal-diff-bootstrap. Aliases app-kit `/react` + root → `../app-kit/src` (`/react` key first; prefix match). See change: add-plugin-app-host. `manualChunks` gains `katex: [katex, rehype-katex]` (lazy math engine, never folded into `markdown`/`index`). Entry cap in `src/__tests__/mdi-chunk-size.test.ts` = 690 KiB. See change: shrink-client-entry-lazy-islands. | | `vitest.config.ts` | Vitest config for client package. Mirrors `vite.config` aliases (shared + client-utils → workspace `src`) so tests resolve worktree source over hoisted symlink; adds `dashboard-plugin-runtime` (+ `/server`,`/context`,`/test-support` subpaths before the bare key) for the same reason. See change: add-blackhole-session-pipeline. jsdom, `pool: "forks"`, shared `setup-home.ts` globalSetup. `setupFiles` adds `src/test-support/eager-lazy-dialogs.ts`. See change: redesign-composer-session-strip. Adds `dashboard-plugin-runtime/embedded-app` + app-kit aliases (before bare runtime key). See change: add-plugin-app-host. | | `vitest.node-tests.ts` | `NODE_ENV_TESTS`: explicit list of DOM-free client tests run under `node`. Jsdom project excludes it, node project includes it. A new test defaults to jsdom. Guard `src/__tests__/client-env-split.test.ts`. See change: test-trust-audit. | | `vitest.node.config.ts` | Second client vitest project (`…-web-node`): `environment: node`, `include: NODE_ENV_TESTS`, `maxWorkers` from `../../vitest.workers`, no setupFiles. Separate file (not inline `extends`): vitest 4 `mergeConfig` concatenates arrays. See change: test-trust-audit. |