@codingame/monaco-vscode-chat-service-override 38.0.2 → 38.0.4

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 (52) hide show
  1. package/package.json +5 -5
  2. package/vscode/src/vs/platform/sandbox/common/terminalSandboxCommandRules.js +4 -4
  3. package/vscode/src/vs/platform/sandbox/common/terminalSandboxEngine.js +1 -1
  4. package/vscode/src/vs/platform/terminal/common/autoApprove/sedFileWriteParser.js +22 -22
  5. package/vscode/src/vs/sessions/browser/parts/mobile/contributions/mobileDiffHelpers.js +1 -1
  6. package/vscode/src/vs/sessions/browser/parts/mobile/contributions/mobileDiffView.js +2 -2
  7. package/vscode/src/vs/sessions/contrib/providers/agentHost/browser/agentSessionSettingsFileSystemProvider.js +1 -1
  8. package/vscode/src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostActions.js +2 -2
  9. package/vscode/src/vs/sessions/services/agentHost/browser/agentHostCustomizationService.js +1 -1
  10. package/vscode/src/vs/sessions/skills/all_/SKILL.md.js +1 -1
  11. package/vscode/src/vs/workbench/contrib/agentsVoice/browser/voiceModeOnboarding.js +1 -1
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/createPluginAction.js +1 -1
  13. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.js +1 -1
  14. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.js +10 -4
  15. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +1 -1
  16. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +1 -1
  17. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionSummaryHoverService.js +1 -1
  18. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/copilotConnectorsService.js +1 -1
  19. package/vscode/src/vs/workbench/contrib/chat/browser/aiCustomization/mcpServerCustomizationMigration.js +1 -1
  20. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheDiff.js +1 -3
  21. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.js +2 -2
  22. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowChartView.js +2 -2
  23. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugFlowGraph.js +1 -1
  24. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.js +1 -1
  25. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugLogsView.js +1 -1
  26. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugOverviewView.js +1 -1
  27. package/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugWireLogView.js +1 -1
  28. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +1 -1
  29. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +1 -1
  30. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +9 -13
  31. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +1 -1
  32. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +5 -5
  33. package/vscode/src/vs/workbench/contrib/chat/browser/chatSubmitRequestHandlerService.js +1 -1
  34. package/vscode/src/vs/workbench/contrib/chat/browser/planReviewFeedback/planReviewFeedbackService.js +1 -1
  35. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineGutterRail.js +1 -1
  36. package/vscode/src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineRulerRail.js +1 -1
  37. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownAnchorService.js +1 -1
  38. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +1 -1
  39. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +1 -1
  40. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +2 -2
  41. package/vscode/src/vs/workbench/contrib/chat/common/chatSideChatService.js +1 -1
  42. package/vscode/src/vs/workbench/contrib/chat/common/editing/chatCodeMapperService.js +1 -1
  43. package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +2 -2
  44. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +1 -1
  45. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +2 -2
  46. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +5 -5
  47. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
  48. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +1 -1
  49. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +1 -1
  50. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/consoleCompactor/consoleCompactor.js +5 -5
  51. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +1 -1
  52. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-chat-service-override",
3
- "version": "38.0.2",
3
+ "version": "38.0.4",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - chat service-override",
6
6
  "keywords": [],
@@ -15,10 +15,10 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "38.0.2",
19
- "@codingame/monaco-vscode-files-service-override": "38.0.2",
20
- "@codingame/monaco-vscode-katex-common": "38.0.2",
21
- "@codingame/monaco-vscode-xterm-common": "38.0.2"
18
+ "@codingame/monaco-vscode-api": "38.0.4",
19
+ "@codingame/monaco-vscode-files-service-override": "38.0.4",
20
+ "@codingame/monaco-vscode-katex-common": "38.0.4",
21
+ "@codingame/monaco-vscode-xterm-common": "38.0.4"
22
22
  },
23
23
  "main": "index.js",
24
24
  "module": "index.js",
