Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Keep Django shell terminals on their existing icon
Co-authored-by: edvilme <5952839+edvilme@users.noreply.github.com>
  • Loading branch information
Copilot and edvilme authored Sep 4, 2026
commit c90ba1e90fe1aef7404a3bee6d20f6f90cbdf3f8
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export class DjangoShellCodeExecutionProvider extends TerminalCodeExecutionProvi
applicationShell,
);
this.terminalTitle = 'Django Shell';
// The snake icon is reserved for the Python REPL terminal.
this.terminalIcon = undefined;
disposableRegistry.push(new DjangoContextInitializer(documentManager, workspace, fileSystem, commandManager));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ suite('Terminal - Code Execution', () => {
let disposables: Disposable[] = [];
let executor: ICodeExecutionService;
let expectedTerminalTitle: string | undefined;
let expectedTerminalIconId: string | undefined;
let terminalFactory: TypeMoq.IMock<ITerminalServiceFactory>;
let documentManager: TypeMoq.IMock<IDocumentManager>;
let commandManager: TypeMoq.IMock<ICommandManager>;
Expand Down Expand Up @@ -81,6 +82,7 @@ suite('Terminal - Code Execution', () => {
settings = TypeMoq.Mock.ofType<IPythonSettings>();
settings.setup((s) => s.terminal).returns(() => terminalSettings.object);
configService.setup((c) => c.getSettings(TypeMoq.It.isAny())).returns(() => settings.object);
expectedTerminalIconId = 'snake';
Comment thread
edvilme marked this conversation as resolved.
Outdated

switch (testSuiteName) {
case 'Terminal Execution': {
Expand Down Expand Up @@ -132,6 +134,7 @@ suite('Terminal - Code Execution', () => {
applicationShell.object,
);
expectedTerminalTitle = 'Django Shell';
expectedTerminalIconId = undefined;
break;
}
default: {
Expand All @@ -148,8 +151,8 @@ suite('Terminal - Code Execution', () => {
TypeMoq.It.is<TerminalCreationOptions>(
(a) =>
a.title === expectedTerminalTitle &&
a.iconPath instanceof ThemeIcon &&
a.iconPath.id === 'snake',
(a.iconPath instanceof ThemeIcon ? a.iconPath.id : undefined) ===
expectedTerminalIconId,
),
),
)
Expand Down
Loading