Skip to content

Commit c0ac4f6

Browse files
committed
Refresh from public docs
1 parent 8940113 commit c0ac4f6

File tree

270 files changed

+2419
-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.

270 files changed

+2419
-6
lines changed

api/advanced-topics/extension-host.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
# DO NOT TOUCH — Managed by doc writer
33
ContentId: 106AA11C-DB26-493A-9E3C-16F513B2AEC8
44
<<<<<<< HEAD
5+
<<<<<<< HEAD
56
DateApproved: 10/03/2024
67
=======
78
DateApproved: 10/29/2024
89
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
10+
=======
11+
DateApproved: 10/29/2024
12+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
913

1014
# Summarize the whole topic in less than 300 characters for SEO purpose
1115
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
@@ -1,10 +1,14 @@
11
---
22
ContentId: 5c708951-e566-42db-9d97-e9715d95cdd1
33
<<<<<<< HEAD
4+
<<<<<<< HEAD
45
DateApproved: 10/03/2024
56
=======
67
DateApproved: 10/29/2024
78
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
9+
=======
10+
DateApproved: 10/29/2024
11+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
812

913
# Summarize the whole topic in less than 300 characters for SEO purpose
1014
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
@@ -1,10 +1,14 @@
11
---
22
ContentId: f00c4913-58e3-4a61-aa42-e769c3430906
33
<<<<<<< HEAD
4+
<<<<<<< HEAD
45
DateApproved: 10/03/2024
56
=======
67
DateApproved: 10/29/2024
78
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
9+
=======
10+
DateApproved: 10/29/2024
11+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
812

913
# Summarize the whole topic in less than 300 characters for SEO purpose
1014
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
@@ -2,10 +2,14 @@
22
# DO NOT TOUCH — Managed by doc writer
33
ContentId: f4d4e9e0-8901-405c-aaf5-faa16c32588b
44
<<<<<<< HEAD
5+
<<<<<<< HEAD
56
DateApproved: 10/03/2024
67
=======
78
DateApproved: 10/29/2024
89
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
10+
=======
11+
DateApproved: 10/29/2024
12+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
913

1014
# Summarize the whole topic in less than 300 characters for SEO purpose
1115
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
@@ -2,10 +2,14 @@
22
# DO NOT TOUCH — Managed by doc writer
33
ContentId: 9c48dfbf-e49d-4f33-aadc-5ebf06d5dde0
44
<<<<<<< HEAD
5+
<<<<<<< HEAD
56
DateApproved: 10/03/2024
67
=======
78
DateApproved: 10/29/2024
89
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
10+
=======
11+
DateApproved: 10/29/2024
12+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
913

1014
# Summarize the whole topic in less than 300 characters for SEO purpose
1115
MetaDescription: Common capabilities that Visual Studio Code extensions (plug-ins) can take advantage of
@@ -40,17 +44,25 @@ An extension can register custom Context Menu items that will be displayed in di
4044

4145
## Data Storage
4246

