Skip to content

Commit d05bde8

Browse files
committed
Fix NPE in terminal tool
Fixes microsoft#258205
1 parent ad38515 commit d05bde8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalTool.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,9 @@ export class RunInTerminalTool extends Disposable implements IToolImpl {
292292
const store = new DisposableStore();
293293

294294
this._logService.debug(`RunInTerminalTool: Creating ${args.isBackground ? 'background' : 'foreground'} terminal. termId=${termId}, chatSessionId=${chatSessionId}`);
295-
const toolTerminal = await (args.isBackground ? this._initBackgroundTerminal : this._initForegroundTerminal)(chatSessionId, termId, token);
295+
const toolTerminal = await (args.isBackground
296+
? this._initBackgroundTerminal(chatSessionId, termId, token)
297+
: this._initForegroundTerminal(chatSessionId, termId, token));
296298

297299
this._terminalService.setActiveInstance(toolTerminal.instance);
298300
const timingConnectMs = Date.now() - timingStart;

0 commit comments

Comments
 (0)