@vscode/chat-lib 0.1.1-7 → 0.1.1-9

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 (48) hide show
  1. package/dist/src/_internal/extension/byok/node/openAIEndpoint.js +2 -2
  2. package/dist/src/_internal/extension/byok/node/openAIEndpoint.js.map +1 -1
  3. package/dist/src/_internal/extension/prompt/node/chatMLFetcher.d.ts.map +1 -1
  4. package/dist/src/_internal/extension/prompt/node/chatMLFetcher.js +22 -9
  5. package/dist/src/_internal/extension/prompt/node/chatMLFetcher.js.map +1 -1
  6. package/dist/src/_internal/extension/prompt/node/chatMLFetcherTelemetry.d.ts +8 -4
  7. package/dist/src/_internal/extension/prompt/node/chatMLFetcherTelemetry.d.ts.map +1 -1
  8. package/dist/src/_internal/extension/prompt/node/chatMLFetcherTelemetry.js +15 -1
  9. package/dist/src/_internal/extension/prompt/node/chatMLFetcherTelemetry.js.map +1 -1
  10. package/dist/src/_internal/extension/xtab/node/xtabProvider.js +1 -1
  11. package/dist/src/_internal/platform/configuration/common/configurationService.d.ts +16 -0
  12. package/dist/src/_internal/platform/configuration/common/configurationService.d.ts.map +1 -1
  13. package/dist/src/_internal/platform/configuration/common/configurationService.js +17 -2
  14. package/dist/src/_internal/platform/configuration/common/configurationService.js.map +1 -1
  15. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.js +6 -6
  16. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.js.map +1 -1
  17. package/dist/src/_internal/platform/endpoint/common/endpointProvider.d.ts +1 -0
  18. package/dist/src/_internal/platform/endpoint/common/endpointProvider.d.ts.map +1 -1
  19. package/dist/src/_internal/platform/endpoint/common/endpointProvider.js.map +1 -1
  20. package/dist/src/_internal/platform/endpoint/node/responsesApi.d.ts.map +1 -1
  21. package/dist/src/_internal/platform/endpoint/node/responsesApi.js +0 -1
  22. package/dist/src/_internal/platform/endpoint/node/responsesApi.js.map +1 -1
  23. package/dist/src/_internal/platform/github/common/githubService.d.ts +13 -2
  24. package/dist/src/_internal/platform/github/common/githubService.d.ts.map +1 -1
  25. package/dist/src/_internal/platform/github/common/githubService.js.map +1 -1
  26. package/dist/src/_internal/platform/networking/common/fetcherService.d.ts +7 -0
  27. package/dist/src/_internal/platform/networking/common/fetcherService.d.ts.map +1 -1
  28. package/dist/src/_internal/platform/networking/common/fetcherService.js.map +1 -1
  29. package/dist/src/_internal/platform/networking/common/networking.d.ts +14 -2
  30. package/dist/src/_internal/platform/networking/common/networking.d.ts.map +1 -1
  31. package/dist/src/_internal/platform/networking/common/networking.js.map +1 -1
  32. package/dist/src/_internal/util/common/test/shims/chatTypes.d.ts +12 -0
  33. package/dist/src/_internal/util/common/test/shims/chatTypes.d.ts.map +1 -1
  34. package/dist/src/_internal/util/common/test/shims/chatTypes.js +21 -2
  35. package/dist/src/_internal/util/common/test/shims/chatTypes.js.map +1 -1
  36. package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.d.ts.map +1 -1
  37. package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.js +6 -1
  38. package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.js.map +1 -1
  39. package/dist/src/_internal/vscodeTypes.d.ts +5 -0
  40. package/dist/src/_internal/vscodeTypes.d.ts.map +1 -1
  41. package/dist/src/_internal/vscodeTypes.js +6 -1
  42. package/dist/src/_internal/vscodeTypes.js.map +1 -1
  43. package/dist/src/main.d.ts.map +1 -1
  44. package/dist/src/main.js +3 -0
  45. package/dist/src/main.js.map +1 -1
  46. package/dist/src/package.json +80 -28
  47. package/package.json +5 -4
  48. package/script/postinstall.ts +74 -0
@@ -334,7 +334,7 @@
334
334
  "search/readFile"
335
335
  ],
