Skip to content

Commit 147c863

Browse files
authored
fix(amazonq): remove unnecessary conditional check
2 parents d87152c + f769646 commit 147c863

File tree

1 file changed

+12
-14
lines changed
  • packages/core/src/codewhispererChat/controllers/chat

1 file changed

+12
-14
lines changed

packages/core/src/codewhispererChat/controllers/chat/controller.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -559,20 +559,18 @@ export class ChatController {
559559
}
560560

561561
private async processCustomFormAction(message: CustomFormActionMessage) {
562-
if (message.tabID) {
563-
if (message.action.id === 'submit-create-prompt') {
564-
const userPromptsDirectory = getUserPromptsDirectory()
565-
566-
const title = message.action.formItemValues?.['prompt-name']
567-
const newFilePath = path.join(
568-
userPromptsDirectory,
569-
title ? `${title}${promptFileExtension}` : `default${promptFileExtension}`
570-
)
571-
const newFileContent = new Uint8Array(Buffer.from(''))
572-
await fs.writeFile(newFilePath, newFileContent)
573-
const newFileDoc = await vscode.workspace.openTextDocument(newFilePath)
574-
await vscode.window.showTextDocument(newFileDoc)
575-
}
562+
if (message.action.id === 'submit-create-prompt') {
563+
const userPromptsDirectory = getUserPromptsDirectory()
564+
565+
const title = message.action.formItemValues?.['prompt-name']
566+
const newFilePath = path.join(
567+
userPromptsDirectory,
568+
title ? `${title}${promptFileExtension}` : `default${promptFileExtension}`
569+
)
570+
const newFileContent = new Uint8Array(Buffer.from(''))
571+
await fs.writeFile(newFilePath, newFileContent)
572+
const newFileDoc = await vscode.workspace.openTextDocument(newFilePath)
573+
await vscode.window.showTextDocument(newFileDoc)
576574
}
577575
}
578576

0 commit comments

Comments
 (0)