mirror of
https://github.com/temetro/temetro.git
synced 2026-08-20 23:22:18 +00:00
frontend: Claude-style AI chat (tool cards, reasoning, queue, suggestions)
Wire the existing ai-elements into the chat:
- collapsible tool-call cards (name, params, result, status) for native tool
parts on the streamed path
- a reasoning block (shimmer while thinking, "Thought for Ns") when the model
emits reasoning; backend forwards it via toUIMessageStream({ sendReasoning })
- a message queue: typing + Enter while the assistant is responding queues the
message (shown above the input, removable) and auto-sends when it goes idle
- starter suggestion chips on the empty state, each tied to a tool
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -143,7 +143,9 @@ chatRouter.post("/", async (req, res, next) => {
|
||||
tools,
|
||||
stopWhen: stepCountIs(6),
|
||||
});
|
||||
writer.merge(result.toUIMessageStream());
|
||||
// Forward reasoning parts (when the model emits them) so the client
|
||||
// can render a Claude-style thinking block.
|
||||
writer.merge(result.toUIMessageStream({ sendReasoning: true }));
|
||||
}
|
||||
},
|
||||
onError: (error) =>
|
||||
|
||||
Reference in New Issue
Block a user