336
336
  "displayName": "%copilot.tools.readFile.name%",
337
- "userDescription": "Read the contents of a file. You must specify the line range you're interested in. Line numbers are 1-indexed. If the file contents returned are insufficient for your task, you may call this tool again to retrieve more content. Prefer reading larger ranges over doing many small reads.",
337
+ "userDescription": "%copilot.tools.readFile.userDescription%",
338
338
  "modelDescription": "Read the contents of a file.\n\nYou must specify the line range you're interested in. Line numbers are 1-indexed. If the file contents returned are insufficient for your task, you may call this tool again to retrieve more content. Prefer reading larger ranges over doing many small reads.",
339
339
  "tags": [
340
340
  "vscode_codesearch"
@@ -817,8 +817,8 @@
817
817
  "name": "copilot_editNotebook",
818
818
  "toolReferenceName": "editNotebook",
819
819
  "icon": "$(pencil)",
820
- "displayName": "%copilot.tools.editNotebook.description%",
821
- "userDescription": "Edit a notebook file in the workspace",
820
+ "displayName": "%copilot.tools.editNotebook.name%",
821
+ "userDescription": "%copilot.tools.editNotebook.userDescription%",
822
822
  "modelDescription": "This is a tool for editing an existing Notebook file in the workspace. Generate the \"explanation\" property first.\nThe system is very smart and can understand how to apply your edits to the notebooks.\nWhen updating the content of an existing cell, ensure newCode preserves whitespace and indentation exactly and does NOT include any code markers such as (...existing code...).",
823
823
  "tags": [
824
824
  "enable_other_tool_copilot_getNotebookSummary"
@@ -1200,6 +1200,14 @@
1200
1200
  "editNotebook"
1201
1201
  ]
1202
1202
  },
1203
+ {
1204
+ "name": "execute",
1205
+ "description": "",
1206
+ "tools": [
1207
+ "runNotebookCell",
1208
+ "testFailure"
1209
+ ]
1210
+ },
1203
1211
  {
1204
1212
  "name": "read",
1205
1213
  "description": "%copilot.toolSet.read.description%",
@@ -1225,14 +1233,6 @@
1225
1233
  "usages"
1226
1234
  ]
1227
1235
  },
1228
- {
1229
- "name": "launch",
1230
- "description": "",
1231
- "tools": [
1232
- "runNotebookCell",
1233
- "testFailure"
1234
- ]
1235
- },
1236
1236
  {
1237
1237
  "name": "vscode",
1238
1238
  "description": "",
@@ -1900,12 +1900,6 @@
1900
1900
  }
1901
1901
  ],
