Skip to content

Commit bc9b17b

Browse files
Copilotalexr00
andcommitted
Hide aria alert div to prevent layout space consumption
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent 2c5d21d commit bc9b17b

3 files changed

Lines changed: 61 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,13 +291,13 @@ declare module 'vscode' {
291291
/**
292292
* Duplicated so that this proposal and languageModelProxy can be independent.
293293
*/
294-
export interface LanguageModelProxyInfo {
294+
export interface LanguageModelProxy extends Disposable {
295295
readonly uri: Uri;
296296
readonly key: string;
297297
}
298298

299299
export interface LanguageModelProxyProvider {
300-
provideModelProxy(forExtensionId: string, token: CancellationToken): ProviderResult<LanguageModelProxyInfo>;
300+
provideModelProxy(forExtensionId: string, token: CancellationToken): ProviderResult<LanguageModelProxy>;
301301
}
302302

303303
export namespace lm {

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

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,18 @@ declare module 'vscode' {
7171
export interface ChatSessionItem {
7272
/**
7373
* Unique identifier for the chat session.
74+
*
75+
* @deprecated Will be replaced by `resource`
7476
*/
7577
id: string;
7678

79+
/**
80+
* The resource associated with the chat session.
81+
*
82+
* This is uniquely identifies the chat session and is used to open the chat session.
83+
*/
84+
resource: Uri | undefined;
85+
7786
/**
7887
* Human readable name of the session shown in the UI
7988
*/
@@ -139,6 +148,11 @@ declare module 'vscode' {
139148
// TODO: link request + response to encourage correct usage?
140149
readonly history: ReadonlyArray<ChatRequestTurn | ChatResponseTurn2>;
141150

151+
/**
152+
* Options configured for this session.
153+
*/
154+
readonly options?: { model?: LanguageModelChatInformation };
155+
142156
/**
143157
* Callback invoked by the editor for a currently running response. This allows the session to push items for the
144158
* current response and stream these in as them come in. The current response will be considered complete once the
@@ -166,6 +180,32 @@ declare module 'vscode' {
166180
* @param token A cancellation token that can be used to cancel the operation.
167181
*/
168182
provideChatSessionContent(sessionId: string, token: CancellationToken): Thenable<ChatSession> | ChatSession;
183+
184+
/**
185+
*
186+
* @param sessionId Identifier of the chat session being updated.
187+
* @param updates Collection of option identifiers and their new values. Only the options that changed are included.
188+
* @param token A cancellation token that can be used to cancel the notification if the session is disposed.
189+
*/
190+
provideHandleOptionsChange?(sessionId: string, updates: ReadonlyArray<ChatSessionOptionUpdate>, token: CancellationToken): void;
191+
192+
/**
193+
* Called as soon as you register (call me once)
194+
* @param token
195+
*/
196+
provideChatSessionProviderOptions?(token: CancellationToken): Thenable<ChatSessionProviderOptions> | ChatSessionProviderOptions;
197+
}
198+
199+
export interface ChatSessionOptionUpdate {
200+
/**
201+
* Identifier of the option that changed (for example `model`).
202+
*/
203+
readonly optionId: string;
204+
205+
/**
206+
* The new value assigned to the option. When `undefined`, the option is cleared.
207+
*/
208+
readonly value: string | undefined;
169209
}
170210

171211
export namespace chat {
@@ -212,6 +252,16 @@ declare module 'vscode' {
212252
supportsInterruptions?: boolean;
213253
}
214254

255+
export interface ChatSessionProviderOptions {
256+
/**
257+
* Set of available models.
258+
*/
259+
models?: LanguageModelChatInformation[];
260+
}
261+
262+
/**
263+
* @deprecated
264+
*/
215265
export interface ChatSessionShowOptions {
216266
/**
217267
* The editor view column to show the chat session in.
@@ -224,6 +274,8 @@ declare module 'vscode' {
224274
export namespace window {
225275
/**
226276
* Shows a chat session in the panel or editor.
277+
*
278+
* @deprecated
227279
*/
228280
export function showChatSession(chatSessionType: string, sessionId: string, options: ChatSessionShowOptions): Thenable<void>;
229281
}

webviews/common/common.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,13 @@ body img.avatar {
240240
gap: 4px;
241241
}
242242

243+
.reviewer-icons [role='alert'] {
244+
position: absolute;
245+
width: 0;
246+
height: 0;
247+
overflow: hidden;
248+
}
249+
243250
.push-right {
244251
margin-left: auto;
245252
}

0 commit comments

Comments
 (0)