@codingame/monaco-vscode-xterm-common 24.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/empty.js +1 -0
- package/package.json +45 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.d.ts +11 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.js +26 -0
- package/vscode/src/vs/platform/terminal/common/environmentVariable.d.ts +86 -0
- package/vscode/src/vs/platform/terminal/common/environmentVariable.js +10 -0
- package/vscode/src/vs/platform/terminal/common/environmentVariableCollection.d.ts +17 -0
- package/vscode/src/vs/platform/terminal/common/environmentVariableCollection.js +214 -0
- package/vscode/src/vs/platform/terminal/common/terminalRecorder.d.ts +14 -0
- package/vscode/src/vs/platform/terminal/common/terminalRecorder.js +75 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/environmentVariableInfo.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +125 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.d.ts +104 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.js +1554 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.js +45 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIconPicker.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIconPicker.js +82 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.d.ts +408 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.js +2338 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.d.ts +143 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +684 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalResizeDebouncer.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalResizeDebouncer.js +68 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalStatusList.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalStatusList.js +135 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTabsList.d.ts +40 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTabsList.js +754 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTooltip.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTooltip.js +112 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.js +59 -0
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.js +319 -0
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalStorageKeys.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalStorageKeys.js +17 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +69 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/media/stickyScroll.css +49 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollColorRegistry.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollColorRegistry.js +25 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollContribution.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollContribution.js +117 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.js +428 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ITerminalInstance } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
|
|
2
|
+
import { MarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
|
|
3
|
+
import type { IHoverAction } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hover";
|
|
4
|
+
import { type IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
5
|
+
export declare function getInstanceHoverInfo(instance: ITerminalInstance, storageService: IStorageService): {
|
|
6
|
+
content: MarkdownString;
|
|
7
|
+
actions: IHoverAction[];
|
|
8
|
+
};
|
|
9
|
+
export declare function getShellProcessTooltip(instance: ITerminalInstance, showDetailed: boolean): string;
|
|
10
|
+
export declare function refreshShellIntegrationInfoStatus(instance: ITerminalInstance): void;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
|
|
2
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
3
|
+
import { asArray } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
4
|
+
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
5
|
+
import { TerminalCapability } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/capabilities';
|
|
6
|
+
import { TerminalStatus } from './terminalStatusList.js';
|
|
7
|
+
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
8
|
+
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
9
|
+
import { TerminalStorageKeys } from '../common/terminalStorageKeys.js';
|
|
10
|
+
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
11
|
+
|
|
12
|
+
function getInstanceHoverInfo(instance, storageService) {
|
|
13
|
+
const showDetailed = parseInt(storageService.get(TerminalStorageKeys.TabsShowDetailed, StorageScope.APPLICATION) ?? '0');
|
|
14
|
+
let statusString = '';
|
|
15
|
+
const statuses = instance.statusList.statuses;
|
|
16
|
+
const actions = [];
|
|
17
|
+
for (const status of statuses) {
|
|
18
|
+
if (showDetailed) {
|
|
19
|
+
if (status.detailedTooltip ?? status.tooltip) {
|
|
20
|
+
statusString += `\n\n---\n\n${status.icon ? `$(${status.icon?.id}) ` : ''}` + (status.detailedTooltip ?? status.tooltip ?? '');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
if (status.tooltip) {
|
|
25
|
+
statusString += `\n\n---\n\n${status.icon ? `$(${status.icon?.id}) ` : ''}` + (status.tooltip ?? '');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (status.hoverActions) {
|
|
29
|
+
actions.push(...status.hoverActions);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
actions.push({
|
|
33
|
+
commandId: 'toggleDetailedInfo',
|
|
34
|
+
label: showDetailed ? ( localize(11634, 'Hide Details')) : ( localize(11635, 'Show Details')),
|
|
35
|
+
run() {
|
|
36
|
+
storageService.store(TerminalStorageKeys.TabsShowDetailed, (showDetailed + 1) % 2, StorageScope.APPLICATION, StorageTarget.USER);
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
const shellProcessString = getShellProcessTooltip(instance, !!showDetailed);
|
|
40
|
+
const content = ( new MarkdownString(
|
|
41
|
+
instance.title + shellProcessString + statusString,
|
|
42
|
+
{ supportThemeIcons: true }
|
|
43
|
+
));
|
|
44
|
+
return { content, actions };
|
|
45
|
+
}
|
|
46
|
+
function getShellProcessTooltip(instance, showDetailed) {
|
|
47
|
+
const lines = [];
|
|
48
|
+
if (instance.processId && instance.processId > 0) {
|
|
49
|
+
lines.push(( localize(11636, "Process ID ({0}): {1}", 'PID', instance.processId)) + '\n');
|
|
50
|
+
}
|
|
51
|
+
if (instance.shellLaunchConfig.executable) {
|
|
52
|
+
let commandLine = '';
|
|
53
|
+
if (!showDetailed && instance.shellLaunchConfig.executable.length > 32) {
|
|
54
|
+
const base = basename(instance.shellLaunchConfig.executable);
|
|
55
|
+
const sepIndex = instance.shellLaunchConfig.executable.length - base.length - 1;
|
|
56
|
+
const sep = instance.shellLaunchConfig.executable.substring(sepIndex, sepIndex + 1);
|
|
57
|
+
commandLine += `…${sep}${base}`;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
commandLine += instance.shellLaunchConfig.executable;
|
|
61
|
+
}
|
|
62
|
+
const args = ( asArray(instance.injectedArgs || instance.shellLaunchConfig.args || []).map(x => x.match(/\s/) ? `'${x}'` : x)).join(' ');
|
|
63
|
+
if (args) {
|
|
64
|
+
commandLine += ` ${args}`;
|
|
65
|
+
}
|
|
66
|
+
lines.push(( localize(11637, 'Command line: {0}', commandLine)));
|
|
67
|
+
}
|
|
68
|
+
return lines.length ? `\n\n---\n\n${lines.join('\n')}` : '';
|
|
69
|
+
}
|
|
70
|
+
function refreshShellIntegrationInfoStatus(instance) {
|
|
71
|
+
if (!instance.xterm) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const cmdDetectionType = (instance.capabilities.get(TerminalCapability.CommandDetection)?.hasRichCommandDetection
|
|
75
|
+
? ( localize(11638, 'Rich'))
|
|
76
|
+
: ( instance.capabilities.has(TerminalCapability.CommandDetection))
|
|
77
|
+
? ( localize(11639, 'Basic'))
|
|
78
|
+
: instance.usedShellIntegrationInjection
|
|
79
|
+
? ( localize(11640, "Injection failed to activate"))
|
|
80
|
+
: ( localize(11641, 'No')));
|
|
81
|
+
const detailedAdditions = [];
|
|
82
|
+
if (instance.shellType) {
|
|
83
|
+
detailedAdditions.push(`Shell type: \`${instance.shellType}\``);
|
|
84
|
+
}
|
|
85
|
+
const cwd = instance.cwd;
|
|
86
|
+
if (cwd) {
|
|
87
|
+
detailedAdditions.push(`Current working directory: \`${cwd}\``);
|
|
88
|
+
}
|
|
89
|
+
const seenSequences = Array.from(instance.xterm.shellIntegration.seenSequences);
|
|
90
|
+
if (seenSequences.length > 0) {
|
|
91
|
+
detailedAdditions.push(`Seen sequences: ${( seenSequences.map(e => `\`${e}\``)).join(', ')}`);
|
|
92
|
+
}
|
|
93
|
+
const promptType = instance.capabilities.get(TerminalCapability.PromptTypeDetection)?.promptType;
|
|
94
|
+
if (promptType) {
|
|
95
|
+
detailedAdditions.push(`Prompt type: \`${promptType}\``);
|
|
96
|
+
}
|
|
97
|
+
const combinedString = instance.capabilities.get(TerminalCapability.CommandDetection)?.promptInputModel.getCombinedString();
|
|
98
|
+
if (combinedString !== undefined) {
|
|
99
|
+
detailedAdditions.push(`Prompt input: \`\`\`${combinedString}\`\`\``);
|
|
100
|
+
}
|
|
101
|
+
const detailedAdditionsString = detailedAdditions.length > 0
|
|
102
|
+
? '\n\n' + ( detailedAdditions.map(e => `- ${e}`)).join('\n')
|
|
103
|
+
: '';
|
|
104
|
+
instance.statusList.add({
|
|
105
|
+
id: TerminalStatus.ShellIntegrationInfo,
|
|
106
|
+
severity: Severity.Info,
|
|
107
|
+
tooltip: `${( localize(11642, "Shell integration"))}: ${cmdDetectionType}`,
|
|
108
|
+
detailedTooltip: `${( localize(11642, "Shell integration"))}: ${cmdDetectionType}${detailedAdditionsString}`
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export { getInstanceHoverInfo, getShellProcessTooltip, refreshShellIntegrationInfoStatus };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
|
|
3
|
+
import type { Terminal as XTermTerminal, ITerminalAddon } from "@xterm/xterm";
|
|
4
|
+
/**
|
|
5
|
+
* Provides extensions to the xterm object in a modular, testable way.
|
|
6
|
+
*/
|
|
7
|
+
export declare class LineDataEventAddon extends Disposable implements ITerminalAddon {
|
|
8
|
+
private readonly _initializationPromise?;
|
|
9
|
+
private _xterm?;
|
|
10
|
+
private _isOsSet;
|
|
11
|
+
private readonly _onLineData;
|
|
12
|
+
readonly onLineData: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<string>;
|
|
13
|
+
constructor(_initializationPromise?: Promise<void> | undefined);
|
|
14
|
+
activate(xterm: XTermTerminal): Promise<void>;
|
|
15
|
+
setOperatingSystem(os: OperatingSystem): void;
|
|
16
|
+
private _sendLineData;
|
|
17
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
|
|
2
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
3
|
+
import { Disposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { OperatingSystem } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
5
|
+
|
|
6
|
+
class LineDataEventAddon extends Disposable {
|
|
7
|
+
constructor(_initializationPromise) {
|
|
8
|
+
super();
|
|
9
|
+
this._initializationPromise = _initializationPromise;
|
|
10
|
+
this._isOsSet = false;
|
|
11
|
+
this._onLineData = this._register(( new Emitter()));
|
|
12
|
+
this.onLineData = this._onLineData.event;
|
|
13
|
+
}
|
|
14
|
+
async activate(xterm) {
|
|
15
|
+
this._xterm = xterm;
|
|
16
|
+
const buffer = xterm.buffer;
|
|
17
|
+
await this._initializationPromise;
|
|
18
|
+
this._register(xterm.onLineFeed(() => {
|
|
19
|
+
const newLine = buffer.active.getLine(buffer.active.baseY + buffer.active.cursorY);
|
|
20
|
+
if (newLine && !newLine.isWrapped) {
|
|
21
|
+
this._sendLineData(buffer.active, buffer.active.baseY + buffer.active.cursorY - 1);
|
|
22
|
+
}
|
|
23
|
+
}));
|
|
24
|
+
this._register(toDisposable(() => {
|
|
25
|
+
this._sendLineData(buffer.active, buffer.active.baseY + buffer.active.cursorY);
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
setOperatingSystem(os) {
|
|
29
|
+
if (this._isOsSet || !this._xterm) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
this._isOsSet = true;
|
|
33
|
+
if (os === OperatingSystem.Windows) {
|
|
34
|
+
const xterm = this._xterm;
|
|
35
|
+
this._register(xterm.parser.registerCsiHandler({ final: 'H' }, () => {
|
|
36
|
+
const buffer = xterm.buffer;
|
|
37
|
+
this._sendLineData(buffer.active, buffer.active.baseY + buffer.active.cursorY);
|
|
38
|
+
return false;
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
_sendLineData(buffer, lineIndex) {
|
|
43
|
+
let line = buffer.getLine(lineIndex);
|
|
44
|
+
if (!line) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
let lineData = line.translateToString(true);
|
|
48
|
+
while (lineIndex > 0 && line.isWrapped) {
|
|
49
|
+
line = buffer.getLine(--lineIndex);
|
|
50
|
+
if (!line) {
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
lineData = line.translateToString(false) + lineData;
|
|
54
|
+
}
|
|
55
|
+
this._onLineData.fire(lineData);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { LineDataEventAddon };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
+
import { IWorkspaceFolder } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace";
|
|
3
|
+
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
4
|
+
import { IConfigurationResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/configurationResolver/common/configurationResolver.service";
|
|
5
|
+
import { IShellLaunchConfig, ITerminalBackend, ITerminalEnvironment, TerminalShellType } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal";
|
|
6
|
+
import { IProcessEnvironment, OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
|
|
7
|
+
import { IHistoryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/history/common/history.service";
|
|
8
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
9
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
10
|
+
export declare function mergeEnvironments(parent: IProcessEnvironment, other: ITerminalEnvironment | undefined): void;
|
|
11
|
+
export declare function addTerminalEnvironmentKeys(env: IProcessEnvironment, version: string | undefined, locale: string | undefined, detectLocale: "auto" | "off" | "on"): void;
|
|
12
|
+
export declare function shouldSetLangEnvVariable(env: IProcessEnvironment, detectLocale: "auto" | "off" | "on"): boolean;
|
|
13
|
+
export declare function getLangEnvVariable(locale?: string): string;
|
|
14
|
+
export declare function getCwd(shell: IShellLaunchConfig, userHome: string | undefined, variableResolver: VariableResolver | undefined, root: URI | undefined, customCwd: string | undefined, logService?: ILogService): Promise<string>;
|
|
15
|
+
export type VariableResolver = (str: string) => Promise<string>;
|
|
16
|
+
export declare function createVariableResolver(lastActiveWorkspace: IWorkspaceFolder | undefined, env: IProcessEnvironment, configurationResolverService: IConfigurationResolverService | undefined): VariableResolver | undefined;
|
|
17
|
+
export declare function createTerminalEnvironment(shellLaunchConfig: IShellLaunchConfig, envFromConfig: ITerminalEnvironment | undefined, variableResolver: VariableResolver | undefined, version: string | undefined, detectLocale: "auto" | "off" | "on", baseEnv: IProcessEnvironment): Promise<IProcessEnvironment>;
|
|
18
|
+
/**
|
|
19
|
+
* Takes a path and returns the properly escaped path to send to a given shell. On Windows, this
|
|
20
|
+
* included trying to prepare the path for WSL if needed.
|
|
21
|
+
*
|
|
22
|
+
* @param originalPath The path to be escaped and formatted.
|
|
23
|
+
* @param executable The executable off the shellLaunchConfig.
|
|
24
|
+
* @param title The terminal's title.
|
|
25
|
+
* @param shellType The type of shell the path is being sent to.
|
|
26
|
+
* @param backend The backend for the terminal.
|
|
27
|
+
* @param isWindowsFrontend Whether the frontend is Windows, this is only exposed for injection via
|
|
28
|
+
* tests.
|
|
29
|
+
* @returns An escaped version of the path to be executed in the terminal.
|
|
30
|
+
*/
|
|
31
|
+
export declare function preparePathForShell(resource: string | URI, executable: string | undefined, title: string, shellType: TerminalShellType | undefined, backend: Pick<ITerminalBackend, "getWslPath"> | undefined, os: OperatingSystem | undefined, isWindowsFrontend?: boolean): Promise<string>;
|
|
32
|
+
export declare function getWorkspaceForTerminal(cwd: URI | string | undefined, workspaceContextService: IWorkspaceContextService, historyService: IHistoryService): IWorkspaceFolder | undefined;
|
|
33
|
+
export declare function getUriLabelForShell(uri: URI | string, backend: Pick<ITerminalBackend, "getWslPath">, shellType?: TerminalShellType, os?: OperatingSystem, isWindowsFrontend?: boolean): Promise<string>;
|
|
34
|
+
/**
|
|
35
|
+
* Gets the unified duration to wait for shell integration after the terminal launches before
|
|
36
|
+
* declaring the terminal lacks shell integration.
|
|
37
|
+
*/
|
|
38
|
+
export declare function getShellIntegrationTimeout(configurationService: IConfigurationService, siInjectionEnabled: boolean, isRemote: boolean, processReadyTimestamp?: number): number;
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
|
|
2
|
+
import { isAbsolute, join, basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
3
|
+
import { URI, uriToFsPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
4
|
+
import { sanitizeProcessEnvironment } from '@codingame/monaco-vscode-api/vscode/vs/base/common/processes';
|
|
5
|
+
import { WindowsShellType, TerminalSettingId } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal';
|
|
6
|
+
import { isWindows, isMacintosh, language, OperatingSystem } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
7
|
+
import { sanitizeCwd, escapeNonWindowsPath } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminalEnvironment';
|
|
8
|
+
import { isString, isNumber } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
9
|
+
|
|
10
|
+
function mergeEnvironments(parent, other) {
|
|
11
|
+
if (!other) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (isWindows) {
|
|
15
|
+
for (const configKey in other) {
|
|
16
|
+
let actualKey = configKey;
|
|
17
|
+
for (const envKey in parent) {
|
|
18
|
+
if (configKey.toLowerCase() === envKey.toLowerCase()) {
|
|
19
|
+
actualKey = envKey;
|
|
20
|
+
break;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const value = other[configKey];
|
|
24
|
+
if (value !== undefined) {
|
|
25
|
+
_mergeEnvironmentValue(parent, actualKey, value);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
( Object.keys(other)).forEach((key) => {
|
|
31
|
+
const value = other[key];
|
|
32
|
+
if (value !== undefined) {
|
|
33
|
+
_mergeEnvironmentValue(parent, key, value);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function _mergeEnvironmentValue(env, key, value) {
|
|
39
|
+
if (isString(value)) {
|
|
40
|
+
env[key] = value;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
delete env[key];
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function addTerminalEnvironmentKeys(env, version, locale, detectLocale) {
|
|
47
|
+
env['TERM_PROGRAM'] = 'vscode';
|
|
48
|
+
if (version) {
|
|
49
|
+
env['TERM_PROGRAM_VERSION'] = version;
|
|
50
|
+
}
|
|
51
|
+
if (shouldSetLangEnvVariable(env, detectLocale)) {
|
|
52
|
+
env['LANG'] = getLangEnvVariable(locale);
|
|
53
|
+
}
|
|
54
|
+
env['COLORTERM'] = 'truecolor';
|
|
55
|
+
}
|
|
56
|
+
function mergeNonNullKeys(env, other) {
|
|
57
|
+
if (!other) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
for (const key of ( Object.keys(other))) {
|
|
61
|
+
const value = other[key];
|
|
62
|
+
if (value !== undefined && value !== null) {
|
|
63
|
+
env[key] = value;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
async function resolveConfigurationVariables(variableResolver, env) {
|
|
68
|
+
await Promise.all(( Object.entries(env).map(async ([key, value]) => {
|
|
69
|
+
if (isString(value)) {
|
|
70
|
+
try {
|
|
71
|
+
env[key] = await variableResolver(value);
|
|
72
|
+
}
|
|
73
|
+
catch (e) {
|
|
74
|
+
env[key] = value;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
})));
|
|
78
|
+
return env;
|
|
79
|
+
}
|
|
80
|
+
function shouldSetLangEnvVariable(env, detectLocale) {
|
|
81
|
+
if (detectLocale === 'on') {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
if (detectLocale === 'auto') {
|
|
85
|
+
const lang = env['LANG'];
|
|
86
|
+
return !lang || (lang.search(/\.UTF\-8$/) === -1 && lang.search(/\.utf8$/) === -1 && lang.search(/\.euc.+/) === -1);
|
|
87
|
+
}
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
function getLangEnvVariable(locale) {
|
|
91
|
+
const parts = locale ? locale.split('-') : [];
|
|
92
|
+
const n = parts.length;
|
|
93
|
+
if (n === 0) {
|
|
94
|
+
return 'en_US.UTF-8';
|
|
95
|
+
}
|
|
96
|
+
if (n === 1) {
|
|
97
|
+
const languageVariants = {
|
|
98
|
+
af: 'ZA',
|
|
99
|
+
am: 'ET',
|
|
100
|
+
be: 'BY',
|
|
101
|
+
bg: 'BG',
|
|
102
|
+
ca: 'ES',
|
|
103
|
+
cs: 'CZ',
|
|
104
|
+
da: 'DK',
|
|
105
|
+
de: 'DE',
|
|
106
|
+
el: 'GR',
|
|
107
|
+
en: 'US',
|
|
108
|
+
es: 'ES',
|
|
109
|
+
et: 'EE',
|
|
110
|
+
eu: 'ES',
|
|
111
|
+
fi: 'FI',
|
|
112
|
+
fr: 'FR',
|
|
113
|
+
he: 'IL',
|
|
114
|
+
hr: 'HR',
|
|
115
|
+
hu: 'HU',
|
|
116
|
+
hy: 'AM',
|
|
117
|
+
is: 'IS',
|
|
118
|
+
it: 'IT',
|
|
119
|
+
ja: 'JP',
|
|
120
|
+
kk: 'KZ',
|
|
121
|
+
ko: 'KR',
|
|
122
|
+
lt: 'LT',
|
|
123
|
+
nl: 'NL',
|
|
124
|
+
no: 'NO',
|
|
125
|
+
pl: 'PL',
|
|
126
|
+
pt: 'BR',
|
|
127
|
+
ro: 'RO',
|
|
128
|
+
ru: 'RU',
|
|
129
|
+
sk: 'SK',
|
|
130
|
+
sl: 'SI',
|
|
131
|
+
sr: 'YU',
|
|
132
|
+
sv: 'SE',
|
|
133
|
+
tr: 'TR',
|
|
134
|
+
uk: 'UA',
|
|
135
|
+
zh: 'CN',
|
|
136
|
+
};
|
|
137
|
+
if (Object.prototype.hasOwnProperty.call(languageVariants, parts[0])) {
|
|
138
|
+
parts.push(languageVariants[parts[0]]);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
parts[1] = parts[1].toUpperCase();
|
|
143
|
+
}
|
|
144
|
+
return parts.join('_') + '.UTF-8';
|
|
145
|
+
}
|
|
146
|
+
async function getCwd(shell, userHome, variableResolver, root, customCwd, logService) {
|
|
147
|
+
if (shell.cwd) {
|
|
148
|
+
const unresolved = (typeof shell.cwd === 'object') ? shell.cwd.fsPath : shell.cwd;
|
|
149
|
+
const resolved = await _resolveCwd(unresolved, variableResolver);
|
|
150
|
+
return sanitizeCwd(resolved || unresolved);
|
|
151
|
+
}
|
|
152
|
+
let cwd;
|
|
153
|
+
if (!shell.ignoreConfigurationCwd && customCwd) {
|
|
154
|
+
if (variableResolver) {
|
|
155
|
+
customCwd = await _resolveCwd(customCwd, variableResolver, logService);
|
|
156
|
+
}
|
|
157
|
+
if (customCwd) {
|
|
158
|
+
if (isAbsolute(customCwd)) {
|
|
159
|
+
cwd = customCwd;
|
|
160
|
+
}
|
|
161
|
+
else if (root) {
|
|
162
|
+
cwd = join(root.fsPath, customCwd);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
if (!cwd) {
|
|
167
|
+
cwd = root ? root.fsPath : userHome || '';
|
|
168
|
+
}
|
|
169
|
+
return sanitizeCwd(cwd);
|
|
170
|
+
}
|
|
171
|
+
async function _resolveCwd(cwd, variableResolver, logService) {
|
|
172
|
+
if (variableResolver) {
|
|
173
|
+
try {
|
|
174
|
+
return await variableResolver(cwd);
|
|
175
|
+
}
|
|
176
|
+
catch (e) {
|
|
177
|
+
logService?.error('Could not resolve terminal cwd', e);
|
|
178
|
+
return undefined;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return cwd;
|
|
182
|
+
}
|
|
183
|
+
function createVariableResolver(lastActiveWorkspace, env, configurationResolverService) {
|
|
184
|
+
if (!configurationResolverService) {
|
|
185
|
+
return undefined;
|
|
186
|
+
}
|
|
187
|
+
return (str) => configurationResolverService.resolveWithEnvironment(env, lastActiveWorkspace, str);
|
|
188
|
+
}
|
|
189
|
+
async function createTerminalEnvironment(shellLaunchConfig, envFromConfig, variableResolver, version, detectLocale, baseEnv) {
|
|
190
|
+
const env = {};
|
|
191
|
+
if (shellLaunchConfig.strictEnv) {
|
|
192
|
+
mergeNonNullKeys(env, shellLaunchConfig.env);
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
mergeNonNullKeys(env, baseEnv);
|
|
196
|
+
const allowedEnvFromConfig = { ...envFromConfig };
|
|
197
|
+
if (variableResolver) {
|
|
198
|
+
if (allowedEnvFromConfig) {
|
|
199
|
+
await resolveConfigurationVariables(variableResolver, allowedEnvFromConfig);
|
|
200
|
+
}
|
|
201
|
+
if (shellLaunchConfig.env) {
|
|
202
|
+
await resolveConfigurationVariables(variableResolver, shellLaunchConfig.env);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
if (isMacintosh) {
|
|
206
|
+
if (env['VSCODE_NODE_OPTIONS']) {
|
|
207
|
+
env['NODE_OPTIONS'] = env['VSCODE_NODE_OPTIONS'];
|
|
208
|
+
delete env['VSCODE_NODE_OPTIONS'];
|
|
209
|
+
}
|
|
210
|
+
if (env['VSCODE_NODE_REPL_EXTERNAL_MODULE']) {
|
|
211
|
+
env['NODE_REPL_EXTERNAL_MODULE'] = env['VSCODE_NODE_REPL_EXTERNAL_MODULE'];
|
|
212
|
+
delete env['VSCODE_NODE_REPL_EXTERNAL_MODULE'];
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
sanitizeProcessEnvironment(env, 'VSCODE_IPC_HOOK_CLI');
|
|
216
|
+
mergeEnvironments(env, allowedEnvFromConfig);
|
|
217
|
+
mergeEnvironments(env, shellLaunchConfig.env);
|
|
218
|
+
addTerminalEnvironmentKeys(env, version, language, detectLocale);
|
|
219
|
+
}
|
|
220
|
+
return env;
|
|
221
|
+
}
|
|
222
|
+
async function preparePathForShell(resource, executable, title, shellType, backend, os, isWindowsFrontend = isWindows) {
|
|
223
|
+
let originalPath;
|
|
224
|
+
if (isString(resource)) {
|
|
225
|
+
originalPath = resource;
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
originalPath = resource.fsPath;
|
|
229
|
+
if (isWindowsFrontend && os !== OperatingSystem.Windows) {
|
|
230
|
+
originalPath = originalPath.replace(/\\/g, '\/');
|
|
231
|
+
}
|
|
232
|
+
else if (!isWindowsFrontend && os === OperatingSystem.Windows) {
|
|
233
|
+
originalPath = originalPath.replace(/\//g, '\\');
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
if (!executable) {
|
|
237
|
+
return originalPath;
|
|
238
|
+
}
|
|
239
|
+
const hasSpace = originalPath.includes(' ');
|
|
240
|
+
const hasParens = originalPath.includes('(') || originalPath.includes(')');
|
|
241
|
+
const pathBasename = basename(executable, '.exe');
|
|
242
|
+
const isPowerShell = pathBasename === 'pwsh' ||
|
|
243
|
+
title === 'pwsh' ||
|
|
244
|
+
pathBasename === 'powershell' ||
|
|
245
|
+
title === 'powershell';
|
|
246
|
+
if (isPowerShell && (hasSpace || originalPath.includes('\''))) {
|
|
247
|
+
return `& '${originalPath.replace(/'/g, '\'\'')}'`;
|
|
248
|
+
}
|
|
249
|
+
if (hasParens && isPowerShell) {
|
|
250
|
+
return `& '${originalPath}'`;
|
|
251
|
+
}
|
|
252
|
+
if (os === OperatingSystem.Windows) {
|
|
253
|
+
if (shellType !== undefined) {
|
|
254
|
+
if (shellType === WindowsShellType.GitBash) {
|
|
255
|
+
return escapeNonWindowsPath(originalPath.replace(/\\/g, '/'), shellType);
|
|
256
|
+
}
|
|
257
|
+
else if (shellType === WindowsShellType.Wsl) {
|
|
258
|
+
return backend?.getWslPath(originalPath, 'win-to-unix') || originalPath;
|
|
259
|
+
}
|
|
260
|
+
else if (hasSpace) {
|
|
261
|
+
return `"${originalPath}"`;
|
|
262
|
+
}
|
|
263
|
+
return originalPath;
|
|
264
|
+
}
|
|
265
|
+
const lowerExecutable = executable.toLowerCase();
|
|
266
|
+
if (lowerExecutable.includes('wsl') || (lowerExecutable.includes('bash.exe') && !lowerExecutable.toLowerCase().includes('git'))) {
|
|
267
|
+
return backend?.getWslPath(originalPath, 'win-to-unix') || originalPath;
|
|
268
|
+
}
|
|
269
|
+
else if (hasSpace) {
|
|
270
|
+
return `"${originalPath}"`;
|
|
271
|
+
}
|
|
272
|
+
return originalPath;
|
|
273
|
+
}
|
|
274
|
+
return escapeNonWindowsPath(originalPath, shellType);
|
|
275
|
+
}
|
|
276
|
+
function getWorkspaceForTerminal(cwd, workspaceContextService, historyService) {
|
|
277
|
+
const cwdUri = isString(cwd) ? ( URI.parse(cwd)) : cwd;
|
|
278
|
+
let workspaceFolder = cwdUri ? workspaceContextService.getWorkspaceFolder(cwdUri) ?? undefined : undefined;
|
|
279
|
+
if (!workspaceFolder) {
|
|
280
|
+
const activeWorkspaceRootUri = historyService.getLastActiveWorkspaceRoot();
|
|
281
|
+
workspaceFolder = activeWorkspaceRootUri ? workspaceContextService.getWorkspaceFolder(activeWorkspaceRootUri) ?? undefined : undefined;
|
|
282
|
+
}
|
|
283
|
+
return workspaceFolder;
|
|
284
|
+
}
|
|
285
|
+
async function getUriLabelForShell(uri, backend, shellType, os, isWindowsFrontend = isWindows) {
|
|
286
|
+
let path = isString(uri) ? uri : uri.fsPath;
|
|
287
|
+
if (os === OperatingSystem.Windows) {
|
|
288
|
+
if (shellType === WindowsShellType.Wsl) {
|
|
289
|
+
return backend.getWslPath(path.replaceAll('/', '\\'), 'win-to-unix');
|
|
290
|
+
}
|
|
291
|
+
else if (shellType === WindowsShellType.GitBash) {
|
|
292
|
+
return path.replaceAll('\\', '/').replace(/^([a-zA-Z]):\//, '/$1/');
|
|
293
|
+
}
|
|
294
|
+
else {
|
|
295
|
+
path = isString(uri) ? path : uriToFsPath(uri, true);
|
|
296
|
+
return !isWindowsFrontend ? path.replaceAll('/', '\\') : path;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
return isWindowsFrontend ? path.replaceAll('\\', '/') : path;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
function getShellIntegrationTimeout(configurationService, siInjectionEnabled, isRemote, processReadyTimestamp) {
|
|
304
|
+
const timeoutValue = configurationService.getValue(TerminalSettingId.ShellIntegrationTimeout);
|
|
305
|
+
let timeoutMs;
|
|
306
|
+
if (!isNumber(timeoutValue) || timeoutValue < 0) {
|
|
307
|
+
timeoutMs = siInjectionEnabled ? 5000 : (isRemote ? 3000 : 2000);
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
timeoutMs = Math.max(timeoutValue, 500);
|
|
311
|
+
}
|
|
312
|
+
if (processReadyTimestamp !== undefined) {
|
|
313
|
+
const elapsed = Date.now() - processReadyTimestamp;
|
|
314
|
+
timeoutMs = Math.max(0, timeoutMs - elapsed);
|
|
315
|
+
}
|
|
316
|
+
return timeoutMs;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export { addTerminalEnvironmentKeys, createTerminalEnvironment, createVariableResolver, getCwd, getLangEnvVariable, getShellIntegrationTimeout, getUriLabelForShell, getWorkspaceForTerminal, mergeEnvironments, preparePathForShell, shouldSetLangEnvVariable };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum TerminalStorageKeys {
|
|
2
|
+
SuggestedRendererType = "terminal.integrated.suggestedRendererType",
|
|
3
|
+
TabsListWidthHorizontal = "tabs-list-width-horizontal",
|
|
4
|
+
TabsListWidthVertical = "tabs-list-width-vertical",
|
|
5
|
+
TabsShowDetailed = "terminal.integrated.tabs.showDetailed",
|
|
6
|
+
DeprecatedEnvironmentVariableCollections = "terminal.integrated.environmentVariableCollections",
|
|
7
|
+
EnvironmentVariableCollections = "terminal.integrated.environmentVariableCollectionsV2",
|
|
8
|
+
TerminalBufferState = "terminal.integrated.bufferState",
|
|
9
|
+
TerminalLayoutInfo = "terminal.integrated.layoutInfo",
|
|
10
|
+
PinnedRecentCommandsPrefix = "terminal.pinnedRecentCommands",
|
|
11
|
+
TerminalSuggestSize = "terminal.integrated.suggestSize"
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
var TerminalStorageKeys;
|
|
4
|
+
(function (TerminalStorageKeys) {
|
|
5
|
+
TerminalStorageKeys["SuggestedRendererType"] = "terminal.integrated.suggestedRendererType";
|
|
6
|
+
TerminalStorageKeys["TabsListWidthHorizontal"] = "tabs-list-width-horizontal";
|
|
7
|
+
TerminalStorageKeys["TabsListWidthVertical"] = "tabs-list-width-vertical";
|
|
8
|
+
TerminalStorageKeys["TabsShowDetailed"] = "terminal.integrated.tabs.showDetailed";
|
|
9
|
+
TerminalStorageKeys["DeprecatedEnvironmentVariableCollections"] = "terminal.integrated.environmentVariableCollections";
|
|
10
|
+
TerminalStorageKeys["EnvironmentVariableCollections"] = "terminal.integrated.environmentVariableCollectionsV2";
|
|
11
|
+
TerminalStorageKeys["TerminalBufferState"] = "terminal.integrated.bufferState";
|
|
12
|
+
TerminalStorageKeys["TerminalLayoutInfo"] = "terminal.integrated.layoutInfo";
|
|
13
|
+
TerminalStorageKeys["PinnedRecentCommandsPrefix"] = "terminal.pinnedRecentCommands";
|
|
14
|
+
TerminalStorageKeys["TerminalSuggestSize"] = "terminal.integrated.suggestSize";
|
|
15
|
+
})(TerminalStorageKeys || (TerminalStorageKeys = {}));
|
|
16
|
+
|
|
17
|
+
export { TerminalStorageKeys };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { MenuId } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
|
|
2
|
+
import { RawContextKey } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
|
|
3
|
+
export declare enum TerminalChatCommandId {
|
|
4
|
+
Start = "workbench.action.terminal.chat.start",
|
|
5
|
+
Close = "workbench.action.terminal.chat.close",
|
|
6
|
+
MakeRequest = "workbench.action.terminal.chat.makeRequest",
|
|
7
|
+
Cancel = "workbench.action.terminal.chat.cancel",
|
|
8
|
+
RunCommand = "workbench.action.terminal.chat.runCommand",
|
|
9
|
+
RunFirstCommand = "workbench.action.terminal.chat.runFirstCommand",
|
|
10
|
+
InsertCommand = "workbench.action.terminal.chat.insertCommand",
|
|
11
|
+
InsertFirstCommand = "workbench.action.terminal.chat.insertFirstCommand",
|
|
12
|
+
ViewInChat = "workbench.action.terminal.chat.viewInChat",
|
|
13
|
+
RerunRequest = "workbench.action.terminal.chat.rerunRequest",
|
|
14
|
+
ViewHiddenChatTerminals = "workbench.action.terminal.chat.viewHiddenChatTerminals",
|
|
15
|
+
OpenTerminalSettingsLink = "workbench.action.terminal.chat.openTerminalSettingsLink",
|
|
16
|
+
DisableSessionAutoApproval = "workbench.action.terminal.chat.disableSessionAutoApproval",
|
|
17
|
+
FocusMostRecentChatTerminalOutput = "workbench.action.terminal.chat.focusMostRecentChatTerminalOutput",
|
|
18
|
+
FocusMostRecentChatTerminal = "workbench.action.terminal.chat.focusMostRecentChatTerminal",
|
|
19
|
+
ToggleChatTerminalOutput = "workbench.action.terminal.chat.toggleChatTerminalOutput",
|
|
20
|
+
FocusChatInstanceAction = "workbench.action.terminal.chat.focusChatInstance"
|
|
21
|
+
}
|
|
22
|
+
export declare const MENU_TERMINAL_CHAT_WIDGET_INPUT_SIDE_TOOLBAR: MenuId;
|
|
23
|
+
export declare const MENU_TERMINAL_CHAT_WIDGET_STATUS: MenuId;
|
|
24
|
+
export declare const MENU_TERMINAL_CHAT_WIDGET_TOOLBAR: MenuId;
|
|
25
|
+
export declare enum TerminalChatContextKeyStrings {
|
|
26
|
+
ChatFocus = "terminalChatFocus",
|
|
27
|
+
ChatVisible = "terminalChatVisible",
|
|
28
|
+
ChatActiveRequest = "terminalChatActiveRequest",
|
|
29
|
+
ChatInputHasText = "terminalChatInputHasText",
|
|
30
|
+
ChatAgentRegistered = "terminalChatAgentRegistered",
|
|
31
|
+
ChatResponseEditorFocused = "terminalChatResponseEditorFocused",
|
|
32
|
+
ChatResponseContainsCodeBlock = "terminalChatResponseContainsCodeBlock",
|
|
33
|
+
ChatResponseContainsMultipleCodeBlocks = "terminalChatResponseContainsMultipleCodeBlocks",
|
|
34
|
+
ChatResponseSupportsIssueReporting = "terminalChatResponseSupportsIssueReporting",
|
|
35
|
+
ChatSessionResponseVote = "terminalChatSessionResponseVote",
|
|
36
|
+
ChatHasTerminals = "hasChatTerminals",
|
|
37
|
+
ChatHasHiddenTerminals = "hasHiddenChatTerminals"
|
|
38
|
+
}
|
|
39
|
+
export declare namespace TerminalChatContextKeys {
|
|
40
|
+
/** Whether the chat widget is focused */
|
|
41
|
+
const focused: RawContextKey<boolean>;
|
|
42
|
+
/** Whether the chat widget is visible */
|
|
43
|
+
const visible: RawContextKey<boolean>;
|
|
44
|
+
/** Whether there is an active chat request */
|
|
45
|
+
const requestActive: RawContextKey<boolean>;
|
|
46
|
+
/** Whether the chat input has text */
|
|
47
|
+
const inputHasText: RawContextKey<boolean>;
|
|
48
|
+
/** The chat response contains at least one code block */
|
|
49
|
+
const responseContainsCodeBlock: RawContextKey<boolean>;
|
|
50
|
+
/** The chat response contains multiple code blocks */
|
|
51
|
+
const responseContainsMultipleCodeBlocks: RawContextKey<boolean>;
|
|
52
|
+
/** A chat agent exists for the terminal location */
|
|
53
|
+
const hasChatAgent: RawContextKey<boolean>;
|
|
54
|
+
/** Has terminals created via chat */
|
|
55
|
+
const hasChatTerminals: RawContextKey<boolean>;
|
|
56
|
+
/** Has hidden chat terminals */
|
|
57
|
+
const hasHiddenChatTerminals: RawContextKey<boolean>;
|
|
58
|
+
}
|