Compare commits

...

2 Commits

Author SHA1 Message Date
Thibault Sottiaux
8e1b657d97 w
Signed-off-by: Thibault Sottiaux <tibo@openai.com>
2025-04-22 15:25:54 -04:00
Thibault Sottiaux
f0b131ebcd w
Signed-off-by: Thibault Sottiaux <tibo@openai.com>
2025-04-22 15:22:10 -04:00
3 changed files with 5 additions and 13 deletions

View File

@@ -639,17 +639,13 @@ export class AgentLoop {
type: "object",
properties: {
command: { type: "array", items: { type: "string" } },
workdir: {
type: "string",
description: "The working directory for the command.",
},
timeout: {
type: "number",
description:
"The maximum time to wait for the command to complete in milliseconds.",
},
},
required: ["command", "workdir", "timeout"],
required: ["command", "timeout"],
additionalProperties: false,
},
},
@@ -975,17 +971,13 @@ export class AgentLoop {
type: "array",
items: { type: "string" },
},
workdir: {
type: "string",
description: "The working directory for the command.",
},
timeout: {
type: "number",
description:
"The maximum time to wait for the command to complete in milliseconds.",
},
},
required: ["command"],
required: ["command", "timeout"],
additionalProperties: false,
},
},

View File

@@ -219,7 +219,7 @@ async function execCommand(
try {
await access(workdir);
} catch (e) {
log(`EXEC workdir=${workdir} not found, use process.cwd() instead`);
log(`EXEC workdir=${workdir} not found, using process.cwd() instead`);
workdir = process.cwd();
}
}

View File

@@ -87,10 +87,10 @@ export function parseToolCallArguments(
}
// @ts-expect-error timeout and workdir may not exist on json.
const { timeout, workdir } = json;
const { timeout } = json;
return {
cmd: commandArray,
workdir: typeof workdir === "string" ? workdir : undefined,
workdir: undefined,
timeoutInMillis: typeof timeout === "number" ? timeout : undefined,
};
}