mirror of
https://github.com/Shubhamsaboo/awesome-llm-apps.git
synced 2026-08-28 11:07:19 +08:00
fix(generative-ui): make showcase + dashboard demos build
Resolve the install/build failures raised in PR review on the two flagged demos.
mcp-apps-generative-ui-showcase:
- Drop @copilotkit/core + @copilotkit/web-inspector (unpublished at the pinned
version, unused in source; core resolves transitively)
- Bump @copilotkit/{react-core,runtime,shared} 1.51.0-next.4 -> 1.59.2 so the
CopilotKit v2 API the demo uses actually exists
- Align @ag-ui/* (^0.0.53 / ^0.0.3) and hono (^4.12.23) with runtime 1.59.2
- Import v2 runtime symbols from @copilotkit/runtime/v2 (the main entry exports
a different v1 CopilotRuntime)
ai-dashboard-canvas-agent:
- Bump @ag-ui/client ^0.0.38 -> ^0.0.53 to match the installed runtime
- Coerce the UserMessage content union to text before rendering
- Regenerate the stale pnpm-lock.yaml
Both demos verified locally: install + next build pass; dashboard
pnpm install --frozen-lockfile is consistent.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
"postinstall": "npm run install:agent"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ag-ui/client": "^0.0.38",
|
||||
"@ag-ui/client": "^0.0.53",
|
||||
"@ai-sdk/openai": "^1.3.22",
|
||||
"@copilotkit/react-core": "^1.56.3",
|
||||
"@copilotkit/react-textarea": "^1.56.3",
|
||||
|
||||
+6201
-9826
File diff suppressed because it is too large
Load Diff
+19
-1
@@ -2,8 +2,26 @@
|
||||
import type { UserMessageProps } from "@copilotkit/react-ui";
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
|
||||
// In newer CopilotKit, message.content is a union (string | content parts),
|
||||
// not a plain string, so coerce it to text before rendering it as JSX.
|
||||
function toText(content: unknown): string {
|
||||
if (typeof content === "string") return content;
|
||||
if (Array.isArray(content)) {
|
||||
return content
|
||||
.map((part) =>
|
||||
typeof part === "string"
|
||||
? part
|
||||
: part && typeof part === "object" && "text" in part
|
||||
? String((part as { text?: unknown }).text ?? "")
|
||||
: "",
|
||||
)
|
||||
.join("");
|
||||
}
|
||||
return content == null ? "" : String(content);
|
||||
}
|
||||
|
||||
export function UserBubble({ message }: UserMessageProps) {
|
||||
const content = message?.content ?? "";
|
||||
const content = toText(message?.content);
|
||||
return (
|
||||
<div className="flex justify-end mb-4 mt-4">
|
||||
<Card className="max-w-[80%] bg-accent/10 text-card-foreground border border-accent/40 rounded-lg text-sm whitespace-pre-wrap p-0">
|
||||
|
||||
@@ -8,15 +8,13 @@
|
||||
"start": "next start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ag-ui/client": "^0.0.42",
|
||||
"@ag-ui/encoder": "^0.0.42",
|
||||
"@ag-ui/mcp-apps-middleware": "^0.0.1",
|
||||
"@copilotkit/core": "1.51.0-next.4",
|
||||
"@copilotkit/react-core": "1.51.0-next.4",
|
||||
"@copilotkit/runtime": "1.51.0-next.4",
|
||||
"@copilotkit/shared": "1.51.0-next.4",
|
||||
"@copilotkit/web-inspector": "1.51.0-next.4",
|
||||
"hono": "^4.11.3",
|
||||
"@ag-ui/client": "^0.0.53",
|
||||
"@ag-ui/encoder": "^0.0.53",
|
||||
"@ag-ui/mcp-apps-middleware": "^0.0.3",
|
||||
"@copilotkit/react-core": "1.59.2",
|
||||
"@copilotkit/runtime": "1.59.2",
|
||||
"@copilotkit/shared": "1.59.2",
|
||||
"hono": "^4.12.23",
|
||||
"next": "16.1.1",
|
||||
"react": "19.2.3",
|
||||
"react-dom": "19.2.3",
|
||||
|
||||
+3643
-7135
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -6,12 +6,12 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
BuiltInAgent,
|
||||
CopilotRuntime,
|
||||
createCopilotEndpoint,
|
||||
InMemoryAgentRunner,
|
||||
} from "@copilotkit/runtime";
|
||||
} from "@copilotkit/runtime/v2";
|
||||
import { handle } from "hono/vercel";
|
||||
import { BuiltInAgent } from "@copilotkit/runtime/v2";
|
||||
import { MCPAppsMiddleware } from "@ag-ui/mcp-apps-middleware";
|
||||
|
||||
// Determine which LLM model to use based on available API keys
|
||||
|
||||
Reference in New Issue
Block a user