1902
1902
  "chatViewsWelcome": [
1903
- {
1904
- "icon": "$(copilot-large)",
1905
- "title": "Ask Copilot",
1906
- "content": "%github.copilot.viewsWelcome.signIn%",
1907
- "when": "!github.copilot-chat.activated && !github.copilot.offline && !github.copilot.interactiveSession.individual.expired && !github.copilot.interactiveSession.enterprise.disabled && !github.copilot.interactiveSession.contactSupport && !github.copilot.interactiveSession.chatDisabled && !github.copilot.interactiveSession.switchToReleaseChannel"
1908
- },
1909
1903
  {
1910
1904
  "icon": "$(copilot-large)",
1911
1905
  "title": "Ask Copilot",
@@ -2762,7 +2756,9 @@
2762
2756
  },
2763
2757
  "github.copilot.chat.githubMcpServer.toolsets": {
2764
2758
  "type": "array",
2765
- "default": ["default"],
2759
+ "default": [
2760
+ "default"
2761
+ ],
2766
2762
  "markdownDescription": "%github.copilot.config.githubMcpServer.toolsets%",
2767
2763
  "items": {
2768
2764
  "type": "string"
@@ -3210,6 +3206,22 @@
3210
3206
  ],
3211
3207
  "markdownDescription": "%github.copilot.config.virtualTools.threshold%"
3212
3208
  },
3209
+ "github.copilot.chat.azureAuthType": {
3210
+ "type": "string",
3211
+ "enum": [
3212
+ "entraId",
3213
+ "apiKey"
3214
+ ],
3215
+ "enumDescriptions": [
3216
+ "%github.copilot.config.azureAuthType.entraId%",
3217
+ "%github.copilot.config.azureAuthType.apiKey%"
3218
+ ],
3219
+ "default": "entraId",
3220
+ "tags": [
3221
+ "experimental"
3222
+ ],
3223
+ "markdownDescription": "%github.copilot.config.azureAuthType%"
3224
+ },
3213
3225
  "github.copilot.chat.azureModels": {
3214
3226
  "type": "object",
3215
3227
  "default": {},
@@ -3248,6 +3260,11 @@
3248
3260
  "default": false,
3249
3261
  "description": "Whether the model supports thinking capabilities"
3250
3262
  },
3263
+ "zeroDataRetentionEnabled": {
3264
+ "type": "boolean",
3265
+ "default": false,
3266
+ "markdownDescription": "Whether Zero Data Retention (ZDR) is enabled for this endpoint. When `true`, `previous_response_id` will not be sent in requests via Responses API."
3267
+ },
3251
3268
  "requestHeaders": {
3252
3269
  "type": "object",
3253
3270
  "description": "Additional HTTP headers to include with requests to this model. These reserved headers are not allowed and ignored if present: forbidden request headers (https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_request_header), forwarding headers ('forwarded', 'x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto'), and others ('api-key', 'authorization', 'content-type', 'openai-intent', 'x-github-api-version', 'x-initiator', 'x-interaction-id', 'x-interaction-type', 'x-onbehalf-extension-id', 'x-request-id', 'x-vscode-user-agent-library-version'). Pattern-based forbidden headers ('proxy-*', 'sec-*', 'x-http-method*' with forbidden methods) are also blocked.",
@@ -3324,6 +3341,11 @@
3324
3341
  "default": false,
3325
3342
  "description": "Whether the model supports thinking capabilities"
3326
3343
  },
3344
+ "zeroDataRetentionEnabled": {
3345
+ "type": "boolean",
3346
+ "default": false,
3347
+ "markdownDescription": "Whether Zero Data Retention (ZDR) is enabled for this endpoint. When `true`, `previous_response_id` will not be sent in requests via Responses API."
3348
+ },
3327
3349
  "requestHeaders": {
3328
3350
  "type": "object",
3329
3351
  "description": "Additional HTTP headers to include with requests to this model. These reserved headers are not allowed and ignored if present: forbidden request headers (https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_request_header), forwarding headers ('forwarded', 'x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto'), and others ('api-key', 'authorization', 'content-type', 'openai-intent', 'x-github-api-version', 'x-initiator', 'x-interaction-id', 'x-interaction-type', 'x-onbehalf-extension-id', 'x-request-id', 'x-vscode-user-agent-library-version'). Pattern-based forbidden headers ('proxy-*', 'sec-*', 'x-http-method*' with forbidden methods) are also blocked.",
@@ -3547,6 +3569,26 @@
3547
3569
  "experimental"
3548
3570
  ]
3549
3571
  },
3572
+ "github.copilot.chat.edits.gemini3ReplaceStringOnly": {
3573
+ "type": "boolean",
3574
+ "default": false,
3575
+ "markdownDescription": "Use only the modern `replace_string_in_file` edit tool when generating edits with Gemini 3 models.",
3576
+ "tags": [
3577
+ "advanced",
3578
+ "experimental",
3579
+ "onExp"
3580
+ ]
3581
+ },
3582
+ "github.copilot.chat.edits.gemini3MultiReplaceString": {
3583
+ "type": "boolean",
3584
+ "default": false,
3585
+ "markdownDescription": "Enable the modern `multi_replace_string_in_file` edit tool when generating edits with Gemini 3 models.",
3586
+ "tags": [
3587
+ "advanced",
3588
+ "experimental",
3589
+ "onExp"
3590
+ ]
3591
+ },
3550
3592
  "github.copilot.chat.projectLabels.expanded": {
3551
3593
  "type": "boolean",
3552
3594
  "default": false,
@@ -3747,7 +3789,7 @@
3747
3789
  },
3748
3790
  "github.copilot.chat.inlineEdits.diagnosticsContextProvider.enabled": {
3749
3791
  "type": "boolean",
3750
- "default": true,
3792
+ "default": false,
3751
3793
  "markdownDescription": "%github.copilot.config.inlineEdits.diagnosticsContextProvider.enabled%",
3752
3794
  "tags": [
3753
3795
  "advanced",
@@ -3966,6 +4008,16 @@
3966
4008
  "onExp"
3967
4009
  ]
3968
4010
  },
