Replace custom widgetRenderer with CopilotKit Open Generative UI
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 1.6k
- Fork
- 202
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CopilotKit/OpenGenerativeUI
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
CopilotKit/OpenGenerativeUI#87 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Deploy deep agents to LangSmith Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
Tất cả issue của CopilotKit/OpenGenerativeUI
Issue tương tự
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Crush Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
ElementsProject/cln-application#167 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Quantco/pnpm-licenses#17 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100