GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Feature: add queued and steered messages · henrik092/t3code@5447dbf

This repository was archived by the owner on Nov 2, 2026. It is now read-only.

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps
    • server/src/provider/Layers
      • CodexProvider.ts
      • CodexSessionRuntime.test.ts
      • CodexSessionRuntime.ts
    • web/src
      • components
        • ChatView.tsx
        • chat
          • ChatComposer.tsx
          • ComposerPrimaryActions.tsx
      • messageQueueStore.test.ts
      • messageQueueStore.ts
  • scripts
    • dev-runner.ts
  • vite.config.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/server/src/provider/Layers/CodexProvider.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/provider/Layers/CodexProvider.ts
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ const LOCAL_CODEX_MODELS: ReadonlyArray<ServerProviderModel> = [
7676
label: "Reasoning",
7777
type: "select",
7878
options: [
79-
{ id: "low", label: REASONING_EFFORT_LABELS.low },
80-
{ id: "medium", label: REASONING_EFFORT_LABELS.medium, isDefault: true },
81-
{ id: "high", label: REASONING_EFFORT_LABELS.high },
82-
{ id: "xhigh", label: REASONING_EFFORT_LABELS.xhigh },
79+
{ id: "low", label: reasoningEffortLabel("low") },
80+
{ id: "medium", label: reasoningEffortLabel("medium"), isDefault: true },
81+
{ id: "high", label: reasoningEffortLabel("high") },
82+
{ id: "xhigh", label: reasoningEffortLabel("xhigh") },
8383
],
8484
currentValue: "medium",
8585
},
Collapse file

‎apps/server/src/provider/Layers/CodexSessionRuntime.test.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/provider/Layers/CodexSessionRuntime.test.ts
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
CODEX_PLAN_MODE_DEVELOPER_INSTRUCTIONS,
1414
} from "../CodexDeveloperInstructions.ts";
1515
import {
16+
buildTurnSteerInput,
1617
buildTurnStartParams,
1718
hasConfiguredMcpServer,
1819
isRecoverableThreadResumeError,
@@ -194,6 +195,24 @@ describe("buildTurnStartParams", () => {
194195
});
195196
});
196197

198+
describe("buildTurnSteerInput", () => {
199+
it("maps text and image input without turn-start-only settings", () => {
200+
NodeAssert.deepStrictEqual(
201+
buildTurnSteerInput({
202+
input: "Adjust the current task",
203+
attachments: [{ type: "image", url: "data:image/png;base64,abc" }],
204+
model: "gpt-5.4",
205+
effort: "high",
206+
interactionMode: "default",
207+
}),
208+
[
209+
{ type: "text", text: "Adjust the current task" },
210+
{ type: "image", url: "data:image/png;base64,abc" },
211+
],
212+
);
213+
});
214+
});
215+
197216
describe("T3 browser developer instructions", () => {
198217
it("prefers the product-native preview tools in both collaboration modes", () => {
199218
for (const instructions of [
Collapse file

‎apps/server/src/provider/Layers/CodexSessionRuntime.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/provider/Layers/CodexSessionRuntime.ts
+35-3Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,22 @@ export function buildTurnStartParams(input: {
398398
);
399399
}
400400

401+
export function buildTurnSteerInput(
402+
input: CodexSessionRuntimeSendTurnInput,
403+
): ReadonlyArray<EffectCodexSchema.V2TurnSteerParams__UserInput> {
404+
const turnInput: Array<EffectCodexSchema.V2TurnSteerParams__UserInput> = [];
405+
if (input.input) {
406+
turnInput.push({
407+
type: "text",
408+
text: input.input,
409+
});
410+
}
411+
for (const attachment of input.attachments ?? []) {
412+
turnInput.push(attachment);
413+
}
414+
return turnInput;
415+
}
416+
401417
function classifyCodexStderrLine(rawLine: string): { readonly message: string } | null {
402418
const line = rawLine.replaceAll(ANSI_ESCAPE_REGEX, "").trim();
403419
if (!line) {
@@ -1265,6 +1281,7 @@ export const makeCodexSessionRuntime = (
12651281
sendTurn: (input) =>
12661282
Effect.gen(function* () {
12671283
const providerThreadId = yield* readProviderThreadId;
1284+
const currentSession = yield* Ref.get(sessionRef);
12681285
if (hasConfiguredMcpServer(options.appServerArgs)) {
12691286
yield* client.request("config/mcpServer/reload", undefined).pipe(
12701287
Effect.catch((cause) =>
@@ -1274,9 +1291,24 @@ export const makeCodexSessionRuntime = (
12741291
),
12751292
);
12761293
}
1277-
const normalizedModel = normalizeCodexModelSlug(
1278-
input.model ?? (yield* Ref.get(sessionRef)).model,
1279-
);
1294+
if (currentSession.status === "running" && currentSession.activeTurnId) {
1295+
const response = yield* client.request("turn/steer", {
1296+
threadId: providerThreadId,
1297+
expectedTurnId: currentSession.activeTurnId,
1298+
input: buildTurnSteerInput(input),
1299+
});
1300+
const turnId = TurnId.make(response.turnId);
1301+
yield* updateSession(sessionRef, {
1302+
status: "running",
1303+
activeTurnId: turnId,
1304+
});
1305+
return {
1306+
threadId: options.threadId,
1307+
turnId,
1308+
resumeCursor: { threadId: providerThreadId },
1309+
} satisfies ProviderTurnStartResult;
1310+
}
1311+
const normalizedModel = normalizeCodexModelSlug(input.model ?? currentSession.model);
12801312
const params = yield* buildTurnStartParams({
12811313
threadId: providerThreadId,
12821314
runtimeMode: options.runtimeMode,

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.