4011
+ "github.copilot.chat.inlineEdits.renameSymbolSuggestions": {
4012
+ "type": "boolean",
4013
+ "default": false,
4014
+ "markdownDescription": "%github.copilot.config.inlineEdits.renameSymbolSuggestions%",
4015
+ "tags": [
4016
+ "advanced",
4017
+ "experimental",
4018
+ "onExp"
4019
+ ]
4020
+ },
3969
4021
  "github.copilot.chat.suggestRelatedFilesFromGitHistory.useEmbeddings": {
3970
4022
  "type": "boolean",
3971
4023
  "default": false,
@@ -5029,13 +5081,13 @@
5029
5081
  {
5030
5082
  "type": "copilotcli",
5031
5083
  "name": "cli",
5032
- "displayName": "GitHub Copilot CLI Agent",
5033
- "icon": "$(copilot)",
5034
- "welcomeTitle": "GitHub Copilot CLI Agent",
5035
- "welcomeMessage": "Run local background tasks",
5084
+ "displayName": "Background Agent",
5085
+ "icon": "$(collection)",
5086
+ "welcomeTitle": "Background Agent",
5087
+ "welcomeMessage": "Run tasks in the background",
5036
5088
  "inputPlaceholder": "Describe your task, type `#` for adding context",
5037
5089
  "order": 2,
5038
- "description": "The GitHub Copilot CLI Agent works on your local machine",
5090
+ "description": "Delegate tasks to a background agent.",
5039
5091
  "capabilities": {
5040
5092
  "supportsFileAttachments": true,
5041
5093
  "supportsProblemAttachments": true,
@@ -5054,12 +5106,12 @@
5054
5106
  "copilot-swe-agent"
5055
5107
  ],
5056
5108
  "name": "cloud",
5057
- "displayName": "GitHub Copilot Cloud Agent",
5109
+ "displayName": "Cloud Agent",
5058
5110
  "icon": {
5059
5111
  "light": "assets/copilot-cloud.svg",
5060
5112
  "dark": "assets/copilot-cloud-dark.svg"
5061
5113
  },
5062
- "welcomeTitle": "GitHub Copilot Cloud Agent",
5114
+ "welcomeTitle": "Cloud Agent",
5063
5115
  "welcomeMessage": "Delegate tasks to the cloud",
5064
5116
  "inputPlaceholder": "Describe your task, type `#` for adding context",
5065
5117
  "order": 1,
@@ -5261,12 +5313,12 @@
5261
5313
  "dependencies": {
5262
5314
  "@anthropic-ai/claude-code": "^1.0.120",
5263
5315
  "@anthropic-ai/sdk": "^0.68.0",
5264
- "@github/copilot": "^0.0.358",
5316
+ "@github/copilot": "^0.0.362",
5265
5317
  "@google/genai": "^1.22.0",
5266
5318
  "@humanwhocodes/gitignore-to-minimatch": "1.0.2",
5267
5319
  "@microsoft/tiktokenizer": "^1.0.10",
5268
5320
  "@sinclair/typebox": "^0.34.41",
5269
- "@vscode/copilot-api": "^0.2.2",
5321
+ "@vscode/copilot-api": "^0.2.4",
5270
5322
  "@vscode/extension-telemetry": "^1.2.0",
5271
5323
  "@vscode/l10n": "^0.0.18",
5272
5324
  "@vscode/prompt-tsx": "^0.4.0-alpha.5",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vscode/chat-lib",
3
- "version": "0.1.1-7",
3
+ "version": "0.1.1-9",
4
4
  "description": "Chat and inline editing SDK extracted from VS Code Copilot Chat",
5
5
  "main": "dist/src/main.js",
6
6
  "types": "dist/src/main.d.ts",
@@ -16,10 +16,11 @@
16
16
  "dependencies": {
17
17
  "@microsoft/tiktokenizer": "^1.0.10",
18
18
  "@sinclair/typebox": "^0.34.41",
19
- "@vscode/copilot-api": "^0.2.2",
19
+ "@vscode/copilot-api": "^0.2.4",
20
20
  "@vscode/l10n": "^0.0.18",
21
21
  "@vscode/prompt-tsx": "^0.4.0-alpha.5",
22
22
  "@vscode/tree-sitter-wasm": "0.0.5-php.2",
23
+ "applicationinsights": "^2.9.7",
23
24
  "jsonc-parser": "^3.3.1",
24
25
  "monaco-editor": "0.44.0",
25
26
  "openai": "^6.7.0",
@@ -33,7 +34,6 @@
33
34
  "@octokit/types": "^14.1.0",
34
35
  "@types/node": "^22.16.3",
35
36
  "@types/vscode": "^1.102.0",
36
- "applicationinsights": "^2.9.7",
37
37
  "copyfiles": "^2.4.1",
38
38
  "dotenv": "^17.2.0",
39
39
  "npm-run-all": "^4.1.5",
@@ -55,7 +55,8 @@
55
55
  "README.md",
56
56
  "LICENSE.txt",
57
57
  "!**/test/**",
58
- "dist/src/_internal/util/common/test/shims"
58
+ "dist/src/_internal/util/common/test/shims",
59
+ "script"
59
60
  ],
60
61
  "scripts": {
61
62
  "clean": "rimraf dist",
@@ -0,0 +1,74 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ import * as fs from 'fs';
7
+ import * as path from 'path';
8
+
9
+ async function copyStaticAssets(srcpaths: string[], dst: string): Promise<void> {
10
+ await Promise.all(srcpaths.map(async srcpath => {
11
+ const src = path.join(REPO_ROOT, srcpath);
12
+ const dest = path.join(REPO_ROOT, dst, path.basename(srcpath));
13
+ await fs.promises.mkdir(path.dirname(dest), { recursive: true });
14
+ await fs.promises.copyFile(src, dest);
15
+ }));
16
+ }
17
+
18
+ async function fileExists(filePath: string): Promise<boolean> {
19
+ try {
20
+ await fs.promises.access(filePath, fs.constants.F_OK);
21
+ return true;
22
+ } catch {
23
+ return false;
24
+ }
25
+ }
26
+
27
+ const treeSitterGrammars: string[] = [
28
+ 'tree-sitter-c-sharp',
29
+ 'tree-sitter-cpp',
30
+ 'tree-sitter-go',
31
+ 'tree-sitter-javascript', // Also includes jsx support
32
+ 'tree-sitter-python',
33
+ 'tree-sitter-ruby',
34
+ 'tree-sitter-typescript',
35
+ 'tree-sitter-tsx',
36
+ 'tree-sitter-java',
37
+ 'tree-sitter-rust',
38
+ 'tree-sitter-php'
39
+ ];
40
+
41
+ const REPO_ROOT = path.join(__dirname, '..');
42
+
43
+ async function platformDir(): Promise<string> {
44
+ const distPath = 'dist/src/_internal/platform';
45
+ const srcPath = 'src/_internal/platform';
46
+ if (await fileExists(path.join(REPO_ROOT, distPath))) {
47
+ return distPath;
48
+ } else if (await fileExists(path.join(REPO_ROOT, srcPath))) {
49
+ return srcPath;
50
+ } else {
51
+ throw new Error('Could not find the source directory for tokenizer files');
52
+ }
53
+ }
54
+
55
+ function treeSitterWasmDir(): string {
56
+ const modulePath = path.dirname(require.resolve('@vscode/tree-sitter-wasm'));
57
+ return path.relative(REPO_ROOT, modulePath);
58
+ }
59
+
60
+ async function main() {
61
+ const platform = await platformDir();
62
+ const vendoredTiktokenFiles = [`${platform}/tokenizer/node/cl100k_base.tiktoken`, `${platform}/tokenizer/node/o200k_base.tiktoken`];
63
+ const wasm = treeSitterWasmDir();
64
+
65
+ // copy static assets to dist
66
+ await copyStaticAssets([
67
+ ...vendoredTiktokenFiles,
68
+ ...treeSitterGrammars.map(grammar => `${wasm}/${grammar}.wasm`),
69
+ `${wasm}/tree-sitter.wasm`,
70
+ ], 'dist');
71
+
72
+ }
73
+
74
+ main();