Skip to content

Commit 130f343

Browse files
authored
Remove "View Usage" action (#316316)
1 parent 6e18ef9 commit 130f343

2 files changed

Lines changed: 2 additions & 35 deletions

File tree

extensions/copilot/src/extension/chatInputNotification/vscode-node/chatInputNotification.contribution.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,10 @@ export class ChatInputNotificationContribution extends Disposable {
272272
];
273273
} else if (isManagedPlan) {
274274
notification.description = vscode.l10n.t('Contact your admin to increase your limits.');
275-
notification.actions = [
276-
{ label: vscode.l10n.t('View Usage'), commandId: 'workbench.action.chat.openCopilotStatus' },
277-
];
275+
notification.actions = [];
278276
} else if (this._chatQuotaService.additionalUsageEnabled) {
279277
notification.description = vscode.l10n.t('Additional budget is enabled to cover extra usage.');
280-
notification.actions = [
281-
{ label: vscode.l10n.t('View Usage'), commandId: 'workbench.action.chat.openCopilotStatus' },
282-
];
278+
notification.actions = [];
283279
} else {
284280
notification.description = vscode.l10n.t('Set additional budget to cover extra usage.');
285281
notification.actions = [

src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.ts

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ import { $ as h, disposableWindowInterval } from '../../../../../base/browser/do
2222
import { isNewUser } from './chatStatus.js';
2323
import product from '../../../../../platform/product/common/product.js';
2424
import { isCompletionsEnabled } from '../../../../../editor/common/services/completionsEnablement.js';
25-
import { CommandsRegistry } from '../../../../../platform/commands/common/commands.js';
26-
import { IHoverService } from '../../../../../platform/hover/browser/hover.js';
2725
import { CHAT_SETUP_ACTION_ID } from '../actions/chatActions.js';
2826
import { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js';
2927
import { isWeb } from '../../../../../base/common/platform.js';
@@ -51,39 +49,12 @@ export class ChatStatusBarEntry extends Disposable implements IWorkbenchContribu
5149
@IConfigurationService private readonly configurationService: IConfigurationService,
5250
@IInlineCompletionsService private readonly completionsService: IInlineCompletionsService,
5351
@IChatSessionsService private readonly chatSessionsService: IChatSessionsService,
54-
@IHoverService private readonly hoverService: IHoverService,
5552
@IContextKeyService private readonly contextKeyService: IContextKeyService,
5653
) {
5754
super();
5855

5956
this.runningSessionsCount = this.chatSessionsService.getInProgress().reduce((total, item) => total + item.count, 0);
6057

61-
this._register(CommandsRegistry.registerCommand('workbench.action.chat.openCopilotStatus', () => {
62-
const target = this.entryAnchor.parentElement;
63-
if (!target) {
64-
return;
65-
}
66-
67-
const store = new DisposableStore();
68-
const content = ChatStatusDashboard.instantiateInContents(this.instantiationService, store, undefined);
69-
const hover = this.hoverService.showInstantHover({
70-
content,
71-
target,
72-
persistence: { hideOnKeyDown: true, sticky: true },
73-
appearance: { maxHeightRatio: 0.9 },
74-
}, true);
75-
if (hover) {
76-
store.add(hover);
77-
store.add(disposableWindowInterval(mainWindow, () => {
78-
if (!content.isConnected) {
79-
store.dispose();
80-
}
81-
}, 2000));
82-
} else {
83-
store.dispose();
84-
}
85-
}));
86-
8758
this.update();
8859

8960
this.registerListeners();

0 commit comments

Comments
 (0)