summaryrefslogtreecommitdiff
path: root/packages/server/src/tools/terminal.ts
diff options
context:
space:
mode:
authorJacob Richman <[email protected]>2025-05-02 09:31:18 -0700
committerGitHub <[email protected]>2025-05-02 09:31:18 -0700
commit539ab947a49b0351759df5192ed44f17d217b2f1 (patch)
treeeb45ee25f24077745456215cb7e9578d79983404 /packages/server/src/tools/terminal.ts
parenta7679db6e99f971306bc4b27c603e93bc67ac254 (diff)
Use parameter properties where possible. (#242)
Diffstat (limited to 'packages/server/src/tools/terminal.ts')
-rw-r--r--packages/server/src/tools/terminal.ts10
1 files changed, 3 insertions, 7 deletions
diff --git a/packages/server/src/tools/terminal.ts b/packages/server/src/tools/terminal.ts
index 514ad682..7320cfb2 100644
--- a/packages/server/src/tools/terminal.ts
+++ b/packages/server/src/tools/terminal.ts
@@ -46,8 +46,6 @@ interface QueuedCommand {
export class TerminalTool extends BaseTool<TerminalToolParams, ToolResult> {
static Name: string = 'execute_bash_command';
- private readonly rootDirectory: string;
- private readonly outputLimit: number;
private bashProcess: ChildProcessWithoutNullStreams | null = null;
private currentCwd: string;
private isExecuting: boolean = false;
@@ -58,12 +56,11 @@ export class TerminalTool extends BaseTool<TerminalToolParams, ToolResult> {
private resolveShellReady: (() => void) | undefined;
private rejectShellReady: ((reason?: unknown) => void) | undefined;
private readonly backgroundTerminalAnalyzer: BackgroundTerminalAnalyzer;
- private readonly config: Config;
constructor(
- rootDirectory: string,
- config: Config,
- outputLimit: number = MAX_OUTPUT_LENGTH,
+ private readonly rootDirectory: string,
+ private readonly config: Config,
+ private readonly outputLimit: number = MAX_OUTPUT_LENGTH,
) {
const toolDisplayName = 'Terminal';
const toolDescription = `Executes one or more bash commands sequentially in a secure and persistent interactive shell session. Can run commands in the foreground (waiting for completion) or background (returning after launch, with subsequent status polling).
@@ -131,7 +128,6 @@ Use this tool for running build steps (\`npm install\`, \`make\`), linters (\`es
toolDescription,
toolParameterSchema,
);
- this.config = config;
this.rootDirectory = path.resolve(rootDirectory);
this.currentCwd = this.rootDirectory;
this.outputLimit = outputLimit;