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
33 changes: 0 additions & 33 deletions packages/amazonq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,21 +560,6 @@
]
},
"commands": [
{
"command": "aws.amazonq.stopCmdExecution",
"title": "Stop Amazon Q Command Execution",
"category": "%AWS.amazonq.title%"
},
{
"command": "aws.amazonq.runCmdExecution",
"title": "Run Amazon Q Command Execution",
"category": "%AWS.amazonq.title%"
},
{
"command": "aws.amazonq.rejectCmdExecution",
"title": "Reject Amazon Q Command Execution",
"category": "%AWS.amazonq.title%"
},
{
"command": "_aws.amazonq.notifications.dismiss",
"title": "%AWS.generic.dismiss%",
Expand Down Expand Up @@ -865,24 +850,6 @@
}
],
"keybindings": [
{
"command": "aws.amazonq.stopCmdExecution",
"key": "ctrl+shift+backspace",
"mac": "cmd+shift+backspace",
"when": "aws.amazonq.amazonqChatLSP.isRunning"
},
{
"command": "aws.amazonq.runCmdExecution",
"key": "ctrl+shift+enter",
"mac": "cmd+shift+enter",
"when": "aws.amazonq.amazonqChatLSP.isRunning"
},
{
"command": "aws.amazonq.rejectCmdExecution",
"key": "ctrl+shift+r",
"mac": "cmd+shift+r",
"when": "aws.amazonq.amazonqChatLSP.isRunning"
},
{
"command": "_aws.amazonq.focusChat.keybinding",
"win": "win+alt+i",
Expand Down
16 changes: 1 addition & 15 deletions packages/amazonq/src/lsp/chat/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ export function registerCommands(provider: AmazonQChatViewProvider) {
params: {},
})
})
}),
registerShellCommandShortCut('aws.amazonq.runCmdExecution', 'run-shell-command', provider),
registerShellCommandShortCut('aws.amazonq.rejectCmdExecution', 'reject-shell-command', provider),
registerShellCommandShortCut('aws.amazonq.stopCmdExecution', 'stop-shell-command', provider)
})
)
}

Expand Down Expand Up @@ -159,14 +156,3 @@ export async function focusAmazonQPanel() {
await Commands.tryExecute('aws.amazonq.AmazonQChatView.focus')
await Commands.tryExecute('aws.amazonq.AmazonCommonAuth.focus')
}

function registerShellCommandShortCut(commandName: string, buttonId: string, provider: AmazonQChatViewProvider) {
return Commands.register(commandName, async () => {
void focusAmazonQPanel().then(() => {
void provider.webview?.postMessage({
command: 'aws/chat/executeShellCommandShortCut',
params: { id: buttonId },
})
})
})
}
3 changes: 1 addition & 2 deletions packages/amazonq/src/lsp/chat/webviewProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
Webview,
} from 'vscode'
import * as path from 'path'
import * as os from 'os'
import {
globals,
isSageMaker,
Expand Down Expand Up @@ -150,7 +149,7 @@ export class AmazonQChatViewProvider implements WebviewViewProvider {
const vscodeApi = acquireVsCodeApi()
const hybridChatConnector = new HybridChatAdapter(${(await AuthUtil.instance.getChatAuthState()).amazonQ === 'connected'},${featureConfigData},${welcomeCount},${disclaimerAcknowledged},${regionProfileString},${disabledCommands},${isSMUS},${isSM},vscodeApi.postMessage)
const commands = [hybridChatConnector.initialQuickActions[0]]
qChat = amazonQChat.createChat(vscodeApi, {os: "${os.platform()}", disclaimerAcknowledged: ${disclaimerAcknowledged}, pairProgrammingAcknowledged: ${pairProgrammingAcknowledged}, agenticMode: true, quickActionCommands: commands, modelSelectionEnabled: ${modelSelectionEnabled}}, hybridChatConnector, ${JSON.stringify(featureConfigData)});
qChat = amazonQChat.createChat(vscodeApi, {disclaimerAcknowledged: ${disclaimerAcknowledged}, pairProgrammingAcknowledged: ${pairProgrammingAcknowledged}, agenticMode: true, quickActionCommands: commands, modelSelectionEnabled: ${modelSelectionEnabled}}, hybridChatConnector, ${JSON.stringify(featureConfigData)});
}
window.addEventListener('message', (event) => {
/**
Expand Down
13 changes: 0 additions & 13 deletions packages/amazonq/src/lsp/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import {
getClientId,
extensionVersion,
isSageMaker,
setContext,
} from 'aws-core-vscode/shared'
import { processUtils } from 'aws-core-vscode/shared'
import { activate } from './chat/activation'
Expand Down Expand Up @@ -165,7 +164,6 @@ export async function startLanguageServer(
pinnedContextEnabled: true,
imageContextEnabled: true,
mcp: true,
shortcut: true,
reroute: true,
modelSelection: true,
workspaceFilePath: vscode.workspace.workspaceFile?.fsPath,
Expand Down Expand Up @@ -250,17 +248,6 @@ async function onLanguageServerReady(

if (Experiments.instance.get('amazonqChatLSP', true)) {
await activate(client, encryptionKey, resourcePaths.ui)

await setContext('aws.amazonq.amazonqChatLSP.isRunning', true)
getLogger().info('Amazon Q Chat LSP context flag set on client activated')

// Add a disposable to reset the context flag when the client stops
toDispose.push({
dispose: async () => {
await setContext('aws.amazonq.amazonqChatLSP.isRunning', false)
getLogger().info('Amazon Q Chat LSP context flag reset on client disposal')
},
})
}

const refreshInterval = auth.startTokenRefreshInterval(10 * oneSecond)
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/shared/vscode/setContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export type contextKey =
| 'gumby.wasQCodeTransformationUsed'
| 'amazonq.inline.codelensShortcutEnabled'
| 'aws.toolkit.lambda.walkthroughSelected'
| 'aws.amazonq.amazonqChatLSP.isRunning'

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

Expand Down
Loading