Show a reply's steps, and catch up on a reply whose live push was missed

A reply that works through tools now shows its latest tool step under
"is thinking…" (not its closing note, which is the answer). While a reply
is due, the open conversation checks the session's latest messages every
few seconds (api/admin/bots/session-messages) and replays any it missed
as server:bot-message, so the thread, rail and unread all take it and the
thinking row can't stay up until a reload. MCP and custom tool steps read
in words ("Using Exa search (web search exa)").

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-19 16:28:53 +01:00
co-authored by Claude Opus 5.5
parent 425ae723cf
commit 61098a114c
11 changed files with 238 additions and 11 deletions
@@ -8,6 +8,8 @@ import useServerEvent from "@/src/hooks/use-server-event";
import { BotComputersContext } from "../(data)/bot-computers-context";
import useBotComputers from "../(hooks)/use-bot-computers";
import useTaskProgress from "../(hooks)/use-task-progress";
import useReplyProgress from "../(hooks)/use-reply-progress";
import useReplyCatchUp from "../(hooks)/use-reply-catch-up";
import ConversationHeader from "../(partials)/conversation-header";
import MessageThread from "../(partials)/message-thread";
import Composer from "../(partials)/composer";
@@ -51,6 +53,20 @@ export default function Conversation() {
task: pageProps?.bot_task || null,
});
const reply_progress = useReplyProgress({
bot_id: bot?.id || 0,
session_id,
last_message_id: messages[messages.length - 1]?.id || null,
});
const awaiting_reply = messages[messages.length - 1]?.author == "user";
useReplyCatchUp({
session_id,
awaiting_reply,
last_message_id: messages[messages.length - 1]?.id || null,
});
/**
* A message that starts a newer session (sent here or in another tab)
* moves the thread onto it.
@@ -107,6 +123,7 @@ export default function Conversation() {
bot={live_bot}
messages={messages}
progress={progress.text}
reply_progress={reply_progress}
has_task={Boolean(progress.task_id)}
/>
<Composer