@codingame/monaco-vscode-xterm-addons-common 37.2.0 → 37.3.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/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.js +462 -0
- package/vscode/src/vs/base/browser/htmlToMarkdown.d.ts +0 -1
- package/vscode/src/vs/base/browser/htmlToMarkdown.js +0 -144
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.d.ts +0 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.js +0 -482
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js +0 -95
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.js +0 -355
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.js +0 -81
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.d.ts +0 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.js +0 -181
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.d.ts +0 -75
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.js +0 -622
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatPasteProviders.d.ts +0 -71
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatPasteProviders.js +0 -800
- package/vscode/src/vs/workbench/contrib/git/common/utils.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/git/common/utils.js +0 -105
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalUri.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalUri.js +0 -51
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.d.ts +0 -79
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +0 -652
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.d.ts +0 -64
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +0 -564
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { GitRepositoryState } from "@codingame/monaco-vscode-extensions-service-override/vscode/vs/workbench/contrib/git/common/gitService";
|
|
2
|
-
export interface IGitHubRemoteInfo {
|
|
3
|
-
readonly owner: string;
|
|
4
|
-
readonly repo: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function hasGitHubRemotes(repositoryState: GitRepositoryState): boolean;
|
|
7
|
-
export declare function getGitHubRemoteInfo(repositoryState: GitRepositoryState, supportedHosts?: readonly string[]): IGitHubRemoteInfo | undefined;
|
|
8
|
-
export declare function getGitHubRepositoryFromRemoteUrl(remoteUrl: string, supportedHosts?: readonly string[]): IGitHubRemoteInfo | undefined;
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { equalsIgnoreCase } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
3
|
-
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
4
|
-
|
|
5
|
-
const DEFAULT_GITHUB_HOSTS = ["github.com", "www.github.com"];
|
|
6
|
-
function getGitHubRemoteInfo(repositoryState, supportedHosts = DEFAULT_GITHUB_HOSTS) {
|
|
7
|
-
for (const remote of getOrderedRemotes(repositoryState)) {
|
|
8
|
-
if (remote.fetchUrl) {
|
|
9
|
-
const repository = getGitHubRepositoryFromRemoteUrl(remote.fetchUrl, supportedHosts);
|
|
10
|
-
if (repository) {
|
|
11
|
-
return repository;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return undefined;
|
|
16
|
-
}
|
|
17
|
-
function getGitHubRepositoryFromRemoteUrl(remoteUrl, supportedHosts = DEFAULT_GITHUB_HOSTS) {
|
|
18
|
-
const remote = parseRemoteUrl(remoteUrl);
|
|
19
|
-
if (!remote) {
|
|
20
|
-
return undefined;
|
|
21
|
-
}
|
|
22
|
-
const host = equalsIgnoreCase(remote.scheme, "ssh") ? remote.host : remote.rawHost;
|
|
23
|
-
if (!( ( supportedHosts.map(normalizeHost)).some(supportedHost => equalsIgnoreCase(host, supportedHost)))) {
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
26
|
-
const segments = remote.path.replace(/^\/+/, "").replace(/\/+$/, "").replace(/\.git$/i, "").split("/");
|
|
27
|
-
return segments.length === 2 && segments[0] && segments[1] ? {
|
|
28
|
-
owner: segments[0],
|
|
29
|
-
repo: segments[1]
|
|
30
|
-
} : undefined;
|
|
31
|
-
}
|
|
32
|
-
function normalizeHost(host) {
|
|
33
|
-
return host.trim().replace(/:\d+$/, "");
|
|
34
|
-
}
|
|
35
|
-
function getOrderedRemotes(repositoryState) {
|
|
36
|
-
if (repositoryState.remotes.length < 2) {
|
|
37
|
-
return repositoryState.remotes;
|
|
38
|
-
}
|
|
39
|
-
const remotes = ( new Map());
|
|
40
|
-
const remoteIndex = repositoryState.remotes.findIndex(r => r.name === repositoryState.HEAD?.upstream?.remote);
|
|
41
|
-
if (remoteIndex !== -1) {
|
|
42
|
-
const fetchUrl = repositoryState.remotes[remoteIndex].fetchUrl;
|
|
43
|
-
if (fetchUrl) {
|
|
44
|
-
remotes.set(
|
|
45
|
-
repositoryState.remotes[remoteIndex].name,
|
|
46
|
-
repositoryState.remotes[remoteIndex]
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
const originIndex = repositoryState.remotes.findIndex(r => r.name === "origin");
|
|
51
|
-
if (originIndex !== -1) {
|
|
52
|
-
const fetchUrl = repositoryState.remotes[originIndex].fetchUrl;
|
|
53
|
-
if (fetchUrl) {
|
|
54
|
-
remotes.set(
|
|
55
|
-
repositoryState.remotes[originIndex].name,
|
|
56
|
-
repositoryState.remotes[originIndex]
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
for (const remote of repositoryState.remotes) {
|
|
61
|
-
if (!( remotes.has(remote.name))) {
|
|
62
|
-
remotes.set(remote.name, remote);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return Array.from(( remotes.values()));
|
|
66
|
-
}
|
|
67
|
-
function parseRemoteUrl(fetchUrl) {
|
|
68
|
-
fetchUrl = fetchUrl.trim();
|
|
69
|
-
try {
|
|
70
|
-
if (/^[\w\d\-]+@/i.test(fetchUrl)) {
|
|
71
|
-
const parts = fetchUrl.split(":");
|
|
72
|
-
if (parts.length !== 2) {
|
|
73
|
-
return undefined;
|
|
74
|
-
}
|
|
75
|
-
fetchUrl = "ssh://" + parts[0] + "/" + parts[1];
|
|
76
|
-
}
|
|
77
|
-
const repoUrl = ( URI.parse(fetchUrl));
|
|
78
|
-
const authority = repoUrl.authority;
|
|
79
|
-
const path = repoUrl.path;
|
|
80
|
-
if (!(equalsIgnoreCase(repoUrl.scheme, "ssh") || equalsIgnoreCase(repoUrl.scheme, "https") || equalsIgnoreCase(repoUrl.scheme, "http"))) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
const splitAuthority = authority.split("@");
|
|
84
|
-
if (splitAuthority.length > 2) {
|
|
85
|
-
return undefined;
|
|
86
|
-
}
|
|
87
|
-
const extractedHost = splitAuthority.at(-1);
|
|
88
|
-
if (!extractedHost) {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
const rawHost = extractedHost.toLowerCase().replace(/:\d+$/, "");
|
|
92
|
-
const normalizedHost =
|
|
93
|
-
rawHost.replace(/^[\w\-]+-/, "").replace(/-[\w\-]+$/, "");
|
|
94
|
-
return {
|
|
95
|
-
scheme: repoUrl.scheme,
|
|
96
|
-
host: normalizedHost,
|
|
97
|
-
rawHost,
|
|
98
|
-
path: path
|
|
99
|
-
};
|
|
100
|
-
} catch (err) {
|
|
101
|
-
return undefined;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export { getGitHubRemoteInfo, getGitHubRepositoryFromRemoteUrl };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
-
import { ITerminalInstance } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
|
|
3
|
-
export interface ITerminalUriMetadata {
|
|
4
|
-
title?: string;
|
|
5
|
-
commandId?: string;
|
|
6
|
-
commandLine?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function parseTerminalUri(resource: URI): ITerminalIdentifier;
|
|
9
|
-
export declare function getTerminalUri(workspaceId: string, instanceId: number, title?: string, commandId?: string): URI;
|
|
10
|
-
export interface ITerminalIdentifier {
|
|
11
|
-
workspaceId: string;
|
|
12
|
-
instanceId: number | undefined;
|
|
13
|
-
}
|
|
14
|
-
export interface IPartialDragEvent {
|
|
15
|
-
dataTransfer: Pick<DataTransfer, "getData"> | null;
|
|
16
|
-
}
|
|
17
|
-
export declare function getTerminalResourcesFromDragEvent(event: IPartialDragEvent): URI[] | undefined;
|
|
18
|
-
export declare function getInstanceFromResource<T extends Pick<ITerminalInstance, "resource">>(instances: T[], resource: URI | undefined): T | undefined;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
3
|
-
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
4
|
-
import { TerminalDataTransfers } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal';
|
|
5
|
-
|
|
6
|
-
function parseTerminalUri(resource) {
|
|
7
|
-
const [, workspaceId, instanceId] = resource.path.split("/");
|
|
8
|
-
if (!workspaceId || !Number.parseInt(instanceId)) {
|
|
9
|
-
throw ( new Error(`Could not parse terminal uri for resource ${resource}`));
|
|
10
|
-
}
|
|
11
|
-
return {
|
|
12
|
-
workspaceId,
|
|
13
|
-
instanceId: Number.parseInt(instanceId)
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
function getTerminalUri(workspaceId, instanceId, title, commandId) {
|
|
17
|
-
const params = ( new URLSearchParams());
|
|
18
|
-
if (commandId) {
|
|
19
|
-
params.set("command", commandId);
|
|
20
|
-
}
|
|
21
|
-
return ( URI.from({
|
|
22
|
-
scheme: Schemas.vscodeTerminal,
|
|
23
|
-
path: `/${workspaceId}/${instanceId}`,
|
|
24
|
-
fragment: title || undefined,
|
|
25
|
-
query: commandId ? ( params.toString()) : undefined
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
function getTerminalResourcesFromDragEvent(event) {
|
|
29
|
-
const resources = event.dataTransfer?.getData(TerminalDataTransfers.Terminals);
|
|
30
|
-
if (resources) {
|
|
31
|
-
const json = JSON.parse(resources);
|
|
32
|
-
const result = [];
|
|
33
|
-
for (const entry of json) {
|
|
34
|
-
result.push(( URI.parse(entry)));
|
|
35
|
-
}
|
|
36
|
-
return result.length === 0 ? undefined : result;
|
|
37
|
-
}
|
|
38
|
-
return undefined;
|
|
39
|
-
}
|
|
40
|
-
function getInstanceFromResource(instances, resource) {
|
|
41
|
-
if (resource) {
|
|
42
|
-
for (const instance of instances) {
|
|
43
|
-
if (instance.resource.path === resource.path) {
|
|
44
|
-
return instance;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return undefined;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export { getInstanceFromResource, getTerminalResourcesFromDragEvent, getTerminalUri, parseTerminalUri };
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import type { IDecoration, ITerminalAddon, Terminal } from "@xterm/xterm";
|
|
2
|
-
import { IAction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
|
|
3
|
-
import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
4
|
-
import { IAccessibilitySignalService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service";
|
|
5
|
-
import { IClipboardService } from "@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service";
|
|
6
|
-
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
7
|
-
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
8
|
-
import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
|
|
9
|
-
import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service";
|
|
10
|
-
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
11
|
-
import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
12
|
-
import { IMarkProperties, ITerminalCapabilityStore, ITerminalCommand } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/capabilities";
|
|
13
|
-
import { type IDecorationAddon } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal";
|
|
14
|
-
import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
|
|
15
|
-
import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
|
|
16
|
-
import { IChatContextPickService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatContextPickService.service";
|
|
17
|
-
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
18
|
-
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
19
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
20
|
-
export declare class DecorationAddon extends Disposable implements ITerminalAddon, IDecorationAddon {
|
|
21
|
-
private readonly _resource;
|
|
22
|
-
private readonly _capabilities;
|
|
23
|
-
private readonly _clipboardService;
|
|
24
|
-
private readonly _contextMenuService;
|
|
25
|
-
private readonly _configurationService;
|
|
26
|
-
private readonly _themeService;
|
|
27
|
-
private readonly _openerService;
|
|
28
|
-
private readonly _quickInputService;
|
|
29
|
-
private readonly _commandService;
|
|
30
|
-
private readonly _accessibilitySignalService;
|
|
31
|
-
private readonly _notificationService;
|
|
32
|
-
private readonly _hoverService;
|
|
33
|
-
private readonly _contextPickService;
|
|
34
|
-
private readonly _chatWidgetService;
|
|
35
|
-
private readonly _instantiationService;
|
|
36
|
-
protected _terminal: Terminal | undefined;
|
|
37
|
-
private _capabilityDisposables;
|
|
38
|
-
private _decorations;
|
|
39
|
-
private _placeholderDecoration;
|
|
40
|
-
private _showGutterDecorations?;
|
|
41
|
-
private _showOverviewRulerDecorations?;
|
|
42
|
-
private readonly _registeredMenuItems;
|
|
43
|
-
private readonly _onDidRequestRunCommand;
|
|
44
|
-
readonly onDidRequestRunCommand: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<{
|
|
45
|
-
command: ITerminalCommand;
|
|
46
|
-
noNewLine?: boolean;
|
|
47
|
-
}>;
|
|
48
|
-
private readonly _onDidRequestCopyAsHtml;
|
|
49
|
-
readonly onDidRequestCopyAsHtml: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<{
|
|
50
|
-
command: ITerminalCommand;
|
|
51
|
-
}>;
|
|
52
|
-
constructor(_resource: URI | undefined, _capabilities: ITerminalCapabilityStore, _clipboardService: IClipboardService, _contextMenuService: IContextMenuService, _configurationService: IConfigurationService, _themeService: IThemeService, _openerService: IOpenerService, _quickInputService: IQuickInputService, _commandService: ICommandService, _accessibilitySignalService: IAccessibilitySignalService, _notificationService: INotificationService, _hoverService: IHoverService, _contextPickService: IChatContextPickService, _chatWidgetService: IChatWidgetService, _instantiationService: IInstantiationService);
|
|
53
|
-
private _createCapabilityDisposables;
|
|
54
|
-
private _removeCapabilityDisposables;
|
|
55
|
-
registerMarkDecoration(mark: IMarkProperties): IDecoration | undefined;
|
|
56
|
-
private _updateDecorationVisibility;
|
|
57
|
-
private _disposeAllDecorations;
|
|
58
|
-
private _updateGutterDecorationVisibility;
|
|
59
|
-
private _updateCommandDecorationVisibility;
|
|
60
|
-
refreshLayouts(): void;
|
|
61
|
-
private _refreshStyles;
|
|
62
|
-
private _dispose;
|
|
63
|
-
private _clearPlaceholder;
|
|
64
|
-
clearDecorations(): void;
|
|
65
|
-
private _attachToCommandCapability;
|
|
66
|
-
private _getCommandDetectionListeners;
|
|
67
|
-
activate(terminal: Terminal): void;
|
|
68
|
-
registerCommandDecoration(command?: ITerminalCommand, beforeCommandExecution?: boolean, markProperties?: IMarkProperties): IDecoration | undefined;
|
|
69
|
-
registerMenuItems(command: ITerminalCommand, items: IAction[]): IDisposable;
|
|
70
|
-
private _createDisposables;
|
|
71
|
-
private _createHover;
|
|
72
|
-
private _updateClasses;
|
|
73
|
-
private _createContextMenu;
|
|
74
|
-
private _getContextMenuActions;
|
|
75
|
-
private _getCommandActions;
|
|
76
|
-
private _createAttachToChatAction;
|
|
77
|
-
private _showToggleVisibilityQuickPick;
|
|
78
|
-
private _getDecorationCssColor;
|
|
79
|
-
}
|