mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
96c2438fab
Add a dedicated Spring/Java ReasoningController (/reasoning/) that reimplements the ag2 reasoning_agent.py BEHAVIOR: it makes a direct streaming chat-completions call, reads the native delta.reasoning_content channel (with a <reasoning>...</reasoning> regex fallback), and emits RUN_STARTED -> REASONING_MESSAGE_START/CONTENT/END -> TEXT_MESSAGE_* -> RUN_FINISHED so the CopilotKit reasoning slot mounts [data-testid="reasoning-block"]. Spring AI's ChatClient drops delta.reasoning_content and the AG-UI Java SDK has no REASONING_MESSAGE_* event types (only THINKING_*, which @ag-ui/client drops), so the controller manages its own SseEmitter and writes the reasoning frames as raw JSON matching the @ag-ui/client 0.0.55 wire schema. Header forwarding (x-aimock-context) rides the existing WebClientConfig exchange filter. Wire route reasoning-custom/-default (plus legacy aliases) to /reasoning/, mirroring ag2's reasoningAgentNames, and bump @ag-ui/client ^0.0.43 -> 0.0.55 for REASONING_MESSAGE_* decode support. (cherry picked from commit 4d183371c489013f0a7bcce1a447078164974aef)
63 lines
1.6 KiB
JSON
63 lines
1.6 KiB
JSON
{
|
|
"name": "@copilotkit/showcase-spring-ai",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev --turbopack",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "next lint",
|
|
"typecheck": "tsc --noEmit",
|
|
"test:e2e": "playwright test"
|
|
},
|
|
"dependencies": {
|
|
"@ag-ui/client": "0.0.55",
|
|
"@copilotkit/a2ui-renderer": "1.59.4",
|
|
"@copilotkit/react-core": "1.59.4",
|
|
"@copilotkit/runtime": "1.59.4",
|
|
"@copilotkit/shared": "1.59.4",
|
|
"@copilotkit/voice": "1.59.4",
|
|
"@hashbrownai/core": "0.5.0-beta.4",
|
|
"@hashbrownai/react": "0.5.0-beta.4",
|
|
"@json-render/core": "0.18.0",
|
|
"@json-render/react": "0.18.0",
|
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
"@radix-ui/react-separator": "^1.1.8",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"cmdk": "^0.2.1",
|
|
"embla-carousel-react": "^8.6.0",
|
|
"lucide-react": "^1.14.0",
|
|
"next": "^15.5.15",
|
|
"openai": "^5.9.0",
|
|
"radix-ui": "^1.4.3",
|
|
"react": "^19.0.0",
|
|
"react-dom": "^19.0.0",
|
|
"react-markdown": "^10.1.0",
|
|
"recharts": "^2.15.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"tailwind-merge": "^3.5.0",
|
|
"yaml": "^2.8.4",
|
|
"zod": "^3.24.0"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.59.1",
|
|
"@tailwindcss/postcss": "^4.0.0",
|
|
"@types/node": "^22.0.0",
|
|
"@types/react": "^19.0.0",
|
|
"postcss": "^8.5.0",
|
|
"tailwindcss": "^4.0.0",
|
|
"typescript": "^5.7.0"
|
|
},
|
|
"overrides": {
|
|
"@copilotkit/web-inspector": {
|
|
"@copilotkit/core": "1.59.4"
|
|
}
|
|
},
|
|
"pnpm": {
|
|
"overrides": {
|
|
"@copilotkit/web-inspector>@copilotkit/core": "1.59.4"
|
|
}
|
|
}
|
|
}
|