You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sharing media and context from merged PR #26141 for verification:
Terminal REPLs launched by the extension only set a title, so VS Code fell back to the default shell/profile icon. This threads an optional iconPath through the terminal creation pipeline and sets ThemeIcon('snake') for the REPL only.
Changes
common/terminal/types.ts: TerminalCreationOptions gains iconPath?: TerminalOptions['iconPath'], keeping the internal type aligned with the VS Code API.
common/terminal/service.ts: ensureTerminal forwards iconPath on both creation paths — ensureTerminalLegacy(...) (env extension, whose options extend TerminalOptions) and terminalManager.createTerminal(...).
terminals/codeExecution/terminalCodeExecution.ts: new protected terminalIcon?: TerminalOptions['iconPath'], passed to terminalServiceFactory.getTerminalService(...) alongside the title.
terminals/codeExecution/repl.ts: sets the icon, so plain Python terminals, Django shells, native REPL tabs, and user-typed python sessions are untouched.
terminalCodeExec.unit.test.ts: the title matcher now also asserts the expected icon id per suite — snake for ReplProvider, none for the Terminal and Django providers.
service.unit.test.ts: two tests assert iconPath reaches terminalManager.createTerminal(...) and, with useEnvExtension() stubbed on, ensureTerminalLegacy(...).
The env-extension test stubs ensureTerminalLegacy with a plain object rather than a TypeMoq mock: dynamic mocks answer any property access, so awaiting one hangs on the phantom then.
Activity
anthonykim1 commentedon Sep 15, 2023
I also think it will be a good idea, to distinguish the icon so it is more "Python" specific!
Show the snake icon on extension-created Python terminal REPLs (#26141)
vs-code-engineering commentedon Sep 8, 2026
Sharing media and context from merged PR #26141 for verification:
Terminal REPLs launched by the extension only set a title, so VS Code fell back to the default shell/profile icon. This threads an optional
iconPaththrough the terminal creation pipeline and setsThemeIcon('snake')for the REPL only.Changes
common/terminal/types.ts:TerminalCreationOptionsgainsiconPath?: TerminalOptions['iconPath'], keeping the internal type aligned with the VS Code API.common/terminal/service.ts:ensureTerminalforwardsiconPathon both creation paths —ensureTerminalLegacy(...)(env extension, whose options extendTerminalOptions) andterminalManager.createTerminal(...).terminals/codeExecution/terminalCodeExecution.ts: newprotected terminalIcon?: TerminalOptions['iconPath'], passed toterminalServiceFactory.getTerminalService(...)alongside the title.terminals/codeExecution/repl.ts: sets the icon, so plain Python terminals, Django shells, native REPL tabs, and user-typedpythonsessions are untouched.Tests
terminalCodeExec.unit.test.ts: the title matcher now also asserts the expected icon id per suite —snakeforReplProvider, none for the Terminal and Django providers.service.unit.test.ts: two tests asserticonPathreachesterminalManager.createTerminal(...)and, withuseEnvExtension()stubbed on,ensureTerminalLegacy(...).The env-extension test stubs
ensureTerminalLegacywith a plain object rather than a TypeMoq mock: dynamic mocks answer any property access, soawaiting one hangs on the phantomthen.Source PR: #26141