@codingame/monaco-vscode-debug-service-override 23.2.2 → 24.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/package.json +2 -14
  2. package/service-override/tools/debugAssets.js +1 -1
  3. package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.d.ts +1 -1
  4. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.d.ts +3 -3
  5. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +21 -21
  6. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +128 -126
  7. package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +13 -13
  8. package/vscode/src/vs/workbench/contrib/debug/browser/debugChatIntegration.d.ts +8 -0
  9. package/vscode/src/vs/workbench/contrib/debug/browser/debugChatIntegration.js +430 -0
  10. package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +7 -7
  11. package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.d.ts +1 -1
  12. package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +3 -3
  13. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +27 -27
  14. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.d.ts +1 -1
  15. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +12 -12
  16. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.d.ts +1 -1
  17. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +27 -27
  18. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.d.ts +4 -4
  19. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +47 -47
  20. package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +3 -3
  21. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.d.ts +1 -1
  22. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +19 -19
  23. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.d.ts +1 -1
  24. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +8 -8
  25. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.d.ts +2 -2
  26. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +9 -9
  27. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.d.ts +1 -1
  28. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +15 -15
  29. package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.d.ts +1 -1
  30. package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +1 -1
  31. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.d.ts +2 -2
  32. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +10 -10
  33. package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +8 -8
  34. package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.d.ts +1 -1
  35. package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.js +9 -9
  36. package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.d.ts +1 -1
  37. package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.js +1 -1
  38. package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.js +16 -16
  39. package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +4 -4
  40. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.d.ts +4 -4
  41. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +17 -17
  42. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.d.ts +2 -2
  43. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +9 -9
  44. package/vscode/src/vs/workbench/contrib/debug/common/debugAccessibilityAnnouncer.js +1 -1
  45. package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +4 -4
  46. package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +3 -3
  47. package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +46 -46
  48. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.d.ts +1 -1
  49. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +1 -1
  50. package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.d.ts +1 -1
  51. package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +2 -2
  52. package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +12 -12
  53. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +2 -2
@@ -24,7 +24,7 @@ import { Debugger } from '../common/debugger.js';
24
24
  import { debuggersExtPoint, breakpointsExtPoint, launchSchema, presentationSchema } from '../common/debugSchemas.js';
