Skip to content

Commit dd7e211

Browse files
committed
setup commit
1 parent e761f78 commit dd7e211

File tree

8 files changed

+27
-10
lines changed

8 files changed

+27
-10
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class FollowUpInteractionHandler {
4848
this.mynahUI.updateStore(tabID, {
4949
loadingChat: true,
5050
cancelButtonWhenLoading: false,
51-
promptInputDisabledState: true,
51+
promptInputDisabledState: false,
5252
})
5353
this.mynahUI.addChatItem(tabID, {
5454
type: ChatItemType.PROMPT,

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export const createMynahUI = (
7676
body: 'This conversation has timed out after 48 hours. It will not be saved. Start a new conversation.',
7777
})
7878
mynahUI.updateStore(tabID, {
79-
promptInputDisabledState: true,
79+
promptInputDisabledState: false,
8080
promptInputPlaceholder: 'Session ended.',
8181
})
8282
},
@@ -422,7 +422,7 @@ export const createMynahUI = (
422422
mynahUI.updateStore(tabID, {
423423
loadingChat: true,
424424
cancelButtonWhenLoading: false,
425-
promptInputDisabledState: true,
425+
promptInputDisabledState: false,
426426
})
427427

428428
tabsStorage.updateTabStatus(tabID, 'busy')
@@ -655,9 +655,10 @@ export const createMynahUI = (
655655
onTabChange: connector.onTabChange,
656656
// TODO: update mynah-ui this type doesn't seem correct https://github.com/aws/mynah-ui/blob/3777a39eb534a91fd6b99d6cf421ce78ee5c7526/src/main.ts#L372
657657
onStopChatResponse: (tabID: string) => {
658+
console.log('stop button clicked')
658659
mynahUI.updateStore(tabID, {
659660
loadingChat: false,
660-
promptInputDisabledState: false,
661+
promptInputDisabledState: true,
661662
})
662663
connector.onStopChatResponse(tabID)
663664
},

packages/core/src/amazonq/webview/ui/messages/controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class MessageController {
121121
this.mynahUI.updateStore(newTabID, {
122122
loadingChat: true,
123123
cancelButtonWhenLoading: false,
124-
promptInputDisabledState: true,
124+
promptInputDisabledState: false,
125125
})
126126

127127
// We have race condition here with onTabAdd Ui event. This way we need to update store twice to be sure

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ export class TextMessageHandler {
3636

3737
this.mynahUI.updateStore(tabID, {
3838
loadingChat: true,
39-
cancelButtonWhenLoading: false,
40-
promptInputDisabledState: true,
39+
cancelButtonWhenLoading: true,
40+
promptInputDisabledState: false,
4141
})
4242

4343
this.tabsStorage.updateTabStatus(tabID, 'busy')

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import { ChatItemType, MynahUIDataModel, QuickActionCommandGroup } from '@aws/mynah-ui'
6+
import { ChatItemType, MynahIcons, MynahUIDataModel, QuickActionCommandGroup } from '@aws/mynah-ui'
77
import { TabType } from '../storages/tabsStorage'
88
import { FollowUpGenerator } from '../followUps/generator'
99
import { QuickActionGenerator } from '../quickActions/generator'
@@ -72,6 +72,19 @@ export class TabDataGenerator {
7272
},
7373
]
7474
: [],
75+
promptInputOptions: [
76+
{
77+
type: 'radiogroup',
78+
id: 'stop-response',
79+
value: 'stop-response',
80+
options: [
81+
{
82+
value: 'stop-response',
83+
icon: MynahIcons.STOP,
84+
},
85+
],
86+
},
87+
],
7588
}
7689
return tabData
7790
}

packages/core/src/codewhisperer/client/codewhisperer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export interface CodeWhispererConfig {
3131
}
3232

3333
export const defaultServiceConfig: CodeWhispererConfig = {
34-
region: 'us-east-1',
35-
endpoint: 'https://codewhisperer.us-east-1.amazonaws.com/',
34+
region: 'us-west-2',
35+
endpoint: 'https://rts.alpha-us-west-2.codewhisperer.ai.aws.dev/',
3636
}
3737

3838
export function getCodewhispererConfig(): CodeWhispererConfig {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ export class ChatController {
367367

368368
private async processStopResponseMessage(message: StopResponseMessage) {
369369
const session = this.sessionStorage.getSession(message.tabID)
370+
console.log('stop process has been triggered')
370371
session.tokenSource.cancel()
371372
this.chatHistoryStorage.getTabHistory(message.tabID).clearRecentHistory()
372373
}
@@ -656,6 +657,7 @@ export class ChatController {
656657
return
657658
}
658659
session.setToolUse(undefined)
660+
console.log('session undefined in controller', toolUse)
659661

660662
const toolResults: ToolResult[] = []
661663

packages/core/src/codewhispererChat/view/messages/messageListener.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export class UIMessageListener {
7979
this.processTriggerTabIDReceived(msg)
8080
break
8181
case 'stop-response':
82+
console.log('this stop-response command in lsitenrer has been called')
8283
this.stopResponse(msg)
8384
break
8485
case 'chat-item-voted':

0 commit comments

Comments
 (0)