Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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": "Amazon Q /dev: fix for stop button showing for Gumby"
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ interface ChatPayload {
export interface ConnectorProps {
sendMessageToExtension: (message: ExtensionMessage) => void
onMessageReceived?: (tabID: string, messageData: any, needToShowAPIDocsTab: boolean) => void
onAsyncEventProgress: (tabID: string, inProgress: boolean, message: string) => void
onAsyncEventProgress: (
tabID: string,
inProgress: boolean,
message: string,
messageId: string | undefined,
enableStopAction: boolean
) => void
onChatAnswerReceived?: (tabID: string, message: ChatItem, messageData: any) => void
sendFeedback?: (tabId: string, feedbackPayload: FeedbackPayload) => void | undefined
onError: (tabID: string, message: string, title: string) => void
Expand Down Expand Up @@ -246,7 +252,14 @@ export class Connector {
}

if (messageData.type === 'asyncEventProgressMessage') {
this.onAsyncEventProgress(messageData.tabID, messageData.inProgress, messageData.message ?? undefined)
const enableStopAction = true
this.onAsyncEventProgress(
messageData.tabID,
messageData.inProgress,
messageData.message ?? undefined,
messageData.messageId ?? undefined,
enableStopAction
)
return
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ import { ChatPayload } from '../connector'
export interface ConnectorProps {
sendMessageToExtension: (message: ExtensionMessage) => void
onMessageReceived?: (tabID: string, messageData: any, needToShowAPIDocsTab: boolean) => void
onAsyncEventProgress: (tabID: string, inProgress: boolean, message: string, messageId: string) => void
onAsyncEventProgress: (
tabID: string,
inProgress: boolean,
message: string,
messageId: string,
enableStopAction: boolean
) => void
onChatAnswerReceived?: (tabID: string, message: ChatItem, messageData: any) => void
onChatAnswerUpdated?: (tabID: string, message: ChatItem) => void
onQuickHandlerCommand: (tabID: string, command: string, eventId?: string) => void
Expand Down Expand Up @@ -196,7 +202,8 @@ export class Connector {
messageData.tabID,
messageData.inProgress,
messageData.message,
messageData.messageId
messageData.messageId,
false
)
break
case 'authNeededException':
Expand Down
5 changes: 3 additions & 2 deletions packages/core/src/amazonq/webview/ui/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,14 @@ export const createMynahUI = (
tabID: string,
inProgress: boolean,
message: string | undefined,
messageId: string | undefined = undefined
messageId: string | undefined = undefined,
enableStopAction: boolean = false
) => {
if (inProgress) {
mynahUI.updateStore(tabID, {
loadingChat: true,
promptInputDisabledState: true,
cancelButtonWhenLoading: true,
cancelButtonWhenLoading: enableStopAction,
})

if (message && messageId) {
Expand Down
Loading