Skip to content

Commit 86cfc2b

Browse files
committed
yarn
1 parent 12e33b1 commit 86cfc2b

File tree

3 files changed

+161
-41
lines changed

3 files changed

+161
-41
lines changed

src/@types/vscode.proposed.chatParticipantAdditions.d.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,19 @@ declare module 'vscode' {
152152
*/
153153
title: string;
154154

155+
/**
156+
* Whether the multi diff editor should be read-only.
157+
* When true, users cannot open individual files or interact with file navigation.
158+
*/
159+
readOnly?: boolean;
160+
155161
/**
156162
* Create a new ChatResponseMultiDiffPart.
157163
* @param value Array of file diff entries.
158164
* @param title The title for the multi diff editor.
165+
* @param readOnly Optional flag to make the multi diff editor read-only.
159166
*/
160-
constructor(value: ChatResponseDiffEntry[], title: string);
167+
constructor(value: ChatResponseDiffEntry[], title: string, readOnly?: boolean);
161168
}
162169

163170
export type ExtendedChatResponsePart = ChatResponsePart | ChatResponseTextEditPart | ChatResponseNotebookEditPart | ChatResponseConfirmationPart | ChatResponseCodeCitationPart | ChatResponseReferencePart2 | ChatResponseMovePart | ChatResponseExtensionsPart | ChatResponsePullRequestPart | ChatPrepareToolInvocationPart | ChatToolInvocationPart | ChatResponseMultiDiffPart | ChatResponseThinkingProgressPart;
@@ -652,6 +659,7 @@ declare module 'vscode' {
652659
}
653660

