mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Allow command execution timeout to be set via IPC task execution (#5825)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
parent
c417f43b18
commit
80fcd1ba74
3 changed files with 21 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@roo-code/types",
|
||||
"version": "1.32.0",
|
||||
"version": "1.34.0",
|
||||
"description": "TypeScript type definitions for Roo Code.",
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ export const globalSettingsSchema = z.object({
|
|||
alwaysAllowUpdateTodoList: z.boolean().optional(),
|
||||
allowedCommands: z.array(z.string()).optional(),
|
||||
deniedCommands: z.array(z.string()).optional(),
|
||||
commandExecutionTimeout: z.number().optional(),
|
||||
allowedMaxRequests: z.number().nullish(),
|
||||
autoCondenseContext: z.boolean().optional(),
|
||||
autoCondenseContextPercent: z.number().optional(),
|
||||
|
|
@ -200,6 +201,7 @@ export const EVALS_SETTINGS: RooCodeSettings = {
|
|||
alwaysAllowUpdateTodoList: true,
|
||||
followupAutoApproveTimeoutMs: 0,
|
||||
allowedCommands: ["*"],
|
||||
commandExecutionTimeout: 30_000,
|
||||
|
||||
browserToolEnabled: false,
|
||||
browserViewportSize: "900x600",
|
||||
|
|
|
|||
|
|
@ -125,6 +125,22 @@ export class API extends EventEmitter<RooCodeEvents> implements RooCodeAPI {
|
|||
.getConfiguration(Package.name)
|
||||
.update("allowedCommands", configuration.allowedCommands, vscode.ConfigurationTarget.Global)
|
||||
}
|
||||
|
||||
if (configuration.deniedCommands) {
|
||||
await vscode.workspace
|
||||
.getConfiguration(Package.name)
|
||||
.update("deniedCommands", configuration.deniedCommands, vscode.ConfigurationTarget.Global)
|
||||
}
|
||||
|
||||
if (configuration.commandExecutionTimeout !== undefined) {
|
||||
await vscode.workspace
|
||||
.getConfiguration(Package.name)
|
||||
.update(
|
||||
"commandExecutionTimeout",
|
||||
configuration.commandExecutionTimeout,
|
||||
vscode.ConfigurationTarget.Global,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
await provider.removeClineFromStack()
|
||||
|
|
@ -223,9 +239,11 @@ export class API extends EventEmitter<RooCodeEvents> implements RooCodeAPI {
|
|||
|
||||
cline.on("taskCompleted", async (_, tokenUsage, toolUsage) => {
|
||||
let isSubtask = false
|
||||
|
||||
if (cline.rootTask != undefined) {
|
||||
isSubtask = true
|
||||
}
|
||||
|
||||
this.emit(RooCodeEventName.TaskCompleted, cline.taskId, tokenUsage, toolUsage, { isSubtask: isSubtask })
|
||||
this.taskMap.delete(cline.taskId)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue