Skip to content

Commit 668a58c

Browse files
authored
refactor(amazonq): removing mynah-ui code for /agents implementation (#6082)
1 parent ab7288d commit 668a58c

File tree

21 files changed

+3
-1607
lines changed

21 files changed

+3
-1607
lines changed

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/Browser.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,8 @@ class Browser(parent: Disposable, private val mynahAsset: Path, val project: Pro
123123
const hybridChatConnector = connectorAdapter.initiateAdapter(
124124
${MeetQSettings.getInstance().reinvent2024OnboardingCount < MAX_ONBOARDING_PAGE_COUNT},
125125
${MeetQSettings.getInstance().disclaimerAcknowledged},
126-
true,
127126
$isCodeTransformAvailable,
128-
true,
129127
$isCodeScanAvailable,
130-
true,
131128
{
132129
postMessage: message => { $postMessageToJavaJsCode }
133130
},

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/BrowserConnector.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,11 +703,8 @@ class BrowserConnector(
703703
const tempConnector = connectorAdapter.initiateAdapter(
704704
false,
705705
true, // the two values are not used here, needed for constructor
706-
true,
707706
$isCodeTransformAvailable,
708-
true,
709707
$isCodeScanAvailable,
710-
true,
711708
{ postMessage: () => {} },
712709
);
713710

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

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,13 @@ import { ChatClientAdapter, ChatEventHandler } from '@aws/chat-client'
1010

1111
export const initiateAdapter = (showWelcomePage: boolean,
1212
disclaimerAcknowledged: boolean,
13-
isFeatureDevEnabled: boolean,
1413
isCodeTransformEnabled: boolean,
15-
isDocEnabled: boolean,
1614
isCodeScanEnabled: boolean,
17-
isCodeTestEnabled: boolean,
1815
ideApiPostMessage: (message: any) => void,
1916
highlightCommand?: QuickActionCommand,
2017
profileName?: string,
2118
) : HybridChatAdapter => {
22-
return new HybridChatAdapter(showWelcomePage, disclaimerAcknowledged, isFeatureDevEnabled, isCodeTransformEnabled, isDocEnabled, isCodeScanEnabled, isCodeTestEnabled, ideApiPostMessage, highlightCommand, profileName)
19+
return new HybridChatAdapter(showWelcomePage, disclaimerAcknowledged, isCodeTransformEnabled, isCodeScanEnabled, ideApiPostMessage, highlightCommand, profileName)
2320
}
2421

2522
// Ref: https://github.com/aws/aws-toolkit-vscode/blob/e9ea8082ffe0b9968a873437407d0b6b31b9e1a5/packages/core/src/amazonq/webview/ui/connectorAdapter.ts#L14
@@ -32,11 +29,8 @@ export class HybridChatAdapter implements ChatClientAdapter {
3229

3330
private showWelcomePage: boolean,
3431
private disclaimerAcknowledged: boolean,
35-
private isFeatureDevEnabled: boolean,
3632
private isCodeTransformEnabled: boolean,
37-
private isDocEnabled: boolean,
3833
private isCodeScanEnabled: boolean,
39-
private isCodeTestEnabled: boolean,
4034
private ideApiPostMessage: (message: any) => void,
4135
private highlightCommand?: QuickActionCommand,
4236
private profileName?: string,
@@ -55,11 +49,8 @@ export class HybridChatAdapter implements ChatClientAdapter {
5549
mynahUIRef: this.mynahUIRef,
5650
showWelcomePage: this.showWelcomePage,
5751
disclaimerAcknowledged: this.disclaimerAcknowledged,
58-
isFeatureDevEnabled: this.isFeatureDevEnabled,
5952
isCodeTransformEnabled: this.isCodeTransformEnabled,
60-
isDocEnabled: this.isDocEnabled,
6153
isCodeScanEnabled: this.isCodeScanEnabled,
62-
isCodeTestEnabled: this.isCodeTestEnabled,
6354
highlightCommand: this.highlightCommand,
6455
profileName: this.profileName,
6556
hybridChat: true,
@@ -86,10 +77,6 @@ export class HybridChatAdapter implements ChatClientAdapter {
8677

8778
isSupportedQuickAction(command: string): boolean {
8879
return (
89-
command === '/dev' ||
90-
command === '/test' ||
91-
command === '/review' ||
92-
command === '/doc' ||
9380
command === '/transform'
9481
)
9582
}
@@ -100,11 +87,8 @@ export class HybridChatAdapter implements ChatClientAdapter {
10087

10188
get initialQuickActions(): QuickActionCommandGroup[] {
10289
const tabDataGenerator = new TabDataGenerator({
103-
isFeatureDevEnabled: this.isFeatureDevEnabled,
10490
isCodeTransformEnabled: this.isCodeTransformEnabled,
105-
isDocEnabled: this.isDocEnabled,
10691
isCodeScanEnabled: this.isCodeScanEnabled,
107-
isCodeTestEnabled: this.isCodeTestEnabled,
10892
profileName: this.profileName
10993
})
11094
return tabDataGenerator.quickActionsGenerator.generateForTab('cwc') ?? []

plugins/amazonq/mynah-ui/src/mynah-ui/ui/apps/amazonqCommonsConnector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ChatItemAction, ChatPrompt } from '@aws/mynah-ui-chat'
77
import { AuthFollowUpType } from '../followUps/generator'
88
import { ExtensionMessage } from '../commands'
99
import {getTabCommandFromTabType, isTabType, TabType } from '../storages/tabsStorage'
10-
import {codeScanUserGuide, codeTestUserGuide, codeTransformUserGuide, docUserGuide, featureDevUserGuide} from "../texts/constants";
10+
import {codeScanUserGuide, codeTransformUserGuide} from "../texts/constants";
1111
import {createClickTelemetry, createOpenAgentTelemetry, Trigger} from "../telemetry/actions";
1212

1313
export type WelcomeFollowupType = 'continue-to-chat'

0 commit comments

Comments
 (0)