Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aws/mynah-ui",
"displayName": "AWS Mynah UI",
"version": "4.0.4",
"version": "4.1.0",
"description": "AWS Toolkit VSCode and Intellij IDE Extension Mynah UI",
"publisher": "Amazon Web Services",
"license": "Apache License 2.0",
Expand Down
15 changes: 13 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,9 @@ export class MynahUI {
};

/**
* Updates the body of the last ChatItemType.ANSWER_STREAM chat item
* @param body new body stream as string.
* Updates the last ChatItemType.ANSWER_STREAM chat item
* @param tabId Corresponding tab ID.
* @param updateWith ChatItem object to update with.
*/
public updateLastChatAnswer = (tabId: string, updateWith: Partial<ChatItem>): void => {
if (MynahUITabsStore.getInstance().getTab(tabId) !== null) {
Expand Down Expand Up @@ -396,6 +397,16 @@ export class MynahUI {
*/
public getAllTabs = (): MynahUITabStoreModel => MynahUITabsStore.getInstance().getAllTabs();

/**
* If exists, switch to a different tab
* @param tabId Tab ID to switch to
*/
public changeSelectedTab = (tabId: string): void => {
if (MynahUITabsStore.getInstance().getTab(tabId) !== null) {
MynahUITabsStore.getInstance().selectTab(tabId);
}
};

/**
* Simply creates and shows a notification
* @param props NotificationProps
Expand Down