mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
9e54ba6706
Production-fix bundle for beautiful-chat + 3 other google-adk demos. All issues either reported on Railway prod or unmasked by the catch-all render_a2ui fallback I added in #4836. Local D5 stays 38/38 green. - Missing copilotkit logo: `<img src="/copilotkit-logo-mark.svg">` returned 404 because the SVG never shipped in the integration's public/. Copy copilotkit-logo-mark.svg + copilotkit-logo.svg over from langgraph-python. - Multimodal sample.png / sample.pdf were LFS pointers in prod (Railway build runs without `git lfs pull`), so the magic-byte check rejected them on first click. Add an integration-scoped .gitattributes that exempts these two paths from LFS (mirrors what every working sibling integration already does) and re-stage the files as real binaries (10KB / 2.5KB). - Sales Dashboard pill returned a generic "Step 1... Step 2..." narration instead of rendering the A2UI surface. Root cause: the render_a2ui catch-all fallback I added to aimock/d5-all.json in #4836 fired before feature-parity.json's specific sales-dashboard fixture (load order d5-all → smoke → feature-parity). Removing the catch-all from both d5-all.json and the per-demo source so the specific fixture wins. - Calculator App pill returned text only with a white iframe because beautiful-chat's agent instruction never mentioned generateSandboxedUi — Gemini saw the tool listed via AGUIToolset but had no nudge to use it. Added a one-line "Interactive / sandboxed widgets" entry to the instruction; verified Gemini now emits the tool call. - hitl-in-app refund (#12345) and escalate (#12347) pills broke on the second click because the 2nd-turn fixtures keyed on `sequenceIndex` 0/1 (a global thread-position counter that drifts when other pills land tool messages in the same thread). Convert both to `toolCallId + hasToolResult: true` and drop the reject branch — Gemini reasons correctly from the tool's `approved: false` return without a fixture override. Same pattern that fixed tool-rendering-reasoning-chain previously. - hitl-in-app downgrade (#12346) pill produced an unrelated "Research / Outline / Draft / Review / Finalize" plan because the prompt contains the substring "plan" and feature-parity.json has a generic catch-all match on `userMessage: "plan"`. Add a specific downgrade fixture in d5-all.json (loaded before feature-parity.json) with hasToolResult: false / true branches. - hitl-in-chat "Schedule a 1:1 with Alice" returned the wrong "Nice to meet you, Alice in Tokyo" response when clicked AFTER another pill in the same thread. The 2nd-turn fixture only matched on `toolCallId` (no hasToolResult), so the bare "alice" / "Alice" greeting fixtures further down won. Add `hasToolResult: true` to the 2nd-turn fixture so it scopes correctly regardless of thread state. - Voice manual recordings always returned "What is the weather in Tokyo?" regardless of audio content. aimock had a catch-all transcription fixture (`match: { endpoint: "transcription" }`) that returned the canned Tokyo string for any audio input. The D5 voice probe uses the sample audio button which bypasses /transcribe entirely (it injects text directly into the composer), so removing the transcription fixture drops aimock into --proxy-only fall-through to real OpenAI Whisper for mic recordings while D5 stays green. Verified. - readonly-state-agent-context and shared-state-read-write fixtures returned hardcoded "Atai" / generic preferences responses even when the user changed the state values in the UI inputs. Gate the Who-am-I / Suggest-next-steps / Greet / Plan-a-weekend fixtures on systemMessage substring matching the canonical default state values ("Atai" name for readonly-state-context; "tone: casual" for shared-state-read-write). When the user changes state, the agent's before-model callback rebuilds the system prompt with the new values, the fixture's systemMessage substring no longer matches, and aimock --proxy-only falls through to the real model so the response reflects the actual state. Confirmed with paired curl tests (default state = fixture match; alem name = real-LLM response). Local verification: bin/showcase test google-adk --d5 finishes 38/38 green (137s). Calculator pill confirmed via direct ADK invocation against real Gemini (GOOGLE_GEMINI_BASE_URL=) emits TOOL_CALL_START toolCallName=generateSandboxedUi. Sales-dashboard pill confirmed end-to-end returning the full Column / DashboardCards / PieChart / BarChart payload. readonly-state-context confirmed with name=Atai matching fixture vs name=alem falling through to real-LLM response that uses the actual context.