summaryrefslogtreecommitdiff
path: root/packages/server/src
diff options
context:
space:
mode:
authorOlcan <[email protected]>2025-04-30 12:27:56 -0700
committerGitHub <[email protected]>2025-04-30 12:27:56 -0700
commit68a3020044b3c8567641c8fdcd5a369366dab981 (patch)
tree969d72948bd0d46c96e81802184c26e45f1923b2 /packages/server/src
parent3aef883f4b834d0e3bf58f214324c384f0865b41 (diff)
simplify directory display in shell tool description (#230)
Diffstat (limited to 'packages/server/src')
-rw-r--r--packages/server/src/tools/shell.ts8
1 files changed, 2 insertions, 6 deletions
diff --git a/packages/server/src/tools/shell.ts b/packages/server/src/tools/shell.ts
index 72672473..1224dc8f 100644
--- a/packages/server/src/tools/shell.ts
+++ b/packages/server/src/tools/shell.ts
@@ -43,14 +43,10 @@ export class ShellTool extends BaseTool<ShellToolParams, ToolResult> {
getDescription(params: ShellToolParams): string {
let description = `${params.command}`;
- // append optional [./directory], prepending ./ if missing and relative
+ // append optional [in directory]
// note description is needed even if validation fails due to absolute path
if (params.directory) {
- let path = params.directory;
- if (!path.startsWith('./') && !path.startsWith('/') && path !== '.') {
- path = './' + path;
- }
- description += ` [${path}]`;
+ description += ` [in ${params.directory}]`;
}
// append optional (description), replacing any line breaks with spaces
// tool description/schema should specify a single line w/o line breaks