Make thinking block collapse immediately when tool call starts
- End reasoning phase as soon as first tool-call event is detected - Set reasoningEndTime and stop reasoning streaming immediately - Creates linear flow: thinking expands → tool call (thinking collapses) → tool result → final response - More aggressive/responsive UX that doesn't wait for final response to collapse thinking
This commit is contained in:
parent
8159950ffd
commit
dffc1aa5fb
1 changed files with 31 additions and 3 deletions
|
|
@ -35,9 +35,15 @@ mcpServer.registerTool("get_vengabus_times",
|
|||
description: "This checks to see when the next Vengabus is, or whether there is one for the user's current location. Please display all the information to the user in a tabulated form.",
|
||||
inputSchema: { }
|
||||
},
|
||||
async () => ({
|
||||
content: [{ type: "text", text: `Next Vengabus: imminent. Current user's route: New York to San Francisco. Route name: "Intercity Disco".` }]
|
||||
})
|
||||
async () => {
|
||||
await scheduler.wait(100)
|
||||
return ({
|
||||
content: [{
|
||||
type: 'text',
|
||||
text: `Next Vengabus: imminent. Current user's route: New York to San Francisco. Route name: "Intercity Disco".`
|
||||
}]
|
||||
})
|
||||
}
|
||||
);
|
||||
|
||||
app.post('/mcp', async (c) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue