Skip to content

Commit fa08fb7

Browse files
authored
feat: add 'Checkout in Worktree' option to PR Description checkout button
Agent-Logs-Url: https://github.com/microsoft/vscode-pull-request-github/sessions/113a0bba-a0a7-47d9-baca-dd4dd5fda645
1 parent 766d8a0 commit fa08fb7

File tree

7 files changed

+308
-45
lines changed

7 files changed

+308
-45
lines changed

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

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,16 @@ declare module 'vscode' {
223223
};
224224
language: string;
225225

226+
/**
227+
* Overrides for how the command is presented in the UI.
228+
* For example, when a `cd <dir> && <command>` prefix is detected,
229+
* the presentation can show only the actual command.
230+
*/
231+
presentationOverrides?: {
232+
commandLine: string;
233+
language?: string;
234+
};
235+
226236
/**
227237
* Terminal command output. Displayed when the terminal is no longer available.
228238
*/
@@ -829,6 +839,12 @@ declare module 'vscode' {
829839
*/
830840
readonly completionTokens: number;
831841

842+
/**
843+
* The number of tokens reserved for the response.
844+
* This is rendered specially in the UI to indicate that these tokens aren't used but are reserved.
845+
*/
846+
readonly outputBuffer?: number;
847+
832848
/**
833849
* Optional breakdown of prompt token usage by category and label.
834850
* If the percentages do not sum to 100%, the remaining will be shown as "Uncategorized".
@@ -974,10 +990,6 @@ declare module 'vscode' {
974990
readonly toolReferences?: readonly ChatLanguageModelToolReference[];
975991
}
976992

977-
export interface ChatResultFeedback {
978-
readonly unhelpfulReason?: string;
979-
}
980-
981993
export namespace lm {
982994
export function fileIsIgnored(uri: Uri, token?: CancellationToken): Thenable<boolean>;
983995
}
@@ -1020,8 +1032,6 @@ declare module 'vscode' {
10201032
readonly rawInput?: unknown;
10211033

10221034
readonly chatRequestId?: string;
1023-
/** @deprecated Use {@link chatSessionResource} instead */
1024-
readonly chatSessionId?: string;
10251035
readonly chatSessionResource?: Uri;
10261036
readonly chatInteractionId?: string;
10271037
}
@@ -1051,9 +1061,15 @@ declare module 'vscode' {
10511061
}
10521062

10531063
export interface ChatRequestModeInstructions {
1064+
/** set when the mode a custom agent (not built-in), to be used as identifier */
1065+
readonly uri?: Uri;
10541066
readonly name: string;
10551067
readonly content: string;
10561068
readonly toolReferences?: readonly ChatLanguageModelToolReference[];
10571069
readonly metadata?: Record<string, boolean | string | number>;
1070+
/**
1071+
* Whether the mode is a builtin mode (e.g. Ask, Edit, Agent) rather than a user or extension-defined custom mode.
1072+
*/
1073+
readonly isBuiltin?: boolean;
10581074
}
10591075
}

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

Lines changed: 47 additions & 6 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: 14
6+
// version: 15
77

88
declare module 'vscode' {
99

@@ -116,10 +116,25 @@ declare module 'vscode' {
116116
*/
117117
readonly parentRequestId?: string;
118118

119+
/**
120+
* The permission level for tool auto-approval in this request.
121+
* - `'autoApprove'`: Auto-approve all tool calls and retry on errors.
122+
* - `'autopilot'`: Everything autoApprove does plus continues until the task is done.
123+
*/
124+
readonly permissionLevel?: string;
125+
119126
/**
120127
* Whether any hooks are enabled for this request.
121128
*/
122129
readonly hasHooksEnabled: boolean;
130+
131+
/**
132+
* When true, this request was initiated by the system (e.g. a terminal
133+
* command completion notification) rather than by the user typing a
134+
* message. Extensions can use this to render the prompt differently
135+
* and skip billing.
136+
*/
137+
readonly isSystemInitiated?: boolean;
123138
}
124139

125140
export enum ChatRequestEditedFileEventKind {
@@ -176,10 +191,20 @@ declare module 'vscode' {
176191
*/
177192
readonly editedFileEvents?: ChatRequestEditedFileEvent[];
178193

194+
/**
195+
* The identifier of the language model that was used for this request, if known.
196+
*/
197+
readonly modelId?: string;
198+
199+
/**
200+
* The mode instructions that were active for this request, if any.
201+
*/
202+
readonly modeInstructions2?: ChatRequestModeInstructions;
203+
179204
/**
180205
* @hidden
181206
*/
182-
constructor(prompt: string, command: string | undefined, references: ChatPromptReference[], participant: string, toolReferences: ChatLanguageModelToolReference[], editedFileEvents: ChatRequestEditedFileEvent[] | undefined, id: string | undefined);
207+
constructor(prompt: string, command: string | undefined, references: ChatPromptReference[], participant: string, toolReferences: ChatLanguageModelToolReference[], editedFileEvents: ChatRequestEditedFileEvent[] | undefined, id: string | undefined, modelId: string | undefined, modeInstructions2: ChatRequestModeInstructions | undefined);
183208
}
184209

185210
export class ChatResponseTurn2 {
@@ -262,8 +287,6 @@ declare module 'vscode' {
262287

263288
export interface LanguageModelToolInvocationOptions<T> {
264289
chatRequestId?: string;
265-
/** @deprecated Use {@link chatSessionResource} instead */
266-
chatSessionId?: string;
267290
chatSessionResource?: Uri;
268291
chatInteractionId?: string;
269292
terminalCommand?: string;
@@ -289,8 +312,6 @@ declare module 'vscode' {
289312
*/
290313
input: T;
291314
chatRequestId?: string;
292-
/** @deprecated Use {@link chatSessionResource} instead */
293-
chatSessionId?: string;
294315
chatSessionResource?: Uri;
295316
chatInteractionId?: string;
296317
/**
@@ -392,7 +413,27 @@ declare module 'vscode' {
392413
* will immediately follow up with a new request in the same conversation.
393414
*/
394415
readonly yieldRequested: boolean;
416+
417+
/**
418+
* The resource URI identifying the chat session this context belongs to.
419+
* Available when the context is provided for title generation, summarization,
420+
* or other session-scoped operations. Extracted from the session's history entries.
421+
*/
422+
readonly sessionResource?: Uri;
395423
}
396424

397425
// #endregion
426+
427+
export interface LanguageModelToolInformation {
428+
/**
429+
* The full reference name of this tool as used in agent definition files.
430+
*
431+
* For MCP tools, this is the canonical name in the format `serverShortName/toolReferenceName`
432+
* (e.g., `github/search_issues`). This can be used to map between the tool names specified
433+
* in agent `.md` files and the tool's internal {@link LanguageModelToolInformation.name id}.
434+
*
435+
* This property is only set for MCP tools. For other tool types, it is `undefined`.
436+
*/
437+
readonly fullReferenceName?: string;
438+
}
398439
}

0 commit comments

Comments
 (0)