Skip to content

Commit 7bf275e

Browse files
committed
Refresh from public docs
1 parent 45d3292 commit 7bf275e

File tree

253 files changed

+2368
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

253 files changed

+2368
-6
lines changed

api/advanced-topics/extension-host.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
ContentId: 106AA11C-DB26-493A-9E3C-16F513B2AEC8
44
<<<<<<< HEAD
55
<<<<<<< HEAD
6+
<<<<<<< HEAD
67
DateApproved: 10/03/2024
78
=======
89
DateApproved: 10/29/2024
910
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
1011
=======
1112
DateApproved: 10/29/2024
1213
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
14+
=======
15+
DateApproved: 10/29/2024
16+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
1317

1418
# Summarize the whole topic in less than 300 characters for SEO purpose
1519
MetaDescription: The Visual Studio Code Extension Host is responsible for managing extensions and ensuring the stability and performance of Visual Studio Code.

api/advanced-topics/remote-extensions.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
ContentId: 5c708951-e566-42db-9d97-e9715d95cdd1
33
<<<<<<< HEAD
44
<<<<<<< HEAD
5+
<<<<<<< HEAD
56
DateApproved: 10/03/2024
67
=======
78
DateApproved: 10/29/2024
89
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
910
=======
1011
DateApproved: 10/29/2024
1112
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
13+
=======
14+
DateApproved: 10/29/2024
15+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
1216

1317
# Summarize the whole topic in less than 300 characters for SEO purpose
1418
MetaDescription: A guide to adding Visual Studio Code Remote Development and GitHub Codespaces support to extensions

api/advanced-topics/tslint-eslint-migration.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
ContentId: f00c4913-58e3-4a61-aa42-e769c3430906
33
<<<<<<< HEAD
44
<<<<<<< HEAD
5+
<<<<<<< HEAD
56
DateApproved: 10/03/2024
67
=======
78
DateApproved: 10/29/2024
89
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
910
=======
1011
DateApproved: 10/29/2024
1112
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
13+
=======
14+
DateApproved: 10/29/2024
15+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
1216

1317
# Summarize the whole topic in less than 300 characters for SEO purpose
1418
MetaDescription: A guide to migrating extension projects from the TSLint linter to ESLint.

api/advanced-topics/using-proposed-api.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
ContentId: f4d4e9e0-8901-405c-aaf5-faa16c32588b
44
<<<<<<< HEAD
55
<<<<<<< HEAD
6+
<<<<<<< HEAD
67
DateApproved: 10/03/2024
78
=======
89
DateApproved: 10/29/2024
910
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
1011
=======
1112
DateApproved: 10/29/2024
1213
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
14+
=======
15+
DateApproved: 10/29/2024
16+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
1317

1418
# Summarize the whole topic in less than 300 characters for SEO purpose
1519
MetaDescription: Use Visual Studio Code's Proposed API

api/extension-capabilities/common-capabilities.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
ContentId: 9c48dfbf-e49d-4f33-aadc-5ebf06d5dde0
44
<<<<<<< HEAD
55
<<<<<<< HEAD
6+
<<<<<<< HEAD
67
DateApproved: 10/03/2024
78
=======
89
DateApproved: 10/29/2024
910
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
1011
=======
1112
DateApproved: 10/29/2024
1213
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
14+
=======
15+
DateApproved: 10/29/2024
16+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
1317

1418
# Summarize the whole topic in less than 300 characters for SEO purpose
1519
MetaDescription: Common capabilities that Visual Studio Code extensions (plug-ins) can take advantage of
@@ -44,6 +48,7 @@ An extension can register custom Context Menu items that will be displayed in di
4448

4549
## Data Storage
4650

