fix(webui): preserve range selection and turn timing
This commit is contained in:
1 parent
4de728a555
commit
e630e78075
9 files changed
+262
-16
No files matched your search
@@ -814,8 +814,11 @@ export function ThreadShell({
|
||||
const rememberedViewportTurnId = chatId
|
||||
? activeViewportTurnByChatIdRef.current.get(chatId) ?? null
|
||||
: null;
|
||||
const canonicalRunTurnId = chatId && messagesReady && turnActive
|
||||
? client.getRunTurnId(chatId)
|
||||
: null;
|
||||
const viewportTurnId = messagesReady && turnActive
|
||||
? rememberedViewportTurnId ?? restoredViewportTurnId
|
||||
? canonicalRunTurnId ?? rememberedViewportTurnId ?? restoredViewportTurnId
|
||||
: null;
|
||||
const activeTurnStartedHere =
|
||||
viewportTurnId !== null && viewportTurnId === submittedViewportTurnId;
|
||||
@@ -1313,7 +1316,12 @@ export function ThreadShell({
|
||||
(content: string, images?: SendAttachment[], options?: SendOptions) => {
|
||||
setFallbackModelName(null);
|
||||
const submitted = send(content, images, withWorkspaceScope(options));
|
||||
if (chatId && submitted && !submitted.sideChannel) {
|
||||
if (
|
||||
chatId
|
||||
&& submitted
|
||||
&& !submitted.sideChannel
|
||||
&& options?.continueActiveTurn !== true
|
||||
) {
|
||||
activeViewportTurnByChatIdRef.current.set(chatId, submitted.turnId);
|
||||
setSubmittedViewportTurnId(submitted.turnId);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user