monaco-editor 0.56.0-dev-20260119 → 0.56.0-dev-20260121
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/dev/vs/basic-languages/monaco.contribution.js +18 -18
- package/dev/vs/{cssMode-VP5J4n2d.js → cssMode-B0VkNrib.js} +1 -1
- package/dev/vs/editor/editor.main.css +42 -25
- package/dev/vs/editor/editor.main.js +1 -1
- package/dev/vs/{editor-ML6zs6Go.js → editor-CR18QzPP.js} +633 -162
- package/dev/vs/editor.js +1 -1
- package/dev/vs/{freemarker2-DOuHb9T9.js → freemarker2-Byr9HmH9.js} +1 -1
- package/dev/vs/{handlebars-CEHZxVsE.js → handlebars-BEVXeROF.js} +1 -1
- package/dev/vs/{html-CHMe_cBk.js → html-CetHjWIf.js} +1 -1
- package/dev/vs/{htmlMode-D7MQf6Yp.js → htmlMode-BNKYUVNo.js} +1 -1
- package/dev/vs/{index-KO0Jv4kb.js → index-g_7JbDIY.js} +1 -1
- package/dev/vs/index.js +1 -1
- package/dev/vs/{javascript-hfXEMgFg.js → javascript-BEgEU725.js} +1 -1
- package/dev/vs/{jsonMode-Dp9qexJG.js → jsonMode-CT2UkfFE.js} +1 -1
- package/dev/vs/language/css/monaco.contribution.js +1 -1
- package/dev/vs/language/html/monaco.contribution.js +1 -1
- package/dev/vs/language/json/monaco.contribution.js +1 -1
- package/dev/vs/language/typescript/monaco.contribution.js +1 -1
- package/dev/vs/{liquid-C5xy2cvN.js → liquid-D-aiCb1P.js} +1 -1
- package/dev/vs/{lspLanguageFeatures-D6ykJL1B.js → lspLanguageFeatures-CE9Occyu.js} +1 -1
- package/dev/vs/{mdx-DTsW_-Y_.js → mdx-DchJ8pbq.js} +1 -1
- package/dev/vs/{monaco.contribution-DuzmV_VZ.js → monaco.contribution-CHqb1dWh.js} +2 -2
- package/dev/vs/{monaco.contribution-t7Hz4wVA.js → monaco.contribution-CVBrIlxn.js} +2 -2
- package/dev/vs/{monaco.contribution-CcoogmES.js → monaco.contribution-CZxuzvA9.js} +2 -2
- package/dev/vs/{monaco.contribution-CQ8dNY-Q.js → monaco.contribution-Cw4OdERZ.js} +2 -2
- package/dev/vs/nls/lang/cs.js +1 -1
- package/dev/vs/nls/lang/de.js +1 -1
- package/dev/vs/nls/lang/es.js +1 -1
- package/dev/vs/nls/lang/fr.js +1 -1
- package/dev/vs/nls/lang/it.js +1 -1
- package/dev/vs/nls/lang/ja.js +1 -1
- package/dev/vs/nls/lang/ko.js +1 -1
- package/dev/vs/nls/lang/pl.js +1 -1
- package/dev/vs/nls/lang/pt-br.js +1 -1
- package/dev/vs/nls/lang/ru.js +1 -1
- package/dev/vs/nls/lang/tr.js +1 -1
- package/dev/vs/nls/lang/zh-cn.js +1 -1
- package/dev/vs/nls/lang/zh-tw.js +1 -1
- package/dev/vs/{python-1ZtmJ8bh.js → python-BCOSaCC8.js} +1 -1
- package/dev/vs/{razor-D7Pdon_S.js → razor-BM2tZCwj.js} +1 -1
- package/dev/vs/{toggleHighContrast-Btd2ryZF.js → toggleHighContrast-CLgtrrIB.js} +148 -315
- package/dev/vs/{tsMode-Dy3ckMs8.js → tsMode-jpkv3SbL.js} +1 -1
- package/dev/vs/{typescript-BBL8N09V.js → typescript-f8pt88eA.js} +1 -1
- package/dev/vs/{workers-B9Ao1ciR.js → workers-zrUx_2Gw.js} +1 -1
- package/dev/vs/{xml-7BH7GgP4.js → xml-CmSjtiR0.js} +1 -1
- package/dev/vs/{yaml-DvwGvgS8.js → yaml-PRriLGdw.js} +1 -1
- package/esm/vs/base/browser/markdownRenderer.js +1 -0
- package/esm/vs/base/browser/ui/actionbar/actionViewItems.js +4 -1
- package/esm/vs/base/browser/ui/actionbar/actionbar.css +8 -5
- package/esm/vs/base/browser/ui/contextview/contextview.js +1 -1
- package/esm/vs/base/browser/ui/list/list.js +2 -1
- package/esm/vs/base/browser/ui/list/listWidget.js +62 -5
- package/esm/vs/base/browser/ui/tree/abstractTree.js +4 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js +4 -1
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +81 -35
- package/esm/vs/editor/browser/controller/editContext/editContext.js +11 -0
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +38 -18
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +4 -0
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +39 -16
- package/esm/vs/editor/browser/dataTransfer.js +1 -1
- package/esm/vs/editor/browser/view.js +21 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +18 -0
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/colorizedBracketPairsDecorationProvider.js +3 -3
- package/esm/vs/editor/common/model/textModel.js +7 -5
- package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js +21 -17
- package/esm/vs/editor/common/viewModel/viewModelDecorations.js +11 -4
- package/esm/vs/editor/common/viewModel/viewModelImpl.js +25 -14
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +3 -3
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +28 -64
- package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +27 -20
- package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.js +37 -9
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.css +7 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +22 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +20 -14
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +1 -0
- package/esm/vs/editor/editor.api.d.ts +5 -1
- package/esm/vs/nls/lang/cs.js +1 -1
- package/esm/vs/nls/lang/de.js +1 -1
- package/esm/vs/nls/lang/es.js +1 -1
- package/esm/vs/nls/lang/fr.js +1 -1
- package/esm/vs/nls/lang/it.js +1 -1
- package/esm/vs/nls/lang/ja.js +1 -1
- package/esm/vs/nls/lang/ko.js +1 -1
- package/esm/vs/nls/lang/pl.js +1 -1
- package/esm/vs/nls/lang/pt-br.js +1 -1
- package/esm/vs/nls/lang/ru.js +1 -1
- package/esm/vs/nls/lang/tr.js +1 -1
- package/esm/vs/nls/lang/zh-cn.js +1 -1
- package/esm/vs/nls/lang/zh-tw.js +1 -1
- package/esm/vs/platform/actionWidget/browser/actionList.js +46 -6
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +9 -2
- package/esm/vs/platform/actions/common/actions.js +2 -1
- package/esm/vs/platform/hover/browser/hoverService.js +1 -0
- package/esm/vs/platform/product/common/product.js +16 -1
- package/min/vs/basic-languages/monaco.contribution.js +1 -1
- package/min/vs/{cssMode-CxJ_Cr_Z.js → cssMode-CheCY05R.js} +1 -1
- package/min/vs/editor/editor.main.css +1 -1
- package/min/vs/editor/editor.main.js +1 -1
- package/min/vs/{editor-CyVlw8K4.js → editor-DxYWA3-X.js} +112 -110
- package/min/vs/editor.js +1 -1
- package/min/vs/{freemarker2-CJcSu3nc.js → freemarker2-C7J7V1Hp.js} +1 -1
- package/min/vs/{handlebars-DPLjS6oj.js → handlebars-DsCar5Ix.js} +1 -1
- package/min/vs/{html-DUmbFRY-.js → html-BGLIaUZV.js} +1 -1
- package/min/vs/{htmlMode-DfUvYWkE.js → htmlMode-BB6WOoy3.js} +1 -1
- package/min/vs/{index-DOycyDud.js → index-BdR0nSqf.js} +1 -1
- package/min/vs/index.js +1 -1
- package/min/vs/{javascript-CQpB78Gy.js → javascript-CXE3i1eX.js} +1 -1
- package/min/vs/{jsonMode-B1E1R3KS.js → jsonMode-rtaE9alu.js} +1 -1
- package/min/vs/language/css/monaco.contribution.js +1 -1
- package/min/vs/language/html/monaco.contribution.js +1 -1
- package/min/vs/language/json/monaco.contribution.js +1 -1
- package/min/vs/language/typescript/monaco.contribution.js +1 -1
- package/min/vs/{liquid-Bh_nhvai.js → liquid-CEdn0ovR.js} +1 -1
- package/min/vs/{lspLanguageFeatures-CAWBopti.js → lspLanguageFeatures-CRAjJmzF.js} +1 -1
- package/min/vs/{mdx-CvpAYI3X.js → mdx-DLDMIqnu.js} +1 -1
- package/min/vs/{monaco.contribution-QIm8iN-Y.js → monaco.contribution-BrRAk-VA.js} +1 -1
- package/min/vs/{monaco.contribution-C3jTRlbI.js → monaco.contribution-C67XgReK.js} +1 -1
- package/min/vs/{monaco.contribution-Cmckd8EG.js → monaco.contribution-CYT-Sx3l.js} +1 -1
- package/min/vs/{monaco.contribution-6Rc9eWJ0.js → monaco.contribution-DjiQkKLa.js} +1 -1
- package/min/vs/nls/lang/cs.js +1 -1
- package/min/vs/nls/lang/de.js +1 -1
- package/min/vs/nls/lang/es.js +1 -1
- package/min/vs/nls/lang/fr.js +1 -1
- package/min/vs/nls/lang/it.js +1 -1
- package/min/vs/nls/lang/ja.js +1 -1
- package/min/vs/nls/lang/ko.js +1 -1
- package/min/vs/nls/lang/pl.js +1 -1
- package/min/vs/nls/lang/pt-br.js +1 -1
- package/min/vs/nls/lang/ru.js +1 -1
- package/min/vs/nls/lang/tr.js +1 -1
- package/min/vs/nls/lang/zh-cn.js +1 -1
- package/min/vs/nls/lang/zh-tw.js +1 -1
- package/min/vs/{python-BuY3uazV.js → python-CKbl_I3e.js} +1 -1
- package/min/vs/{razor-DQBMGsJX.js → razor--RjiPxbd.js} +1 -1
- package/min/vs/{toggleHighContrast-BTse4XBl.js → toggleHighContrast-BKDMxisH.js} +31 -33
- package/min/vs/{tsMode-C8sInOMc.js → tsMode-C48d5M22.js} +1 -1
- package/min/vs/{typescript-DMigl3F4.js → typescript-e7oUhPyX.js} +1 -1
- package/min/vs/{workers-BznOw4bL.js → workers-CtpYUoCo.js} +1 -1
- package/min/vs/{xml-C2bHWkWJ.js → xml-tOyfgws7.js} +1 -1
- package/min/vs/{yaml-gtjQmyMa.js → yaml-Cmf9NYDf.js} +1 -1
- package/monaco.d.ts +5 -1
- package/package.json +4 -4
|
@@ -4,41 +4,48 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
.floating-menu-overlay-widget {
|
|
7
|
-
padding:
|
|
8
|
-
color: var(--vscode-
|
|
9
|
-
background-color: var(--vscode-
|
|
10
|
-
border-radius:
|
|
7
|
+
padding: 2px 4px;
|
|
8
|
+
color: var(--vscode-foreground);
|
|
9
|
+
background-color: var(--vscode-editorWidget-background);
|
|
10
|
+
border-radius: 6px;
|
|
11
11
|
border: 1px solid var(--vscode-contrastBorder);
|
|
12
12
|
display: flex;
|
|
13
13
|
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
gap: 4px;
|
|
14
16
|
z-index: 10;
|
|
15
17
|
box-shadow: 0 2px 8px var(--vscode-widget-shadow);
|
|
16
18
|
overflow: hidden;
|
|
17
19
|
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
font-size: 12px;
|
|
21
|
-
border-radius: 2px;
|
|
20
|
+
.actions-container {
|
|
21
|
+
gap: 4px;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
.action-item > .action-label
|
|
25
|
-
|
|
24
|
+
.action-item > .action-label {
|
|
25
|
+
padding: 4px 6px;
|
|
26
|
+
font-size: 11px;
|
|
27
|
+
line-height: 14px;
|
|
28
|
+
border-radius: 4px;
|
|
26
29
|
}
|
|
27
30
|
|
|
28
31
|
.action-item > .action-label.codicon:not(.separator) {
|
|
29
|
-
|
|
30
|
-
|
|
32
|
+
color: var(--vscode-foreground);
|
|
33
|
+
width: 22px;
|
|
34
|
+
height: 22px;
|
|
35
|
+
padding: 0;
|
|
36
|
+
font-size: 16px;
|
|
37
|
+
line-height: 22px;
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: center;
|
|
31
41
|
}
|
|
32
42
|
|
|
33
|
-
.action-item
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
.action-item:last-child > .action-label {
|
|
38
|
-
padding-right: 7px;
|
|
43
|
+
.action-item.primary > .action-label {
|
|
44
|
+
background-color: var(--vscode-button-background);
|
|
45
|
+
color: var(--vscode-button-foreground);
|
|
39
46
|
}
|
|
40
47
|
|
|
41
|
-
.action-item .action-label
|
|
42
|
-
background-color: var(--vscode-button-
|
|
48
|
+
.action-item.primary > .action-label:hover {
|
|
49
|
+
background-color: var(--vscode-button-hoverBackground) !important;
|
|
43
50
|
}
|
|
44
51
|
}
|
|
@@ -8,6 +8,7 @@ import { IInstantiationService } from '../../../../platform/instantiation/common
|
|
|
8
8
|
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';
|
|
9
9
|
import { observableCodeEditor } from '../../../browser/observableCodeEditor.js';
|
|
10
10
|
import { observableFromEvent } from '../../../../base/common/observableInternal/observables/observableFromEvent.js';
|
|
11
|
+
import { derived } from '../../../../base/common/observableInternal/observables/derived.js';
|
|
11
12
|
import { autorun } from '../../../../base/common/observableInternal/reactions/autorun.js';
|
|
12
13
|
import { constObservable } from '../../../../base/common/observableInternal/observables/constObservable.js';
|
|
13
14
|
|
|
@@ -30,30 +31,57 @@ let FloatingEditorToolbar = class FloatingEditorToolbar extends Disposable {
|
|
|
30
31
|
super();
|
|
31
32
|
const editorObs = this._register(observableCodeEditor(editor));
|
|
32
33
|
const menu = this._register(menuService.createMenu(MenuId.EditorContent, editor.contextKeyService));
|
|
33
|
-
const
|
|
34
|
+
const menuActionsObs = observableFromEvent(this, menu.onDidChange, () => menu.getActions());
|
|
35
|
+
const menuPrimaryActionIdObs = derived(reader => {
|
|
36
|
+
const menuActions = menuActionsObs.read(reader);
|
|
37
|
+
if (menuActions.length === 0) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
// Navigation group
|
|
41
|
+
const navigationGroup = menuActions
|
|
42
|
+
.find((group) => group[0] === 'navigation');
|
|
43
|
+
// First action in navigation group
|
|
44
|
+
if (navigationGroup && navigationGroup[1].length > 0) {
|
|
45
|
+
return navigationGroup[1][0].id;
|
|
46
|
+
}
|
|
47
|
+
// Fallback to first group/action
|
|
48
|
+
for (const [, actions] of menuActions) {
|
|
49
|
+
if (actions.length > 0) {
|
|
50
|
+
return actions[0].id;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return undefined;
|
|
54
|
+
});
|
|
34
55
|
this._register(autorun(reader => {
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
56
|
+
const menuPrimaryActionId = menuPrimaryActionIdObs.read(reader);
|
|
57
|
+
if (!menuPrimaryActionId) {
|
|
37
58
|
return;
|
|
38
59
|
}
|
|
39
60
|
const container = h('div.floating-menu-overlay-widget');
|
|
40
61
|
// Set height explicitly to ensure that the floating menu element
|
|
41
62
|
// is rendered in the lower right corner at the correct position.
|
|
42
|
-
container.root.style.height = '
|
|
63
|
+
container.root.style.height = '26px';
|
|
43
64
|
// Toolbar
|
|
44
65
|
const toolbar = instantiationService.createInstance(MenuWorkbenchToolBar, container.root, MenuId.EditorContent, {
|
|
45
66
|
actionViewItemProvider: (action, options) => {
|
|
46
67
|
if (!(action instanceof MenuItemAction)) {
|
|
47
68
|
return undefined;
|
|
48
69
|
}
|
|
49
|
-
const keybinding = keybindingService.lookupKeybinding(action.id);
|
|
50
|
-
if (!keybinding) {
|
|
51
|
-
return undefined;
|
|
52
|
-
}
|
|
53
70
|
return instantiationService.createInstance(class extends MenuEntryActionViewItem {
|
|
71
|
+
render(container) {
|
|
72
|
+
super.render(container);
|
|
73
|
+
// Highlight primary action
|
|
74
|
+
if (action.id === menuPrimaryActionId) {
|
|
75
|
+
this.element?.classList.add('primary');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
54
78
|
updateLabel() {
|
|
79
|
+
const keybinding = keybindingService.lookupKeybinding(action.id);
|
|
80
|
+
const keybindingLabel = keybinding ? keybinding.getLabel() : undefined;
|
|
55
81
|
if (this.options.label && this.label) {
|
|
56
|
-
this.label.textContent =
|
|
82
|
+
this.label.textContent = keybindingLabel
|
|
83
|
+
? `${this._commandAction.label} (${keybindingLabel})`
|
|
84
|
+
: this._commandAction.label;
|
|
57
85
|
}
|
|
58
86
|
}
|
|
59
87
|
}, action, { ...options, keybindingNotRenderedWithLabel: true });
|
|
@@ -1095,8 +1095,8 @@ function isSuggestionInViewport(editor, suggestion, reader = undefined) {
|
|
|
1095
1095
|
return viewportRange.containsRange(targetRange);
|
|
1096
1096
|
}
|
|
1097
1097
|
function skuFromAccount(account) {
|
|
1098
|
-
if (account?.access_type_sku && account?.copilot_plan) {
|
|
1099
|
-
return { type: account.access_type_sku, plan: account.copilot_plan };
|
|
1098
|
+
if (account?.entitlementsData?.access_type_sku && account?.entitlementsData?.copilot_plan) {
|
|
1099
|
+
return { type: account.entitlementsData.access_type_sku, plan: account.entitlementsData.copilot_plan };
|
|
1100
1100
|
}
|
|
1101
1101
|
return undefined;
|
|
1102
1102
|
}
|
|
@@ -64,6 +64,13 @@
|
|
|
64
64
|
border-bottom: 4px double var(--vscode-editorWarning-border);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
.monaco-editor .ghost-text-decoration.short-text,
|
|
68
|
+
.monaco-editor .ghost-text-decoration-preview.short-text,
|
|
69
|
+
.monaco-editor .suggest-preview-text .ghost-text.short-text {
|
|
70
|
+
text-decoration: underline dotted var(--vscode-editorGhostText-foreground);
|
|
71
|
+
text-underline-position: under;
|
|
72
|
+
}
|
|
73
|
+
|
|
67
74
|
.ghost-text-view-warning-widget-icon {
|
|
68
75
|
.codicon {
|
|
69
76
|
color: var(--vscode-editorWarning-foreground) !important;
|
|
@@ -77,14 +77,27 @@ let GhostTextView = class GhostTextView extends Disposable {
|
|
|
77
77
|
});
|
|
78
78
|
this._onDidClick = this._register(new Emitter());
|
|
79
79
|
this.onDidClick = this._onDidClick.event;
|
|
80
|
+
this._nonWhitespaceCount = derived(this, reader => {
|
|
81
|
+
const data = this._data.read(reader);
|
|
82
|
+
if (!data) {
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
const ghostText = data.ghostText;
|
|
86
|
+
const allText = ghostText.parts.map(p => p.lines.map(l => l.line).join('')).join('');
|
|
87
|
+
return allText.replace(/\s/g, '').length;
|
|
88
|
+
});
|
|
80
89
|
this._extraClassNames = derived(this, reader => {
|
|
81
90
|
const extraClasses = this._extraClasses.slice();
|
|
82
|
-
if (this._useSyntaxHighlighting.read(reader)) {
|
|
83
|
-
extraClasses.push('syntax-highlighted');
|
|
84
|
-
}
|
|
85
91
|
if (this._warningState.read(reader)) {
|
|
86
92
|
extraClasses.push('warning');
|
|
87
93
|
}
|
|
94
|
+
const nonWhitespaceCount = this._nonWhitespaceCount.read(reader);
|
|
95
|
+
if (this._highlightShortText && nonWhitespaceCount && nonWhitespaceCount < 3) {
|
|
96
|
+
extraClasses.push('short-text');
|
|
97
|
+
}
|
|
98
|
+
else if (this._useSyntaxHighlighting.read(reader)) {
|
|
99
|
+
extraClasses.push('syntax-highlighted');
|
|
100
|
+
}
|
|
88
101
|
const extraClassNames = extraClasses.map(c => ` ${c}`).join('');
|
|
89
102
|
return extraClassNames;
|
|
90
103
|
});
|
|
@@ -156,6 +169,10 @@ let GhostTextView = class GhostTextView extends Disposable {
|
|
|
156
169
|
});
|
|
157
170
|
}
|
|
158
171
|
for (const p of uiState.inlineTexts) {
|
|
172
|
+
let inlineExtraClassNames = '';
|
|
173
|
+
if (this._highlightShortText && p.text.length < 5) {
|
|
174
|
+
inlineExtraClassNames += ' short-text';
|
|
175
|
+
}
|
|
159
176
|
decorations.push({
|
|
160
177
|
range: Range.fromPositions(new Position(uiState.lineNumber, p.column)),
|
|
161
178
|
options: {
|
|
@@ -166,6 +183,7 @@ let GhostTextView = class GhostTextView extends Disposable {
|
|
|
166
183
|
inlineClassName: (p.preview ? 'ghost-text-decoration-preview' : 'ghost-text-decoration')
|
|
167
184
|
+ (this._isClickable ? ' clickable' : '')
|
|
168
185
|
+ extraClassNames
|
|
186
|
+
+ inlineExtraClassNames
|
|
169
187
|
+ p.lineDecorations.map(d => ' ' + d.className).join(' '), // TODO: take the ranges into account for line decorations
|
|
170
188
|
cursorStops: InjectedTextCursorStops.Left,
|
|
171
189
|
attachedData: new GhostTextAttachedData(this),
|
|
@@ -191,6 +209,7 @@ let GhostTextView = class GhostTextView extends Disposable {
|
|
|
191
209
|
this._shouldKeepCursorStable = options.shouldKeepCursorStable ?? false;
|
|
192
210
|
this._minReservedLineCount = options.minReservedLineCount ?? constObservable(0);
|
|
193
211
|
this._useSyntaxHighlighting = options.useSyntaxHighlighting ?? constObservable(true);
|
|
212
|
+
this._highlightShortText = options.highlightShortSuggestions ?? false;
|
|
194
213
|
this._editorObs = observableCodeEditor(this._editor);
|
|
195
214
|
this._additionalLinesWidget = this._register(new AdditionalLinesWidget(this._editor, derivedOpts({ owner: this, equalsFn: equalsIfDefinedC(thisEqualsC()) }, reader => {
|
|
196
215
|
/** @description lines */
|
|
@@ -22,8 +22,8 @@ import { asCssVariable } from '../../../../../../../platform/theme/common/colorU
|
|
|
22
22
|
import { debouncedObservable } from '../../../../../../../base/common/observableInternal/utils/utils.js';
|
|
23
23
|
import { observableFromEvent } from '../../../../../../../base/common/observableInternal/observables/observableFromEvent.js';
|
|
24
24
|
import { derived } from '../../../../../../../base/common/observableInternal/observables/derived.js';
|
|
25
|
-
import { observableValue } from '../../../../../../../base/common/observableInternal/observables/observableValue.js';
|
|
26
25
|
import { constObservable } from '../../../../../../../base/common/observableInternal/observables/constObservable.js';
|
|
26
|
+
import { observableValue } from '../../../../../../../base/common/observableInternal/observables/observableValue.js';
|
|
27
27
|
import { runOnChange } from '../../../../../../../base/common/observableInternal/utils/runOnChange.js';
|
|
28
28
|
import { autorun } from '../../../../../../../base/common/observableInternal/reactions/autorun.js';
|
|
29
29
|
|
|
@@ -41,11 +41,12 @@ var __param = (undefined && undefined.__param) || function (paramIndex, decorato
|
|
|
41
41
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
42
42
|
};
|
|
43
43
|
class InlineEditsGutterIndicatorData {
|
|
44
|
-
constructor(gutterMenuData, originalRange, model, altAction) {
|
|
44
|
+
constructor(gutterMenuData, originalRange, model, altAction, customization) {
|
|
45
45
|
this.gutterMenuData = gutterMenuData;
|
|
46
46
|
this.originalRange = originalRange;
|
|
47
47
|
this.model = model;
|
|
48
48
|
this.altAction = altAction;
|
|
49
|
+
this.customization = customization;
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
class InlineSuggestionGutterMenuData {
|
|
@@ -224,18 +225,23 @@ let InlineEditsGutterIndicator = class InlineEditsGutterIndicator extends Dispos
|
|
|
224
225
|
const pillFullyDockedRect = gutterEditArea.withHeight(pillHeight).translateY(pillOffset);
|
|
225
226
|
const pillIsFullyDocked = gutterViewPortWithoutStickyScrollWithoutPaddingTop.containsRect(pillFullyDockedRect);
|
|
226
227
|
// The icon which will be rendered in the pill
|
|
227
|
-
const
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
228
|
+
const customIcon = this._data.read(reader)?.customization?.icon;
|
|
229
|
+
const iconNoneDocked = customIcon
|
|
230
|
+
? constObservable(customIcon)
|
|
231
|
+
: this._tabAction.map(action => action === InlineEditTabAction.Accept ? Codicon.keyboardTab : Codicon.arrowRight);
|
|
232
|
+
const iconDocked = customIcon
|
|
233
|
+
? constObservable(customIcon)
|
|
234
|
+
: derived(this, reader => {
|
|
235
|
+
if (this._isHoveredOverIconDebounced.read(reader) || this._isHoveredOverInlineEditDebounced.read(reader)) {
|
|
236
|
+
return Codicon.check;
|
|
237
|
+
}
|
|
238
|
+
if (this._tabAction.read(reader) === InlineEditTabAction.Accept) {
|
|
239
|
+
return Codicon.keyboardTab;
|
|
240
|
+
}
|
|
241
|
+
const cursorLineNumber = this._editorObs.cursorLineNumber.read(reader) ?? 0;
|
|
242
|
+
const editStartLineNumber = s.range.read(reader).startLineNumber;
|
|
243
|
+
return cursorLineNumber <= editStartLineNumber ? Codicon.keyboardTabAbove : Codicon.keyboardTabBelow;
|
|
244
|
+
});
|
|
239
245
|
const idealIconAreaWidth = 22;
|
|
240
246
|
const iconWidth = (pillRect) => {
|
|
241
247
|
const availableIconAreaWidth = this._availableWidthForIcon.read(undefined)(pillRect.bottom + this._editorObs.editor.getScrollTop()) - gutterViewPortPaddingLeft;
|
|
@@ -153,6 +153,7 @@ let InlineSuggestionsView = class InlineSuggestionsView extends Disposable {
|
|
|
153
153
|
};
|
|
154
154
|
}), {
|
|
155
155
|
useSyntaxHighlighting: this._editorObs.getOption(71 /* EditorOption.inlineSuggest */).map(v => v.syntaxHighlightingEnabled),
|
|
156
|
+
highlightShortSuggestions: true,
|
|
156
157
|
});
|
|
157
158
|
}
|
|
158
159
|
shouldShowHoverAtViewZone(viewZoneId) {
|
|
@@ -1745,7 +1745,7 @@ declare namespace editor {
|
|
|
1745
1745
|
*/
|
|
1746
1746
|
glyphMargin?: IModelDecorationGlyphMarginOptions | null;
|
|
1747
1747
|
/**
|
|
1748
|
-
* If set, the decoration will override the line height of the lines it spans.
|
|
1748
|
+
* If set, the decoration will override the line height of the lines it spans. This value is a multiplier to the default line height.
|
|
1749
1749
|
*/
|
|
1750
1750
|
lineHeight?: number | null;
|
|
1751
1751
|
/**
|
|
@@ -6387,6 +6387,10 @@ declare namespace editor {
|
|
|
6387
6387
|
* Force an editor render now.
|
|
6388
6388
|
*/
|
|
6389
6389
|
render(forceRedraw?: boolean): void;
|
|
6390
|
+
/**
|
|
6391
|
+
* Render the editor at the next animation frame.
|
|
6392
|
+
*/
|
|
6393
|
+
renderAsync(forceRedraw?: boolean): void;
|
|
6390
6394
|
/**
|
|
6391
6395
|
* Get the hit test target at coordinates `clientX` and `clientY`.
|
|
6392
6396
|
* The coordinates are relative to the top-left of the viewport.
|
package/esm/vs/nls/lang/cs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.56.0-dev-
|
|
3
|
+
* Version: 0.56.0-dev-20260121(fe9dd23f49a64c1b2811d9eeec98f38876f93511)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/vs/nls/lang/de.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.56.0-dev-
|
|
3
|
+
* Version: 0.56.0-dev-20260121(fe9dd23f49a64c1b2811d9eeec98f38876f93511)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/vs/nls/lang/es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.56.0-dev-
|
|
3
|
+
* Version: 0.56.0-dev-20260121(fe9dd23f49a64c1b2811d9eeec98f38876f93511)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/vs/nls/lang/fr.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.56.0-dev-
|
|
3
|
+
* Version: 0.56.0-dev-20260121(fe9dd23f49a64c1b2811d9eeec98f38876f93511)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/vs/nls/lang/it.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.56.0-dev-
|
|
3
|
+
* Version: 0.56.0-dev-20260121(fe9dd23f49a64c1b2811d9eeec98f38876f93511)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/vs/nls/lang/ja.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.56.0-dev-
|
|
3
|
+
* Version: 0.56.0-dev-20260121(fe9dd23f49a64c1b2811d9eeec98f38876f93511)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/vs/nls/lang/ko.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.56.0-dev-
|
|
3
|
+
* Version: 0.56.0-dev-20260121(fe9dd23f49a64c1b2811d9eeec98f38876f93511)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/vs/nls/lang/pl.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.56.0-dev-
|
|
3
|
+
* Version: 0.56.0-dev-20260121(fe9dd23f49a64c1b2811d9eeec98f38876f93511)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/vs/nls/lang/pt-br.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.56.0-dev-
|
|
3
|
+
* Version: 0.56.0-dev-20260121(fe9dd23f49a64c1b2811d9eeec98f38876f93511)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/vs/nls/lang/ru.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.56.0-dev-
|
|
3
|
+
* Version: 0.56.0-dev-20260121(fe9dd23f49a64c1b2811d9eeec98f38876f93511)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/vs/nls/lang/tr.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.56.0-dev-
|
|
3
|
+
* Version: 0.56.0-dev-20260121(fe9dd23f49a64c1b2811d9eeec98f38876f93511)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/vs/nls/lang/zh-cn.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.56.0-dev-
|
|
3
|
+
* Version: 0.56.0-dev-20260121(fe9dd23f49a64c1b2811d9eeec98f38876f93511)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/vs/nls/lang/zh-tw.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.56.0-dev-
|
|
3
|
+
* Version: 0.56.0-dev-20260121(fe9dd23f49a64c1b2811d9eeec98f38876f93511)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
|
@@ -3,7 +3,7 @@ import { KeybindingLabel } from '../../../base/browser/ui/keybindingLabel/keybin
|
|
|
3
3
|
import { List } from '../../../base/browser/ui/list/listWidget.js';
|
|
4
4
|
import { CancellationTokenSource } from '../../../base/common/cancellation.js';
|
|
5
5
|
import { Codicon } from '../../../base/common/codicons.js';
|
|
6
|
-
import { Disposable } from '../../../base/common/lifecycle.js';
|
|
6
|
+
import { Disposable, MutableDisposable } from '../../../base/common/lifecycle.js';
|
|
7
7
|
import { OS } from '../../../base/common/platform.js';
|
|
8
8
|
import { ThemeIcon } from '../../../base/common/themables.js';
|
|
9
9
|
import './actionWidget.css';
|
|
@@ -23,6 +23,8 @@ import '../../theme/common/colors/miscColors.js';
|
|
|
23
23
|
import '../../theme/common/colors/quickpickColors.js';
|
|
24
24
|
import '../../theme/common/colors/searchColors.js';
|
|
25
25
|
import { ILayoutService } from '../../layout/browser/layoutService.js';
|
|
26
|
+
import { IHoverService } from '../../hover/browser/hover.js';
|
|
27
|
+
import { MarkdownString } from '../../../base/common/htmlContent.js';
|
|
26
28
|
|
|
27
29
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
28
30
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -124,6 +126,10 @@ let ActionItemRenderer = class ActionItemRenderer {
|
|
|
124
126
|
else if (element.disabled) {
|
|
125
127
|
data.container.title = element.label;
|
|
126
128
|
}
|
|
129
|
+
else if (element.hover?.content) {
|
|
130
|
+
// Don't show tooltip when hover content is configured - the rich hover will show instead
|
|
131
|
+
data.container.title = '';
|
|
132
|
+
}
|
|
127
133
|
else if (actionTitle && previewTitle) {
|
|
128
134
|
if (this._supportsPreview && element.canPreview) {
|
|
129
135
|
data.container.title = localize(1668, "{0} to Apply, {1} to Preview", actionTitle, previewTitle);
|
|
@@ -157,16 +163,18 @@ function getKeyboardNavigationLabel(item) {
|
|
|
157
163
|
return undefined;
|
|
158
164
|
}
|
|
159
165
|
let ActionList = class ActionList extends Disposable {
|
|
160
|
-
constructor(user, preview, items, _delegate, accessibilityProvider, _contextViewService, _keybindingService, _layoutService) {
|
|
166
|
+
constructor(user, preview, items, _delegate, accessibilityProvider, _contextViewService, _keybindingService, _layoutService, _hoverService) {
|
|
161
167
|
super();
|
|
162
168
|
this._delegate = _delegate;
|
|
163
169
|
this._contextViewService = _contextViewService;
|
|
164
170
|
this._keybindingService = _keybindingService;
|
|
165
171
|
this._layoutService = _layoutService;
|
|
172
|
+
this._hoverService = _hoverService;
|
|
166
173
|
this._actionLineHeight = 28;
|
|
167
174
|
this._headerLineHeight = 28;
|
|
168
175
|
this._separatorLineHeight = 8;
|
|
169
176
|
this.cts = this._register(new CancellationTokenSource());
|
|
177
|
+
this._hover = this._register(new MutableDisposable());
|
|
170
178
|
this.domNode = document.createElement('div');
|
|
171
179
|
this.domNode.classList.add('actionList');
|
|
172
180
|
const virtualDelegate = {
|
|
@@ -236,6 +244,7 @@ let ActionList = class ActionList extends Disposable {
|
|
|
236
244
|
hide(didCancel) {
|
|
237
245
|
this._delegate.onHide(didCancel);
|
|
238
246
|
this.cts.cancel();
|
|
247
|
+
this._hover.clear();
|
|
239
248
|
this._contextViewService.hideContextView();
|
|
240
249
|
}
|
|
241
250
|
layout(minWidth) {
|
|
@@ -253,8 +262,7 @@ let ActionList = class ActionList extends Disposable {
|
|
|
253
262
|
else {
|
|
254
263
|
// For finding width dynamically (not using resize observer)
|
|
255
264
|
const itemWidths = this._allMenuItems.map((_, index) => {
|
|
256
|
-
|
|
257
|
-
const element = this.domNode.ownerDocument.getElementById(this._list.getElementID(index));
|
|
265
|
+
const element = this._getRowElement(index);
|
|
258
266
|
if (element) {
|
|
259
267
|
element.style.width = 'auto';
|
|
260
268
|
const width = element.getBoundingClientRect().width;
|
|
@@ -312,6 +320,37 @@ let ActionList = class ActionList extends Disposable {
|
|
|
312
320
|
const focusIndex = focused[0];
|
|
313
321
|
const element = this._list.element(focusIndex);
|
|
314
322
|
this._delegate.onFocus?.(element.item);
|
|
323
|
+
// Show hover on focus change
|
|
324
|
+
this._showHoverForElement(element, focusIndex);
|
|
325
|
+
}
|
|
326
|
+
_getRowElement(index) {
|
|
327
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
328
|
+
return this.domNode.ownerDocument.getElementById(this._list.getElementID(index));
|
|
329
|
+
}
|
|
330
|
+
_showHoverForElement(element, index) {
|
|
331
|
+
let newHover;
|
|
332
|
+
// Show hover if the element has hover content
|
|
333
|
+
if (element.hover?.content && this.focusCondition(element)) {
|
|
334
|
+
// The List widget separates data models from DOM elements, so we need to
|
|
335
|
+
// look up the actual DOM node to use as the hover target.
|
|
336
|
+
const rowElement = this._getRowElement(index);
|
|
337
|
+
if (rowElement) {
|
|
338
|
+
const markdown = element.hover.content ? new MarkdownString(element.hover.content) : undefined;
|
|
339
|
+
newHover = this._hoverService.showDelayedHover({
|
|
340
|
+
content: markdown ?? '',
|
|
341
|
+
target: rowElement,
|
|
342
|
+
additionalClasses: ['action-widget-hover'],
|
|
343
|
+
position: {
|
|
344
|
+
hoverPosition: 0 /* HoverPosition.LEFT */,
|
|
345
|
+
forcePosition: false,
|
|
346
|
+
},
|
|
347
|
+
appearance: {
|
|
348
|
+
showPointer: true,
|
|
349
|
+
},
|
|
350
|
+
}, { groupId: `actionListHover` });
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
this._hover.value = newHover;
|
|
315
354
|
}
|
|
316
355
|
async onListHover(e) {
|
|
317
356
|
const element = e.element;
|
|
@@ -323,8 +362,8 @@ let ActionList = class ActionList extends Disposable {
|
|
|
323
362
|
if (e.index) {
|
|
324
363
|
this._list.splice(e.index, 1, [element]);
|
|
325
364
|
}
|
|
365
|
+
this._list.setFocus(typeof e.index === 'number' ? [e.index] : []);
|
|
326
366
|
}
|
|
327
|
-
this._list.setFocus(typeof e.index === 'number' ? [e.index] : []);
|
|
328
367
|
}
|
|
329
368
|
onListClick(e) {
|
|
330
369
|
if (e.element && this.focusCondition(e.element)) {
|
|
@@ -335,7 +374,8 @@ let ActionList = class ActionList extends Disposable {
|
|
|
335
374
|
ActionList = __decorate([
|
|
336
375
|
__param(5, IContextViewService),
|
|
337
376
|
__param(6, IKeybindingService),
|
|
338
|
-
__param(7, ILayoutService)
|
|
377
|
+
__param(7, ILayoutService),
|
|
378
|
+
__param(8, IHoverService)
|
|
339
379
|
], ActionList);
|
|
340
380
|
function stripNewlines(str) {
|
|
341
381
|
return str.replace(/\r\n|\r|\n/g, ' ');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addDisposableListener, EventType, trackFocus, $ } from '../../../base/browser/dom.js';
|
|
1
|
+
import { addDisposableListener, EventType, trackFocus, getActiveElement, $ } from '../../../base/browser/dom.js';
|
|
2
2
|
import { ActionBar } from '../../../base/browser/ui/actionbar/actionbar.js';
|
|
3
3
|
import { Disposable, MutableDisposable, DisposableStore } from '../../../base/common/lifecycle.js';
|
|
4
4
|
import './actionWidget.css';
|
|
@@ -111,7 +111,14 @@ let ActionWidgetService = class ActionWidgetService extends Disposable {
|
|
|
111
111
|
const width = this._list.value?.layout(actionBarWidth);
|
|
112
112
|
widget.style.width = `${width}px`;
|
|
113
113
|
const focusTracker = renderDisposables.add(trackFocus(element));
|
|
114
|
-
renderDisposables.add(focusTracker.onDidBlur(() =>
|
|
114
|
+
renderDisposables.add(focusTracker.onDidBlur(() => {
|
|
115
|
+
// Don't hide if focus moved to a hover that belongs to this action widget
|
|
116
|
+
const activeElement = getActiveElement();
|
|
117
|
+
if (activeElement?.closest('.action-widget-hover')) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
this.hide(true);
|
|
121
|
+
}));
|
|
115
122
|
return renderDisposables;
|
|
116
123
|
}
|
|
117
124
|
_createActionBar(className, actions) {
|
|
@@ -240,6 +240,7 @@ class MenuId {
|
|
|
240
240
|
static { this.ChatToolOutputResourceContext = new MenuId('ChatToolOutputResourceContext'); }
|
|
241
241
|
static { this.ChatMultiDiffContext = new MenuId('ChatMultiDiffContext'); }
|
|
242
242
|
static { this.ChatConfirmationMenu = new MenuId('ChatConfirmationMenu'); }
|
|
243
|
+
static { this.ChatEditorInlineGutter = new MenuId('ChatEditorInlineGutter'); }
|
|
243
244
|
static { this.ChatEditorInlineExecute = new MenuId('ChatEditorInputExecute'); }
|
|
244
245
|
static { this.ChatEditorInlineInputSide = new MenuId('ChatEditorInputSide'); }
|
|
245
246
|
static { this.AccessibleView = new MenuId('AccessibleView'); }
|
|
@@ -256,7 +257,7 @@ class MenuId {
|
|
|
256
257
|
static { this.AgentSessionsToolbar = new MenuId('AgentSessionsToolbar'); }
|
|
257
258
|
static { this.AgentSessionItemToolbar = new MenuId('AgentSessionItemToolbar'); }
|
|
258
259
|
static { this.AgentSessionSectionToolbar = new MenuId('AgentSessionSectionToolbar'); }
|
|
259
|
-
static { this.
|
|
260
|
+
static { this.AgentsTitleBarControlMenu = new MenuId('AgentsTitleBarControlMenu'); }
|
|
260
261
|
static { this.ChatViewSessionTitleNavigationToolbar = new MenuId('ChatViewSessionTitleNavigationToolbar'); }
|
|
261
262
|
static { this.ChatViewSessionTitleToolbar = new MenuId('ChatViewSessionTitleToolbar'); }
|
|
262
263
|
/**
|
|
@@ -256,6 +256,7 @@ let HoverService = class HoverService extends Disposable {
|
|
|
256
256
|
}
|
|
257
257
|
_showHover(hover, options, focus) {
|
|
258
258
|
this._contextViewHandler.showContextView(new HoverContextViewDelegate(hover, focus), options.container);
|
|
259
|
+
options.onDidShow?.();
|
|
259
260
|
}
|
|
260
261
|
hideHover(force) {
|
|
261
262
|
if ((!force && this._currentHover?.isLocked) || !this._currentHoverOptions) {
|
|
@@ -61,7 +61,22 @@ else {
|
|
|
61
61
|
reportIssueUrl: 'https://github.com/microsoft/vscode/issues/new',
|
|
62
62
|
licenseName: 'MIT',
|
|
63
63
|
licenseUrl: 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt',
|
|
64
|
-
serverLicenseUrl: 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt'
|
|
64
|
+
serverLicenseUrl: 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt',
|
|
65
|
+
defaultChatAgent: {
|
|
66
|
+
extensionId: 'GitHub.copilot',
|
|
67
|
+
chatExtensionId: 'GitHub.copilot-chat',
|
|
68
|
+
provider: {
|
|
69
|
+
default: {
|
|
70
|
+
id: 'github',
|
|
71
|
+
name: 'GitHub',
|
|
72
|
+
},
|
|
73
|
+
enterprise: {
|
|
74
|
+
id: 'github-enterprise',
|
|
75
|
+
name: 'GitHub Enterprise',
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
providerScopes: []
|
|
79
|
+
}
|
|
65
80
|
});
|
|
66
81
|
}
|
|
67
82
|
}
|