25
25
  import { TaskDefinitionRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/tasks/common/taskDefinitionRegistry';
26
26
  import { ITaskService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/tasks/common/taskService.service';
27
- import { launchSchemaId } from '@codingame/monaco-vscode-ce7c734f-7712-563c-9335-d7acb43306af-common/vscode/vs/workbench/services/configuration/common/configuration';
27
+ import { launchSchemaId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/configuration/common/configuration';
28
28
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
29
29
  import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
30
30
  import { LifecyclePhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle';
@@ -87,7 +87,7 @@ let AdapterManager = class AdapterManager extends Disposable {
87
87
  delta.added.forEach(added => {
88
88
  added.value.forEach(rawAdapter => {
89
89
  if (!rawAdapter.type || (typeof rawAdapter.type !== 'string')) {
90
- added.collector.error(( localize(6545, "Debugger 'type' can not be omitted and must be of type 'string'.")));
90
+ added.collector.error(( localize(6671, "Debugger 'type' can not be omitted and must be of type 'string'.")));
91
91
  }
92
92
  if (rawAdapter.type !== '*') {
93
93
  const existing = this.getDebugger(rawAdapter.type);
@@ -137,7 +137,7 @@ let AdapterManager = class AdapterManager extends Disposable {
137
137
  'name': {
138
138
  type: 'string',
139
139
  description: ( localize(
140
- 6546,
140
+ 6672,
141
141
  "Name of configuration; appears in the launch configuration dropdown menu."
142
142
  )),
143
143
  default: 'Launch'
@@ -145,7 +145,7 @@ let AdapterManager = class AdapterManager extends Disposable {
145
145
  'debugServer': {
146
146
  type: 'number',
147
147
  description: ( localize(
148
- 6547,
148
+ 6673,
149
149
  "For debug extension development only: if a port is specified VS Code tries to connect to a debug adapter running in server mode"
150
150
  )),
151
151
  default: 4711
@@ -156,7 +156,7 @@ let AdapterManager = class AdapterManager extends Disposable {
156
156
  }],
157
157
  default: '',
158
158
  defaultSnippets: [{ body: { task: '', type: '' } }],
159
- description: ( localize(6548, "Task to run before debug session starts.")),
159
+ description: ( localize(6674, "Task to run before debug session starts.")),
160
160
  examples: this.taskLabels,
161
161
  },
162
162
  'postDebugTask': {
@@ -165,7 +165,7 @@ let AdapterManager = class AdapterManager extends Disposable {
165
165
  }],
166
166
  default: '',
167
167
  defaultSnippets: [{ body: { task: '', type: '' } }],
168
- description: ( localize(6549, "Task to run after debug session ends.")),
168
+ description: ( localize(6675, "Task to run after debug session ends.")),
169
169
  examples: this.taskLabels,
170
170
  },
171
171
  'presentation': presentationSchema,
@@ -173,7 +173,7 @@ let AdapterManager = class AdapterManager extends Disposable {
173
173
  'suppressMultipleSessionWarning': {
174
174
  type: 'boolean',
175
175
  description: ( localize(
176
- 6550,
176
+ 6676,
177
177
  "Disable the warning when trying to start the same debug configuration more than once."
178
178
  )),
179
179
  default: true
@@ -327,11 +327,11 @@ let AdapterManager = class AdapterManager extends Disposable {
327
327
  const { confirmed } = await this.dialogService.confirm({
328
328
  type: Severity.Warning,
329
329
  message: ( localize(
330
- 6551,
330
+ 6677,
331
331
  "You don't have an extension for debugging {0}. Should we find a {0} extension in the Marketplace?",
332
332
  languageLabel
333
333
  )),
334
- primaryButton: ( localize(6552, "&&Find {0} extension", languageLabel))
334
+ primaryButton: ( localize(6678, "&&Find {0} extension", languageLabel))
335
335
  });
336
336
  if (confirmed) {
337
337
  await this.commandService.executeCommand('debug.installAdditionalDebuggers', languageLabel);
@@ -358,7 +358,7 @@ let AdapterManager = class AdapterManager extends Disposable {
358
358
  const picks = [];
359
359
  const dynamic = await this.delegate.configurationManager().getDynamicProviders();
360
360
  if (suggestedCandidates.length > 0) {
361
- picks.push({ type: 'separator', label: ( localize(6553, "Suggested")) }, ...( suggestedCandidates.map(c => ({ label: c.label, pick: () => ({ debugger: c }) }))));
361
+ picks.push({ type: 'separator', label: ( localize(6679, "Suggested")) }, ...( suggestedCandidates.map(c => ({ label: c.label, pick: () => ({ debugger: c }) }))));
362
362
  }
363
363
  if (otherCandidates.length > 0) {
364
364
  if (picks.length > 0) {
@@ -372,7 +372,7 @@ let AdapterManager = class AdapterManager extends Disposable {
372
372
  }
373
373
  for (const d of dynamic) {
374
374
  picks.push({
375
- label: ( localize(6554, "More {0} options...", d.label)),
375
+ label: ( localize(6680, "More {0} options...", d.label)),
376
376
  pick: async () => {
377
377
  const cfg = await d.pick();
378
378
  if (!cfg) {
@@ -383,14 +383,14 @@ let AdapterManager = class AdapterManager extends Disposable {
383
383
  });
384
384
  }
385
385
  }
386
- picks.push({ type: 'separator', label: '' }, { label: languageLabel ? ( localize(6555, "Install an extension for {0}...", languageLabel)) : ( localize(6556, "Install extension...")) });
386
+ picks.push({ type: 'separator', label: '' }, { label: languageLabel ? ( localize(6681, "Install an extension for {0}...", languageLabel)) : ( localize(6682, "Install extension...")) });
387
387
  const contributed = this.menuService.getMenuActions(MenuId.DebugCreateConfiguration, this.contextKeyService);
388
388
  for (const [, action] of contributed) {
389
389
  for (const item of action) {
390
390
  picks.push(item);
391
391
  }
392
392
  }
393
- const placeHolder = ( localize(6557, "Select debugger"));
393
+ const placeHolder = ( localize(6683, "Select debugger"));
394
394
  return this.quickInputService.pick(picks, { activeItem: picks[0], placeHolder }).then(async (picked) => {
395
395
  if (picked && 'pick' in picked && typeof picked.pick === 'function') {
396
396
  return await picked.pick();
@@ -0,0 +1,8 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
3
+ import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
4
+ import { IChatContextPickService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContextPickService.service";
5
+ export declare class DebugChatContextContribution extends Disposable implements IWorkbenchContribution {
6
+ static readonly ID = "workbench.contrib.chat.debugChatContextContribution";
7
+ constructor(contextPickService: IChatContextPickService, instantiationService: IInstantiationService);
8
+ }
@@ -0,0 +1,430 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
4
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
5
+ import { DisposableStore, toDisposable, Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
6
+ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
7
+ import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
8
+ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
9
+ import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
10
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
11
+ import { registerAction2, Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
12
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
13
+ import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
14
+ import { IChatContextPickService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContextPickService.service';
15
+ import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
16
+ import { State } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug';
17
+ import { IDebugService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug.service';
18
+ import { Variable } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debugModel';
19
+ import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
20
+ import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
21
+ import { debouncedObservable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/utils';
22
+ import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
23
+ import { ObservablePromise } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/promise';
24
+
25
+ var PickerMode;
26
+ (function (PickerMode) {
27
+ PickerMode["Main"] = "main";
28
+ PickerMode["Expression"] = "expression";
29
+ })(PickerMode || (PickerMode = {}));
30
+ let DebugSessionContextPick = class DebugSessionContextPick {
31
+ constructor(debugService) {
32
+ this.debugService = debugService;
33
+ this.type = 'pickerPick';
34
+ this.label = ( localize(6684, 'Debug Session...'));
35
+ this.icon = Codicon.debug;
36
+ this.ordinal = -200;
37
+ }
38
+ isEnabled() {
39
+ const viewModel = this.debugService.getViewModel();
40
+ const focusedSession = viewModel.focusedSession;
41
+ return !!focusedSession && focusedSession.state === State.Stopped;
42
+ }
43
+ asPicker(_widget) {
44
+ const store = ( new DisposableStore());
45
+ const mode = observableValue('debugPicker.mode', PickerMode.Main);
46
+ const query = observableValue('debugPicker.query', '');
47
+ const picksObservable = this.createPicksObservable(mode, query, store);
48
+ return {
49
+ placeholder: ( localize(6685, 'Select debug data to attach')),
50
+ picks: (_queryObs, token) => {
51
+ store.add(autorun(reader => {
52
+ query.set(_queryObs.read(reader), undefined);
53
+ }));
54
+ const cts = ( new CancellationTokenSource(token));
55
+ store.add(toDisposable(() => cts.dispose(true)));
56
+ return picksObservable;
57
+ },
58
+ goBack: () => {
59
+ if (mode.get() === PickerMode.Expression) {
60
+ mode.set(PickerMode.Main, undefined);
61
+ return true;
62
+ }
63
+ return false;
64
+ },
65
+ dispose: () => store.dispose(),
66
+ };
67
+ }
68
+ createPicksObservable(mode, query, store) {
69
+ const debouncedQuery = debouncedObservable(query, 300);
70
+ return derived(reader => {
71
+ const currentMode = mode.read(reader);
72
+ if (currentMode === PickerMode.Expression) {
73
+ return this.getExpressionPicks(debouncedQuery, store);
74
+ }
75
+ else {
76
+ return this.getMainPicks(mode);
77
+ }
78
+ }).flatten();
79
+ }
80
+ getMainPicks(mode) {
81
+ const promise = derived(_reader => {
82
+ return ( new ObservablePromise(this.buildMainPicks(mode)));
83
+ });
84
+ return ( promise.map((value, reader) => {
85
+ const result = value.promiseResult.read(reader);
86
+ return { picks: result?.data || [], busy: result === undefined };
87
+ }));
88
+ }
89
+ async buildMainPicks(mode) {
90
+ const picks = [];
91
+ const viewModel = this.debugService.getViewModel();
92
+ const stackFrame = viewModel.focusedStackFrame;
93
+ const session = viewModel.focusedSession;
94
+ if (!session || !stackFrame) {
95
+ return picks;
96
+ }
97
+ picks.push({
98
+ label: ( localize(6686, 'Expression Value...')),
99
+ iconClass: ThemeIcon.asClassName(Codicon.symbolVariable),
100
+ asAttachment: () => {
101
+ mode.set(PickerMode.Expression, undefined);
102
+ return 'noop';
103
+ },
104
+ });
105
+ const watches = this.debugService.getModel().getWatchExpressions();
106
+ if (watches.length > 0) {
107
+ picks.push({ type: 'separator', label: ( localize(6687, 'Watch Expressions')) });
108
+ for (const watch of watches) {
109
+ picks.push({
110
+ label: watch.name,
111
+ description: watch.value,
112
+ iconClass: ThemeIcon.asClassName(Codicon.eye),
113
+ asAttachment: () => createDebugAttachments(stackFrame, createDebugVariableEntry(watch)),
114
+ });
115
+ }
116
+ }
117
+ let scopes = [];
118
+ try {
119
+ scopes = await stackFrame.getScopes();
120
+ }
121
+ catch {
122
+ }
123
+ for (const scope of scopes) {
124
+ if (scope.expensive && !scope.childrenHaveBeenLoaded) {
125
+ continue;
126
+ }
127
+ picks.push({ type: 'separator', label: scope.name });
128
+ try {
129
+ const variables = await scope.getChildren();
130
+ if (variables.length > 1) {
131
+ picks.push({
132
+ label: ( localize(6688, 'All variables in {0}', scope.name)),
133
+ iconClass: ThemeIcon.asClassName(Codicon.symbolNamespace),
134
+ asAttachment: () => createDebugAttachments(stackFrame, createScopeEntry(scope, variables)),
135
+ });
136
+ }
137
+ for (const variable of variables) {
138
+ picks.push({
139
+ label: variable.name,
140
+ description: formatVariableDescription(variable),
141
+ iconClass: ThemeIcon.asClassName(Codicon.symbolVariable),
142
+ asAttachment: () => createDebugAttachments(stackFrame, createDebugVariableEntry(variable)),
143
+ });
144
+ }
145
+ }
146
+ catch {
147
+ }
148
+ }
149
+ return picks;
150
+ }
151
+ getExpressionPicks(query, _store) {
152
+ const promise = derived((reader) => {
153
+ const queryValue = query.read(reader);
154
+ const cts = ( new CancellationTokenSource());
155
+ reader.store.add(toDisposable(() => cts.dispose(true)));
156
+ return ( new ObservablePromise(this.evaluateExpression(queryValue, cts.token)));
157
+ });
158
+ return ( promise.map((value, r) => {
159
+ const result = value.promiseResult.read(r);
160
+ return { picks: result?.data || [], busy: result === undefined };
161
+ }));
162
+ }
163
+ async evaluateExpression(expression, token) {
164
+ if (!expression.trim()) {
165
+ return [{
166
+ label: ( localize(6689, 'Type an expression to evaluate...')),
167
+ disabled: true,
168
+ asAttachment: () => 'noop',
169
+ }];
170
+ }
171
+ const viewModel = this.debugService.getViewModel();
172
+ const session = viewModel.focusedSession;
173
+ const stackFrame = viewModel.focusedStackFrame;
174
+ if (!session || !stackFrame) {
175
+ return [{
176
+ label: ( localize(6690, 'No active debug session')),
177
+ disabled: true,
178
+ asAttachment: () => 'noop',
179
+ }];
180
+ }
181
+ try {
182
+ const response = await session.evaluate(expression, stackFrame.frameId, 'watch');
183
+ if (token.isCancellationRequested) {
184
+ return [];
185
+ }
186
+ if (response?.body) {
187
+ const resultValue = response.body.result;
188
+ const resultType = response.body.type;
189
+ return [{
190
+ label: expression,
191
+ description: formatExpressionResult(resultValue, resultType),
192
+ iconClass: ThemeIcon.asClassName(Codicon.symbolVariable),
193
+ asAttachment: () => createDebugAttachments(stackFrame, {
194
+ kind: 'debugVariable',
195
+ id: `debug-expression:${expression}`,
196
+ name: expression,
197
+ fullName: expression,
198
+ icon: Codicon.debug,
199
+ value: resultValue,
200
+ expression: expression,
201
+ type: resultType,
202
+ modelDescription: formatModelDescription(expression, resultValue, resultType),
203
+ }),
204
+ }];
205
+ }
206
+ else {
207
+ return [{
208
+ label: expression,
209
+ description: ( localize(6691, 'No result')),
210
+ disabled: true,
211
+ asAttachment: () => 'noop',
212
+ }];
213
+ }
214
+ }
215
+ catch (err) {
216
+ return [{
217
+ label: expression,
218
+ description: err instanceof Error ? err.message : ( localize(6692, 'Evaluation error')),
219
+ disabled: true,
220
+ asAttachment: () => 'noop',
221
+ }];
222
+ }
223
+ }
224
+ };
225
+ DebugSessionContextPick = ( __decorate([
226
+ ( __param(0, IDebugService))
227
+ ], DebugSessionContextPick));
228
+ function createDebugVariableEntry(expression) {
229
+ return {
230
+ kind: 'debugVariable',
231
+ id: `debug-variable:${expression.getId()}`,
232
+ name: expression.name,
233
+ fullName: expression.name,
234
+ icon: Codicon.debug,
235
+ value: expression.value,
236
+ expression: expression.name,
237
+ type: expression.type,
238
+ modelDescription: formatModelDescription(expression.name, expression.value, expression.type),
239
+ };
240
+ }
241
+ function createPausedLocationEntry(stackFrame) {
242
+ const uri = stackFrame.source.uri;
243
+ let range = Range.lift(stackFrame.range);
244
+ if (range.isEmpty()) {
245
+ range = range.setEndPosition(range.startLineNumber + 1, 1);
246
+ }
247
+ return {
248
+ kind: 'file',
249
+ value: { uri, range },
250
+ id: `debug-paused-location:${( uri.toString())}:${range.startLineNumber}`,
251
+ name: basename(uri),
252
+ modelDescription: 'The debugger is currently paused at this location',
253
+ };
254
+ }
255
+ function createDebugAttachments(stackFrame, variableEntry) {
256
+ return [
257
+ createPausedLocationEntry(stackFrame),
258
+ variableEntry,
259
+ ];
260
+ }
261
+ function createScopeEntry(scope, variables) {
262
+ const variablesSummary = ( variables.map(v => `${v.name}: ${v.value}`)).join('\n');
263
+ return {
264
+ kind: 'debugVariable',
265
+ id: `debug-scope:${scope.name}`,
266
+ name: `Scope: ${scope.name}`,
267
+ fullName: `Scope: ${scope.name}`,
268
+ icon: Codicon.debug,
269
+ value: variablesSummary,
270
+ expression: scope.name,
271
+ type: 'scope',
272
+ modelDescription: `Debug scope "${scope.name}" with ${variables.length} variables:\n${variablesSummary}`,
273
+ };
274
+ }
275
+ function formatVariableDescription(expression) {
276
+ const value = expression.value;
277
+ const type = expression.type;
278
+ if (type && value) {
279
+ return `${type}: ${value}`;
280
+ }
281
+ return value || type || '';
282
+ }
283
+ function formatExpressionResult(value, type) {
284
+ if (type && value) {
285
+ return `${type}: ${value}`;
286
+ }
287
+ return value || type || '';
288
+ }
289
+ function formatModelDescription(name, value, type) {
290
+ let description = `Debug variable "${name}"`;
291
+ if (type) {
292
+ description += ` of type ${type}`;
293
+ }
294
+ description += ` with value: ${value}`;
295
+ return description;
296
+ }
297
+ let DebugChatContextContribution = class DebugChatContextContribution extends Disposable {
298
+ static { this.ID = 'workbench.contrib.chat.debugChatContextContribution'; }
299
+ constructor(contextPickService, instantiationService) {
300
+ super();
301
+ this._register(contextPickService.registerChatContextItem(instantiationService.createInstance(DebugSessionContextPick)));
302
+ }
303
+ };
304
+ DebugChatContextContribution = ( __decorate([
305
+ ( __param(0, IChatContextPickService)),
306
+ ( __param(1, IInstantiationService))
307
+ ], DebugChatContextContribution));
308
+ registerAction2(class extends Action2 {
309
+ constructor() {
310
+ super({
311
+ id: 'workbench.debug.action.addVariableToChat',
312
+ title: ( localize(6693, 'Add to Chat')),
313
+ f1: false,
314
+ menu: {
315
+ id: MenuId.DebugVariablesContext,
316
+ group: 'z_commands',
317
+ order: 110,
318
+ when: ChatContextKeys.enabled
319
+ }
320
+ });
321
+ }
322
+ async run(accessor, context) {
323
+ const chatWidgetService = accessor.get(IChatWidgetService);
324
+ const debugService = accessor.get(IDebugService);
325
+ const widget = await chatWidgetService.revealWidget();
326
+ if (!widget) {
327
+ return;
328
+ }
329
+ const entry = createDebugVariableEntryFromContext(context);
330
+ if (entry) {
331
+ const stackFrame = debugService.getViewModel().focusedStackFrame;
332
+ if (stackFrame) {
333
+ widget.attachmentModel.addContext(createPausedLocationEntry(stackFrame));
334
+ }
335
+ widget.attachmentModel.addContext(entry);
336
+ }
337
+ }
338
+ });
339
+ registerAction2(class extends Action2 {
340
+ constructor() {
341
+ super({
342
+ id: 'workbench.debug.action.addWatchExpressionToChat',
343
+ title: ( localize(6693, 'Add to Chat')),
344
+ f1: false,
345
+ menu: {
346
+ id: MenuId.DebugWatchContext,
347
+ group: 'z_commands',
348
+ order: 110,
349
+ when: ChatContextKeys.enabled
350
+ }
351
+ });
352
+ }
353
+ async run(accessor, context) {
354
+ const chatWidgetService = accessor.get(IChatWidgetService);
355
+ const debugService = accessor.get(IDebugService);
356
+ const widget = await chatWidgetService.revealWidget();
357
+ if (!context || !widget) {
358
+ return;
359
+ }
360
+ const stackFrame = debugService.getViewModel().focusedStackFrame;
361
+ if (stackFrame) {
362
+ widget.attachmentModel.addContext(createPausedLocationEntry(stackFrame));
363
+ }
364
+ widget.attachmentModel.addContext(createDebugVariableEntry(context));
365
+ }
366
+ });
367
+ registerAction2(class extends Action2 {
368
+ constructor() {
369
+ super({
370
+ id: 'workbench.debug.action.addScopeToChat',
371
+ title: ( localize(6693, 'Add to Chat')),
372
+ f1: false,
373
+ menu: {
374
+ id: MenuId.DebugScopesContext,
375
+ group: 'z_commands',
376
+ order: 1,
377
+ when: ChatContextKeys.enabled
378
+ }
379
+ });
380
+ }
381
+ async run(accessor, context) {
382
+ const chatWidgetService = accessor.get(IChatWidgetService);
383
+ const debugService = accessor.get(IDebugService);
384
+ const widget = await chatWidgetService.revealWidget();
385
+ if (!context || !widget) {
386
+ return;
387
+ }
388
+ const viewModel = debugService.getViewModel();
389
+ const stackFrame = viewModel.focusedStackFrame;
390
+ if (!stackFrame) {
391
+ return;
392
+ }
393
+ try {
394
+ const scopes = await stackFrame.getScopes();
395
+ const scope = scopes.find(s => s.name === context.scope.name);
396
+ if (scope) {
397
+ const variables = await scope.getChildren();
398
+ widget.attachmentModel.addContext(createPausedLocationEntry(stackFrame));
399
+ widget.attachmentModel.addContext(createScopeEntry(scope, variables));
400
+ }
401
+ }
402
+ catch {
403
+ }
404
+ }
405
+ });
406
+ function isVariablesContext(context) {
407
+ return typeof context === 'object' && context !== null && 'variable' in context && 'sessionId' in context;
408
+ }
409
+ function createDebugVariableEntryFromContext(context) {
410
+ if (context instanceof Variable) {
411
+ return createDebugVariableEntry(context);
412
+ }
413
+ if (isVariablesContext(context)) {
414
+ const variable = context.variable;
415
+ return {
416
+ kind: 'debugVariable',
417
+ id: `debug-variable:${variable.name}`,
418
+ name: variable.name,
419
+ fullName: variable.evaluateName ?? variable.name,
420
+ icon: Codicon.debug,
421
+ value: variable.value,
422
+ expression: variable.evaluateName ?? variable.name,
423
+ type: variable.type,
424
+ modelDescription: formatModelDescription(variable.evaluateName || variable.name, variable.value, variable.type),
425
+ };
426
+ }
427
+ return undefined;
428
+ }
429
+
430
+ export { DebugChatContextContribution };
@@ -24,7 +24,7 @@ import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform
24
24
  import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
25
25
  import { WorkbenchState } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace';
26
26
  import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
27
- import { launchSchemaId } from '@codingame/monaco-vscode-ce7c734f-7712-563c-9335-d7acb43306af-common/vscode/vs/workbench/services/configuration/common/configuration';
27
+ import { launchSchemaId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/configuration/common/configuration';
28
28
  import { ACTIVE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
29
29
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
30
30
  import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
@@ -34,7 +34,7 @@ import { ITextFileService } from '@codingame/monaco-vscode-api/vscode/vs/workben
34
34
  import { CONTEXT_DEBUG_CONFIGURATION_TYPE, DebugConfigurationProviderTriggerKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug';
35
35
  import { launchSchema } from '../common/debugSchemas.js';
36
36
  import { getVisibleAndSorted } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debugUtils';
37
- import { debugConfigure } from '@codingame/monaco-vscode-2c64d2c2-fdf7-5675-a2fe-f6f65fbdedbf-common/vscode/vs/workbench/contrib/debug/browser/debugIcons';
37
+ import { debugConfigure } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/browser/debugIcons';
38
38
 
39
39
  const jsonRegistry = ( Registry.as(Extensions.JSONContribution));
40
40
  jsonRegistry.registerSchema(launchSchemaId, launchSchema);
@@ -186,7 +186,7 @@ let ConfigurationManager = class ConfigurationManager {
186
186
  disposables.add(token);
187
187
  const input = disposables.add(this.quickInputService.createQuickPick());
188
188
  input.busy = true;
189
- input.placeholder = ( localize(6608, "Select Launch Configuration"));
189
+ input.placeholder = ( localize(6744, "Select Launch Configuration"));
190
190
  const chosenPromise = ( new Promise(resolve => {
191
191
  disposables.add(input.onDidAccept(() => resolve(input.activeItems[0])));
192
192
  disposables.add(input.onDidTriggerItemButton(async (context) => {
@@ -230,7 +230,7 @@ let ConfigurationManager = class ConfigurationManager {
230
230
  config,
231
231
  buttons: [{
232
232
  iconClass: ThemeIcon.asClassName(debugConfigure),
233
- tooltip: ( localize(6609, "Edit Debug Configuration in launch.json"))
233
+ tooltip: ( localize(6745, "Edit Debug Configuration in launch.json"))
234
234
  }],
235
235
  launch
236
236
  })))));
@@ -548,7 +548,7 @@ let Launch = class Launch extends AbstractLaunch {
548
548
  }
549
549
  catch (error) {
550
550
  throw ( new Error(( localize(
551
- 6610,
551
+ 6746,
552
552
  "Unable to create 'launch.json' file inside the '.vscode' folder ({0}).",
553
553
  error.message
554
554
  ))));
@@ -602,7 +602,7 @@ let WorkspaceLaunch = class WorkspaceLaunch extends AbstractLaunch {
602
602
  return this.contextService.getWorkspace().configuration;
603
603
  }
604
604
  get name() {
605
- return localize(6611, "workspace");
605
+ return localize(6747, "workspace");
606
606
  }
607
607
  getConfig() {
608
608
  return this.configurationService.inspect('launch').workspaceValue;
@@ -646,7 +646,7 @@ let UserLaunch = class UserLaunch extends AbstractLaunch {
646
646
  return this.preferencesService.userSettingsResource;
647
647
  }
648
648
  get name() {
649
- return localize(6612, "user settings");
649
+ return localize(6748, "user settings");
650
650
  }
651
651
  get hidden() {
652
652
  return true;
@@ -1,7 +1,7 @@
1
1
  import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
2
2
  import { DisposableStore } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
3
  import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
4
- import { FastAndSlowPicks, IPickerQuickAccessItem, PickerQuickAccessProvider, Picks } from "@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/platform/quickinput/browser/pickerQuickAccess";
4
+ import { FastAndSlowPicks, IPickerQuickAccessItem, PickerQuickAccessProvider, Picks } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/browser/pickerQuickAccess";
5
5
  import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service";
6
6
  import { IDebugService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug.service";
7
7
  export declare class DebugConsoleQuickAccess extends PickerQuickAccessProvider<IPickerQuickAccessItem> {
@@ -3,9 +3,9 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
3
3
  import { matchesFuzzy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/filters';
4
4
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
5
5
  import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
6
- import { PickerQuickAccessProvider } from '@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/platform/quickinput/browser/pickerQuickAccess';
6
+ import { PickerQuickAccessProvider } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/browser/pickerQuickAccess';
7
7
  import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
8
- import { DEBUG_CONSOLE_QUICK_ACCESS_PREFIX, SELECT_AND_START_ID } from '@codingame/monaco-vscode-88aa9a78-75f5-5aaa-89e9-bbdd580b3b5c-common/vscode/vs/workbench/contrib/debug/browser/debugCommands';
8
+ import { DEBUG_CONSOLE_QUICK_ACCESS_PREFIX, SELECT_AND_START_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/browser/debugCommands';
9
9
  import { REPL_VIEW_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug';
10
10
  import { IDebugService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug.service';
11
11
 
@@ -27,7 +27,7 @@ let DebugConsoleQuickAccess = class DebugConsoleQuickAccess extends PickerQuickA
27
27
  if (debugConsolePicks.length > 0) {
28
28
  debugConsolePicks.push({ type: 'separator' });
29
29
  }
30
- const createTerminalLabel = ( localize(6613, "Start a New Debug Session"));
30
+ const createTerminalLabel = ( localize(6749, "Start a New Debug Session"));
31
31
  debugConsolePicks.push({
32
32
  label: `$(plus) ${createTerminalLabel}`,
33
33
  ariaLabel: createTerminalLabel,