Skip to content

Commit 064df9d

Browse files
committed
fix: reverts commit 028f4f3.
1 parent c917133 commit 064df9d

File tree

5 files changed

+2
-64
lines changed

5 files changed

+2
-64
lines changed

packages/amazonq/package.json

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -560,21 +560,6 @@
560560
]
561561
},
562562
"commands": [
563-
{
564-
"command": "aws.amazonq.stopCmdExecution",
565-
"title": "Stop Amazon Q Command Execution",
566-
"category": "%AWS.amazonq.title%"
567-
},
568-
{
569-
"command": "aws.amazonq.runCmdExecution",
570-
"title": "Run Amazon Q Command Execution",
571-
"category": "%AWS.amazonq.title%"
572-
},
573-
{
574-
"command": "aws.amazonq.rejectCmdExecution",
575-
"title": "Reject Amazon Q Command Execution",
576-
"category": "%AWS.amazonq.title%"
577-
},
578563
{
579564
"command": "_aws.amazonq.notifications.dismiss",
580565
"title": "%AWS.generic.dismiss%",
@@ -865,24 +850,6 @@
865850
}
866851
],
867852
"keybindings": [
868-
{
869-
"command": "aws.amazonq.stopCmdExecution",
870-
"key": "ctrl+shift+backspace",
871-
"mac": "cmd+shift+backspace",
872-
"when": "aws.amazonq.amazonqChatLSP.isRunning"
873-
},
874-
{
875-
"command": "aws.amazonq.runCmdExecution",
876-
"key": "ctrl+shift+enter",
877-
"mac": "cmd+shift+enter",
878-
"when": "aws.amazonq.amazonqChatLSP.isRunning"
879-
},
880-
{
881-
"command": "aws.amazonq.rejectCmdExecution",
882-
"key": "ctrl+shift+r",
883-
"mac": "cmd+shift+r",
884-
"when": "aws.amazonq.amazonqChatLSP.isRunning"
885-
},
886853
{
887854
"command": "_aws.amazonq.focusChat.keybinding",
888855
"win": "win+alt+i",

packages/amazonq/src/lsp/chat/commands.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ export function registerCommands(provider: AmazonQChatViewProvider) {
5959
params: {},
6060
})
6161
})
62-
}),
63-
registerShellCommandShortCut('aws.amazonq.runCmdExecution', 'run-shell-command', provider),
64-
registerShellCommandShortCut('aws.amazonq.rejectCmdExecution', 'reject-shell-command', provider),
65-
registerShellCommandShortCut('aws.amazonq.stopCmdExecution', 'stop-shell-command', provider)
62+
})
6663
)
6764
}
6865

@@ -159,14 +156,3 @@ export async function focusAmazonQPanel() {
159156
await Commands.tryExecute('aws.amazonq.AmazonQChatView.focus')
160157
await Commands.tryExecute('aws.amazonq.AmazonCommonAuth.focus')
161158
}
162-
163-
function registerShellCommandShortCut(commandName: string, buttonId: string, provider: AmazonQChatViewProvider) {
164-
return Commands.register(commandName, async () => {
165-
void focusAmazonQPanel().then(() => {
166-
void provider.webview?.postMessage({
167-
command: 'aws/chat/executeShellCommandShortCut',
168-
params: { id: buttonId },
169-
})
170-
})
171-
})
172-
}

packages/amazonq/src/lsp/chat/webviewProvider.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
Webview,
1414
} from 'vscode'
1515
import * as path from 'path'
16-
import * as os from 'os'
1716
import {
1817
globals,
1918
isSageMaker,
@@ -150,7 +149,7 @@ export class AmazonQChatViewProvider implements WebviewViewProvider {
150149
const vscodeApi = acquireVsCodeApi()
151150
const hybridChatConnector = new HybridChatAdapter(${(await AuthUtil.instance.getChatAuthState()).amazonQ === 'connected'},${featureConfigData},${welcomeCount},${disclaimerAcknowledged},${regionProfileString},${disabledCommands},${isSMUS},${isSM},vscodeApi.postMessage)
152151
const commands = [hybridChatConnector.initialQuickActions[0]]
153-
qChat = amazonQChat.createChat(vscodeApi, {os: "${os.platform()}", disclaimerAcknowledged: ${disclaimerAcknowledged}, pairProgrammingAcknowledged: ${pairProgrammingAcknowledged}, agenticMode: true, quickActionCommands: commands, modelSelectionEnabled: ${modelSelectionEnabled}}, hybridChatConnector, ${JSON.stringify(featureConfigData)});
152+
qChat = amazonQChat.createChat(vscodeApi, {disclaimerAcknowledged: ${disclaimerAcknowledged}, pairProgrammingAcknowledged: ${pairProgrammingAcknowledged}, agenticMode: true, quickActionCommands: commands, modelSelectionEnabled: ${modelSelectionEnabled}}, hybridChatConnector, ${JSON.stringify(featureConfigData)});
154153
}
155154
window.addEventListener('message', (event) => {
156155
/**

packages/amazonq/src/lsp/client.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import {
3838
getClientId,
3939
extensionVersion,
4040
isSageMaker,
41-
setContext,
4241
} from 'aws-core-vscode/shared'
4342
import { processUtils } from 'aws-core-vscode/shared'
4443
import { activate } from './chat/activation'
@@ -165,7 +164,6 @@ export async function startLanguageServer(
165164
pinnedContextEnabled: true,
166165
imageContextEnabled: true,
167166
mcp: true,
168-
shortcut: true,
169167
reroute: true,
170168
modelSelection: true,
171169
workspaceFilePath: vscode.workspace.workspaceFile?.fsPath,
@@ -250,17 +248,6 @@ async function onLanguageServerReady(
250248

251249
if (Experiments.instance.get('amazonqChatLSP', true)) {
252250
await activate(client, encryptionKey, resourcePaths.ui)
253-
254-
await setContext('aws.amazonq.amazonqChatLSP.isRunning', true)
255-
getLogger().info('Amazon Q Chat LSP context flag set on client activated')
256-
257-
// Add a disposable to reset the context flag when the client stops
258-
toDispose.push({
259-
dispose: async () => {
260-
await setContext('aws.amazonq.amazonqChatLSP.isRunning', false)
261-
getLogger().info('Amazon Q Chat LSP context flag reset on client disposal')
262-
},
263-
})
264251
}
265252

266253
const refreshInterval = auth.startTokenRefreshInterval(10 * oneSecond)

packages/core/src/shared/vscode/setContext.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export type contextKey =
4040
| 'gumby.wasQCodeTransformationUsed'
4141
| 'amazonq.inline.codelensShortcutEnabled'
4242
| 'aws.toolkit.lambda.walkthroughSelected'
43-
| 'aws.amazonq.amazonqChatLSP.isRunning'
4443

4544
const contextMap: Partial<Record<contextKey, any>> = {}
4645

0 commit comments

Comments
 (0)