Skip to content

Commit f8b15b1

Browse files
authored
fix(generic chat): fix chat panel open-settings not opening the configuration panel correctly (#5286)
1 parent e9e2d8b commit f8b15b1

File tree

1 file changed

+9
-31
lines changed

1 file changed

+9
-31
lines changed

plugins/amazonq/mynah-ui/src/mynah-ui/ui/connector.ts

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,15 @@ export class Connector {
559559
this.amazonqCommonsConnector.onCustomFormAction(tabId, action)
560560
break
561561
}
562+
case 'cwc': {
563+
if (action.id === `open-settings`) {
564+
this.sendMessageToExtension({
565+
command: 'open-settings',
566+
type: '',
567+
tabType: 'cwc',
568+
})
569+
}
570+
}
562571
}
563572
}
564573

@@ -594,35 +603,4 @@ export class Connector {
594603
break
595604
}
596605
}
597-
598-
onFormButtonClick = (
599-
tabId: string,
600-
messageId: string,
601-
action: {
602-
id: string
603-
text?: string
604-
formItemValues?: Record<string, string>
605-
}
606-
) => {
607-
if (isFormButtonCodeTransform(action.id)) {
608-
this.codeTransformChatConnector.onFormButtonClick(tabId, action)
609-
} else if (isFormButtonCodeScan(action.id)) {
610-
this.codeScanChatConnector.onFormButtonClick(tabId, action)
611-
} else if (isFormButtonCodeTest(action.id)) {
612-
this.codeTestChatConnector.onFormButtonClick(tabId, messageId, action)
613-
} else if (action.id === 'doc') {
614-
this.docChatConnector.onFormButtonClick(tabId, action)
615-
}
616-
switch (this.tabsStorage.getTab(tabId)?.type) {
617-
case 'cwc':
618-
if (action.id === `open-settings`) {
619-
this.sendMessageToExtension({
620-
command: 'open-settings',
621-
type: '',
622-
tabType: 'cwc',
623-
})
624-
}
625-
break
626-
}
627-
}
628606
}

0 commit comments

Comments
 (0)