You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Summarize the whole topic in less than 300 characters for SEO purpose
19
23
MetaDescription: The Visual Studio Code Extension Host is responsible for managing extensions and ensuring the stability and performance of Visual Studio Code.
# Summarize the whole topic in less than 300 characters for SEO purpose
19
23
MetaDescription: Common capabilities that Visual Studio Code extensions (plug-ins) can take advantage of
@@ -51,6 +55,7 @@ An extension can register custom Context Menu items that will be displayed in di
51
55
<<<<<<< HEAD
52
56
<<<<<<< HEAD
53
57
<<<<<<< HEAD
58
+
<<<<<<< HEAD
54
59
There are four options for storing data:
55
60
=======
56
61
There are five options for storing data:
@@ -61,6 +66,9 @@ There are five options for storing data:
61
66
=======
62
67
There are five options for storing data:
63
68
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
69
+
=======
70
+
There are five options for storing data:
71
+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
64
72
65
73
-[`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.
66
74
-[`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`.
@@ -69,6 +77,10 @@ There are five options for storing data:
69
77
<<<<<<< HEAD
70
78
<<<<<<< HEAD
71
79
<<<<<<< HEAD
80
+
<<<<<<< HEAD
81
+
=======
82
+
-[`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.
83
+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
72
84
=======
73
85
-[`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.
# Summarize the whole topic in less than 300 characters for SEO purpose
19
23
MetaDescription: Tutorial that walks you through creating a GitHub Copilot chat participant in VS Code by using the Chat API.
@@ -93,6 +97,7 @@ Finally, setting `isSticky: true` will automatically prepend the participant nam
93
97
<<<<<<< HEAD
94
98
<<<<<<< HEAD
95
99
<<<<<<< HEAD
100
+
<<<<<<< HEAD
96
101
## Step 3: Craft the prompt and select the model
97
102
98
103
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.
@@ -109,6 +114,11 @@ Now that the participant is registered, you can start implementing the logic for
109
114
=======
110
115
## Step 3: Craft the prompt
111
116
117
+
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.
118
+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
119
+
=======
120
+
## Step 3: Craft the prompt
121
+
112
122
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.
113
123
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
114
124
@@ -130,6 +140,7 @@ const BASE_PROMPT = 'You are a helpful code tutor. Your job is to teach the user
130
140
<<<<<<< HEAD
131
141
<<<<<<< HEAD
132
142
<<<<<<< HEAD
143
+
<<<<<<< HEAD
133
144
You also need to select the model for the requests. gpt-4o is recommended since it is fast and high quality.
134
145
135
146
```ts
@@ -152,6 +163,11 @@ Now that the prompt is selected, you need to implement the request handler. This
152
163
=======
153
164
## Step 4: Implement the request handler
154
165
166
+
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.
167
+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
168
+
=======
169
+
## Step 4: Implement the request handler
170
+
155
171
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.
Within the body of this handler, initialize the prompt and model. Check that the model returned successfully.
172
189
=======
173
190
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`.
@@ -182,6 +199,11 @@ Send the request using `request.model.sendRequest`, which will send the request
182
199
=======
183
200
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
201
202
+
Send the request using `request.model.sendRequest`, which will send the request using the currently selected model. Finally, stream the response to the user.
203
+
>>>>>>> 27e6951b86c69326ee8ff76ba46694a60b72ec65
204
+
=======
205
+
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`.
206
+
185
207
Send the request using `request.model.sendRequest`, which will send the request using the currently selected model. Finally, stream the response to the user.
0 commit comments