Skip to content

Commit

Permalink
chat - toggle from title if installed (#241753)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero authored Feb 25, 2025
1 parent 8b5daf2 commit 4f68d9e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/vs/workbench/contrib/chat/browser/actions/chatActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const CHAT_SETUP_ACTION_ID = 'workbench.action.chat.triggerSetup';
export const CHAT_SETUP_ACTION_LABEL = localize2('triggerChatSetup', "Use AI Features with Copilot for Free...");

export const TOGGLE_CHAT_ACTION_ID = 'workbench.action.chat.toggle';
export const TOGGLE_CHAT_ACTION_LABEL = localize('toggleChat', "Toggle Chat");

export interface IChatViewOpenOptions {
/**
Expand Down Expand Up @@ -728,16 +729,16 @@ export class CopilotTitleBarMenuRendering extends Disposable implements IWorkben
primaryActionIcon = Codicon.copilot;
} else {
if (signedOut) {
primaryActionId = CHAT_OPEN_ACTION_ID;
primaryActionId = TOGGLE_CHAT_ACTION_ID;
primaryActionTitle = localize('signInToChatSetup', "Sign in to Use Copilot...");
primaryActionIcon = Codicon.copilotNotConnected;
} else if (chatQuotaExceeded || completionsQuotaExceeded) {
primaryActionId = OPEN_CHAT_QUOTA_EXCEEDED_DIALOG;
primaryActionTitle = quotaToButtonMessage({ chatQuotaExceeded, completionsQuotaExceeded });
primaryActionIcon = Codicon.copilotWarning;
} else {
primaryActionId = CHAT_OPEN_ACTION_ID;
primaryActionTitle = CHAT_OPEN_ACTION_LABEL.value;
primaryActionId = TOGGLE_CHAT_ACTION_ID;
primaryActionTitle = TOGGLE_CHAT_ACTION_LABEL;
primaryActionIcon = Codicon.copilot;
}
}
Expand Down

0 comments on commit 4f68d9e

Please sign in to comment.