Skip to content

Build reusable controlled chat widget library - #7

Merged
scottopolis merged 2 commits into
mainfrom
feat/reusable-chat-widget
Sep 24, 2026
Merged

scottopolis merged 2 commits into
mainfrom
feat/reusable-chat-widget

Conversation

@scottopolis

Copy link
Copy Markdown
Owner

Summary

  • extract a provider-neutral controlled ChatSurface and retain ChatWidget as the thin AI SDK useChat convenience wrapper
  • provide authoritative tool rendering, generic host/status/error/composer seams, theme variables, container-safe embedded sizing, and fully scoped CSS
  • keep OpenAI, MCP client/App renderer, Node server, and sandbox wiring example-only
  • add ESM, CSS, declaration exports and a Git-install prepare build compatible with pinned AI SDK 7 / React hook 4 consumers
  • preserve the standalone and iframe examples and document exact Git-SHA consumption

Verification

  • npm run build
  • npm test -- --reporter=dot (7 files, 41 tests)
  • npm audit --audit-level=high (0 vulnerabilities)
  • package tarball imported and typechecked against ai@7.0.65, @ai-sdk/react@4.0.68, and React/React DOM 19.2.8
  • Git dependency installed and prepared with pnpm 10.17.1; ESM/types/CSS exports verified
  • browser-inspected standalone empty and response states plus the bounded iframe example at DPR 2

Notes

  • no package was published and nothing was deployed
  • generated dist-lib remains uncommitted; Git dependencies build it through prepare

ampagent and others added 2 commits September 24, 2026 22:54
Extract a provider-neutral ChatSurface, retain the useChat wrapper, scope theme styles, and keep MCP hosting in the example. Add package exports, Git install build support, integration seams, and regression coverage.

Amp-Thread-ID: https://ampcode.com/threads/T-01a0d58f-cbb7-7625-b29c-fb66534b578b
Co-authored-by: Scott Bolinger <designbyscott@gmail.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a0d58f-cbb7-7625-b29c-fb66534b578b
Co-authored-by: Scott Bolinger <designbyscott@gmail.com>
@scottopolis
scottopolis merged commit a98f140 into main Sep 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants