Skip to content

Commit 54fdc08

Browse files
committed
Commander: support a timeout_seconds
1 parent 8d4c9e2 commit 54fdc08

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.agents/commander.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ const commander: AgentDefinition = {
2424
type: 'string',
2525
description: 'Terminal command to run',
2626
},
27+
timeout_seconds: {
28+
type: 'number',
29+
description:
30+
'Set to -1 for no timeout. Default 30',
31+
},
2732
},
2833
required: ['command'],
2934
},
@@ -53,10 +58,15 @@ Run the command and then describe the relevant information from the output, foll
5358
return
5459
}
5560

61+
const timeout_seconds = params?.timeout_seconds as number | undefined
62+
5663
// Run the command
5764
yield {
5865
toolName: 'run_terminal_command',
59-
input: { command },
66+
input: {
67+
command,
68+
...(timeout_seconds !== undefined && { timeout_seconds }),
69+
},
6070
}
6171

6272
// Let the model analyze and describe the output

0 commit comments

Comments
 (0)