Skip to content

Python REPL should use a snake icon #21996

Description

@Tyriar

Currently the REPL uses whatever icon is associated with the default profile, so below it's showing as the pwsh icon:

Image

Because of this, at a glance it looks like a powershell repl. It would be nice to make this more clear.

Activity

  1. anthonykim1 commented on Sep 15, 2023

    @anthonykim1

    I also think it will be a good idea, to distinguish the icon so it is more "Python" specific!

  2. added a commit that references this issue on Sep 8, 2026
    9edd2b3
  3. vs-code-engineering commented on Sep 8, 2026

    @vs-code-engineering

    Sharing media and context from merged PR #26141 for verification:

    image

    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.
    // repl.ts
    this.terminalTitle = 'REPL';
    this.terminalIcon = new ThemeIcon('snake');

    Tests

    • 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.

    Source PR: #26141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions