Fix circular import in terminal suggest

Found while trying to switch us to use esbuild for extension emit
This commit is contained in:
Matt Bierner
2026-04-28 15:12:15 -07:00
parent 83cbe74699
commit c9dedcf8eb
5 changed files with 14 additions and 13 deletions

View File

@@ -8,3 +8,12 @@ export const enum SettingsIds {
CachedWindowsExecutableExtensions = 'terminal.integrated.suggest.windowsExecutableExtensions',
CachedWindowsExecutableExtensionsSuffixOnly = 'windowsExecutableExtensions',
}
export const enum TerminalShellType {
Bash = 'bash',
Fish = 'fish',
Zsh = 'zsh',
PowerShell = 'pwsh',
WindowsPowerShell = 'powershell',
GitBash = 'gitbash',
}

View File

@@ -5,12 +5,11 @@
import * as fs from 'fs/promises';
import * as vscode from 'vscode';
import { SettingsIds, TerminalShellType } from '../constants';
import { isExecutable, WindowsExecutableExtensionsCache } from '../helpers/executable';
import { osIsWindows } from '../helpers/os';
import type { ICompletionResource } from '../types';
import { getFriendlyResourcePath } from '../helpers/uri';
import { SettingsIds } from '../constants';
import { TerminalShellType } from '../terminalSuggestMain';
import type { ICompletionResource } from '../types';
const isWindows = osIsWindows();

View File

@@ -35,14 +35,7 @@ import { getPwshGlobals } from './shell/pwsh';
import { getZshGlobals } from './shell/zsh';
import { defaultShellTypeResetChars, getTokenType, shellTypeResetChars, TokenType } from './tokens';
import type { ICompletionResource } from './types';
export const enum TerminalShellType {
Bash = 'bash',
Fish = 'fish',
Zsh = 'zsh',
PowerShell = 'pwsh',
WindowsPowerShell = 'powershell',
GitBash = 'gitbash',
}
import { TerminalShellType } from './constants';
const isWindows = osIsWindows();
type ShellGlobalsCacheEntry = {

View File

@@ -6,7 +6,7 @@
import 'mocha';
import { strictEqual } from 'node:assert';
import { getTokenType, TokenType } from '../tokens';
import { TerminalShellType } from '../terminalSuggestMain';
import { TerminalShellType } from '../constants';
suite('Terminal Suggest', () => {
test('simple command', () => {

View File

@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { TerminalShellType } from './terminalSuggestMain';
import { TerminalShellType } from './constants';
export const enum TokenType {