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:
co-authored by
Matt Van Horn
parent
b4518cbf33
commit
fcaa84f0e4
@@ -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 () => {
|
test("streams a prompt through completion", async () => {
|
||||||
const omp = new OmpHarness();
|
const omp = new OmpHarness();
|
||||||
await omp.start();
|
await omp.start();
|
||||||
|
|||||||
@@ -136,7 +136,8 @@ const OMP_THINKING_OPTIONS: ReadonlyArray<{
|
|||||||
{ id: "low", label: "Low", description: "Faster reasoning" },
|
{ id: "low", label: "Low", description: "Faster reasoning" },
|
||||||
{ id: "medium", label: "Medium", description: "Balanced reasoning", isDefault: true },
|
{ id: "medium", label: "Medium", description: "Balanced reasoning", isDefault: true },
|
||||||
{ id: "high", label: "High", description: "Deeper reasoning" },
|
{ 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;
|
] as const;
|
||||||
|
|
||||||
export interface OmpAgentClientOptions {
|
export interface OmpAgentClientOptions {
|
||||||
@@ -269,7 +270,8 @@ function isOmpThinkingLevel(value: string | null | undefined): value is OmpThink
|
|||||||
value === "low" ||
|
value === "low" ||
|
||||||
value === "medium" ||
|
value === "medium" ||
|
||||||
value === "high" ||
|
value === "high" ||
|
||||||
value === "xhigh"
|
value === "xhigh" ||
|
||||||
|
value === "max"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
import { z } from "zod";
|
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
|
export const OmpImageContentSchema = z
|
||||||
.object({ type: z.literal("image"), data: z.string(), mimeType: z.string() })
|
.object({ type: z.literal("image"), data: z.string(), mimeType: z.string() })
|
||||||
|
|||||||
Reference in New Issue
Block a user