mirror of
https://github.com/TanStack/ai.git
synced 2026-11-18 19:34:58 +00:00
fix(ui): green up the CI suite for createChatHook
Nine tasks were failing on this branch. Fixes, in order of substance: - `ai-vue`/`ai-solid` ship their `/ui` subpath as source (Vue SFCs and Solid JSX must be compiled by the consumer), so `create-ui` is type-checked against the *consumer's* tsconfig. Both referenced a bare `process`, which broke any consumer without `@types/node` (this is what failed `ts-vue-chat`). Declare `process` locally, matching the `src/env.d.ts` shape the devtools packages already use, so the literal `process.env.NODE_ENV` bundlers substitute stays intact and the branch is still constant-folded in production. - `ts-react-ui-chatbot` imported `useChatContext` from `@/chat/ui-context`, which only exports the raw contexts. It comes off the factory in `./ui-components`, the way `layout.tsx` already imports it. - Docs: `docs/ui/react.md`'s widget-picking snippet referenced `UI` and `message` that no fence defined, and `p.getWeather` for a widget the example factory never registered. Grouped it with the factory fence and registered `getWeather`/`text`, so the snippet now type-checks against the real API instead of only looking right. - Docs: `docs/ui/vue.md`'s `StatusLine` and `ui` formed an inference cycle. Declare `StatusLine` after `ui` and annotate it; `h(StatusLine)` only runs at render time, so the runtime order is unchanged. - Split the mixed value/type imports in `ai-react`/`ai-solid` `create-ui` and drop the inline `import()` type in the Solid test (oxlint). - Drop devDeps the deprecation commit orphaned in the `ai-*-ui` packages, and alphabetize `ai-vue`'s (knip, sherif). `pnpm test:ci` and `pnpm test:dts` both pass across all 86 projects. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
88e47e7c2a
commit
ad5c6c28d9
12 changed files with 83 additions and 52 deletions
13
pnpm-lock.yaml
generated
13
pnpm-lock.yaml
generated
Loading…
Add table
Add a link
Reference in a new issue