Skip to content

Commit 8958541

Browse files
committed
Code Clean up2
1 parent 3fad124 commit 8958541

File tree

8 files changed

+14
-15
lines changed

8 files changed

+14
-15
lines changed

packages/core/src/amazonq/webview/ui/apps/scanChatConnector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ export class Connector {
118118
}
119119
}
120120

121-
transform = (tabID: string): void => {
121+
scan = (tabID: string): void => {
122122
this.sendMessageToExtension({
123123
tabID: tabID,
124124
command: 'scan',
125-
chatMessage: 'transform',
125+
chatMessage: '',
126126
tabType: 'scan',
127127
})
128128
}

packages/core/src/amazonq/webview/ui/connector.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ export class Connector {
159159
this.gumbyChatConnector.transform(tabID)
160160
}
161161

162-
transformScans = (tabID: string): void => {
163-
this.scanChatConnector.transform(tabID)
162+
scans = (tabID: string): void => {
163+
this.scanChatConnector.scan(tabID)
164164
}
165165

166166
handleMessageReceive = async (message: MessageEvent): Promise<void> => {
@@ -181,6 +181,8 @@ export class Connector {
181181
await this.featureDevChatConnector.handleMessageReceive(messageData)
182182
} else if (messageData.sender === 'gumbyChat') {
183183
await this.gumbyChatConnector.handleMessageReceive(messageData)
184+
} else if (messageData.sender === 'scanChat') {
185+
await this.scanChatConnector.handleMessageReceive(messageData)
184186
}
185187
}
186188

packages/core/src/amazonq/webview/ui/quickActions/generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export class QuickActionGenerator {
8383
},
8484
scan: {
8585
description: "This command isn't available in /scan",
86-
unavailableItems: ['/dev', '/scan'],
86+
unavailableItems: ['/dev', '/scan', '/transform'],
8787
},
8888
unknown: {
8989
description: '',

packages/core/src/amazonq/webview/ui/quickActions/handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export class QuickActionHandler {
163163
loadingChat: true,
164164
})
165165

166-
this.connector.transformScans(affectedTabId)
166+
this.connector.scans(affectedTabId)
167167
}
168168
}
169169

packages/core/src/amazonq/webview/ui/tabs/constants.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ To get started, describe the task you are trying to accomplish.`,
3838
I can help you upgrade your Java 8 and 11 codebases to Java 17.`,
3939
},
4040
scan: {
41-
title: 'Q - Security Scans',
41+
title: 'Q - Scan',
4242
placeholder: 'Open a new tab to chat with Q',
43-
welcome: `Welcome to Q Security Scans!
44-
45-
I can help you Security Scans`,
43+
welcome: `Hi, I'm Amazon Q. I can answer your software development questions.
44+
Ask me to explain, debug, or optimize your code.
45+
You can enter \`/\` to see a list of quick actions. Add @workspace to beginning of your message to include your entire workspace as context.`,
4646
},
4747
}

packages/core/src/amazonqGumby/chat/controller/controller.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ export class GumbyController {
327327
await cleanupTransformationJob()
328328
break
329329
case ButtonActions.CONFIRM_START_TRANSFORMATION_FLOW:
330-
void vscode.window.setStatusBarMessage('Running Project scan Gumby')
331330
this.resetTransformationChatFlow()
332331
this.messenger.sendCommandMessage({ ...message, command: GumbyCommands.CLEAR_CHAT })
333332
await this.transformInitiated(message)

packages/core/src/amazonqGumby/chat/views/actions/uiMessageListener.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import { MessageListener } from '../../../../amazonq/messages/messageListener'
77
import { ExtensionMessage } from '../../../../amazonq/webview/ui/commands'
88
import { ChatControllerEventEmitters } from '../../controller/controller'
9-
// import * as vscode from 'vscode'
109

1110
type UIMessage = ExtensionMessage & {
1211
tabID?: string
@@ -65,7 +64,6 @@ export class UIMessageListener {
6564
}
6665

6766
private transform(msg: UIMessage) {
68-
// void vscode.window.setStatusBarMessage('Got to Gumby side')
6967
this.gumbyControllerEventsEmitters?.transformSelected.fire({
7068
tabID: msg.tabID,
7169
})

packages/core/src/amazonqGumby/chat/views/connector/connector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import { gumbyChat } from '../../../models/constants' //TODO
6+
import { gumbyChat } from '../../../models/constants'
77
import { AuthFollowUpType } from '../../../../amazonq/auth/model'
88
import { MessagePublisher } from '../../../../amazonq/messages/messagePublisher'
99
import { ChatItemButton, ChatItemFormItem } from '@aws/mynah-ui/dist/static'
10-
import { GumbyCommands } from '../../controller/messenger/messengerUtils' //TODO
10+
import { GumbyCommands } from '../../controller/messenger/messengerUtils'
1111
import { ChatItemType } from '../../../../amazonq/commons/model'
1212

1313
export type GumbyMessageType =

0 commit comments

Comments
 (0)