Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): pending user-input Submit bypasses normal-send guards #9319

ClosedImBIOS(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/9319/headopened View on GitHub

Showing 10 changed files with 79 additions and 6 deletions (loading 7).

x
0 of 10 viewed, 10 left
6 additions and 3 deletionsapps/server/src/provider/Layers/OpenCodeAdapter.tsModified
View file
@@ -25,6 +25,7 @@
import * as Stream from "effect/Stream";
import type { OpencodeClient, Part, PermissionRequest, QuestionRequest } from "@opencode-ai/sdk/v2";
import { getModelSelectionStringOptionValue } from "@t3tools/shared/model";
+import { sanitizeTerminalValue } from "@t3tools/shared/stripTerminalEscapes";
​
import { resolveAttachmentPath } from "../../attachmentStore.ts";
import { ServerConfig } from "../../config.ts";
@@ -1472,12 +1473,14 @@
- const agent = getModelSelectionStringOptionValue(modelSelection, "agent");
- const variant = getModelSelectionStringOptionValue(modelSelection, "variant");
+ const rawAgent = getModelSelectionStringOptionValue(modelSelection, "agent");
+ const rawVariant = getModelSelectionStringOptionValue(modelSelection, "variant");
+ const agent = rawAgent ? sanitizeTerminalValue(rawAgent) : undefined;
+ const variant = rawVariant ? sanitizeTerminalValue(rawVariant) : undefined;
context.activeTurnId = turnId;
context.activeAgent = agent ?? (input.interactionMode === "plan" ? "plan" : undefined);
- context.activeVariant = variant;
+ context.activeVariant = variant || undefined;
yield* updateProviderSession(
context,
11 additions and 3 deletionsapps/server/src/provider/Layers/OpenCodeProvider.tsModified
View file