diff options
Diffstat (limited to 'packages/server/src/tools/shell.ts')
| -rw-r--r-- | packages/server/src/tools/shell.ts | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/server/src/tools/shell.ts b/packages/server/src/tools/shell.ts index e80c0c02..8066044f 100644 --- a/packages/server/src/tools/shell.ts +++ b/packages/server/src/tools/shell.ts @@ -43,13 +43,15 @@ export class ShellTool extends BaseTool<ShellToolParams, ToolResult> { getDescription(params: ShellToolParams): string { let description = `${params.command}`; + // append optional [./directory] + if (params.directory) { + description += ` [./${params.directory}]`; + } + // append optional (description), replacing any line breaks with spaces + // tool description/schema should specify a single line w/o line breaks if (params.description) { - // replace any line breaks with spaces, in case instructions are not followed description += ` (${params.description.replace(/\n/g, ' ')})`; } - if (params.directory) { - description += ` @ ${params.directory}`; - } return description; } @@ -193,6 +195,7 @@ export class ShellTool extends BaseTool<ShellToolParams, ToolResult> { return { llmContent: [ `Command: ${params.command}`, + `Directory: ${params.directory || '(root)'}`, `Stdout: ${stdout || '(empty)'}`, `Stderr: ${stderr || '(empty)'}`, `Error: ${error ?? '(none)'}`, |
