@codingame/monaco-vscode-notebook-service-override 11.1.2 → 12.0.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/index.d.ts +2 -1
- package/index.js +64 -1
- package/package.json +47 -15
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +43 -41
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +109 -130
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +13 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +72 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +23 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +4 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +30 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.js +76 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +61 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +4 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +8 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +10 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +52 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +28 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +51 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +21 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +4 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +6 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.d.ts +69 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +460 -382
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +124 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +87 -145
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +16 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +8 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +9 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +40 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.d.ts +112 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +115 -116
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +4 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +111 -117
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +11 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +5 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +7 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +113 -198
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +25 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +115 -145
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +76 -147
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +45 -77
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +30 -35
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +19 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +59 -52
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +11 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +69 -113
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +194 -184
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +51 -51
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +14 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +57 -56
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +29 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +17 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +14 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +21 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +7 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +30 -26
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +6 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.d.ts +134 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +164 -121
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +37 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +6 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +131 -55
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +4 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +12 -10
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +75 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.js +2 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.d.ts +31 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +2 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.d.ts +78 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +45 -42
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.d.ts +96 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +57 -54
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.d.ts +74 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +6 -3
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.d.ts +53 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +2 -1
- package/worker.js +2 -1
- package/workers/notebook.worker.d.ts +1 -0
- package/notebook.js +0 -50
- package/workers/notebook.worker.js +0 -1
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
3
4
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
5
|
import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility.service';
|
|
5
|
-
import { CellEditState } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
6
|
-
import { registerNotebookContribution } from '@codingame/monaco-vscode-
|
|
7
|
-
import { outputDisplayLimit } from '@codingame/monaco-vscode-
|
|
6
|
+
import { CellEditState, RenderOutputType } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
7
|
+
import { registerNotebookContribution } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
|
|
8
|
+
import { outputDisplayLimit } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel';
|
|
8
9
|
import { CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
9
|
-
import { cellRangesToIndexes } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookRange';
|
|
10
|
+
import { cellRangesToIndexes } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/common/notebookRange';
|
|
10
11
|
import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
11
12
|
|
|
12
13
|
let NotebookViewportContribution = class NotebookViewportContribution extends Disposable {
|
|
@@ -82,7 +83,7 @@ let NotebookViewportContribution = class NotebookViewportContribution extends Di
|
|
|
82
83
|
if (!renderer) {
|
|
83
84
|
return;
|
|
84
85
|
}
|
|
85
|
-
const result = { type:
|
|
86
|
+
const result = { type: RenderOutputType.Extension, renderer, source: output, mimeType: pickedMimeTypeRenderer.mimeType };
|
|
86
87
|
this._notebookEditor.createOutput(viewCell, result, 0, true);
|
|
87
88
|
}
|
|
88
89
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ServicesAccessor } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
2
|
+
import { ICodeEditor } from "vscode/vscode/vs/editor/browser/editorBrowser";
|
|
3
|
+
import { AbstractInlineChatAction } from "@codingame/monaco-vscode-4a36e358-d94d-55e0-86ee-3bcd543d9d3f-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatActions";
|
|
4
|
+
import { InlineChatController } from "@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController";
|
|
5
|
+
import { HunkInformation } from "@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSession";
|
|
6
|
+
export declare class AcceptChangesAndRun extends AbstractInlineChatAction {
|
|
7
|
+
constructor();
|
|
8
|
+
runInlineChatCommand(accessor: ServicesAccessor, ctrl: InlineChatController, codeEditor: ICodeEditor, hunk?: HunkInformation | any): Promise<void>;
|
|
9
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
|
|
1
2
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
2
|
-
import { KeyChord } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
3
|
+
import { KeyCode, KeyMod, KeyChord } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
3
4
|
import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
|
|
4
5
|
import { localize2, localize } from 'vscode/vscode/vs/nls';
|
|
5
6
|
import { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vscode/vscode/vs/platform/accessibility/common/accessibility';
|
|
@@ -8,39 +9,36 @@ import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/comma
|
|
|
8
9
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
9
10
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
10
11
|
import { InputFocusedContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
12
|
+
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
13
|
+
import { CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_INNER_CURSOR_FIRST, CTX_INLINE_CHAT_INNER_CURSOR_LAST, CTX_INLINE_CHAT_RESPONSE_TYPE, InlineChatResponseType, CTX_INLINE_CHAT_VISIBLE, CTX_INLINE_CHAT_DOCUMENT_CHANGED, CTX_INLINE_CHAT_EDIT_MODE, EditMode, MENU_INLINE_CHAT_WIDGET_STATUS, CTX_INLINE_CHAT_REQUEST_IN_PROGRESS } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
|
|
14
|
+
import { CTX_NOTEBOOK_CELL_CHAT_FOCUSED, MENU_CELL_CHAT_INPUT, CTX_NOTEBOOK_CHAT_HAS_ACTIVE_REQUEST, MENU_CELL_CHAT_WIDGET, CTX_NOTEBOOK_CHAT_USER_DID_EDIT, CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION, MENU_CELL_CHAT_WIDGET_STATUS, CTX_NOTEBOOK_CHAT_HAS_AGENT } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext';
|
|
15
|
+
import { NotebookChatController } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController';
|
|
16
|
+
import { NotebookAction, NotebookCellAction, getEditorFromArgsOrActivePane, CELL_TITLE_CELL_GROUP_ID, getContextFromActiveEditor } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
15
17
|
import { insertNewCell } from '../insertCellActions.js';
|
|
16
|
-
import { CellEditState } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
18
|
+
import { CellEditState } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
17
19
|
import { CellKind, NOTEBOOK_EDITOR_CURSOR_BOUNDARY, NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
18
|
-
import { NOTEBOOK_CELL_EDITOR_FOCUSED, NOTEBOOK_EDITOR_FOCUSED, IS_COMPOSITE_NOTEBOOK, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_GENERATED_BY_CHAT } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
20
|
+
import { NOTEBOOK_CELL_EDITOR_FOCUSED, NOTEBOOK_EDITOR_FOCUSED, IS_COMPOSITE_NOTEBOOK, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_GENERATED_BY_CHAT } from '@codingame/monaco-vscode-4a36e358-d94d-55e0-86ee-3bcd543d9d3f-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
19
21
|
import { Iterable } from 'vscode/vscode/vs/base/common/iterator';
|
|
20
22
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
21
|
-
import {
|
|
22
|
-
import { AbstractInlineChatAction } from '@codingame/monaco-vscode-
|
|
23
|
+
import { ChatContextKeys } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
24
|
+
import { AbstractInlineChatAction } from '@codingame/monaco-vscode-4a36e358-d94d-55e0-86ee-3bcd543d9d3f-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatActions';
|
|
23
25
|
|
|
24
26
|
registerAction2(class extends NotebookAction {
|
|
25
27
|
constructor() {
|
|
26
28
|
super({
|
|
27
29
|
id: 'notebook.cell.chat.accept',
|
|
28
|
-
title: ( localize2(
|
|
30
|
+
title: ( localize2(7412, "Make Request")),
|
|
29
31
|
icon: Codicon.send,
|
|
30
32
|
keybinding: {
|
|
31
|
-
when: (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
(NOTEBOOK_CELL_EDITOR_FOCUSED.negate())
|
|
35
|
-
))),
|
|
36
|
-
weight: 200 ,
|
|
37
|
-
primary: 3
|
|
33
|
+
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED, ( NOTEBOOK_CELL_EDITOR_FOCUSED.negate()))),
|
|
34
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
35
|
+
primary: KeyCode.Enter
|
|
38
36
|
},
|
|
39
37
|
menu: {
|
|
40
38
|
id: MENU_CELL_CHAT_INPUT,
|
|
41
39
|
group: 'navigation',
|
|
42
40
|
order: 1,
|
|
43
|
-
when: (
|
|
41
|
+
when: ( CTX_NOTEBOOK_CHAT_HAS_ACTIVE_REQUEST.negate())
|
|
44
42
|
},
|
|
45
43
|
f1: false
|
|
46
44
|
});
|
|
@@ -53,17 +51,17 @@ registerAction2(class extends NotebookCellAction {
|
|
|
53
51
|
constructor() {
|
|
54
52
|
super({
|
|
55
53
|
id: 'notebook.cell.chat.arrowOutUp',
|
|
56
|
-
title: ( localize(
|
|
54
|
+
title: ( localize(7413, 'Cursor Up')),
|
|
57
55
|
keybinding: {
|
|
58
|
-
when: (
|
|
56
|
+
when: ( ContextKeyExpr.and(
|
|
59
57
|
CTX_NOTEBOOK_CELL_CHAT_FOCUSED,
|
|
60
58
|
CTX_INLINE_CHAT_FOCUSED,
|
|
61
59
|
CTX_INLINE_CHAT_INNER_CURSOR_FIRST,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
))
|
|
65
|
-
weight:
|
|
66
|
-
primary:
|
|
60
|
+
( NOTEBOOK_CELL_EDITOR_FOCUSED.negate()),
|
|
61
|
+
( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate())
|
|
62
|
+
)),
|
|
63
|
+
weight: KeybindingWeight.EditorCore + 7,
|
|
64
|
+
primary: KeyMod.CtrlCmd | KeyCode.UpArrow
|
|
67
65
|
},
|
|
68
66
|
f1: false
|
|
69
67
|
});
|
|
@@ -88,17 +86,17 @@ registerAction2(class extends NotebookAction {
|
|
|
88
86
|
constructor() {
|
|
89
87
|
super({
|
|
90
88
|
id: 'notebook.cell.chat.arrowOutDown',
|
|
91
|
-
title: ( localize(
|
|
89
|
+
title: ( localize(7414, 'Cursor Down')),
|
|
92
90
|
keybinding: {
|
|
93
|
-
when: (
|
|
91
|
+
when: ( ContextKeyExpr.and(
|
|
94
92
|
CTX_NOTEBOOK_CELL_CHAT_FOCUSED,
|
|
95
93
|
CTX_INLINE_CHAT_FOCUSED,
|
|
96
94
|
CTX_INLINE_CHAT_INNER_CURSOR_LAST,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
))
|
|
100
|
-
weight:
|
|
101
|
-
primary:
|
|
95
|
+
( NOTEBOOK_CELL_EDITOR_FOCUSED.negate()),
|
|
96
|
+
( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate())
|
|
97
|
+
)),
|
|
98
|
+
weight: KeybindingWeight.EditorCore + 7,
|
|
99
|
+
primary: KeyMod.CtrlCmd | KeyCode.DownArrow
|
|
102
100
|
},
|
|
103
101
|
f1: false
|
|
104
102
|
});
|
|
@@ -111,21 +109,11 @@ registerAction2(class extends NotebookCellAction {
|
|
|
111
109
|
constructor() {
|
|
112
110
|
super({
|
|
113
111
|
id: 'notebook.cell.focusChatWidget',
|
|
114
|
-
title: ( localize(
|
|
112
|
+
title: ( localize(7415, 'Focus Chat Widget')),
|
|
115
113
|
keybinding: {
|
|
116
|
-
when: ( (ContextKeyExpr.and(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
(ContextKeyExpr.and(
|
|
120
|
-
(ContextKeyExpr.has(InputFocusedContextKey)),
|
|
121
|
-
EditorContextKeys.editorTextFocus,
|
|
122
|
-
(NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('bottom')),
|
|
123
|
-
(NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none'))
|
|
124
|
-
)),
|
|
125
|
-
(EditorContextKeys.isEmbeddedDiffEditor.negate())
|
|
126
|
-
))),
|
|
127
|
-
weight: 0 + 7,
|
|
128
|
-
primary: 2048 | 16
|
|
114
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()), ( ContextKeyExpr.and(( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('bottom')), ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none')))), ( EditorContextKeys.isEmbeddedDiffEditor.negate()))),
|
|
115
|
+
weight: KeybindingWeight.EditorCore + 7,
|
|
116
|
+
primary: KeyMod.CtrlCmd | KeyCode.UpArrow
|
|
129
117
|
},
|
|
130
118
|
f1: false
|
|
131
119
|
});
|
|
@@ -139,29 +127,14 @@ registerAction2(class extends NotebookCellAction {
|
|
|
139
127
|
constructor() {
|
|
140
128
|
super({
|
|
141
129
|
id: 'notebook.cell.focusNextChatWidget',
|
|
142
|
-
title: ( localize(
|
|
130
|
+
title: ( localize(7416, 'Focus Next Cell Chat Widget')),
|
|
143
131
|
keybinding: {
|
|
144
|
-
when: ( (ContextKeyExpr.and(
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
(ContextKeyExpr.has(InputFocusedContextKey)),
|
|
148
|
-
EditorContextKeys.editorTextFocus,
|
|
149
|
-
(NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('top')),
|
|
150
|
-
(NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none'))
|
|
151
|
-
)),
|
|
152
|
-
(EditorContextKeys.isEmbeddedDiffEditor.negate())
|
|
153
|
-
))),
|
|
154
|
-
weight: 0 + 7,
|
|
155
|
-
primary: 2048 | 18
|
|
132
|
+
when: ( ContextKeyExpr.and(( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()), ( ContextKeyExpr.and(( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('top')), ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none')))), ( EditorContextKeys.isEmbeddedDiffEditor.negate()))),
|
|
133
|
+
weight: KeybindingWeight.EditorCore + 7,
|
|
134
|
+
primary: KeyMod.CtrlCmd | KeyCode.DownArrow
|
|
156
135
|
},
|
|
157
136
|
f1: false,
|
|
158
|
-
precondition: (
|
|
159
|
-
(IS_COMPOSITE_NOTEBOOK.negate()),
|
|
160
|
-
NOTEBOOK_CELL_EDITOR_FOCUSED
|
|
161
|
-
)), (ContextKeyExpr.and(
|
|
162
|
-
IS_COMPOSITE_NOTEBOOK,
|
|
163
|
-
(NOTEBOOK_CELL_EDITOR_FOCUSED.negate())
|
|
164
|
-
)))))
|
|
137
|
+
precondition: ( ContextKeyExpr.or(( ContextKeyExpr.and(( IS_COMPOSITE_NOTEBOOK.negate()), NOTEBOOK_CELL_EDITOR_FOCUSED)), ( ContextKeyExpr.and(IS_COMPOSITE_NOTEBOOK, ( NOTEBOOK_CELL_EDITOR_FOCUSED.negate())))))
|
|
165
138
|
});
|
|
166
139
|
}
|
|
167
140
|
async runWithContext(accessor, context) {
|
|
@@ -173,7 +146,7 @@ registerAction2(class extends NotebookAction {
|
|
|
173
146
|
constructor() {
|
|
174
147
|
super({
|
|
175
148
|
id: 'notebook.cell.chat.stop',
|
|
176
|
-
title: ( localize2(
|
|
149
|
+
title: ( localize2(7417, "Stop Request")),
|
|
177
150
|
icon: Codicon.debugStop,
|
|
178
151
|
menu: {
|
|
179
152
|
id: MENU_CELL_CHAT_INPUT,
|
|
@@ -192,7 +165,7 @@ registerAction2(class extends NotebookAction {
|
|
|
192
165
|
constructor() {
|
|
193
166
|
super({
|
|
194
167
|
id: 'notebook.cell.chat.close',
|
|
195
|
-
title: ( localize2(
|
|
168
|
+
title: ( localize2(7418, "Close Chat")),
|
|
196
169
|
icon: Codicon.close,
|
|
197
170
|
menu: {
|
|
198
171
|
id: MENU_CELL_CHAT_WIDGET,
|
|
@@ -210,39 +183,35 @@ registerAction2(class extends NotebookAction {
|
|
|
210
183
|
constructor() {
|
|
211
184
|
super({
|
|
212
185
|
id: 'notebook.cell.chat.acceptChanges',
|
|
213
|
-
title: ( localize2(
|
|
214
|
-
shortTitle: ( localize(
|
|
186
|
+
title: ( localize2(7419, "Accept Changes")),
|
|
187
|
+
shortTitle: ( localize(7420, 'Accept')),
|
|
215
188
|
icon: Codicon.check,
|
|
216
|
-
tooltip: ( localize(
|
|
189
|
+
tooltip: ( localize(7421, 'Accept Changes')),
|
|
217
190
|
keybinding: [
|
|
218
191
|
{
|
|
219
|
-
when: (
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
(NOTEBOOK_CELL_EDITOR_FOCUSED.negate())
|
|
223
|
-
))),
|
|
224
|
-
weight: 100 + 10,
|
|
225
|
-
primary: 2048 | 3 ,
|
|
192
|
+
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED, ( NOTEBOOK_CELL_EDITOR_FOCUSED.negate()))),
|
|
193
|
+
weight: KeybindingWeight.EditorContrib + 10,
|
|
194
|
+
primary: KeyMod.CtrlCmd | KeyCode.Enter,
|
|
226
195
|
},
|
|
227
196
|
{
|
|
228
|
-
when: (
|
|
197
|
+
when: ( ContextKeyExpr.and(
|
|
229
198
|
CTX_NOTEBOOK_CELL_CHAT_FOCUSED,
|
|
230
199
|
CTX_INLINE_CHAT_FOCUSED,
|
|
231
200
|
CTX_NOTEBOOK_CHAT_USER_DID_EDIT,
|
|
232
|
-
|
|
233
|
-
))
|
|
234
|
-
weight:
|
|
235
|
-
primary:
|
|
201
|
+
( NOTEBOOK_CELL_EDITOR_FOCUSED.negate())
|
|
202
|
+
)),
|
|
203
|
+
weight: KeybindingWeight.EditorCore + 10,
|
|
204
|
+
primary: KeyCode.Escape
|
|
236
205
|
},
|
|
237
206
|
{
|
|
238
|
-
when: (
|
|
207
|
+
when: ( ContextKeyExpr.and(
|
|
239
208
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
240
209
|
ContextKeyExpr.not(InputFocusedContextKey),
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
))
|
|
244
|
-
primary:
|
|
245
|
-
weight:
|
|
210
|
+
( NOTEBOOK_CELL_EDITOR_FOCUSED.negate()),
|
|
211
|
+
( CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo('below'))
|
|
212
|
+
)),
|
|
213
|
+
primary: KeyMod.CtrlCmd | KeyCode.Enter,
|
|
214
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
246
215
|
}
|
|
247
216
|
],
|
|
248
217
|
menu: [
|
|
@@ -250,7 +219,7 @@ registerAction2(class extends NotebookAction {
|
|
|
250
219
|
id: MENU_CELL_CHAT_WIDGET_STATUS,
|
|
251
220
|
group: '0_main',
|
|
252
221
|
order: 0,
|
|
253
|
-
when: (
|
|
222
|
+
when: ( CTX_INLINE_CHAT_RESPONSE_TYPE.notEqualsTo(InlineChatResponseType.Messages)),
|
|
254
223
|
}
|
|
255
224
|
],
|
|
256
225
|
f1: false
|
|
@@ -264,17 +233,12 @@ registerAction2(class extends NotebookAction {
|
|
|
264
233
|
constructor() {
|
|
265
234
|
super({
|
|
266
235
|
id: 'notebook.cell.chat.discard',
|
|
267
|
-
title: ( localize(
|
|
236
|
+
title: ( localize(7422, 'Discard')),
|
|
268
237
|
icon: Codicon.discard,
|
|
269
238
|
keybinding: {
|
|
270
|
-
when: (
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
(CTX_NOTEBOOK_CHAT_USER_DID_EDIT.negate()),
|
|
274
|
-
(NOTEBOOK_CELL_EDITOR_FOCUSED.negate())
|
|
275
|
-
))),
|
|
276
|
-
weight: 100 ,
|
|
277
|
-
primary: 9
|
|
239
|
+
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED, ( CTX_NOTEBOOK_CHAT_USER_DID_EDIT.negate()), ( NOTEBOOK_CELL_EDITOR_FOCUSED.negate()))),
|
|
240
|
+
weight: KeybindingWeight.EditorContrib,
|
|
241
|
+
primary: KeyCode.Escape
|
|
278
242
|
},
|
|
279
243
|
menu: {
|
|
280
244
|
id: MENU_CELL_CHAT_WIDGET_STATUS,
|
|
@@ -310,12 +274,12 @@ registerAction2(class extends NotebookAction {
|
|
|
310
274
|
super({
|
|
311
275
|
id: 'notebook.cell.chat.start',
|
|
312
276
|
title: {
|
|
313
|
-
value: '$(sparkle) ' + ( localize(
|
|
277
|
+
value: '$(sparkle) ' + ( localize(7423, "Generate")),
|
|
314
278
|
original: '$(sparkle) Generate',
|
|
315
279
|
},
|
|
316
|
-
tooltip: ( localize(
|
|
280
|
+
tooltip: ( localize(7424, "Start Chat to Generate Code")),
|
|
317
281
|
metadata: {
|
|
318
|
-
description: ( localize(
|
|
282
|
+
description: ( localize(7424, "Start Chat to Generate Code")),
|
|
319
283
|
args: [
|
|
320
284
|
{
|
|
321
285
|
name: 'args',
|
|
@@ -339,33 +303,17 @@ registerAction2(class extends NotebookAction {
|
|
|
339
303
|
},
|
|
340
304
|
f1: false,
|
|
341
305
|
keybinding: {
|
|
342
|
-
when: (
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
CTX_NOTEBOOK_CHAT_HAS_AGENT,
|
|
347
|
-
(ContextKeyExpr.or(
|
|
348
|
-
(ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true)),
|
|
349
|
-
(ContextKeyExpr.equals(`config.${NotebookSetting.cellGenerate}`, true))
|
|
350
|
-
))
|
|
351
|
-
))),
|
|
352
|
-
weight: 200 ,
|
|
353
|
-
primary: 2048 | 39 ,
|
|
354
|
-
secondary: [KeyChord(2048 | 41 , 39 )],
|
|
306
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ContextKeyExpr.not(InputFocusedContextKey), CTX_NOTEBOOK_CHAT_HAS_AGENT, ( ContextKeyExpr.or(( ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true)), ( ContextKeyExpr.equals(`config.${NotebookSetting.cellGenerate}`, true)))))),
|
|
307
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
308
|
+
primary: KeyMod.CtrlCmd | KeyCode.KeyI,
|
|
309
|
+
secondary: [KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyI)],
|
|
355
310
|
},
|
|
356
311
|
menu: [
|
|
357
312
|
{
|
|
358
313
|
id: MenuId.NotebookCellBetween,
|
|
359
314
|
group: 'inline',
|
|
360
315
|
order: -1,
|
|
361
|
-
when: (
|
|
362
|
-
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
363
|
-
CTX_NOTEBOOK_CHAT_HAS_AGENT,
|
|
364
|
-
(ContextKeyExpr.or(
|
|
365
|
-
(ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true)),
|
|
366
|
-
(ContextKeyExpr.equals(`config.${NotebookSetting.cellGenerate}`, true))
|
|
367
|
-
))
|
|
368
|
-
)))
|
|
316
|
+
when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), CTX_NOTEBOOK_CHAT_HAS_AGENT, ( ContextKeyExpr.or(( ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true)), ( ContextKeyExpr.equals(`config.${NotebookSetting.cellGenerate}`, true))))))
|
|
369
317
|
}
|
|
370
318
|
]
|
|
371
319
|
});
|
|
@@ -413,24 +361,17 @@ registerAction2(class extends NotebookAction {
|
|
|
413
361
|
super({
|
|
414
362
|
id: 'notebook.cell.chat.startAtTop',
|
|
415
363
|
title: {
|
|
416
|
-
value: '$(sparkle) ' + ( localize(
|
|
364
|
+
value: '$(sparkle) ' + ( localize(7423, "Generate")),
|
|
417
365
|
original: '$(sparkle) Generate',
|
|
418
366
|
},
|
|
419
|
-
tooltip: ( localize(
|
|
367
|
+
tooltip: ( localize(7424, "Start Chat to Generate Code")),
|
|
420
368
|
f1: false,
|
|
421
369
|
menu: [
|
|
422
370
|
{
|
|
423
371
|
id: MenuId.NotebookCellListTop,
|
|
424
372
|
group: 'inline',
|
|
425
373
|
order: -1,
|
|
426
|
-
when: (
|
|
427
|
-
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
428
|
-
CTX_NOTEBOOK_CHAT_HAS_AGENT,
|
|
429
|
-
(ContextKeyExpr.or(
|
|
430
|
-
(ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true)),
|
|
431
|
-
(ContextKeyExpr.equals(`config.${NotebookSetting.cellGenerate}`, true))
|
|
432
|
-
))
|
|
433
|
-
)))
|
|
374
|
+
when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), CTX_NOTEBOOK_CHAT_HAS_AGENT, ( ContextKeyExpr.or(( ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true)), ( ContextKeyExpr.equals(`config.${NotebookSetting.cellGenerate}`, true))))))
|
|
434
375
|
},
|
|
435
376
|
]
|
|
436
377
|
});
|
|
@@ -443,45 +384,36 @@ MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
|
|
|
443
384
|
command: {
|
|
444
385
|
id: 'notebook.cell.chat.start',
|
|
445
386
|
icon: Codicon.sparkle,
|
|
446
|
-
title: ( localize(
|
|
447
|
-
tooltip: ( localize(
|
|
387
|
+
title: ( localize(7425, "Generate")),
|
|
388
|
+
tooltip: ( localize(7426, "Start Chat to Generate Code"))
|
|
448
389
|
},
|
|
449
390
|
order: -10,
|
|
450
391
|
group: 'navigation/add',
|
|
451
|
-
when: (
|
|
452
|
-
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
453
|
-
(ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'betweenCells')),
|
|
454
|
-
(ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'hidden')),
|
|
455
|
-
CTX_NOTEBOOK_CHAT_HAS_AGENT,
|
|
456
|
-
(ContextKeyExpr.or(
|
|
457
|
-
(ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true)),
|
|
458
|
-
(ContextKeyExpr.equals(`config.${NotebookSetting.cellGenerate}`, true))
|
|
459
|
-
))
|
|
460
|
-
)))
|
|
392
|
+
when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'betweenCells')), ( ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'hidden')), CTX_NOTEBOOK_CHAT_HAS_AGENT, ( ContextKeyExpr.or(( ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true)), ( ContextKeyExpr.equals(`config.${NotebookSetting.cellGenerate}`, true))))))
|
|
461
393
|
});
|
|
462
394
|
registerAction2(class extends NotebookAction {
|
|
463
395
|
constructor() {
|
|
464
396
|
super({
|
|
465
397
|
id: 'notebook.cell.chat.focus',
|
|
466
|
-
title: ( localize(
|
|
398
|
+
title: ( localize(7427, 'Focus Chat')),
|
|
467
399
|
keybinding: [
|
|
468
400
|
{
|
|
469
|
-
when: (
|
|
401
|
+
when: ( ContextKeyExpr.and(
|
|
470
402
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
471
403
|
ContextKeyExpr.not(InputFocusedContextKey),
|
|
472
|
-
|
|
473
|
-
))
|
|
474
|
-
primary:
|
|
475
|
-
weight:
|
|
404
|
+
( CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo('above'))
|
|
405
|
+
)),
|
|
406
|
+
primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
|
|
407
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
476
408
|
},
|
|
477
409
|
{
|
|
478
|
-
when: (
|
|
410
|
+
when: ( ContextKeyExpr.and(
|
|
479
411
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
480
412
|
ContextKeyExpr.not(InputFocusedContextKey),
|
|
481
|
-
|
|
482
|
-
))
|
|
483
|
-
primary:
|
|
484
|
-
weight:
|
|
413
|
+
( CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo('below'))
|
|
414
|
+
)),
|
|
415
|
+
primary: KeyMod.CtrlCmd | KeyCode.UpArrow,
|
|
416
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
485
417
|
}
|
|
486
418
|
],
|
|
487
419
|
f1: false
|
|
@@ -495,12 +427,12 @@ registerAction2(class extends NotebookAction {
|
|
|
495
427
|
constructor() {
|
|
496
428
|
super({
|
|
497
429
|
id: 'notebook.cell.chat.focusNextCell',
|
|
498
|
-
title: ( localize(
|
|
430
|
+
title: ( localize(7428, 'Focus Next Cell')),
|
|
499
431
|
keybinding: [
|
|
500
432
|
{
|
|
501
|
-
when: (
|
|
502
|
-
primary:
|
|
503
|
-
weight:
|
|
433
|
+
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
434
|
+
primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
|
|
435
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
504
436
|
}
|
|
505
437
|
],
|
|
506
438
|
f1: false
|
|
@@ -514,12 +446,12 @@ registerAction2(class extends NotebookAction {
|
|
|
514
446
|
constructor() {
|
|
515
447
|
super({
|
|
516
448
|
id: 'notebook.cell.chat.focusPreviousCell',
|
|
517
|
-
title: ( localize(
|
|
449
|
+
title: ( localize(7429, 'Focus Previous Cell')),
|
|
518
450
|
keybinding: [
|
|
519
451
|
{
|
|
520
|
-
when: (
|
|
521
|
-
primary:
|
|
522
|
-
weight:
|
|
452
|
+
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
453
|
+
primary: KeyMod.CtrlCmd | KeyCode.UpArrow,
|
|
454
|
+
weight: KeybindingWeight.WorkbenchContrib
|
|
523
455
|
}
|
|
524
456
|
],
|
|
525
457
|
f1: false
|
|
@@ -533,12 +465,12 @@ registerAction2(class extends NotebookAction {
|
|
|
533
465
|
constructor() {
|
|
534
466
|
super({
|
|
535
467
|
id: 'notebook.cell.chat.previousFromHistory',
|
|
536
|
-
title: ( localize2(
|
|
537
|
-
precondition: (
|
|
468
|
+
title: ( localize2(7430, "Previous From History")),
|
|
469
|
+
precondition: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
538
470
|
keybinding: {
|
|
539
|
-
when: (
|
|
540
|
-
weight:
|
|
541
|
-
primary:
|
|
471
|
+
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
472
|
+
weight: KeybindingWeight.EditorCore + 10,
|
|
473
|
+
primary: KeyCode.UpArrow,
|
|
542
474
|
},
|
|
543
475
|
f1: false
|
|
544
476
|
});
|
|
@@ -551,12 +483,12 @@ registerAction2(class extends NotebookAction {
|
|
|
551
483
|
constructor() {
|
|
552
484
|
super({
|
|
553
485
|
id: 'notebook.cell.chat.nextFromHistory',
|
|
554
|
-
title: ( localize2(
|
|
555
|
-
precondition: (
|
|
486
|
+
title: ( localize2(7431, "Next From History")),
|
|
487
|
+
precondition: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
556
488
|
keybinding: {
|
|
557
|
-
when: (
|
|
558
|
-
weight:
|
|
559
|
-
primary:
|
|
489
|
+
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
490
|
+
weight: KeybindingWeight.EditorCore + 10,
|
|
491
|
+
primary: KeyCode.DownArrow
|
|
560
492
|
},
|
|
561
493
|
f1: false
|
|
562
494
|
});
|
|
@@ -569,18 +501,13 @@ registerAction2(class extends NotebookCellAction {
|
|
|
569
501
|
constructor() {
|
|
570
502
|
super({
|
|
571
503
|
id: 'notebook.cell.chat.restore',
|
|
572
|
-
title: ( localize2(
|
|
504
|
+
title: ( localize2(7432, "Generate")),
|
|
573
505
|
icon: Codicon.sparkle,
|
|
574
506
|
menu: {
|
|
575
507
|
id: MenuId.NotebookCellTitle,
|
|
576
508
|
group: CELL_TITLE_CELL_GROUP_ID,
|
|
577
509
|
order: 0,
|
|
578
|
-
when: (
|
|
579
|
-
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
580
|
-
CTX_NOTEBOOK_CHAT_HAS_AGENT,
|
|
581
|
-
NOTEBOOK_CELL_GENERATED_BY_CHAT,
|
|
582
|
-
(ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true))
|
|
583
|
-
)))
|
|
510
|
+
when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), CTX_NOTEBOOK_CHAT_HAS_AGENT, NOTEBOOK_CELL_GENERATED_BY_CHAT, ( ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true))))
|
|
584
511
|
},
|
|
585
512
|
f1: false
|
|
586
513
|
});
|
|
@@ -605,30 +532,18 @@ class AcceptChangesAndRun extends AbstractInlineChatAction {
|
|
|
605
532
|
constructor() {
|
|
606
533
|
super({
|
|
607
534
|
id: 'notebook.inlineChat.acceptChangesAndRun',
|
|
608
|
-
title: ( localize2(
|
|
609
|
-
shortTitle: ( localize(
|
|
610
|
-
tooltip: ( localize(
|
|
535
|
+
title: ( localize2(7433, "Accept and Run")),
|
|
536
|
+
shortTitle: ( localize(7434, 'Accept & Run')),
|
|
537
|
+
tooltip: ( localize(7435, 'Accept the changes and run the cell')),
|
|
611
538
|
icon: Codicon.check,
|
|
612
539
|
f1: true,
|
|
613
|
-
precondition: (
|
|
614
|
-
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
615
|
-
CTX_INLINE_CHAT_VISIBLE,
|
|
616
|
-
(ContextKeyExpr.or(
|
|
617
|
-
(CTX_INLINE_CHAT_DOCUMENT_CHANGED.toNegated()),
|
|
618
|
-
(CTX_INLINE_CHAT_EDIT_MODE.notEqualsTo("preview" ))
|
|
619
|
-
))
|
|
620
|
-
))),
|
|
540
|
+
precondition: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), CTX_INLINE_CHAT_VISIBLE, ( ContextKeyExpr.or(( CTX_INLINE_CHAT_DOCUMENT_CHANGED.toNegated()), ( CTX_INLINE_CHAT_EDIT_MODE.notEqualsTo(EditMode.Preview)))))),
|
|
621
541
|
keybinding: undefined,
|
|
622
542
|
menu: [{
|
|
623
543
|
id: MENU_INLINE_CHAT_WIDGET_STATUS,
|
|
624
544
|
group: '0_main',
|
|
625
545
|
order: 2,
|
|
626
|
-
when: (
|
|
627
|
-
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
628
|
-
(CONTEXT_CHAT_INPUT_HAS_TEXT.toNegated()),
|
|
629
|
-
(CTX_INLINE_CHAT_REQUEST_IN_PROGRESS.toNegated()),
|
|
630
|
-
(CTX_INLINE_CHAT_RESPONSE_TYPE.isEqualTo("messagesAndEdits" ))
|
|
631
|
-
)))
|
|
546
|
+
when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ChatContextKeys.inputHasText.toNegated()), ( CTX_INLINE_CHAT_REQUEST_IN_PROGRESS.toNegated()), ( CTX_INLINE_CHAT_RESPONSE_TYPE.isEqualTo(InlineChatResponseType.MessagesAndEdits))))
|
|
632
547
|
}]
|
|
633
548
|
});
|
|
634
549
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Action2 } from "vscode/vscode/vs/platform/actions/common/actions";
|
|
2
|
+
import { ServicesAccessor } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
3
|
+
export declare class SelectAndInsertKernelVariableAction extends Action2 {
|
|
4
|
+
constructor();
|
|
5
|
+
static readonly ID = "notebook.chat.selectAndInsertKernelVariable";
|
|
6
|
+
run(accessor: ServicesAccessor, ...args: any[]): Promise<void>;
|
|
7
|
+
private addVariableReference;
|
|
8
|
+
}
|