|
6 | 6 | import { window } from 'vscode' |
7 | 7 | import { LanguageClient } from 'vscode-languageclient' |
8 | 8 | import { AmazonQChatViewProvider } from './webviewProvider' |
9 | | -import { registerCommands } from './commands' |
| 9 | +import { focusAmazonQPanel, registerCommands } from './commands' |
10 | 10 | import { registerLanguageServerEventListener, registerMessageListeners } from './messages' |
11 | 11 | import { Commands, getLogger, globals, undefinedIfEmpty } from 'aws-core-vscode/shared' |
12 | 12 | import { activate as registerLegacyChatListeners } from '../../app/chat/activation' |
@@ -78,6 +78,18 @@ export async function activate(languageClient: LanguageClient, encryptionKey: Bu |
78 | 78 | Commands.register('aws.amazonq.updateCustomizations', () => { |
79 | 79 | pushCustomizationToServer(languageClient) |
80 | 80 | }), |
| 81 | + Commands.register('aws.amazonq.manageSubscription', () => { |
| 82 | + focusAmazonQPanel().catch((e) => languageClient.error(`[VSCode Client] focusAmazonQPanel() failed`)) |
| 83 | + |
| 84 | + languageClient |
| 85 | + .sendRequest('workspace/executeCommand', { |
| 86 | + command: 'aws/chat/manageSubscription', |
| 87 | + // arguments: [], |
| 88 | + }) |
| 89 | + .catch((e) => { |
| 90 | + getLogger('amazonqLsp').error('failed request: aws/chat/manageSubscription: %O', e) |
| 91 | + }) |
| 92 | + }), |
81 | 93 | globals.logOutputChannel.onDidChangeLogLevel((logLevel) => { |
82 | 94 | getLogger('amazonqLsp').info(`Local log level changed to ${logLevel}, notifying LSP`) |
83 | 95 | void pushConfigUpdate(languageClient, { |
|
0 commit comments