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
28 changes: 8 additions & 20 deletions src/@types/vscode.proposed.chatSessionsProvider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,6 @@ declare module 'vscode' {
*/
readonly onDidCommitChatSessionItem: Event<{ original: ChatSessionItem /** untitled */; modified: ChatSessionItem /** newly created */ }>;

/**
* DEPRECATED: Will be removed!
* Creates a new chat session.
*
* @param options Options for the new session including an optional initial prompt and history
* @param token A cancellation token
* @returns Metadata for the chat session
*/
provideNewChatSessionItem?(options: {
/**
* The chat request that initiated the session creation
*/
readonly request: ChatRequest;

/**
* Additional metadata to use for session creation
*/
metadata?: any;
}, token: CancellationToken): ProviderResult<ChatSessionItem>;

// #endregion
}

Expand Down Expand Up @@ -241,6 +221,14 @@ declare module 'vscode' {
*/
readonly onDidChangeChatSessionOptions?: Event<ChatSessionOptionChangeEvent>;

/**
* Event that the provider can fire to signal that the available provider options have changed.
*
* When fired, the editor will re-query {@link ChatSessionContentProvider.provideChatSessionProviderOptions}
* and update the UI to reflect the new option groups.
*/
readonly onDidChangeChatSessionProviderOptions?: Event<void>;

/**
* Provides the chat session content for a given uri.
*
Expand Down
26 changes: 25 additions & 1 deletion src/github/pullRequestReviewCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,30 @@ export namespace PullRequestReviewCommon {
}

// Execute all deletions in parallel
await performBranchDeletion(folderRepositoryManager, item, defaultBranch, branchInfo!, selectedActions);
const deletedBranchTypes = await performBranchDeletion(folderRepositoryManager, item, defaultBranch, branchInfo!, selectedActions);

// Show notification to the user about what was deleted
if (deletedBranchTypes.length > 0) {
const wasLocalDeleted = deletedBranchTypes.includes('local');
const wasRemoteDeleted = deletedBranchTypes.includes('remoteHead') || deletedBranchTypes.includes('remote');
const branchName = branchInfo?.branch || item.head?.ref;

// Only show notification if we have a branch name
if (branchName) {
if (wasLocalDeleted && wasRemoteDeleted) {
vscode.window.showInformationMessage(
vscode.l10n.t('Deleted local and remote branches for {0}.', branchName)
);
} else if (wasLocalDeleted) {
vscode.window.showInformationMessage(
vscode.l10n.t('Deleted local branch {0}.', branchName)
);
} else {
vscode.window.showInformationMessage(
vscode.l10n.t('Deleted remote branch {0}.', branchName)
);
}
}
}
}
}