Skip to content

Commit 0ca1c3c

Browse files
Copilotalexr00
andauthored
Initial plan for fixing AI warning suffix in applySuggestionWithCopilot
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/vscode-pull-request-github/sessions/a47a6887-194e-4dd7-966a-3459c61cc24c
1 parent 9ec8957 commit 0ca1c3c

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ declare module 'vscode' {
5050
constructor(cell: TextDocument);
5151
}
5252

53+
export interface ChatRequestSessionGrouping {
54+
readonly id: string;
55+
readonly order: number;
56+
readonly kind?: string;
57+
}
58+
5359
export interface ChatRequest {
5460
/**
5561
* The id of the chat request. Used to identity an interaction with any of the chat surfaces.
@@ -116,6 +122,11 @@ declare module 'vscode' {
116122
*/
117123
readonly parentRequestId?: string;
118124

125+
/**
126+
* Optional metadata used to group related requests together in the UI.
127+
*/
128+
readonly sessionGrouping?: ChatRequestSessionGrouping;
129+
119130
/**
120131
* The permission level for tool auto-approval in this request.
121132
* - `'autoApprove'`: Auto-approve all tool calls and retry on errors.

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

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ declare module 'vscode' {
100100
readonly command?: string;
101101
};
102102

103-
readonly sessionOptions: ReadonlyArray<{ optionId: string; value: ChatSessionProviderOptionItem }>;
103+
readonly sessionOptions: ReadonlyArray<{ optionId: string; value: string | ChatSessionProviderOptionItem }>;
104104
}
105105

106106
/**
@@ -116,7 +116,7 @@ declare module 'vscode' {
116116
*
117117
* @param sessionResource The resource of the chat session being forked.
118118
* @param request The request turn that marks the fork point. The forked session includes all turns
119-
* upto this request turn and includes this request turn itself. If undefined, fork the full session.
119+
* upto this request turn and excludes this request turn itself. If undefined, fork the full session.
120120
* @param token A cancellation token.
121121
* @returns The forked session item.
122122
*/
@@ -396,9 +396,12 @@ declare module 'vscode' {
396396
/**
397397
* Options configured for this session as key-value pairs.
398398
* Keys correspond to option group IDs (e.g., 'models', 'subagents').
399+
* Values can be either:
400+
* - A string (the option item ID) for backwards compatibility
401+
* - A ChatSessionProviderOptionItem object to include metadata like locked state
399402
* TODO: Strongly type the keys
400403
*/
401-
readonly options?: Record<string, ChatSessionProviderOptionItem>;
404+
readonly options?: Record<string, string | ChatSessionProviderOptionItem>;
402405

403406
/**
404407
* Callback invoked by the editor for a currently running response. This allows the session to push items for the
@@ -429,7 +432,7 @@ declare module 'vscode' {
429432
*
430433
* @param sessionResource The resource of the chat session being forked.
431434
* @param request The request turn that marks the fork point. The forked session includes all turns
432-
* until this request turn and includes this request turn itself. If undefined, fork the full session.
435+
* upto this request turn and excludes this request turn itself. If undefined, fork the full session.
433436
* @param token A cancellation token.
434437
* @returns The forked session item.
435438
*/
@@ -456,7 +459,7 @@ declare module 'vscode' {
456459
/**
457460
* The new value assigned to the option. When `undefined`, the option is cleared.
458461
*/
459-
readonly value: ChatSessionProviderOptionItem;
462+
readonly value: string | ChatSessionProviderOptionItem;
460463
}>;
461464
}
462465

@@ -489,7 +492,7 @@ declare module 'vscode' {
489492
* @return The {@link ChatSession chat session} associated with the given URI.
490493
*/
491494
provideChatSessionContent(resource: Uri, token: CancellationToken, context: {
492-
readonly sessionOptions: ReadonlyArray<{ optionId: string; value: ChatSessionProviderOptionItem }>;
495+
readonly sessionOptions: ReadonlyArray<{ optionId: string; value: string | ChatSessionProviderOptionItem }>;
493496
}): Thenable<ChatSession> | ChatSession;
494497

495498
/**
@@ -514,7 +517,7 @@ declare module 'vscode' {
514517
/**
515518
* The new value assigned to the option. When `undefined`, the option is cleared.
516519
*/
517-
readonly value: ChatSessionProviderOptionItem | undefined;
520+
readonly value: string | undefined;
518521
}
519522

520523
export namespace chat {
@@ -544,7 +547,7 @@ declare module 'vscode' {
544547
* The initial option selections for the session, provided with the first request.
545548
* Contains the options the user selected (or defaults) before the session was created.
546549
*/
547-
readonly initialSessionOptions?: ReadonlyArray<{ optionId: string; value: ChatSessionProviderOptionItem }>;
550+
readonly initialSessionOptions?: ReadonlyArray<{ optionId: string; value: string | ChatSessionProviderOptionItem }>;
548551
}
549552

550553
export interface ChatSessionCapabilities {
@@ -667,6 +670,6 @@ declare module 'vscode' {
667670
*
668671
* Keys correspond to option group IDs (e.g., 'models', 'subagents').
669672
*/
670-
readonly newSessionOptions?: Record<string, ChatSessionProviderOptionItem>;
673+
readonly newSessionOptions?: Record<string, string | ChatSessionProviderOptionItem>;
671674
}
672675
}

0 commit comments

Comments
 (0)