mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
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:
@@ -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();
|
||||
|
||||
@@ -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"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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() })
|
||||
|
||||
Reference in New Issue
Block a user