Skip to content

Commit 7780183

Browse files
authored
Merge pull request microsoft#258208 from microsoft/tyriar/258205
Fix NPE in terminal tool
2 parents ad38515 + d05bde8 commit 7780183

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)