@@ -18,12 +18,12 @@ function matchesTerminalSandboxCommandRule(command, rule, context) {
18
18
  function getCommandSubcommand(args, optionsWithValue) {
19
19
  for (let i = 0; i < args.length; i++) {
20
20
  const arg = args[i];
21
- if (arg === '--') {
21
+ if (arg === "--") {
22
22
  return undefined;
23
23
  }
24
- if (arg.startsWith('-')) {
25
- const option = arg.includes('=') ? arg.substring(0, arg.indexOf('=')) : arg;
26
- if (!arg.includes('=') && optionsWithValue?.has(option)) {
24
+ if (arg.startsWith("-")) {
25
+ const option = arg.includes("=") ? arg.substring(0, ( arg.indexOf("="))) : arg;
26
+ if (!arg.includes("=") && optionsWithValue?.has(option)) {
27
27
  i++;
28
28
  }
29
29
  continue;
@@ -828,7 +828,7 @@ let TerminalSandboxEngine = class TerminalSandboxEngine extends Disposable {
828
828
  _toWindowsFileSystemResource(path) {
829
829
  const normalizedPath = path.replace(/\\/g, "/");
830
830
  if (/^\/\/[^/]/.test(normalizedPath)) {
831
- const firstPathSeparator = normalizedPath.indexOf("/", 2);
831
+ const firstPathSeparator = ( normalizedPath.indexOf("/", 2));
832
832
  if (firstPathSeparator === -1) {
833
833
  return ( URI.from({
834
834
  scheme: "file",
@@ -2,7 +2,7 @@
2
2
 
3
3
  class SedFileWriteParser {
4
4
  constructor() {
5
- this.commandName = 'sed';
5
+ this.commandName = "sed";
6
6
  }
7
7
  canHandle(commandText) {
8
8
  if (!commandText.match(/^sed\s+/)) {
@@ -17,7 +17,7 @@ class SedFileWriteParser {
17
17
  }
18
18
  _tokenizeCommand(commandText) {
19
19
  const tokens = [];
20
- let current = '';
20
+ let current = "";
21
21
  let inSingleQuote = false;
22
22
  let inDoubleQuote = false;
23
23
  let escaped = false;
@@ -28,17 +28,17 @@ class SedFileWriteParser {
28
28
  escaped = false;
29
29
  continue;
30
30
  }
31
- if (char === '\\' && !inSingleQuote) {
31
+ if (char === "\\" && !inSingleQuote) {
32
32
  escaped = true;
33
33
  current += char;
34
34
  continue;
35
35
  }
36
- if (char === '\'' && !inDoubleQuote) {
36
+ if (char === "'" && !inDoubleQuote) {
37
37
  inSingleQuote = !inSingleQuote;
38
38
  current += char;
39
39
  continue;
40
40
  }
41
- if (char === '"' && !inSingleQuote) {
41
+ if (char === "\"" && !inSingleQuote) {
42
42
  inDoubleQuote = !inDoubleQuote;
43
43
  current += char;
44
44
  continue;
@@ -46,7 +46,7 @@ class SedFileWriteParser {
46
46
  if (/\s/.test(char) && !inSingleQuote && !inDoubleQuote) {
47
47
  if (current) {
48
48
  tokens.push(current);
49
- current = '';
49
+ current = "";
50
50
  }
51
51
  continue;
52
52
  }
@@ -58,7 +58,7 @@ class SedFileWriteParser {
58
58
  return tokens;
59
59
  }
60
60
  _extractFileTargets(tokens) {
61
- if (tokens.length === 0 || tokens[0] !== 'sed') {
61
+ if (tokens.length === 0 || tokens[0] !== "sed") {
62
62
  return [];
63
63
  }
64
64
  const files = [];
@@ -66,17 +66,17 @@ class SedFileWriteParser {
66
66
  let foundScript = false;
67
67
  while (i < tokens.length) {
68
68
  const token = tokens[i];
69
- if (token.startsWith('--')) {
70
- if (token === '--in-place' || token.startsWith('--in-place=')) {
69
+ if (token.startsWith("--")) {
70
+ if (token === "--in-place" || token.startsWith("--in-place=")) {
71
71
  i++;
72
72
  continue;
73
73
  }
74
- if (token === '--expression' || token === '--file') {
74
+ if (token === "--expression" || token === "--file") {
75
75
  i += 2;
76
76
  foundScript = true;
77
77
  continue;
78
78
  }
79
- if (token.startsWith('--expression=') || token.startsWith('--file=')) {
79
+ if (token.startsWith("--expression=") || token.startsWith("--file=")) {
80
80
  i++;
81
81
  foundScript = true;
82
82
  continue;
@@ -84,32 +84,32 @@ class SedFileWriteParser {
84
84
  i++;
85
85
  continue;
86
86
  }
87
- if (token.startsWith('-') && token.length > 1 && token[1] !== '-') {
87
+ if (token.startsWith("-") && token.length > 1 && token[1] !== "-") {
88
88
  const flags = token.slice(1);
89
- const iIndex = flags.indexOf('i');
90
- const IIndex = flags.indexOf('I');
89
+ const iIndex = ( flags.indexOf("i"));
90
+ const IIndex = ( flags.indexOf("I"));
91
91
  const inPlaceIndex = iIndex >= 0 ? iIndex : IIndex;
92
92
  if (inPlaceIndex >= 0 && inPlaceIndex < flags.length - 1) {
93
93
  i++;
94
94
  continue;
95
95
  }
96
- if ((flags.endsWith('i') || flags.endsWith('I')) && i + 1 < tokens.length) {
96
+ if ((flags.endsWith("i") || flags.endsWith("I")) && i + 1 < tokens.length) {
97
97
  const nextToken = tokens[i + 1];
98
- if (nextToken === '\'\'' || nextToken === '""') {
98
+ if (nextToken === "''" || nextToken === "\"\"") {
99
99
  i += 2;
100
100
  continue;
101
101
  }
102
- if ((nextToken.startsWith('\'') && nextToken.endsWith('\'')) || (nextToken.startsWith('"') && nextToken.endsWith('"'))) {
102
+ if ((nextToken.startsWith("'") && nextToken.endsWith("'")) || (nextToken.startsWith("\"") && nextToken.endsWith("\""))) {
103
103
  const unquoted = nextToken.slice(1, -1);
104
- if (unquoted.startsWith('.') && unquoted.length <= 10 && !unquoted.includes('/')) {
104
+ if (unquoted.startsWith(".") && unquoted.length <= 10 && !unquoted.includes("/")) {
105
105
  i += 2;
106
106
  continue;
107
107
  }
108
108
  }
109
109
  }
110
- if (flags.includes('e') || flags.includes('f')) {
111
- const eIndex = flags.indexOf('e');
112
- const fIndex = flags.indexOf('f');
110
+ if (flags.includes("e") || flags.includes("f")) {
111
+ const eIndex = ( flags.indexOf("e"));
112
+ const fIndex = ( flags.indexOf("f"));
113
113
  const optIndex = eIndex >= 0 ? eIndex : fIndex;
114
114
  if (optIndex < flags.length - 1) {
115
115
  foundScript = true;
@@ -129,7 +129,7 @@ class SedFileWriteParser {
129
129
  continue;
130
130
  }
131
131
  let file = token;
132
- if ((file.startsWith('\'') && file.endsWith('\'')) || (file.startsWith('"') && file.endsWith('"'))) {
132
+ if ((file.startsWith("'") && file.endsWith("'")) || (file.startsWith("\"") && file.endsWith("\""))) {
133
133
  file = file.slice(1, -1);
134
134
  }
135
135
  files.push(file);
@@ -233,7 +233,7 @@ function regexTokenizeLine(line, lang) {
233
233
  matched = true;
234
234
  }
235
235
  if (!matched && lang !== "python" && lang !== "shell" && line.startsWith("/*", pos)) {
236
- const end = line.indexOf("*/", pos + 2);
236
+ const end = ( line.indexOf("*/", pos + 2));
237
237
  const tokenEnd = end === -1 ? len : end + 2;
238
238
  tokens.push({
239
239
  start: pos,
@@ -74,7 +74,7 @@ class MobileDiffView extends Disposable {
74
74
  this.disposed = false;
75
75
  this.renderGeneration = 0;
76
76
  this.siblings = data.siblings && data.siblings.length > 0 ? data.siblings : [data.diff];
77
- const startIndex = data.index ?? this.siblings.indexOf(data.diff);
77
+ const startIndex = data.index ?? ( this.siblings.indexOf(data.diff));
78
78
  this.currentIndex = startIndex >= 0 ? startIndex : 0;
79
79
  this.render(workbenchContainer);
80
80
  this.renderBodyForCurrent();
@@ -476,7 +476,7 @@ function regexTokenizeLine(line, lang) {
476
476
  matched = true;
477
477
  }
478
478
  if (!matched && lang !== "python" && lang !== "shell" && line.startsWith("/*", pos)) {
479
- const end = line.indexOf("*/", pos + 2);
479
+ const end = ( line.indexOf("*/", pos + 2));
480
480
  const tokenEnd = end === -1 ? len : end + 2;
481
481
  tokens.push({
482
482
  start: pos,
@@ -26,7 +26,7 @@ function parseSessionSettingsUri(uri) {
26
26
  return undefined;
27
27
  }
28
28
  const path = uri.path.startsWith("/") ? uri.path.substring(1) : uri.path;
29
- const firstSlash = path.indexOf("/");
29
+ const firstSlash = ( path.indexOf("/"));
30
30
  if (firstSlash <= 0) {
31
31
  return undefined;
32
32
  }
@@ -176,7 +176,7 @@ function parseSSHHostInput(value) {
176
176
  if (!trimmed) {
177
177
  return undefined;
178
178
  }
179
- const atIdx = trimmed.indexOf("@");
179
+ const atIdx = ( trimmed.indexOf("@"));
180
180
  if (atIdx === 0 || atIdx === trimmed.length - 1) {
181
181
  return undefined;
182
182
  }
@@ -224,7 +224,7 @@ function validateSSHHostInput(value) {
224
224
  if (!v) {
225
225
  return localize(5391, "Enter an SSH host.");
226
226
  }
227
- const atIdx = v.indexOf("@");
227
+ const atIdx = ( v.indexOf("@"));
228
228
  if (atIdx === 0) {
229
229
  return localize(5392, "Enter a username before '@'.");
230
230
  }
@@ -115,7 +115,7 @@ let AgentHostCustomizationService = class AgentHostCustomizationService extends
115
115
  })));
116
116
  }
117
117
  _serverIdMatchesRawId(serverId, rawId) {
118
- const separator = serverId.indexOf("/");
118
+ const separator = ( serverId.indexOf("/"));
119
119
  return serverId === rawId || (separator >= 0 && serverId.slice(separator + 1) === rawId);
120
120
  }
121
121
  _agentFromMode(uri) {
@@ -8,8 +8,8 @@ var skillAssets = {
8
8
  'vs/sessions/skills/generate-run-commands/SKILL.md': new URL('../generate-run-commands/SKILL.md', import.meta.url).href,
9
9
  'vs/sessions/skills/merge/SKILL.md': new URL('../merge/SKILL.md', import.meta.url).href,
10
10
  'vs/sessions/skills/sync/SKILL.md': new URL('../sync/SKILL.md', import.meta.url).href,
11
- 'vs/sessions/skills/sync-upstream/SKILL.md': new URL('../sync-upstream/SKILL.md', import.meta.url).href,
12
11
  'vs/sessions/skills/troubleshoot/SKILL.md': new URL('../troubleshoot/SKILL.md', import.meta.url).href,
12
+ 'vs/sessions/skills/sync-upstream/SKILL.md': new URL('../sync-upstream/SKILL.md', import.meta.url).href,
13
13
  'vs/sessions/skills/update-pr/SKILL.md': new URL('../update-pr/SKILL.md', import.meta.url).href,
14
14
  'vs/sessions/skills/update-skills/SKILL.md': new URL('../update-skills/SKILL.md', import.meta.url).href
15
15
  };
@@ -732,7 +732,7 @@ let VoiceModeOnboardingBanner = class VoiceModeOnboardingBanner extends ChatInpu
732
732
  const backward = keyboardEvent.equals(KeyCode.LeftArrow) || keyboardEvent.equals(KeyCode.UpArrow);
733
733
  if (forward || backward) {
734
734
  keyboardEvent.preventDefault();
735
- const index = VOICES.indexOf(voice);
735
+ const index = ( VOICES.indexOf(voice));
736
736
  const next = VOICES[(index + (forward ? 1 : VOICES.length - 1)) % VOICES.length];
737
737
  this.selectVoice(next);
738
738
  this.voiceElements.get(next.id)?.element.focus();
@@ -68,7 +68,7 @@ function getResourceLabel(r) {
68
68
  }
69
69
  function getResourceFileName(r) {
70
70
  const label = getResourceLabel(r);
71
- const colonIndex = label.indexOf(":");
71
+ const colonIndex = ( label.indexOf(":"));
72
72
  return colonIndex >= 0 ? label.substring(colonIndex + 1) : label;
73
73
  }
74
74
  class CreatePluginAction extends Action2 {
@@ -210,7 +210,7 @@ class AgentHostLanguageModelProvider extends Disposable {
210
210
  }
211
211
  _modelGroupFor(model) {
212
212
  const explicitGroupId = readAgentModelGroupId(model);
213
- const slash = model.id.indexOf("/");
213
+ const slash = ( model.id.indexOf("/"));
214
214
  const groupVendorId = explicitGroupId ?? (slash > 0 ? model.id.slice(0, slash) : model.provider);
215
215
  if (!groupVendorId) {
216
216
  return undefined;
@@ -2234,7 +2234,7 @@ let AgentHostSessionHandler = class AgentHostSessionHandler extends Disposable {
2234
2234
  const startedClientToolCalls = ( new Set());
2235
2235
  const clientToolExecutions = ( new Map());
2236
2236
  const releaseClientToolExecution = (key, execution) => {
2237
- if (clientToolExecutions.get(key) !== execution) {
2237
+ if (execution.ownerCount > 0 || clientToolExecutions.get(key) !== execution) {
2238
2238
  return;
2239
2239
  }
2240
2240
  clientToolExecutions.delete(key);
@@ -2266,12 +2266,18 @@ let AgentHostSessionHandler = class AgentHostSessionHandler extends Disposable {
2266
2266
  execution = {
2267
2267
  source: ( new CancellationTokenSource()),
2268
2268
  retain: this._retainToolCall(key),
2269
+ ownerCount: 0,
2269
2270
  activeAttempts: 0
2270
2271
  };
2271
2272
  clientToolExecutions.set(key, execution);
2272
2273
  }
2274
+ execution.ownerCount++;
2273
2275
  const targetsConfirmation = initial.toolCall.status === ToolCallStatus.PendingConfirmation;
2274
2276
  requestLifecycle.value = toDisposable(() => {
2277
+ execution.ownerCount--;
2278
+ if (execution.ownerCount > 0) {
2279
+ return;
2280
+ }
2275
2281
  const state = this._clientToolInvocations.get(key)?.state.get();
2276
2282
  const targetsState = state?.type === IChatToolInvocation.StateKind.Streaming || state?.type === (targetsConfirmation ? IChatToolInvocation.StateKind.WaitingForConfirmation : IChatToolInvocation.StateKind.Executing) || (execution.activeAttempts > 0 && (state?.type === IChatToolInvocation.StateKind.Cancelled || state?.type === IChatToolInvocation.StateKind.Completed));
2277
2283
  if (targetsState) {
@@ -3013,7 +3019,7 @@ let AgentHostSessionHandler = class AgentHostSessionHandler extends Disposable {
3013
3019
  }));
3014
3020
  store.add(autorunPerKeyedItem(
3015
3021
  responseParts$,
3016
- rp => rp.kind === ResponsePartKind.ToolCall ? `tc:${rp.toolCall.toolCallId}` : rp.kind === ResponsePartKind.Markdown ? `md:${rp.id}` : rp.kind === ResponsePartKind.Reasoning ? `rs:${rp.id}` : rp.kind === ResponsePartKind.InputRequest ? inputRequestResponsePartKey(rp) : `other:${responseParts$.get().indexOf(rp)}`,
3022
+ rp => rp.kind === ResponsePartKind.ToolCall ? `tc:${rp.toolCall.toolCallId}` : rp.kind === ResponsePartKind.Markdown ? `md:${rp.id}` : rp.kind === ResponsePartKind.Reasoning ? `rs:${rp.id}` : rp.kind === ResponsePartKind.InputRequest ? inputRequestResponsePartKey(rp) : `other:${( responseParts$.get().indexOf(rp))}`,
3017
3023
  (_key, part$, partStore) => {
3018
3024
  const initial = part$.get();
3019
3025
  switch (initial.kind) {
@@ -3038,7 +3044,7 @@ let AgentHostSessionHandler = class AgentHostSessionHandler extends Disposable {
3038
3044
  }
3039
3045
  break;
3040
3046
  case ResponsePartKind.SystemNotification:
3041
- if (responseParts$.get().indexOf(initial) >= (opts.initialResponsePartCount ?? 0) && opts.subAgentInvocationId === undefined) {
3047
+ if (( responseParts$.get().indexOf(initial)) >= (opts.initialResponsePartCount ?? 0) && opts.subAgentInvocationId === undefined) {
3042
3048
  const resource = readSlashCommandResource(initial);
3043
3049
  if (resource && opts.onOpenResponseResource) {
3044
3050
  opts.onOpenResponseResource(resource);
@@ -4538,7 +4544,7 @@ let AgentHostSessionHandler = class AgentHostSessionHandler extends Disposable {
4538
4544
  );
4539
4545
  invocation.toolSpecificData = parentPart.toolSpecificData;
4540
4546
  invocation.presentation = parentPart.presentation;
4541
- const index = item.parts.indexOf(parentPart);
4547
+ const index = ( item.parts.indexOf(parentPart));
4542
4548
  if (isUnstartedSubagent(parentPart)) {
4543
4549
  item.parts.splice(index, 1);
4544
4550
  observation.publisher.publish([invocation]);
@@ -633,7 +633,7 @@ let AgentTitleBarStatusWidget = class AgentTitleBarStatusWidget extends BaseActi
633
633
  disposables.add(sparkleDropdown);
634
634
  disposables.add(addDisposableListener(sparkleContainer, EventType.KEY_DOWN, e => {
635
635
  if (e.key === "ArrowLeft" || e.key === "ArrowRight" || e.key === "Home" || e.key === "End") {
636
- const idx = this._rovingElements.indexOf(sparkleContainer);
636
+ const idx = ( this._rovingElements.indexOf(sparkleContainer));
637
637
  if (idx === -1) {
638
638
  return;
639
639
  }
@@ -335,7 +335,7 @@ let UnifiedQuickAccess = class UnifiedQuickAccess extends Disposable {
335
335
  this._currentTab = tab;
336
336
  const radio = picker._unifiedRadio;
337
337
  if (radio) {
338
- const index = this._tabs.indexOf(tab);
338
+ const index = ( this._tabs.indexOf(tab));
339
339
  if (index >= 0) {
340
340
  radio.setActiveItem(index);
341
341
  }
@@ -9,7 +9,7 @@ class SessionSummaryHoverService {
9
9
  registerProvider(provider) {
10
10
  this._providers.unshift(provider);
11
11
  return toDisposable(() => {
12
- const index = this._providers.indexOf(provider);
12
+ const index = ( this._providers.indexOf(provider));
13
13
  if (index !== -1) {
14
14
  this._providers.splice(index, 1);
15
15
  }
@@ -767,7 +767,7 @@ function scoreConnector(connector, words) {
767
767
  return Math.round(total / words.length);
768
768
  }
769
769
  function scoreConnectorField(word, value) {
770
- const index = value.toLowerCase().indexOf(word);
770
+ const index = ( value.toLowerCase().indexOf(word));
771
771
  if (index >= 0) {
772
772
  return value.length === word.length ? 25 : index === 0 ? 20 : 15;
773
773
  }
@@ -952,7 +952,7 @@ function replaceConfigurationVariables(value, replace) {
952
952
  let copied = 0;
953
953
  let position = 0;
954
954
  while (position < value.length) {
955
- const start = value.indexOf("${", position);
955
+ const start = ( value.indexOf("${", position));
956
956
  if (start === -1) {
957
957
  break;
958
958
  }
@@ -260,9 +260,7 @@ function insertPrefixComponent(drift, entry) {
260
260
  }
261
261
  }
262
262
  prefixEntries.push(entry);
263
- prefixEntries.sort(
264
- (a, b) => PREFIX_COMPONENT_ORDER.indexOf(a.name) - PREFIX_COMPONENT_ORDER.indexOf(b.name)
265
- );
263
+ prefixEntries.sort((a, b) => ( PREFIX_COMPONENT_ORDER.indexOf(a.name)) - ( PREFIX_COMPONENT_ORDER.indexOf(b.name)));
266
264
  return [...prefixEntries, ...rest];
267
265
  }
268
266
  function classifyStringDrift(a, b) {
@@ -78,7 +78,7 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
78
78
  if (e.type === "select" && e.item instanceof TextBreadcrumbItem) {
79
79
  this.breadcrumbWidget.setSelection(undefined);
80
80
  const items = this.breadcrumbWidget.getItems();
81
- const idx = items.indexOf(e.item);
81
+ const idx = ( items.indexOf(e.item));
82
82
  if (idx === 0) {
83
83
  this._onNavigate.fire(CacheExplorerNavigation.Home);
84
84
  } else if (idx === 1) {
@@ -423,7 +423,7 @@ let ChatDebugCacheExplorerView = class ChatDebugCacheExplorerView extends Dispos
423
423
  if (indices.length === 0) {
424
424
  return;
425
425
  }
426
- const pos = indices.indexOf(this.selectedIndex);
426
+ const pos = ( indices.indexOf(this.selectedIndex));
427
427
  const nextPos = pos === -1 ? (delta > 0 ? 0 : indices.length - 1) : Math.min(indices.length - 1, Math.max(0, pos + delta));
428
428
  this.selectTurn(indices[nextPos], {
429
429
  preventScroll: false
@@ -83,7 +83,7 @@ let ChatDebugFlowChartView = class ChatDebugFlowChartView extends Disposable {
83
83
  if (e.type === "select" && e.item instanceof TextBreadcrumbItem) {
84
84
  this.breadcrumbWidget.setSelection(undefined);
85
85
  const items = this.breadcrumbWidget.getItems();
86
- const idx = items.indexOf(e.item);
86
+ const idx = ( items.indexOf(e.item));
87
87
  if (idx === 0) {
88
88
  this._onNavigate.fire(FlowChartNavigation.Home);
89
89
  } else if (idx === 1) {
@@ -423,7 +423,7 @@ let ChatDebugFlowChartView = class ChatDebugFlowChartView extends Disposable {
423
423
  return false;
424
424
  }
425
425
  const keys = [...( this.renderResult.focusableElements.keys())];
426
- const idx = keys.indexOf(currentMapKey);
426
+ const idx = ( keys.indexOf(currentMapKey));
427
427
  if (idx === -1) {
428
428
  return false;
429
429
  }
@@ -102,7 +102,7 @@ function buildFlowGraph(events) {
102
102
  }
103
103
  }
104
104
  return {
105
- id: event.id ?? `event-${events.indexOf(event)}`,
105
+ id: event.id ?? `event-${( events.indexOf(event))}`,
106
106
  kind: effectiveKind,
107
107
  category: event.kind === "generic" ? event.category : undefined,
108
108
  label,
@@ -199,7 +199,7 @@ let ChatDebugHomeView = class ChatDebugHomeView extends Disposable {
199
199
  return;
200
200
  }
201
201
  const focused = getActiveElement();
202
- const idx = items.indexOf(focused);
202
+ const idx = ( items.indexOf(focused));
203
203
  if (idx === -1) {
204
204
  return;
205
205
  }
@@ -88,7 +88,7 @@ let ChatDebugLogsView = class ChatDebugLogsView extends Disposable {
88
88
  if (e.type === "select" && e.item instanceof TextBreadcrumbItem) {
89
89
  this.breadcrumbWidget.setSelection(undefined);
90
90
  const items = this.breadcrumbWidget.getItems();
91
- const idx = items.indexOf(e.item);
91
+ const idx = ( items.indexOf(e.item));
92
92
  if (idx === 0) {
93
93
  this._onNavigate.fire(LogsNavigation.Home);
94
94
  } else if (idx === 1) {
@@ -79,7 +79,7 @@ let ChatDebugOverviewView = class ChatDebugOverviewView extends Disposable {
79
79
  if (e.type === "select" && e.item instanceof TextBreadcrumbItem) {
80
80
  this.breadcrumbWidget.setSelection(undefined);
81
81
  const items = this.breadcrumbWidget.getItems();
82
- const idx = items.indexOf(e.item);
82
+ const idx = ( items.indexOf(e.item));
83
83
  if (idx === 0) {
84
84
  this._onNavigate.fire(OverviewNavigation.Home);
85
85
  }
@@ -114,7 +114,7 @@ let ChatDebugWireLogView = class ChatDebugWireLogView extends Disposable {
114
114
  this._register(this.breadcrumbWidget.onDidSelectItem(e => {
115
115
  if (e.type === "select" && e.item instanceof TextBreadcrumbItem) {
116
116
  this.breadcrumbWidget.setSelection(undefined);
117
- const idx = this.breadcrumbWidget.getItems().indexOf(e.item);
117
+ const idx = ( this.breadcrumbWidget.getItems().indexOf(e.item));
118
118
  if (idx === 0) {
119
119
  this._onNavigate.fire(WireLogNavigation.Home);
120
120
  } else if (idx === 1) {
@@ -98,7 +98,7 @@ class NavigateAction extends ChatEditingEditorAction {
98
98
  async function openNextOrPreviousChange(accessor, session, entry, next) {
99
99
  const editorService = accessor.get(IEditorService);
100
100
  const entries = session.entries.get();
101
- let idx = entries.indexOf(entry);
101
+ let idx = ( entries.indexOf(entry));
102
102
  let newEntry;
103
103
  while (true) {
104
104
  idx = (idx + (next ? 1 : -1) + entries.length) % entries.length;
@@ -330,7 +330,7 @@ let ChatEditingOverlayController = class ChatEditingOverlayController {
330
330
  const changeIndex = derived(
331
331
  r => entry ? entry.getEditorIntegration(editorPane).currentIndex.read(r) : 0
332
332
  );
333
- const entryIndex = derived(r => entry ? session.entries.read(r).indexOf(entry) : 0);
333
+ const entryIndex = derived(r => entry ? ( session.entries.read(r).indexOf(entry)) : 0);
334
334
  widget.show(session, entry, {
335
335
  entryIndex,
336
336
  changeIndex
@@ -543,7 +543,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
543
543
  const cell = isCellUri && this.modifiedModel.cells.find(cell => isEqual(cell.uri, resource));
544
544
  let cellEntry;
545
545
  if (cell) {
546
- const index = this.modifiedModel.cells.indexOf(cell);
546
+ const index = ( this.modifiedModel.cells.indexOf(cell));
547
547
  const entry = this._cellsDiffInfo.get().slice().find(entry => entry.modifiedCellIndex === index);
548
548
  if (!entry) {
549
549
  console.error("Original cell model not found");
@@ -763,16 +763,12 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
763
763
  });
764
764
  const modifiedModel = this.modelService.getModel(modifiedModelUri) || this._register(this.modelService.createModel("", null, modifiedModelUri));
765
765
  const keep = async () => {
766
- this._applyEditsSync(
767
- () => this.keepPreviouslyDeletedCell(this.originalModel.cells.indexOf(originalCell))
768
- );
766
+ this._applyEditsSync(() => this.keepPreviouslyDeletedCell(( this.originalModel.cells.indexOf(originalCell))));
769
767
  this.computeStateAfterAcceptingRejectingChanges(true);
770
768
  return true;
771
769
  };
772
770
  const undo = async () => {
773
- this._applyEditsSync(
774
- () => this.undoPreviouslyDeletedCell(this.originalModel.cells.indexOf(originalCell), originalCell)
775
- );
771
+ this._applyEditsSync(() => this.undoPreviouslyDeletedCell(( this.originalModel.cells.indexOf(originalCell)), originalCell));
776
772
  this.computeStateAfterAcceptingRejectingChanges(false);
777
773
  return true;
778
774
  };
@@ -795,7 +791,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
795
791
  undoPreviouslyInsertedCell(cell) {
796
792
  let diffs = [];
797
793
  this._applyEditsSync(() => {
798
- const index = this.modifiedModel.cells.indexOf(cell);
794
+ const index = ( this.modifiedModel.cells.indexOf(cell));
799
795
  diffs = adjustCellDiffForRevertingAnInsertedCell(
800
796
  index,
801
797
  this._cellsDiffInfo.get(),
@@ -806,7 +802,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
806
802
  this.updateCellDiffInfo(diffs, undefined);
807
803
  }
808
804
  keepPreviouslyInsertedCell(cell) {
809
- const modifiedCellIndex = this.modifiedModel.cells.indexOf(cell);
805
+ const modifiedCellIndex = ( this.modifiedModel.cells.indexOf(cell));
810
806
  if (modifiedCellIndex === -1) {
811
807
  return;
812
808
  }
@@ -1000,16 +996,16 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
1000
996
  ));
1001
997
  this.cellEntryMap.set(cell.uri, cellEntry);
1002
998
  disposables.add(autorun(r => {
1003
- if (this.modifiedModel.cells.indexOf(cell) === -1) {
999
+ if (( this.modifiedModel.cells.indexOf(cell)) === -1) {
1004
1000
  return;
1005
1001
  }
1006
1002
  const diffs = this.cellsDiffInfo.read(undefined).slice();
1007
- const index = this.modifiedModel.cells.indexOf(cell);
1003
+ const index = ( this.modifiedModel.cells.indexOf(cell));
1008
1004
  let entry = diffs.find(entry => entry.modifiedCellIndex === index);
1009
1005
  if (!entry) {
1010
1006
  return;
1011
1007
  }
1012
- const entryIndex = diffs.indexOf(entry);
1008
+ const entryIndex = ( diffs.indexOf(entry));
1013
1009
  entry.diff.set(cellEntry.diffInfo.read(r), undefined);
1014
1010
  if (cellEntry.diffInfo.read(undefined).identical && entry.type === "modified") {
1015
1011
  entry = {
@@ -1031,7 +1027,7 @@ let ChatEditingModifiedNotebookEntry = class ChatEditingModifiedNotebookEntry ex
1031
1027
  });
1032
1028
  }));
1033
1029
  disposables.add(autorun(r => {
1034
- if (this.modifiedModel.cells.indexOf(cell) === -1) {
1030
+ if (( this.modifiedModel.cells.indexOf(cell)) === -1) {
1035
1031
  return;
1036
1032
  }
1037
1033
  const cellState = cellEntry.state.read(r);
@@ -435,7 +435,7 @@ let ChatEditingSession = ChatEditingSession_1 = class ChatEditingSession extends
435
435
  ];
436
436
  await Promise.allSettled(this._editorGroupsService.groups.flatMap(async g => {
437
437
  return g.editors.map(async e => {
438
- if ((e instanceof MultiDiffEditorInput && e.initialResources?.some(r => r.originalUri && schemes.indexOf(r.originalUri.scheme) !== -1)) || (e instanceof DiffEditorInput && e.original.resource && schemes.indexOf(e.original.resource.scheme) !== -1)) {
438
+ if ((e instanceof MultiDiffEditorInput && e.initialResources?.some(r => r.originalUri && ( schemes.indexOf(r.originalUri.scheme)) !== -1)) || (e instanceof DiffEditorInput && e.original.resource && ( schemes.indexOf(e.original.resource.scheme)) !== -1)) {
439
439
  await g.closeEditor(e);
440
440
  }
441
441
  });
@@ -317,7 +317,7 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
317
317
  } : undefined;
318
318
  }
319
319
  updateCurrentIndex(change, indexInCell = 0) {
320
- const index = this.sortedCellChanges.indexOf(change);
320
+ const index = ( this.sortedCellChanges.indexOf(change));
321
321
  const changeIndex = this.changeIndexComputer.getPrefixSum(index - 1);
322
322
  const currentIndex = Math.min(changeIndex + indexInCell, this.changeIndexComputer.getTotalSum() - 1);
323
323
  this._currentIndex.set(currentIndex, undefined);
@@ -496,7 +496,7 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
496
496
  }
497
497
  const isLastChangeInCell = currentChange.index >= lastChangeIndex(currentChange.change);
498
498
  const index = isLastChangeInCell ? 0 : currentChange.index + 1;
499
- const change = isLastChangeInCell ? changes[changes.indexOf(currentChange.change) + 1] : currentChange.change;
499
+ const change = isLastChangeInCell ? changes[( changes.indexOf(currentChange.change)) + 1] : currentChange.change;
500
500
  if (change) {
501
501
  if (isLastChangeInCell) {
502
502
  this.blur(currentChange.change);
@@ -511,7 +511,7 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
511
511
  case "delete":
512
512
  {
513
513
  this.blur(currentChange.change);
514
- const nextChange = changes[changes.indexOf(currentChange.change) + 1];
514
+ const nextChange = changes[( changes.indexOf(currentChange.change)) + 1];
515
515
  if (nextChange && this._revealFirstOrLast(nextChange, true)) {
516
516
  return true;
517
517
  }
@@ -547,7 +547,7 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
547
547
  }
548
548
  }
549
549
  const isFirstChangeInCell = currentChange.index <= 0;
550
- const change = isFirstChangeInCell ? changes[changes.indexOf(currentChange.change) - 1] : currentChange.change;
550
+ const change = isFirstChangeInCell ? changes[( changes.indexOf(currentChange.change)) - 1] : currentChange.change;
551
551
  if (change) {
552
552
  const index = isFirstChangeInCell ? lastChangeIndex(change) : currentChange.index - 1;
553
553
  if (isFirstChangeInCell) {
@@ -563,7 +563,7 @@ let ChatEditingNotebookEditorWidgetIntegration = class ChatEditingNotebookEditor
563
563
  case "delete":
564
564
  {
565
565
  this.blur(currentChange.change);
566
- const prevChange = changes[changes.indexOf(currentChange.change) - 1];
566
+ const prevChange = changes[( changes.indexOf(currentChange.change)) - 1];
567
567
  if (prevChange && this._revealFirstOrLast(prevChange, false)) {
568
568
  return true;
569
569
  }
@@ -8,7 +8,7 @@ class ChatSubmitRequestHandlerService {
8
8
  register(handler) {
9
9
  this._handlers.push(handler);
10
10
  return toDisposable(() => {
11
- const index = this._handlers.indexOf(handler);
11
+ const index = ( this._handlers.indexOf(handler));
12
12
  if (index >= 0) {
13
13
  this._handlers.splice(index, 1);
14
14
  }
@@ -52,7 +52,7 @@ let PlanReviewFeedbackService = class PlanReviewFeedbackService extends Disposab
52
52
  }
53
53
  this._onDidChangeRegistrations.fire();
54
54
  return toDisposable(() => {
55
- const index = registrations.indexOf(registration);
55
+ const index = ( registrations.indexOf(registration));
56
56
  if (index === -1) {
57
57
  return;
58
58
  }
@@ -293,7 +293,7 @@ class PromptTimelineGutterRail extends Disposable {
293
293
  this._rowDisposables.add(addDisposableListener(button, EventType.FOCUS, () => {
294
294
  this._open = true;
295
295
  this._updateRevealed();
296
- this._updateTabStops(this._rows.indexOf(entry), column);
296
+ this._updateTabStops(( this._rows.indexOf(entry)), column);
297
297
  }));
298
298
  }
299
299
  this._rows.push(entry);
@@ -128,7 +128,7 @@ class PromptTimelineRulerRail extends Disposable {
128
128
  );
129
129
  this._markDisposables.add(addDisposableListener(button, EventType.FOCUS, () => {
130
130
  this._showCard(entry);
131
- this._updateTabStops(this._marks.indexOf(entry));
131
+ this._updateTabStops(( this._marks.indexOf(entry)));
132
132
  }));
133
133
  this._markDisposables.add(
134
134
  addDisposableListener(button, EventType.MOUSE_LEAVE, () => this._card.scheduleHide())
@@ -25,7 +25,7 @@ class ChatMarkdownAnchorService extends Disposable {
25
25
  }
26
26
  return combinedDisposable(
27
27
  addDisposableListener(element, "focus", () => this.setLastFocusedList(widget)),
28
- toDisposable(() => this._widgets.splice(this._widgets.indexOf(widget), 1)),
28
+ toDisposable(() => this._widgets.splice(( this._widgets.indexOf(widget)), 1)),
29
29
  addDisposableListener(element, "blur", () => {
30
30
  if (this._lastFocusedWidget === widget) {
31
31
  this.setLastFocusedList(undefined);
@@ -242,7 +242,7 @@ let ChatWidgetService = class ChatWidgetService extends Disposable {
242
242
  });
243
243
  }),
244
244
  toDisposable(() => {
245
- this._widgets.splice(this._widgets.indexOf(newWidget), 1);
245
+ this._widgets.splice(( this._widgets.indexOf(newWidget)), 1);
246
246
  if (this._lastFocusedWidget === newWidget) {
247
247
  this.setLastFocusedWidget(undefined);
248
248
  }
@@ -42,7 +42,7 @@ function isWhitespaceOrPromptPart(p) {
42
42
  return (p instanceof ChatRequestTextPart && !p.text.trim().length) || (p instanceof ChatRequestSlashPromptPart);
43
43
  }
44
44
  function exactlyOneSpaceAfterPart(parsedRequest, part) {
45
- const partIdx = parsedRequest.indexOf(part);
45
+ const partIdx = ( parsedRequest.indexOf(part));
46
46
  if (parsedRequest.length > partIdx + 2) {
47
47
  return false;
48
48
  }
@@ -943,12 +943,12 @@ let ChatService = class ChatService extends Disposable {
943
943
  }
944
944
  continue;
945
945
  }
946
- let insertionIndex = existing ? currentRequests.indexOf(existing) : currentRequests.length;
946
+ let insertionIndex = existing ? ( currentRequests.indexOf(existing)) : currentRequests.length;
947
947
  if (!existing) {
948
948
  for (const following of turns.slice(turnIndex + 1)) {
949
949
  const nextRequest = following.id === undefined ? undefined : requestsById.get(following.id);
950
950
  if (nextRequest) {
951
- insertionIndex = currentRequests.indexOf(nextRequest);
951
+ insertionIndex = ( currentRequests.indexOf(nextRequest));
952
952
  break;
953
953
  }
954
954
  }
@@ -17,7 +17,7 @@ class ChatSideChatService extends Disposable {
17
17
  }
18
18
  return toDisposable(() => {
19
19
  const providers = this._providers.get();
20
- const index = providers.indexOf(provider);
20
+ const index = ( providers.indexOf(provider));
21
21
  if (index !== -1) {
22
22
  this._providers.set([...providers.slice(0, index), ...providers.slice(index + 1)], undefined);
23
23
  }
@@ -8,7 +8,7 @@ class CodeMapperService {
8
8
  this.providers.push(provider);
9
9
  return {
10
10
  dispose: () => {
11
- const index = this.providers.indexOf(provider);
11
+ const index = ( this.providers.indexOf(provider));
12
12
  if (index >= 0) {
13
13
  this.providers.splice(index, 1);
14
14
  }
@@ -6,7 +6,7 @@ import { isUndefinedOrNull } from '@codingame/monaco-vscode-api/vscode/vs/base/c
6
6
  function prefixError(e, prefix) {
7
7
  e.message = prefix + e.message;
8
8
  if (e.stack) {
9
- const nlIdx = e.stack.indexOf("\n");
9
+ const nlIdx = ( e.stack.indexOf("\n"));
10
10
  e.stack = nlIdx !== -1 ? `${e.name}: ${e.message}${e.stack.slice(nlIdx)}` : `${e.name}: ${e.message}`;
11
11
  }
12
12
  }
@@ -167,7 +167,7 @@ class ObjectMutationLog {
167
167
  let start = 0;
168
168
  const len = content.byteLength;
169
169
  while (start < len) {
170
- let end = content.indexOf(LF, start);
170
+ let end = ( content.indexOf(LF, start));
171
171
  if (end === -1) {
172
172
  end = len;
173
173
  }
@@ -47,7 +47,7 @@ let ChatSlashCommandService = class ChatSlashCommandService extends Disposable {
47
47
  if (!commandsForId) {
48
48
  return;
49
49
  }
50
- const entryIndex = commandsForId.indexOf(entry);
50
+ const entryIndex = ( commandsForId.indexOf(entry));
51
51
  if (entryIndex === -1) {
52
52
  return;
53
53
  }
@@ -606,10 +606,10 @@ let ComputeAutomaticInstructions = class ComputeAutomaticInstructions {
606
606
  const toolReferences = [];
607
607
  const collectToolReference = tool => {
608
608
  if (tool) {
609
- let offset = content.indexOf(tool.variable);
609
+ let offset = ( content.indexOf(tool.variable));
610
610
  while (offset >= 0) {
611
611
  toolReferences.push(toToolVariableEntry(tool.tool, ( new OffsetRange(offset, offset + tool.variable.length))));
612
- offset = content.indexOf(tool.variable, offset + 1);
612
+ offset = ( content.indexOf(tool.variable, offset + 1));
613
613
  }
614
614
  }
615
615
  };
@@ -62,7 +62,7 @@ let PromptHeaderAutocompletion = class PromptHeaderAutocompletion {
62
62
  return undefined;
63
63
  }
64
64
  const lineText = model.getLineContent(position.lineNumber);
65
- const colonIndex = lineText.indexOf(":");
65
+ const colonIndex = ( lineText.indexOf(":"));
66
66
  const colonPosition = colonIndex !== -1 ? ( new Position(position.lineNumber, colonIndex + 1)) : undefined;
67
67
  if (!colonPosition || position.isBeforeOrEqual(colonPosition)) {
68
68
  let containingAttribute = header.attributes.find((
@@ -85,7 +85,7 @@ let PromptHeaderAutocompletion = class PromptHeaderAutocompletion {
85
85
  }
86
86
  if (containingAttribute) {
87
87
  const attrLineText = model.getLineContent(containingAttribute.range.startLineNumber);
88
- const attrColonIndex = attrLineText.indexOf(":");
88
+ const attrColonIndex = ( attrLineText.indexOf(":"));
89
89
  if (attrColonIndex !== -1) {
90
90
  return this.provideValueCompletions(model, position, header, ( new Position(containingAttribute.range.startLineNumber, attrColonIndex + 1)), promptType, containingAttribute);
91
91
  }
@@ -270,7 +270,7 @@ let PromptHeaderAutocompletion = class PromptHeaderAutocompletion {
270
270
  const hookEventOnLine = hooksMap.properties.find(p => p.key.range.startLineNumber === position.lineNumber);
271
271
  if (hookEventOnLine) {
272
272
  const lineText = model.getLineContent(position.lineNumber);
273
- const colonIdx = lineText.indexOf(":");
273
+ const colonIdx = ( lineText.indexOf(":"));
274
274
  if (colonIdx !== -1 && position.column > colonIdx + 1) {
275
275
  const whilespaceAfterColon = (lineText.substring(colonIdx + 1).match(/^\s*/)?.[0].length) ?? 0;
276
276
  const commandSnippet = ["", " - type: command", " command: \"$1\""].join("\n");
@@ -327,7 +327,7 @@ let PromptHeaderAutocompletion = class PromptHeaderAutocompletion {
327
327
  }
328
328
  }
329
329
  }
330
- const lineHasColon = lineText.indexOf(":") !== -1;
330
+ const lineHasColon = ( lineText.indexOf(":")) !== -1;
331
331
  for (const [hookName, hookType] of Object.entries(hooksByTarget)) {
332
332
  if (( existingKeys.has(hookName))) {
333
333
  continue;
@@ -386,7 +386,7 @@ let PromptHeaderAutocompletion = class PromptHeaderAutocompletion {
386
386
  const dashPrefixMatch = lineText.match(/^(\s*-\s+)/);
387
387
  const fieldStart = dashPrefixMatch ? dashPrefixMatch[1].length : firstNonWhitespace;
388
388
  const rangeStartColumn = isEmptyLine ? position.column : fieldStart + 1;
389
- const colonIndex = lineText.indexOf(":");
389
+ const colonIndex = ( lineText.indexOf(":"));
390
390
  const suggestions = [];
391
391
  for (const fieldName of validFields) {
392
392
  if (( existingFields.has(fieldName))) {
@@ -27,7 +27,7 @@ function createNotebookOutputVariableEntry(outputViewModel, mimeType, notebookEd
27
27
  }
28
28
  const notebookUri = notebookModel.uri;
29
29
  const cellUri = cell.uri;
30
- const cellIndex = notebookModel.cells.indexOf(cell.model);
30
+ const cellIndex = ( notebookModel.cells.indexOf(cell.model));
31
31
  const outputId = outputViewModel?.model.outputId;
32
32
  let outputIndex = 0;
33
33
  if (outputId !== undefined) {
@@ -113,7 +113,7 @@ function findCommandEcho(output, commandLine, allowSuffixMatch) {
113
113
  strippedOutput,
114
114
  indexMapping
115
115
  } = stripNewLinesAndBuildMapping(output);
116
- const matchIndex = strippedOutput.indexOf(trimmedCommand);
116
+ const matchIndex = ( strippedOutput.indexOf(trimmedCommand));
117
117
  let matchEndInStripped;
118
118
  let contentBefore;
119
119
  if (matchIndex !== -1) {
@@ -10,7 +10,7 @@ import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event'
10
10
  import { isString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
11
11
 
12
12
  function getTaskDefinition(id) {
13
- const idx = id.indexOf(": ");
13
+ const idx = ( id.indexOf(": "));
14
14
  const taskType = id.substring(0, idx);
15
15
  let taskLabel = idx > 0 ? id.substring(idx + 2) : id;
16
16
  if (/^\d+$/.test(taskLabel)) {
@@ -619,7 +619,7 @@ function stripSuffix(value, suffix) {
619
619
  return value.endsWith(suffix) ? value.slice(0, value.length - suffix.length) : undefined;
620
620
  }
621
621
  function splitOnce(value, separator) {
622
- const index = value.indexOf(separator);
622
+ const index = ( value.indexOf(separator));
623
623
  if (index === -1) {
624
624
  return undefined;
625
625
  }
@@ -2477,8 +2477,8 @@ function uvProgressExample(line) {
2477
2477
  return undefined;
2478
2478
  }
2479
2479
  const withoutSpinner = normalized.slice(firstChar.length).trimStart();
2480
- const dotsIndex = withoutSpinner.indexOf("...");
2481
- const spacesIndex = withoutSpinner.indexOf(" ");
2480
+ const dotsIndex = ( withoutSpinner.indexOf("..."));
2481
+ const spacesIndex = ( withoutSpinner.indexOf(" "));
2482
2482
  const candidates = [dotsIndex, spacesIndex].filter(index => index !== -1);
2483
2483
  const end = candidates.length > 0 ? Math.min(...candidates) : withoutSpinner.length;
2484
2484
  return withoutSpinner.slice(0, end).trim();
@@ -2704,7 +2704,7 @@ function stripPnpmWorkspacePrefix(line) {
2704
2704
  return end !== undefined ? line.slice(end) : line;
2705
2705
  }
2706
2706
  function pnpmWorkspacePrefixEnd(line) {
2707
- const index = line.indexOf("|");
2707
+ const index = ( line.indexOf("|"));
2708
2708
  if (index === -1) {
2709
2709
  return undefined;
2710
2710
  }
@@ -4062,7 +4062,7 @@ function parseGrepContentLine(line) {
4062
4062
  if (numbered !== undefined) {
4063
4063
  return numbered;
4064
4064
  }
4065
- const separatorIndex = line.indexOf(":");
4065
+ const separatorIndex = ( line.indexOf(":"));
4066
4066
  if (separatorIndex < 0) {
4067
4067
  return undefined;
4068
4068
  }
@@ -116,7 +116,7 @@ let GetTerminalOutputTool = class GetTerminalOutputTool extends Disposable {
116
116
  return output;
117
117
  }
118
118
  const startIndex = output.length - charBudget;
119
- const newlineIndex = output.indexOf("\n", startIndex);
119
+ const newlineIndex = ( output.indexOf("\n", startIndex));
120
120
  if (newlineIndex !== -1 && newlineIndex < output.length - 1) {
121
121
  return output.slice(newlineIndex + 1);
122
122
  }
@@ -189,7 +189,7 @@ let TreeSitterCommandParser = class TreeSitterCommandParser extends Disposable {
189
189
  return i + 1 < tokens.length ? i + 1 : undefined;
190
190
  }
191
191
  if (token === "-" || token.startsWith("-")) {
192
- const option = token.includes("=") ? token.substring(0, token.indexOf("=")) : token;
192
+ const option = token.includes("=") ? token.substring(0, ( token.indexOf("="))) : token;
193
193
  if (!token.includes("=") && ( envOptionsWithValue.has(option))) {
194
194
  i++;
195
195
  }