654661
export interface ChatRequestModeInstructions {
662+
readonly name: string;
655663
readonly content: string;
656664
readonly toolReferences?: readonly ChatLanguageModelToolReference[];
657665
readonly metadata?: Record<string, boolean | string | number>;

src/@types/vscode.proposed.chatSessionsProvider.d.ts

Lines changed: 64 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
// version: 2
6+
// version: 3
77

88
declare module 'vscode' {
99
/**
@@ -35,6 +35,14 @@ declare module 'vscode' {
3535
*/
3636
readonly onDidChangeChatSessionItems: Event<void>;
3737

38+
/**
39+
* Provides a list of chat sessions.
40+
*/
41+
// TODO: Do we need a flag to try auth if needed?
42+
provideChatSessionItems(token: CancellationToken): ProviderResult<ChatSessionItem[]>;
43+
44+
// #region Unstable parts of API
45+
3846
/**
3947
* Event that the provider can fire to signal that the current (original) chat session should be replaced with a new (modified) chat session.
4048
* The UI can use this information to gracefully migrate the user to the new session.
@@ -61,27 +69,16 @@ declare module 'vscode' {
6169
metadata?: any;
6270
}, token: CancellationToken): ProviderResult<ChatSessionItem>;
6371

64-
/**
65-
* Provides a list of chat sessions.
66-
*/
67-
// TODO: Do we need a flag to try auth if needed?
68-
provideChatSessionItems(token: CancellationToken): ProviderResult<ChatSessionItem[]>;
72+
// #endregion
6973
}
7074

7175
export interface ChatSessionItem {
72-
/**
73-
* Unique identifier for the chat session.
74-
*
75-
* @deprecated Will be replaced by `resource`
76-
*/
77-
id: string;
78-
7976
/**
8077
* The resource associated with the chat session.
8178
*
8279
* This is uniquely identifies the chat session and is used to open the chat session.
8380
*/
84-
resource: Uri | undefined;
81+
resource: Uri;
8582

8683
/**
8784
* Human readable name of the session shown in the UI
@@ -149,9 +146,12 @@ declare module 'vscode' {
149146
readonly history: ReadonlyArray<ChatRequestTurn | ChatResponseTurn2>;
150147

151148
/**
152-
* Options configured for this session.
149+
* Options configured for this session as key-value pairs.
150+
* Keys correspond to option group IDs (e.g., 'models', 'subagents')
151+
* and values are the selected option item IDs.
152+
* TODO: Strongly type the keys
153153
*/
154-
readonly options?: { model?: LanguageModelChatInformation };
154+
readonly options?: Record<string, string>;
155155

156156
/**
157157
* Callback invoked by the editor for a currently running response. This allows the session to push items for the
@@ -172,22 +172,28 @@ declare module 'vscode' {
172172
readonly requestHandler: ChatRequestHandler | undefined;
173173
}
174174

175+
/**
176+
* Provides the content for a chat session rendered using the native chat UI.
177+
*/
175178
export interface ChatSessionContentProvider {
176179
/**
177-
* Resolves a chat session into a full `ChatSession` object.
180+
* Provides the chat session content for a given uri.
178181
*
179-
* @param sessionId The id of the chat session to open.
182+
* The returned {@linkcode ChatSession} is used to populate the history of the chat UI.
183+
*
184+
* @param resource The URI of the chat session to resolve.
180185
* @param token A cancellation token that can be used to cancel the operation.
186+
*
187+
* @return The {@link ChatSession chat session} associated with the given URI.
181188
*/
182-
provideChatSessionContent(sessionId: string, token: CancellationToken): Thenable<ChatSession> | ChatSession;
189+
provideChatSessionContent(resource: Uri, token: CancellationToken): Thenable<ChatSession> | ChatSession;
183190

184191
/**
185-
*
186-
* @param sessionId Identifier of the chat session being updated.
192+
* @param resource Identifier of the chat session being updated.
187193
* @param updates Collection of option identifiers and their new values. Only the options that changed are included.
188194
* @param token A cancellation token that can be used to cancel the notification if the session is disposed.
189195
*/
190-
provideHandleOptionsChange?(sessionId: string, updates: ReadonlyArray<ChatSessionOptionUpdate>, token: CancellationToken): void;
196+
provideHandleOptionsChange?(resource: Uri, updates: ReadonlyArray<ChatSessionOptionUpdate>, token: CancellationToken): void;
191197

192198
/**
193199
* Called as soon as you register (call me once)
@@ -224,12 +230,12 @@ declare module 'vscode' {
224230
/**
225231
* Registers a new {@link ChatSessionContentProvider chat session content provider}.
226232
*
227-
* @param chatSessionType A unique identifier for the chat session type. This is used to differentiate between different chat session providers.
233+
* @param scheme The uri-scheme to register for. This must be unique.
228234
* @param provider The provider to register.
229235
*
230236
* @returns A disposable that unregisters the provider when disposed.
231237
*/
232-
export function registerChatSessionContentProvider(chatSessionType: string, provider: ChatSessionContentProvider, chatParticipant: ChatParticipant, capabilities?: ChatSessionCapabilities): Disposable;
238+
export function registerChatSessionContentProvider(scheme: string, provider: ChatSessionContentProvider, chatParticipant: ChatParticipant, capabilities?: ChatSessionCapabilities): Disposable;
233239
}
234240

235241
export interface ChatContext {
@@ -252,31 +258,51 @@ declare module 'vscode' {
252258
supportsInterruptions?: boolean;
253259
}
254260

255-
export interface ChatSessionProviderOptions {
261+
/**
262+
* Represents a single selectable item within a provider option group.
263+
*/
264+
export interface ChatSessionProviderOptionItem {
265+
/**
266+
* Unique identifier for the option item.
267+
*/
268+
readonly id: string;
269+
256270
/**
257-
* Set of available models.
271+
* Human-readable name displayed in the UI.
258272
*/
259-
models?: LanguageModelChatInformation[];
273+
readonly name: string;
260274
}
261275

262276
/**
263-
* @deprecated
277+
* Represents a group of related provider options (e.g., models, sub-agents).
264278
*/
265-
export interface ChatSessionShowOptions {
279+
export interface ChatSessionProviderOptionGroup {
266280
/**
267-
* The editor view column to show the chat session in.
268-
*
269-
* If not provided, the chat session will be shown in the chat panel instead.
281+
* Unique identifier for the option group (e.g., "models", "subagents").
270282
*/
271-
readonly viewColumn?: ViewColumn;
283+
readonly id: string;
284+
285+
/**
286+
* Human-readable name for the option group.
287+
*/
288+
readonly name: string;
289+
290+
/**
291+
* Optional description providing context about this option group.
292+
*/
293+
readonly description?: string;
294+
295+
/**
296+
* The selectable items within this option group.
297+
*/
298+
readonly items: ChatSessionProviderOptionItem[];
272299
}
273300

274-
export namespace window {
301+
export interface ChatSessionProviderOptions {
275302
/**
276-
* Shows a chat session in the panel or editor.
277-
*
278-
* @deprecated
303+
* Provider-defined option groups (0-2 groups supported).
304+
* Examples: models picker, sub-agents picker, etc.
279305
*/
280-
export function showChatSession(chatSessionType: string, sessionId: string, options: ChatSessionShowOptions): Thenable<void>;
306+
optionGroups?: ChatSessionProviderOptionGroup[];
281307
}
282308
}

yarn.lock

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@
102102
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
103103
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
104104

105+
"@cspotcode/source-map-support@^0.8.0":
106+
version "0.8.1"
107+
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1"
108+
integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==
109+
dependencies:
110+
"@jridgewell/trace-mapping" "0.3.9"
111+
105112
"@emnapi/core@^1.4.3":
106113
version "1.5.0"
107114
resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.5.0.tgz#85cd84537ec989cebb2343606a1ee663ce4edaf0"
@@ -423,6 +430,14 @@
423430
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a"
424431
integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==
425432

433+
"@jridgewell/trace-mapping@0.3.9":
434+
version "0.3.9"
435+
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9"
436+
integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==
437+
dependencies:
438+
"@jridgewell/resolve-uri" "^3.0.3"
439+
"@jridgewell/sourcemap-codec" "^1.4.10"
440+
426441
"@jridgewell/trace-mapping@^0.3.12":
427442
version "0.3.31"
428443
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0"
@@ -788,6 +803,26 @@
788803
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
789804
integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==
790805

806+
"@tsconfig/node10@^1.0.7":
807+
version "1.0.11"
808+
resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2"
809+
integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==
810+
811+
"@tsconfig/node12@^1.0.7":
812+
version "1.0.11"
813+
resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d"
814+
integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==
815+
816+
"@tsconfig/node14@^1.0.0":
817+
version "1.0.3"
818+
resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1"
819+
integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==
820+
821+
"@tsconfig/node16@^1.0.2":
822+
version "1.0.4"
823+
resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9"
824+
integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==
825+
791826
"@tybys/wasm-util@^0.10.0":
792827
version "0.10.1"
793828
resolved "https://registry.yarnpkg.com/@tybys/wasm-util/-/wasm-util-0.10.1.tgz#ecddd3205cf1e2d5274649ff0eedd2991ed7f414"
@@ -1459,12 +1494,19 @@ acorn-walk@^7.1.1:
14591494
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc"
14601495
integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==
14611496

1497+
acorn-walk@^8.1.1:
1498+
version "8.3.4"
1499+
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7"
1500+
integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==
1501+
dependencies:
1502+
acorn "^8.11.0"
1503+
14621504
acorn@^7.1.1:
14631505
version "7.4.1"
14641506
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
14651507
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
14661508

1467-
acorn@^8.15.0:
1509+
acorn@^8.11.0, acorn@^8.15.0, acorn@^8.4.1:
14681510
version "8.15.0"
14691511
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816"
14701512
integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==
@@ -1692,6 +1734,11 @@ applicationinsights@2.4.1:
16921734
diagnostic-channel "1.1.0"
16931735
diagnostic-channel-publishers "1.0.5"
16941736

1737+
arg@^4.1.0:
1738+
version "4.1.3"
1739+
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
1740+
integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==
1741+
16951742
argparse@^2.0.1:
16961743
version "2.0.1"
16971744
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
@@ -2486,6 +2533,11 @@ create-hmac@^1.1.0, create-hmac@^1.1.7:
24862533
safe-buffer "^5.0.1"
24872534
sha.js "^2.4.8"
24882535

2536+
create-require@^1.1.0:
2537+
version "1.1.1"
2538+
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
2539+
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==
2540+
24892541
cross-fetch@3.1.5:
24902542
version "3.1.5"
24912543
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f"
@@ -2770,7 +2822,7 @@ diff@5.0.0:
27702822
resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b"
27712823
integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==
27722824

2773-
diff@^4.0.2:
2825+
diff@^4.0.1, diff@^4.0.2:
27742826
version "4.0.2"
27752827
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
27762828
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
@@ -5048,6 +5100,11 @@ make-dir@^4.0.0:
50485100
dependencies:
50495101
semver "^7.5.3"
50505102

5103+
make-error@^1.1.1:
5104+
version "1.3.6"
5105+
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
5106+
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
5107+
50515108
map-stream@0.0.7:
50525109
version "0.0.7"
50535110
resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.0.7.tgz#8a1f07896d82b10926bd3744a2420009f88974a8"
@@ -7239,6 +7296,25 @@ ts-loader@9.5.2:
72397296
semver "^7.3.4"
72407297
source-map "^0.7.4"
72417298

7299+
ts-node@^10.9.2:
7300+
version "10.9.2"
7301+
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f"
7302+
integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==
7303+
dependencies:
7304+
"@cspotcode/source-map-support" "^0.8.0"
7305+
"@tsconfig/node10" "^1.0.7"
7306+
"@tsconfig/node12" "^1.0.7"
7307+
"@tsconfig/node14" "^1.0.0"
7308+
"@tsconfig/node16" "^1.0.2"
7309+
acorn "^8.4.1"
7310+
acorn-walk "^8.1.1"
7311+
arg "^4.1.0"
7312+
create-require "^1.1.0"
7313+
diff "^4.0.1"
7314+
make-error "^1.1.1"
7315+
v8-compile-cache-lib "^3.0.1"
7316+
yn "3.1.1"
7317+
72427318
tsconfig-paths@^3.15.0:
72437319
version "3.15.0"
72447320
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4"
@@ -7553,6 +7629,11 @@ uuid@8.3.2, uuid@^8.3.0:
75537629
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
75547630
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
75557631

7632+
v8-compile-cache-lib@^3.0.1:
7633+
version "3.0.1"
7634+
resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf"
7635+
integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==
7636+
75567637
v8-compile-cache@^2.2.0:
75577638
version "2.3.0"
75587639
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
@@ -8034,6 +8115,11 @@ yargs@^17.7.2:
80348115
y18n "^5.0.5"
80358116
yargs-parser "^21.1.1"
80368117

8118+
yn@3.1.1:
8119+
version "3.1.1"
8120+
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
8121+
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
8122+
80378123
yocto-queue@^0.1.0:
80388124
version "0.1.0"
80398125
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"

0 commit comments

Comments
 (0)