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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Bug Fix",
"description": "\"failed to run command\" error"
}
5 changes: 2 additions & 3 deletions packages/amazonq/src/lsp/chat/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

import * as vscode from 'vscode'
import { Commands, globals } from 'aws-core-vscode/shared'
import { window } from 'vscode'
import { AmazonQChatViewProvider } from './webviewProvider'
Expand Down Expand Up @@ -74,6 +73,6 @@ function registerGenericCommand(commandName: string, genericCommand: string, pro
* Instead, we just create our own as a temporary solution
*/
async function focusAmazonQPanel() {
await vscode.commands.executeCommand('aws.amazonq.AmazonQChatView.focus')
await vscode.commands.executeCommand('aws.amazonq.AmazonCommonAuth.focus')
await Commands.tryExecute('aws.amazonq.AmazonQChatView.focus')
await Commands.tryExecute('aws.amazonq.AmazonCommonAuth.focus')
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { AuthUtil } from '../../../codewhisperer/util/authUtil'
import { AuthController } from '../../../amazonq/auth/controller'
import { getLogger } from '../../../shared/logger/logger'
import { submitFeedback } from '../../../feedback/vue/submitFeedback'
import { placeholder } from '../../../shared/vscode/commands2'
import { Commands, placeholder } from '../../../shared/vscode/commands2'
import { EditorContentController } from '../../../amazonq/commons/controllers/contentController'
import { openUrl } from '../../../shared/utilities/vsCodeUtils'
import { checkForDevFile, getPathsFromZipFilePath } from '../../../amazonq/util/files'
Expand Down Expand Up @@ -579,7 +579,7 @@ export class FeatureDevController {
open
)
if (resp === open) {
await vscode.commands.executeCommand('aws.amazonq.AmazonQChatView.focus')
await Commands.tryExecute('aws.amazonq.AmazonQChatView.focus')
// TODO add focusing on the specific tab once that's implemented
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { commandPalette } from '../../codewhisperer/commands/types'
import { CodeScanIssue } from '../../codewhisperer/models/model'
import { Commands, VsCodeCommandArg, placeholder } from '../../shared/vscode/commands2'
import { ChatControllerMessagePublishers } from '../controllers/chat/controller'
import vscode from 'vscode'

/**
* Opens the Amazon Q panel, showing the correct View that should
Expand All @@ -25,8 +24,8 @@ export const focusAmazonQPanel = Commands.declare(
* So when we try to focus the following Views, only one will show depending
* on the context.
*/
await vscode.commands.executeCommand('aws.amazonq.AmazonQChatView.focus')
await vscode.commands.executeCommand('aws.amazonq.AmazonCommonAuth.focus')
await Commands.tryExecute('aws.amazonq.AmazonQChatView.focus')
await Commands.tryExecute('aws.amazonq.AmazonCommonAuth.focus')
}
)

Expand Down
Loading