47+
<<<<<<< HEAD
4348
<<<<<<< HEAD
4449
There are four options for storing data:
4550
=======
4651
There are five options for storing data:
4752
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
53+
=======
54+
There are five options for storing data:
55+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
4856
4957
- [`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.
5058
- [`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`.
5159
- [`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.
5260
- [`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.
5361
<<<<<<< HEAD
62+
<<<<<<< HEAD
63+
=======
64+
- [`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.
65+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
5466
=======
5567
- [`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.
5668
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65

api/extension-capabilities/extending-workbench.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
# DO NOT TOUCH — Managed by doc writer
33
ContentId: e0d5bd37-f020-4235-ad81-c977baaeb24f
44
<<<<<<< HEAD
5+
<<<<<<< HEAD
56
DateApproved: 10/03/2024
67
=======
78
DateApproved: 10/29/2024
89
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
10+
=======
11+
DateApproved: 10/29/2024
12+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
913

1014
# Summarize the whole topic in less than 300 characters for SEO purpose
1115
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
@@ -2,10 +2,14 @@
22
# DO NOT TOUCH — Managed by doc writer
33
ContentId: d22675fc-6609-43f2-a66b-8f2a52597195
44
<<<<<<< HEAD
5+
<<<<<<< HEAD
56
DateApproved: 10/03/2024
67
=======
78
DateApproved: 10/29/2024
89
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
10+
=======
11+
DateApproved: 10/29/2024
12+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
913

1014
# Summarize the whole topic in less than 300 characters for SEO purpose
1115
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
@@ -2,10 +2,14 @@
22
# DO NOT TOUCH — Managed by doc writer
33
ContentId: 37b6ae0a-d1b5-48b6-9bd4-9b50ef11d573
44
<<<<<<< HEAD
5+
<<<<<<< HEAD
56
DateApproved: 10/03/2024
67
=======
78
DateApproved: 10/29/2024
89
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
10+
=======
11+
DateApproved: 10/29/2024
12+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
913

1014
# Summarize the whole topic in less than 300 characters for SEO purpose
1115
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
@@ -2,10 +2,14 @@
22
# DO NOT TOUCH — Managed by doc writer
33
ContentId: bea1d4c5-71e5-4b27-ac1e-fa9b59886dab
44
<<<<<<< HEAD
5+
<<<<<<< HEAD
56
DateApproved: 10/03/2024
67
=======
78
DateApproved: 10/29/2024
89
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
10+
=======
11+
DateApproved: 10/29/2024
12+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
913

1014
# Summarize the whole topic in less than 300 characters for SEO purpose
1115
MetaDescription: Tutorial that walks you through creating a GitHub Copilot chat participant in VS Code by using the Chat API.
@@ -82,13 +86,19 @@ This code registers a chat participant with the following attributes:
8286

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

89+
<<<<<<< HEAD
8590
<<<<<<< HEAD
8691
## Step 3: Craft the prompt and select the model
8792

8893
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 and select the model for the requests.
8994
=======
9095
## Step 3: Craft the prompt
9196

97+
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.
98+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
99+
=======
100+
## Step 3: Craft the prompt
101+
92102
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.
93103
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
94104
@@ -107,6 +117,7 @@ The second prompt is more specific and gives the participant a clear direction o
107117
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.';
108118
```
109119

120+
<<<<<<< HEAD
110121
<<<<<<< HEAD
111122
You also need to select the model for the requests. gpt-4o is recommended since it is fast and high quality.
112123

@@ -120,6 +131,11 @@ Now that the prompt and model are selected, you need to implement the request ha
120131
=======
121132
## Step 4: Implement the request handler
122133

134+
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.
135+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
136+
=======
137+
## Step 4: Implement the request handler
138+
123139
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.
124140
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
125141
@@ -133,18 +149,25 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
133149
}
134150
```
135151

152+
<<<<<<< HEAD
136153
<<<<<<< HEAD
137154
Within the body of this handler, initialize the prompt and model. Check that the model returned successfully.
138155
=======
139156
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`.
140157

158+
Send the request using `request.model.sendRequest`, which will send the request using the currently selected model. Finally, stream the response to the user.
159+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
160+
=======
161+
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`.
162+
141163
Send the request using `request.model.sendRequest`, which will send the request using the currently selected model. Finally, stream the response to the user.
142164
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
143165
144166
```ts
145167
// define a chat handler
146168
const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, context: vscode.ChatContext, stream: vscode.ChatResponseStream, token: vscode.CancellationToken) => {
147169

170+
<<<<<<< HEAD
148171
<<<<<<< HEAD
149172
// initialize the prompt and model
150173
let prompt = BASE_PROMPT;
@@ -191,6 +214,8 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
191214
stream.markdown(fragment);
192215
}
193216
=======
217+
=======
218+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
194219
// initialize the prompt
195220
let prompt = BASE_PROMPT;
196221

@@ -208,6 +233,9 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
208233
// stream the response
209234
for await (const fragment of chatResponse.text) {
210235
stream.markdown(fragment);
236+
<<<<<<< HEAD
237+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
238+
=======
211239
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
212240
}
213241

@@ -225,6 +253,7 @@ You should further customize your participant by adding an icon for it. This wil
225253
// define a chat handler
226254
const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, context: vscode.ChatContext, stream: vscode.ChatResponseStream, token: vscode.CancellationToken) => {
227255

256+
<<<<<<< HEAD
228257
<<<<<<< HEAD
229258
// initialize the prompt and model
230259
let prompt = BASE_PROMPT;
@@ -249,6 +278,8 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
249278
stream.markdown(fragment);
250279
}
251280
=======
281+
=======
282+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
252283
// initialize the prompt
253284
let prompt = BASE_PROMPT;
254285

@@ -266,6 +297,9 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
266297
// stream the response
267298
for await (const fragment of chatResponse.text) {
268299
stream.markdown(fragment);
300+
<<<<<<< HEAD
301+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
302+
=======
269303
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
270304
}
271305

@@ -306,6 +340,7 @@ You'll need to retrieve that history and add it to the `messages` array. You wil
306340
// define a chat handler
307341
const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, context: vscode.ChatContext, stream: vscode.ChatResponseStream, token: vscode.CancellationToken) => {
308342

343+
<<<<<<< HEAD
309344
<<<<<<< HEAD
310345
// initialize the prompt and model
311346
let prompt = BASE_PROMPT;
@@ -345,6 +380,8 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
345380
stream.markdown(fragment);
346381
}
347382
=======
383+
=======
384+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
348385
// initialize the prompt
349386
let prompt = BASE_PROMPT;
350387

@@ -377,6 +414,9 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
377414
// stream the response
378415
for await (const fragment of chatResponse.text) {
379416
stream.markdown(fragment);
417+
<<<<<<< HEAD
418+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
419+
=======
380420
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
381421
}
382422

@@ -430,8 +470,12 @@ If the command is referenced, update the prompt to the newly created `EXERCISES_
430470
// define a chat handler
431471
const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, context: vscode.ChatContext, stream: vscode.ChatResponseStream, token: vscode.CancellationToken) => {
432472

473+
<<<<<<< HEAD
433474
<<<<<<< HEAD
434475
// initialize the prompt and model
476+
=======
477+
// initialize the prompt
478+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
435479
=======
436480
// initialize the prompt
437481
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
@@ -441,6 +485,7 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
441485
prompt = EXERCISES_PROMPT;
442486
}
443487

488+
<<<<<<< HEAD
444489
<<<<<<< HEAD
445490
const [model] = await vscode.lm.selectChatModels(MODEL_SELECTOR);
446491

@@ -477,6 +522,8 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
477522
stream.markdown(fragment);
478523
}
479524
=======
525+
=======
526+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
480527
// initialize the messages array with the prompt
481528
const messages = [
482529
vscode.LanguageModelChatMessage.User(prompt),
@@ -506,6 +553,9 @@ const handler: vscode.ChatRequestHandler = async (request: vscode.ChatRequest, c
506553
// stream the response
507554
for await (const fragment of chatResponse.text) {
508555
stream.markdown(fragment);
556+
<<<<<<< HEAD
557+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
558+
=======
509559
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
510560
}
511561

0 commit comments

Comments
 (0)