fix(omp): accept thinkingLevel "max" when importing OMP sessions (#2191)

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
This commit is contained in:
Matt Van Horn
2026-07-18 06:44:34 -07:00
committed by GitHub
parent b4518cbf33
commit fcaa84f0e4
3 changed files with 20 additions and 3 deletions

View File

@@ -67,6 +67,13 @@ describe("OMP agent client and session", () => {
});
});
test("preserves max as the selected thinking option", async () => {
const omp = new OmpHarness();
await omp.start({ thinkingOptionId: "max" });
expect(omp.launchConfiguration().argv).toEqual(expect.arrayContaining(["--thinking", "max"]));
});
test("streams a prompt through completion", async () => {
const omp = new OmpHarness();
await omp.start();

View File

@@ -136,7 +136,8 @@ const OMP_THINKING_OPTIONS: ReadonlyArray<{
{ id: "low", label: "Low", description: "Faster reasoning" },
{ id: "medium", label: "Medium", description: "Balanced reasoning", isDefault: true },
{ id: "high", label: "High", description: "Deeper reasoning" },
{ id: "xhigh", label: "XHigh", description: "Maximum reasoning" },
{ id: "xhigh", label: "XHigh", description: "Extra-high reasoning" },
{ id: "max", label: "Max", description: "Maximum reasoning" },
] as const;
export interface OmpAgentClientOptions {
@@ -269,7 +270,8 @@ function isOmpThinkingLevel(value: string | null | undefined): value is OmpThink
value === "low" ||
value === "medium" ||
value === "high" ||
value === "xhigh"
value === "xhigh" ||
value === "max"
);
}

View File

@@ -1,6 +1,14 @@
import { z } from "zod";
export const OmpThinkingLevelSchema = z.enum(["off", "minimal", "low", "medium", "high", "xhigh"]);
export const OmpThinkingLevelSchema = z.enum([
"off",
"minimal",
"low",
"medium",
"high",
"xhigh",
"max",
]);
export const OmpImageContentSchema = z
.object({ type: z.literal("image"), data: z.string(), mimeType: z.string() })