mirror of
https://github.com/openai/codex.git
synced 2026-04-24 06:35:50 +00:00
@@ -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,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user