Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 19 additions & 28 deletions src/@types/vscode.proposed.chatSessionsProvider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ declare module 'vscode' {
/**
* Statistics about the chat session.
*/
changes?: readonly ChatSessionChangedFile[] | readonly ChatSessionChangedFile2[];
changes?: readonly ChatSessionChangedFile[];

/**
* Arbitrary metadata for the chat session. Can be anything, but must be JSON-stringifyable.
Expand All @@ -353,34 +353,7 @@ declare module 'vscode' {
metadata?: { readonly [key: string]: any };
}

/**
* @deprecated Use `ChatSessionChangedFile2` instead
*/
export class ChatSessionChangedFile {
/**
* URI of the file.
*/
modifiedUri: Uri;

/**
* File opened when the user takes the 'compare' action.
*/
originalUri?: Uri;

/**
* Number of insertions made during the session.
*/
insertions: number;

/**
* Number of deletions made during the session.
*/
deletions: number;

constructor(modifiedUri: Uri, insertions: number, deletions: number, originalUri?: Uri);
}

export class ChatSessionChangedFile2 {
/**
* URI of the file.
*/
Expand Down Expand Up @@ -594,8 +567,15 @@ declare module 'vscode' {
/**
* The initial option selections for the session, provided with the first request.
* Contains the options the user selected (or defaults) before the session was created.
*
* @deprecated Use `inputState` instead
*/
readonly initialSessionOptions?: ReadonlyArray<{ optionId: string; value: string | ChatSessionProviderOptionItem }>;

/**
* The current input state of the chat session.
*/
readonly inputState: ChatSessionInputState;
}

export interface ChatSessionCapabilities {
Expand Down Expand Up @@ -692,6 +672,8 @@ declare module 'vscode' {
*
* These commands will be displayed at the bottom of the group.
*
* For extensions using the legacy `commands` API, these commands are passed the sessionResource as the first argument.
*
* For extensions that use the new `provideChatSessionInputState` API, these commands are passed a context object
* `{ inputState: ChatSessionInputState; sessionResource: Uri | undefined }` that they can use to determine which session and options they are being invoked for.
*/
Expand Down Expand Up @@ -719,9 +701,18 @@ declare module 'vscode' {
export interface ChatSessionInputState {
/**
* Fired when the input state is changed by the user.
*
* Move to controller?
*/
readonly onDidChange: Event<void>;

/**
* The resource associated with this chat session.
*
* This is `undefined` for chat sessions that have not yet started.
*/
readonly sessionResource: Uri | undefined;

/**
* The groups of options to show in the UI for user input.
*
Expand Down
2 changes: 1 addition & 1 deletion src/github/pullRequestModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
pullRequestId: this.graphNodeId,
pullRequestReviewId: pendingReviewId,
startLine: startLine === endLine ? undefined : startLine,
line: (endLine === undefined) ? 0 : endLine,
line: endLine,
side,
subjectType: (startLine === undefined || endLine === undefined) ? SubjectType.FILE : SubjectType.LINE
Comment thread
alexr00 marked this conversation as resolved.
}
Expand Down
Loading