@aws/mynah-ui 1.4.0 → 2.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/static.d.ts CHANGED
@@ -5,17 +5,23 @@
5
5
  import { ToggleOption } from './components/toggle';
6
6
  export interface MynahUIDataModel {
7
7
  loading?: boolean;
8
+ loadingChat?: boolean;
9
+ showChatAvatars?: boolean;
8
10
  liveSearchState?: LiveSearchState;
9
11
  liveSearchAnimation?: boolean;
10
12
  query?: string;
13
+ chatMessageOnTopOfSearchResults?: string;
11
14
  code?: string;
12
15
  codeSelection?: SearchPayloadCodeSelection;
13
16
  codeQuery?: SearchPayloadCodeQuery;
14
17
  matchPolicy?: SearchPayloadMatchPolicy;
15
18
  invisibleContextItems?: string[];
16
19
  navigationTabs?: ToggleOption[];
20
+ sideNavigationTabs?: ToggleOption[];
17
21
  userAddedContext?: string[];
22
+ mode?: MynahMode;
18
23
  suggestions?: Suggestion[];
24
+ chatItems?: ChatItem[];
19
25
  autoCompleteSuggestions?: AutocompleteItem[];
20
26
  searchHistory?: SearchHistoryItem[];
21
27
  showingHistoricalSearch?: boolean;
@@ -39,10 +45,18 @@ export declare enum MynahEventNames {
39
45
  SUGGESTION_OPEN = "suggestionOpen",
40
46
  SUGGESTION_LINK_COPY = "suggestionLinkCopy",
41
47
  SUGGESTION_ENGAGEMENT = "suggestionEngagement",
42
- SUGGESTION_COPY_TO_CLIPBOARD = "suggestionCopyToClipboard"
48
+ SUGGESTION_COPY_TO_CLIPBOARD = "suggestionCopyToClipboard",
49
+ CHAT_PROMPT = "chatPrompt",
50
+ FOLLOW_UP_CLICKED = "followUpClicked",
51
+ SUGGESTION_ATTACHED_TO_CHAT = "suggestionAttachedToChat",
52
+ UPDATE_LAST_CHAT_ANSWER_STREAM = "updateLastChatAnswerStream",
53
+ CLEAR_CHAT = "clearChat",
54
+ SHOW_MORE_WEB_RESULTS_CLICK = "showMoreWebResultsClick",
55
+ SHOW_FEEDBACK_FORM_CLICK = "showFeedbackFormClick"
43
56
  }
44
57
  export declare const MynahPortalNames: {
45
58
  WRAPPER: string;
59
+ SIDE_NAV: string;
46
60
  OVERLAY: string;
47
61
  FEEDBACK_FORM: string;
48
62
  };
@@ -110,6 +124,42 @@ export interface Suggestion {
110
124
  type?: string;
111
125
  metadata?: SuggestionMetaDataUnion | CanonicalExample;
112
126
  }
127
+ export declare enum ChatItemType {
128
+ PROMPT = "prompt",
129
+ SYSTEM_PROMPT = "system-prompt",
130
+ AI_PROMPT = "ai-prompt",
131
+ ANSWER = "answer",
132
+ ANSWER_STREAM = "answer-stream",
133
+ ANSWER_PART = "answer-part"
134
+ }
135
+ export interface ChatItem {
136
+ body?: string;
137
+ type: ChatItemType;
138
+ followUp?: {
139
+ text?: string;
140
+ options?: ChatItemFollowUp[];
141
+ };
142
+ relatedContent?: {
143
+ title: string | boolean;
144
+ content: Suggestion[];
145
+ };
146
+ suggestions?: {
147
+ title: string | boolean;
148
+ suggestions: Suggestion[];
149
+ };
150
+ }
151
+ export interface ChatPrompt {
152
+ prompt: string;
153
+ attachment?: Suggestion;
154
+ }
155
+ export interface ChatItemFollowUp extends ChatPrompt {
156
+ type: string;
157
+ pillText: string;
158
+ }
159
+ export declare enum MynahMode {
160
+ CHAT = "chat",
161
+ SEARCH = "search"
162
+ }
113
163
  export declare enum KeyMap {
114
164
  ESCAPE = "Escape",
115
165
  ENTER = "Enter",
@@ -3,6 +3,10 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  declare const en: {
6
+ limitByUrl: string;
7
+ relatedContent: string;
8
+ chatPromptInputPlaceholder: string;
9
+ chatPromptInputFollowUpPlaceholder: string;
6
10
  searchInputAPIHelpPlaceholder: string;
7
11
  searchInputMynahPlaceholder: string;
8
12
  };
@@ -5,6 +5,10 @@
5
5
  export declare class I18N {
6
6
  private static instance;
7
7
  texts: {
8
+ limitByUrl: string;
9
+ relatedContent: string;
10
+ chatPromptInputPlaceholder: string;
11
+ chatPromptInputFollowUpPlaceholder: string;
8
12
  searchInputAPIHelpPlaceholder: string;
9
13
  searchInputMynahPlaceholder: string;
10
14
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws/mynah-ui",
3
3
  "displayName": "AWS Mynah UI",
4
- "version": "1.4.0",
4
+ "version": "2.0.0-beta.1",
5
5
  "description": "AWS Tookit VSCode and Intellij IDE Extension Mynah UI",
6
6
  "publisher": "Amazon Web Services",
7
7
  "license": "Apache License 2.0",
@@ -19,10 +19,13 @@
19
19
  "lint": "npx eslint \"./**\""
20
20
  },
21
21
  "dependencies": {
22
+ "@types/marked": "^5.0.1",
22
23
  "i18n-ts": "1.0.5",
24
+ "marked": "^7.0.3",
23
25
  "prismjs": "1.29.0"
24
26
  },
25
27
  "devDependencies": {
28
+ "@typescript-eslint/eslint-plugin": "5.34.0",
26
29
  "@types/eslint": "7.2.13",
27
30
  "@types/eslint-scope": "3.7.0",
28
31
  "@types/estree": "0.0.49",
@@ -30,7 +33,6 @@
30
33
  "@types/json-schema": "7.0.7",
31
34
  "@types/node": "17.0.29",
32
35
  "@types/prismjs": "1.26.0",
33
- "@typescript-eslint/eslint-plugin": "5.34.0",
34
36
  "css-loader": "6.6.0",
35
37
  "eslint": "8.22.0",
36
38
  "eslint-config-prettier": "^8.5.0",