From 383b9177848eeefb8c123a7a7ecc0ee391380eea Mon Sep 17 00:00:00 2001 From: Taylor Mullen Date: Fri, 18 Apr 2025 18:08:43 -0400 Subject: Run `npm run format` - This has the entirety of the changes. Part of https://b.corp.google.com/issues/411720532 --- packages/cli/src/tools/terminal.tool.ts | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'packages/cli/src/tools/terminal.tool.ts') diff --git a/packages/cli/src/tools/terminal.tool.ts b/packages/cli/src/tools/terminal.tool.ts index 1049a224..dacfb0be 100644 --- a/packages/cli/src/tools/terminal.tool.ts +++ b/packages/cli/src/tools/terminal.tool.ts @@ -115,10 +115,7 @@ interface QueuedCommand { /** * Implementation of the terminal tool that executes shell commands within a persistent session. */ -export class TerminalTool extends BaseTool< - TerminalToolParams, - ToolResult -> { +export class TerminalTool extends BaseTool { static Name: string = 'execute_bash_command'; private readonly rootDirectory: string; @@ -134,10 +131,7 @@ export class TerminalTool extends BaseTool< private rejectShellReady: ((reason?: unknown) => void) | undefined; // Definite assignment assertion private readonly backgroundTerminalAnalyzer: BackgroundTerminalAnalyzer; - constructor( - rootDirectory: string, - outputLimit: number = MAX_OUTPUT_LENGTH, - ) { + constructor(rootDirectory: string, outputLimit: number = MAX_OUTPUT_LENGTH) { const toolDisplayName = 'Terminal'; // --- LLM-Facing Description --- // Updated description for background tasks to mention polling and LLM analysis @@ -454,9 +448,7 @@ Use this tool for running build steps (\`npm install\`, \`make\`), linters (\`es // Define temp file paths here to be accessible throughout let tempStdoutPath: string | null = null; let tempStderrPath: string | null = null; - let originalResolve: ( - value: ToolResult | PromiseLike, - ) => void; // To pass to polling + let originalResolve: (value: ToolResult | PromiseLike) => void; // To pass to polling let originalReject: (reason?: unknown) => void; const promise = new Promise((resolve, reject) => { @@ -939,9 +931,7 @@ Use this tool for running build steps (\`npm install\`, \`make\`), linters (\`es initialStderr: string, // Stderr during launch phase tempStdoutPath: string, // Path to redirected stdout tempStderrPath: string, // Path to redirected stderr - resolve: ( - value: ToolResult | PromiseLike, - ) => void, // The original promise's resolve + resolve: (value: ToolResult | PromiseLike) => void, // The original promise's resolve ): Promise { // This function manages its own lifecycle but resolves the outer promise let finalStdout = ''; -- cgit v1.2.3