51+
<<<<<<< HEAD
4752
<<<<<<< HEAD
4853
<<<<<<< HEAD
4954
There are four options for storing data:
@@ -53,13 +58,20 @@ There are five options for storing data:
5358
=======
5459
There are five options for storing data:
5560
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
61+
=======
62+
There are five options for storing data:
63+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
5664
5765
- [`ExtensionContext.workspaceState`](/api/references/vscode-api#ExtensionContext.workspaceState): A workspace storage where you can write key/value pairs. VS Code manages the storage and will restore it when the same workspace is opened again.
5866
- [`ExtensionContext.globalState`](/api/references/vscode-api#ExtensionContext.globalState): A global storage where you can write key/value pairs. VS Code manages the storage and will restore it for each extension activation. You can selectively synchronize key/value pairs in global storage by setting the keys for sync using `setKeysForSync` method on `globalState`.
5967
- [`ExtensionContext.storageUri`](/api/references/vscode-api#ExtensionContext.storageUri): A workspace specific storage URI pointing to a local directory where your extension has read/write access. This is a good option if you need to store large files that are accessible only from the current workspace.
6068
- [`ExtensionContext.globalStorageUri`](/api/references/vscode-api#ExtensionContext.globalStorageUri): A global storage URI pointing to a local directory where your extension has read/write access. This is a good option if you need to store large files that are accessible from all workspaces.
6169
<<<<<<< HEAD
6270
<<<<<<< HEAD
71+
<<<<<<< HEAD
72+
=======
73+
- [`ExtensionContext.secrets`](/api/references/vscode-api#ExtensionContext.secrets): A global storage for secrets (or any information that is sensitive) that will be encrypted. These are not synced across machines. For VS Code desktop, this leverages Electron's [safeStorage API](https://www.electronjs.org/docs/latest/api/safe-storage). For VS Code for the Web, this uses a Double Key Encryption (DKE) implementation.
74+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
6375
=======
6476
- [`ExtensionContext.secrets`](/api/references/vscode-api#ExtensionContext.secrets): A global storage for secrets (or any information that is sensitive) that will be encrypted. These are not synced across machines. For VS Code desktop, this leverages Electron's [safeStorage API](https://www.electronjs.org/docs/latest/api/safe-storage). For VS Code for the Web, this uses a Double Key Encryption (DKE) implementation.
6577
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65

api/extension-capabilities/extending-workbench.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
ContentId: e0d5bd37-f020-4235-ad81-c977baaeb24f
44
<<<<<<< HEAD
55
<<<<<<< HEAD
6+
<<<<<<< HEAD
67
DateApproved: 10/03/2024
78
=======
89
DateApproved: 10/29/2024
910
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
1011
=======
1112
DateApproved: 10/29/2024
1213
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
14+
=======
15+
DateApproved: 10/29/2024
16+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
1317

1418
# Summarize the whole topic in less than 300 characters for SEO purpose
1519
MetaDescription: Explain how to extend Visual Studio Code's workbench area with custom UI components

api/extension-capabilities/overview.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
ContentId: d22675fc-6609-43f2-a66b-8f2a52597195
44
<<<<<<< HEAD
55
<<<<<<< HEAD
6+
<<<<<<< HEAD
67
DateApproved: 10/03/2024
78
=======
89
DateApproved: 10/29/2024
910
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
1011
=======
1112
DateApproved: 10/29/2024
1213
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
14+
=======
15+
DateApproved: 10/29/2024
16+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
1317

1418
# Summarize the whole topic in less than 300 characters for SEO purpose
1519
MetaDescription: Learn the details of what's possible with Visual Studio Code's rich extension (plug-in) API.

api/extension-capabilities/theming.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
ContentId: 37b6ae0a-d1b5-48b6-9bd4-9b50ef11d573
44
<<<<<<< HEAD
55
<<<<<<< HEAD
6+
<<<<<<< HEAD
67
DateApproved: 10/03/2024
78
=======
89
DateApproved: 10/29/2024
910
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
1011
=======
1112
DateApproved: 10/29/2024
1213
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
14+
=======
15+
DateApproved: 10/29/2024
16+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
1317

1418
# Summarize the whole topic in less than 300 characters for SEO purpose
1519
MetaDescription: Learn how to add custom themes for colors and icons in Visual Studio Code.

api/extension-guides/chat-tutorial.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
ContentId: bea1d4c5-71e5-4b27-ac1e-fa9b59886dab
44
<<<<<<< HEAD
55
<<<<<<< HEAD
6+
<<<<<<< HEAD
67
DateApproved: 10/03/2024
78
=======
89
DateApproved: 10/29/2024
910
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
1011
=======
1112
DateApproved: 10/29/2024
1213
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
14+
=======
15+
DateApproved: 10/29/2024
16+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
1317

1418
# Summarize the whole topic in less than 300 characters for SEO purpose
1519
MetaDescription: Tutorial that walks you through creating a GitHub Copilot chat participant in VS Code by using the Chat API.
@@ -86,6 +90,7 @@ This code registers a chat participant with the following attributes:
8690

8791
Finally, setting `isSticky: true` will automatically prepend the participant name in the chat input field after the user has started interacting with the participant.
8892

93+
<<<<<<< HEAD
8994
<<<<<<< HEAD
9095
<<<<<<< HEAD
9196
## Step 3: Craft the prompt and select the model
@@ -99,6 +104,11 @@ Now that the participant is registered, you can start implementing the logic for
99104
=======
100105
## Step 3: Craft the prompt
101106

107+
Now that the participant is registered, you can start implementing the logic for the code tutor. In the `extension.ts` file, you will define a prompt for the requests.
108+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
109+
=======
110+
## Step 3: Craft the prompt
111+
102112
Now that the participant is registered, you can start implementing the logic for the code tutor. In the `extension.ts` file, you will define a prompt for the requests.
103113
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
104114
@@ -117,6 +127,7 @@ The second prompt is more specific and gives the participant a clear direction o
117127
const BASE_PROMPT = 'You are a helpful code tutor. Your job is to teach the user with simple descriptions and sample code of the concept. Respond with a guided overview of the concept in a series of messages. Do not give the user the answer directly, but guide them to find the answer themselves. If the user asks a non-programming question, politely decline to respond.';
118128
```
119129

130+
<<<<<<< HEAD
120131
<<<<<<< HEAD
121132
<<<<<<< HEAD
122133
You also need to select the model for the requests. gpt-4o is recommended since it is fast and high quality.
@@ -136,6 +147,11 @@ Now that the prompt is selected, you need to implement the request handler. This
136147
=======
137148
## Step 4: Implement the request handler
138149

150+
Now that the prompt is selected, you need to implement the request handler. This is what will process the user's chat request. You will define the request handler, perform logic for processing the request, and return a response to the user.
151+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
152+
=======
153+
## Step 4: Implement the request handler
154+
139155
Now that the prompt is selected, you need to implement the request handler. This is what will process the user's chat request. You will define the request handler, perform logic for processing the request, and return a response to the user.
140156
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
141157
@@ -149,6 +165,7 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
149165
}
150166
```
151167

168+
<<<<<<< HEAD
152169
<<<<<<< HEAD
153170
<<<<<<< HEAD
154171
Within the body of this handler, initialize the prompt and model. Check that the model returned successfully.
@@ -160,13 +177,19 @@ Send the request using `request.model.sendRequest`, which will send the request
160177
=======
161178
Within the body of this handler, initialize the prompt and a `messages` array with the prompt. Then, send in what the user typed in the chat box. You can access this through `request.prompt`.
162179

180+
Send the request using `request.model.sendRequest`, which will send the request using the currently selected model. Finally, stream the response to the user.
181+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
182+
=======
183+
Within the body of this handler, initialize the prompt and a `messages` array with the prompt. Then, send in what the user typed in the chat box. You can access this through `request.prompt`.
184+
163185
Send the request using `request.model.sendRequest`, which will send the request using the currently selected model. Finally, stream the response to the user.
164186
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
165187
166188
```ts
167189
// define a chat handler
168190
const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, context: vscode.ChatContext, stream: vscode.ChatResponseStream, token: vscode.CancellationToken) => {
169191

192+
<<<<<<< HEAD
170193
<<<<<<< HEAD
171194
<<<<<<< HEAD
172195
// initialize the prompt and model
@@ -215,6 +238,8 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
215238
}
216239
=======
217240
=======
241+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
242+
=======
218243
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
219244
// initialize the prompt
220245
let prompt = BASE_PROMPT;
@@ -234,6 +259,9 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
234259
for await (const fragment of chatResponse.text) {
235260
stream.markdown(fragment);
236261
<<<<<<< HEAD
262+
<<<<<<< HEAD
263+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
264+
=======
237265
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
238266
=======
239267
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
@@ -253,6 +281,7 @@ You should further customize your participant by adding an icon for it. This wil
253281
// define a chat handler
254282
const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, context: vscode.ChatContext, stream: vscode.ChatResponseStream, token: vscode.CancellationToken) => {
255283

284+
<<<<<<< HEAD
256285
<<<<<<< HEAD
257286
<<<<<<< HEAD
258287
// initialize the prompt and model
@@ -279,6 +308,8 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
279308
}
280309
=======
281310
=======
311+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
312+
=======
282313
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
283314
// initialize the prompt
284315
let prompt = BASE_PROMPT;
@@ -298,6 +329,9 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
298329
for await (const fragment of chatResponse.text) {
299330
stream.markdown(fragment);
300331
<<<<<<< HEAD
332+
<<<<<<< HEAD
333+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
334+
=======
301335
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
302336
=======
303337
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
@@ -340,6 +374,7 @@ You'll need to retrieve that history and add it to the `messages` array. You wil
340374
// define a chat handler
341375
const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, context: vscode.ChatContext, stream: vscode.ChatResponseStream, token: vscode.CancellationToken) => {
342376

377+
<<<<<<< HEAD
343378
<<<<<<< HEAD
344379
<<<<<<< HEAD
345380
// initialize the prompt and model
@@ -381,6 +416,8 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
381416
}
382417
=======
383418
=======
419+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
420+
=======
384421
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
385422
// initialize the prompt
386423
let prompt = BASE_PROMPT;
@@ -415,6 +452,9 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
415452
for await (const fragment of chatResponse.text) {
416453
stream.markdown(fragment);
417454
<<<<<<< HEAD
455+
<<<<<<< HEAD
456+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
457+
=======
418458
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
419459
=======
420460
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
@@ -470,12 +510,16 @@ If the command is referenced, update the prompt to the newly created `EXERCISES_
470510
// define a chat handler
471511
const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, context: vscode.ChatContext, stream: vscode.ChatResponseStream, token: vscode.CancellationToken) => {
472512

513+
<<<<<<< HEAD
473514
<<<<<<< HEAD
474515
<<<<<<< HEAD
475516
// initialize the prompt and model
476517
=======
477518
// initialize the prompt
478519
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
520+
=======
521+
// initialize the prompt
522+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
479523
=======
480524
// initialize the prompt
481525
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
@@ -485,6 +529,7 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
485529
prompt = EXERCISES_PROMPT;
486530
}
487531

532+
<<<<<<< HEAD
488533
<<<<<<< HEAD
489534
<<<<<<< HEAD
490535
const [model] = await vscode.lm.selectChatModels(MODEL_SELECTOR);
@@ -523,6 +568,8 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
523568
}
524569
=======
525570
=======
571+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
572+
=======
526573
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
527574
// initialize the messages array with the prompt
528575
const messages = [
@@ -554,6 +601,9 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
554601
for await (const fragment of chatResponse.text) {
555602
stream.markdown(fragment);
556603
<<<<<<< HEAD
604+
<<<<<<< HEAD
605+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
606+
=======
557607
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
558608
=======
559609
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65

0 commit comments

Comments
 (0)