Skip to content

Commit 41d5406

Browse files
committed
fix: call tool on callback
1 parent f37cf72 commit 41d5406

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

src/components/Chat/ChatInterface.stories.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ export const WithComponents: Story = {
281281
render: (args) => <ChatInterfaceWrapper
282282
{...args}
283283
messages={[...mockMessages,
284+
284285
{
285286
"parts": [
286287
{
@@ -359,10 +360,26 @@ export const WithComponents: Story = {
359360
}
360361
}
361362
]
363+
},
364+
{
365+
"parts": [
366+
{
367+
"type": "text",
368+
"text": "what is my github id ?"
369+
}
370+
],
371+
"id": "7bKMFeQ6Q2QGQYWH",
372+
"role": "user"
373+
},
374+
{
375+
"id": "b41b6445-e9ed-4a57-99bc-9161e8a7947c",
376+
"role": "assistant",
377+
"parts": []
362378
}
363379

364380

365381

382+
366383
]}
367384
/>,
368385
name: 'With Components',

src/components/Chat/CopilotInterface.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export function CopilotInterface({
117117
// Call the AI SDK's addToolResult with the correct argument shape
118118
// Ignore the returned promise for compatibility
119119
void chatHook.addToolResult({ tool, toolCallId, output })
120+
void chatHook.sendMessage()
120121
}
121122
: () => {}
122123
// Safe initialization of business units with fallback

0 commit comments

Comments
 (0)