fix(webui): preserve range selection and turn timing

This commit is contained in:
Xubin Ren
2026-08-15 15:40:52 +08:00
parent 4de728a555
commit e630e78075
9 changed files with 262 additions and 16 deletions
+5
View File
@@ -308,6 +308,11 @@ export class NanobotClient {
return v === undefined ? null : v;
}
/** Canonical lifecycle turn currently owning the run for *chatId*, if known. */
getRunTurnId(chatId: string): string | null {
return this.latestRunTurnIdByChatId.get(chatId) ?? null;
}
/** Clear the optimistic run state immediately after the user stops a turn. */
finishRunLocally(chatId: string): void {
const unsettled = [...(this.unsettledRunTurnIdsByChatId.get(chatId) ?? [])];