@codingame/monaco-vscode-xterm-addons-common 25.1.2 → 26.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.
Files changed (18) hide show
  1. package/package.json +10 -10
  2. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.js +58 -114
  3. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.d.ts +42 -0
  4. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.js +209 -0
  5. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js +18 -16
  6. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.d.ts +1 -0
  7. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.js +151 -70
  8. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.js +27 -25
  9. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.js +67 -53
  10. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.d.ts +4 -1
  11. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.js +188 -116
  12. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatPasteProviders.js +106 -71
  13. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalUri.js +6 -3
  14. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +204 -140
  15. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +77 -82
  16. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermAddonImporter.js +24 -24
  17. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +4 -1
  18. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +262 -162
@@ -15,7 +15,7 @@ async function askForPromptSourceFolder(accessor, type, existingFolder, isMove =
15
15
  const promptsService = accessor.get(IPromptsService);
16
16
  const labelService = accessor.get(ILabelService);
17
17
  const workspaceService = accessor.get(IWorkspaceContextService);
18
- const folders = promptsService.getSourceFolders(type);
18
+ const folders = await promptsService.getSourceFolders(type);
19
19
  if (folders.length === 0) {
20
20
  await showNoFoldersDialog(accessor, type);
21
21
  return;
@@ -23,38 +23,42 @@ async function askForPromptSourceFolder(accessor, type, existingFolder, isMove =
23
23
  const pickOptions = {
24
24
  placeHolder: existingFolder ? getPlaceholderStringforMove(type, isMove) : getPlaceholderStringforNew(type),
25
25
  canPickMany: false,
26
- matchOnDescription: true,
26
+ matchOnDescription: true
27
27
  };
28
28
  const foldersList = ( folders.map(folder => {
29
29
  const uri = folder.uri;
30
- const detail = (existingFolder && isEqual(uri, existingFolder)) ? ( localize(5479, "Current Location")) : undefined;
30
+ const detail = (existingFolder && isEqual(uri, existingFolder)) ? ( localize(5686, "Current Location")) : undefined;
31
31
  if (folder.storage !== PromptsStorage.local) {
32
32
  return {
33
- type: 'item',
33
+ type: "item",
34
34
  label: promptsService.getPromptLocationLabel(folder),
35
35
  detail,
36
36
  tooltip: labelService.getUriLabel(uri),
37
37
  folder
38
38
  };
39
39
  }
40
- const { folders } = workspaceService.getWorkspace();
40
+ const {
41
+ folders
42
+ } = workspaceService.getWorkspace();
41
43
  const isMultirootWorkspace = (folders.length > 1);
42
44
  const firstFolder = folders[0];
43
45
  if (isMultirootWorkspace || !firstFolder || !extUri.isEqual(firstFolder.uri, uri)) {
44
46
  return {
45
- type: 'item',
46
- label: labelService.getUriLabel(uri, { relative: true }),
47
+ type: "item",
48
+ label: labelService.getUriLabel(uri, {
49
+ relative: true
50
+ }),
47
51
  detail,
48
52
  tooltip: labelService.getUriLabel(uri),
49
- folder,
53
+ folder
50
54
  };
51
55
  }
52
56
  return {
53
- type: 'item',
54
- label: ( localize(5480, "Current Workspace")),
57
+ type: "item",
58
+ label: ( localize(5687, "Current Workspace")),
55
59
  detail,
56
60
  tooltip: labelService.getUriLabel(uri),
57
- folder,
61
+ folder
58
62
  };
59
63
  }));
60
64
  const answer = await quickInputService.pick(foldersList, pickOptions);
@@ -65,53 +69,59 @@ async function askForPromptSourceFolder(accessor, type, existingFolder, isMove =
65
69
  }
66
70
  function getPlaceholderStringforNew(type) {
67
71
  switch (type) {
68
- case PromptsType.instructions:
69
- return localize(5481, "Select a location to create the instructions file");
70
- case PromptsType.prompt:
71
- return localize(5482, "Select a location to create the prompt file");
72
- case PromptsType.agent:
73
- return localize(5483, "Select a location to create the agent file");
74
- default:
75
- throw ( new Error('Unknown prompt type'));
72
+ case PromptsType.instructions:
73
+ return localize(5688, "Select a location to create the instructions file");
74
+ case PromptsType.prompt:
75
+ return localize(5689, "Select a location to create the prompt file");
76
+ case PromptsType.agent:
77
+ return localize(5690, "Select a location to create the agent file");
78
+ case PromptsType.skill:
79
+ return localize(5691, "Select a location to create the skill");
80
+ default:
81
+ throw ( new Error("Unknown prompt type"));
76
82
  }
77
83
  }
78
84
  function getPlaceholderStringforMove(type, isMove) {
79
85
  if (isMove) {
80
86
  switch (type) {
81
- case PromptsType.instructions:
82
- return localize(5484, "Select a location to move the instructions file to");
83
- case PromptsType.prompt:
84
- return localize(5485, "Select a location to move the prompt file to");
85
- case PromptsType.agent:
86
- return localize(5486, "Select a location to move the agent file to");
87
- default:
88
- throw ( new Error('Unknown prompt type'));
89
- }
90
- }
91
- switch (type) {
92
87
  case PromptsType.instructions:
93
- return localize(5487, "Select a location to copy the instructions file to");
88
+ return localize(5692, "Select a location to move the instructions file to");
94
89
  case PromptsType.prompt:
95
- return localize(5488, "Select a location to copy the prompt file to");
90
+ return localize(5693, "Select a location to move the prompt file to");
96
91
  case PromptsType.agent:
97
- return localize(5489, "Select a location to copy the agent file to");
92
+ return localize(5694, "Select a location to move the agent file to");
93
+ case PromptsType.skill:
94
+ return localize(5695, "Select a location to move the skill to");
98
95
  default:
99
- throw ( new Error('Unknown prompt type'));
96
+ throw ( new Error("Unknown prompt type"));
97
+ }
98
+ }
99
+ switch (type) {
100
+ case PromptsType.instructions:
101
+ return localize(5696, "Select a location to copy the instructions file to");
102
+ case PromptsType.prompt:
103
+ return localize(5697, "Select a location to copy the prompt file to");
104
+ case PromptsType.agent:
105
+ return localize(5698, "Select a location to copy the agent file to");
106
+ case PromptsType.skill:
107
+ return localize(5699, "Select a location to copy the skill to");
108
+ default:
109
+ throw ( new Error("Unknown prompt type"));
100
110
  }
101
111
  }
102
112
  async function showNoFoldersDialog(accessor, type) {
103
113
  const quickInputService = accessor.get(IQuickInputService);
104
114
  const openerService = accessor.get(IOpenerService);
105
115
  const docsQuickPick = {
106
- type: 'item',
116
+ type: "item",
107
117
  label: getLearnLabel(type),
108
118
  description: PROMPT_DOCUMENTATION_URL,
109
119
  tooltip: PROMPT_DOCUMENTATION_URL,
110
- value: ( URI.parse(PROMPT_DOCUMENTATION_URL)),
120
+ value: ( URI.parse(PROMPT_DOCUMENTATION_URL))
111
121
  };
112
122
  const result = await quickInputService.pick([docsQuickPick], {
113
123
  placeHolder: getMissingSourceFolderString(type),
114
- canPickMany: false,
124
+ canPickMany: false
115
125
  });
116
126
  if (result) {
117
127
  await openerService.open(result.value);
@@ -119,26 +129,30 @@ async function showNoFoldersDialog(accessor, type) {
119
129
  }
120
130
  function getLearnLabel(type) {
121
131
  switch (type) {
122
- case PromptsType.prompt:
123
- return localize(5490, 'Learn how to configure reusable prompts');
124
- case PromptsType.instructions:
125
- return localize(5491, 'Learn how to configure reusable instructions');
126
- case PromptsType.agent:
127
- return localize(5492, 'Learn how to configure custom agents');
128
- default:
129
- throw ( new Error('Unknown prompt type'));
132
+ case PromptsType.prompt:
133
+ return localize(5700, "Learn how to configure reusable prompts");
134
+ case PromptsType.instructions:
135
+ return localize(5701, "Learn how to configure reusable instructions");
136
+ case PromptsType.agent:
137
+ return localize(5702, "Learn how to configure custom agents");
138
+ case PromptsType.skill:
139
+ return localize(5703, "Learn how to configure skills");
140
+ default:
141
+ throw ( new Error("Unknown prompt type"));
130
142
  }
131
143
  }
132
144
  function getMissingSourceFolderString(type) {
133
145
  switch (type) {
134
- case PromptsType.instructions:
135
- return localize(5493, 'No instruction source folders found.');
136
- case PromptsType.prompt:
137
- return localize(5494, 'No prompt source folders found.');
138
- case PromptsType.agent:
139
- return localize(5495, 'No agent source folders found.');
140
- default:
141
- throw ( new Error('Unknown prompt type'));
146
+ case PromptsType.instructions:
147
+ return localize(5704, "No instruction source folders found.");
148
+ case PromptsType.prompt:
149
+ return localize(5705, "No prompt source folders found.");
150
+ case PromptsType.agent:
151
+ return localize(5706, "No agent source folders found.");
152
+ case PromptsType.skill:
153
+ return localize(5707, "No skill source folders found.");
154
+ default:
155
+ throw ( new Error("Unknown prompt type"));
142
156
  }
143
157
  }
144
158
 
@@ -10,6 +10,7 @@ import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platf
10
10
  import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
11
11
  import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
12
12
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
13
+ import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
13
14
  /**
14
15
  * Options for the {@link askToSelectInstructions} function.
15
16
  */
@@ -52,7 +53,8 @@ export declare class PromptFilePickers {
52
53
  private readonly _promptsService;
53
54
  private readonly _labelService;
54
55
  private readonly _configurationService;
55
- constructor(_quickInputService: IQuickInputService, _openerService: IOpenerService, _fileService: IFileService, _dialogService: IDialogService, _commandService: ICommandService, _instaService: IInstantiationService, _promptsService: IPromptsService, _labelService: ILabelService, _configurationService: IConfigurationService);
56
+ private readonly _productService;
57
+ constructor(_quickInputService: IQuickInputService, _openerService: IOpenerService, _fileService: IFileService, _dialogService: IDialogService, _commandService: ICommandService, _instaService: IInstantiationService, _promptsService: IPromptsService, _labelService: ILabelService, _configurationService: IConfigurationService, _productService: IProductService);
56
58
  /**
57
59
  * Shows the prompt file selection dialog to the user that allows to run a prompt file(s).
58
60
  *
@@ -61,6 +63,7 @@ export declare class PromptFilePickers {
61
63
  */
62
64
  selectPromptFile(options: ISelectOptions): Promise<ISelectPromptResult | undefined>;
63
65
  private _createPromptPickItems;
66
+ private _getExtensionGroupLabel;
64
67
  private _getNewItems;
65
68
  private _createPromptPickItem;
66
69
  private keepQuickPickOpen;