Replace custom widgetRenderer with CopilotKit Open Generative UI
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
Direzione di ricerca
Start with apps/app/src/app/api/copilotkit/route.ts and verify whether openGenerativeUI supports the current LangGraphHttpAgent runtime; compare this with the linked CopilotKit documentation. Then inspect use-generative-ui-examples.tsx, widget-renderer.tsx, idiomorph-inline.ts, export-overlay.tsx, and export-utils.ts, including the CopilotKit provider's sandboxFunctions. Done means generated calculator and binary-search UIs work, theme toggling remains functional, custom helpers are removed, and README/CLAUDE.md no longer reference widgetRenderer.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Background
We currently ship a hand-rolled open generative UI implementation:
WidgetRenderer— ~730-line component that renders agent-authored HTML/CSS/JS inside a sandboxed iframe, with our own theme CSS, idiomorph streaming, and export overlay.- Registered as a
useComponent({ name: "widgetRenderer", ... })inuse-generative-ui-examples.tsx.
CopilotKit now ships this as a first-class feature: Open Generative UI. It covers the same use case (live-streamed sandboxed HTML/CSS/JS, CDN libraries, two-way host bridges) without per-app widget code.
Goal
Delete the custom widget pipeline and use CopilotKit's built-in Open Generative UI instead.
Scope
- Enable
openGenerativeUI: truein the runtime (route.ts). - Remove the
widgetRendereruseComponentregistration and its supporting files (widget-renderer.tsx,idiomorph-inline.ts,export-overlay.tsx,export-utils.ts) once parity is confirmed. - Port any host-side hooks we relied on (e.g. theme toggling) to
sandboxFunctionson theCopilotKitprovider. - Keep the other declarative components (
pieChart,barChart,plan_visualization, HITLscheduleTime) as-is. - Update CLAUDE.md and any demo prompts/suggestions referencing "widgetRenderer".
Open question
The current runtime is v1 CopilotRuntime + LangGraphHttpAgent pointing at the Python LangGraph agent. The docs example for openGenerativeUI: true uses the v2 runtime with BuiltInAgent + InMemoryAgentRunner. We need to verify whether the flag is supported alongside LangGraphHttpAgent, or whether this upgrade also requires migrating the runtime wiring (and what that means for the Python agent in apps/agent/).
Acceptance criteria
- "Build me a calculator" / "Visualize binary search" prompts produce a streamed, sandboxed UI in chat with no custom widget code in this repo.
- Theme toggle still works from generated UI (via
sandboxFunctions). - Custom
widget-renderer.tsxand helpers are deleted. - README/CLAUDE.md reflect the new approach.
Docs: https://docs.copilotkit.ai/generative-ui/open-generative-ui
- Lingua principale
- TypeScript
- Stelle
- 1.6k
- Fork
- 202
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di CopilotKit/OpenGenerativeUI
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
CopilotKit/OpenGenerativeUI#87 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 42/100
Tutte le issue di CopilotKit/OpenGenerativeUI
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
ontola/atomic-server#1625 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
melgarafael/DeskcommCRM#1451 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
-
bug via-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bot:ai-assisted component:compact-js status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
midnightntwrk/midnight-sdk#403 ·