File tree Expand file tree Collapse file tree
showcase/integrations/google-adk/src/app/demos Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change 1+ "use client" ;
2+
3+ // Reasoning — Default
4+ //
5+ // Pairs with `reasoning-custom` (the Custom variant) so users can
6+ // compare default vs custom reasoning rendering side by side. This cell
7+ // renders <CopilotChat> with NO slot override — reasoning messages are
8+ // rendered by the built-in `CopilotChatReasoningMessage` component
9+ // (Thinking… / Thought for X header with an expandable content region).
10+ //
11+ // Both demos share the same backend (`reasoning_agent` graph) and the
12+ // same runtime URL (/api/copilotkit). The only difference is whether the
13+ // `messageView.reasoningMessage` slot is overridden.
14+
15+ import { CopilotKit , CopilotChat } from "@copilotkit/react-core/v2" ;
16+ import { useReasoningDefaultSuggestions } from "./suggestions" ;
17+
18+ const AGENT_ID = "reasoning-default" ;
19+
20+ export default function ReasoningDefaultDemo ( ) {
21+ return (
22+ < CopilotKit runtimeUrl = "/api/copilotkit" agent = { AGENT_ID } >
23+ < div className = "flex justify-center items-center h-screen w-full" >
24+ < div className = "h-full w-full max-w-4xl" >
25+ < Chat />
26+ </ div >
27+ </ div >
28+ </ CopilotKit >
29+ ) ;
30+ }
31+
32+ function Chat ( ) {
33+ useReasoningDefaultSuggestions ( ) ;
34+ return < CopilotChat agentId = { AGENT_ID } className = "h-full rounded-2xl" /> ;
35+ }
Original file line number Diff line number Diff line change 1+ "use client" ;
2+
3+ import { useConfigureSuggestions } from "@copilotkit/react-core/v2" ;
4+
5+ // Suggestions registered via the v2 chat composer hook. The prompt is a
6+ // concrete reasoning-eliciting question — gpt-5-mini (and other OpenAI
7+ // reasoning models) only emit `response.reasoning_summary_text.delta`
8+ // events when there's a real problem to think about. Meta-prompts like
9+ // "show your reasoning" produce no reasoning summary, so the reasoning
10+ // slot would never light up.
11+ export function useReasoningDefaultSuggestions ( ) {
12+ useConfigureSuggestions ( {
13+ suggestions : [
14+ {
15+ title : "Show reasoning" ,
16+ message :
17+ "Explain step by step why the sky appears blue during the day but red at sunset." ,
18+ } ,
19+ ] ,
20+ available : "always" ,
21+ } ) ;
22+ }
You can’t perform that action at this time.
0 commit comments