Signed-off-by: Thibault Sottiaux <tibo@openai.com>
This commit is contained in:
Thibault Sottiaux
2025-04-22 15:22:10 -04:00
parent f99c9080fd
commit f0b131ebcd
3 changed files with 4 additions and 12 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

@@ -90,7 +90,7 @@ export function parseToolCallArguments(
const { timeout, workdir } = json;
return {
cmd: commandArray,
workdir: typeof workdir === "string" ? workdir : undefined,
workdir: undefined,
timeoutInMillis: typeof timeout === "number" ? timeout : undefined,
};
}