@aws/mynah-ui 4.11.2 → 4.13.0

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.
Files changed (140) hide show
  1. package/dist/components/button.d.ts +8 -6
  2. package/dist/components/card/card-body.d.ts +2 -5
  3. package/dist/components/card/card.d.ts +2 -1
  4. package/dist/components/chat-item/chat-item-buttons.d.ts +1 -1
  5. package/dist/components/chat-item/chat-item-card-content.d.ts +35 -0
  6. package/dist/components/chat-item/chat-item-card.d.ts +13 -18
  7. package/dist/components/chat-item/chat-item-form-items.d.ts +1 -0
  8. package/dist/components/chat-item/chat-item-relevance-vote.d.ts +1 -0
  9. package/dist/components/chat-item/chat-item-tree-view-wrapper.d.ts +1 -0
  10. package/dist/components/chat-item/chat-prompt-input.d.ts +10 -6
  11. package/dist/components/chat-item/chat-wrapper.d.ts +1 -0
  12. package/dist/components/chat-item/prompt-input/prompt-text-input.d.ts +10 -2
  13. package/dist/components/chat-item/prompt-input/send-button.d.ts +4 -5
  14. package/dist/components/collapsible-content.d.ts +1 -0
  15. package/dist/components/feedback-form/feedback-form.d.ts +1 -0
  16. package/dist/components/form-items/radio-group.d.ts +15 -1
  17. package/dist/components/form-items/select.d.ts +16 -1
  18. package/dist/components/form-items/stars.d.ts +1 -0
  19. package/dist/components/form-items/text-area.d.ts +15 -1
  20. package/dist/components/form-items/text-input.d.ts +16 -2
  21. package/dist/components/icon.d.ts +1 -0
  22. package/dist/components/navigation-tabs.d.ts +1 -0
  23. package/dist/components/no-tabs.d.ts +1 -0
  24. package/dist/components/notification.d.ts +1 -0
  25. package/dist/components/overlay.d.ts +1 -0
  26. package/dist/components/syntax-highlighter.d.ts +2 -0
  27. package/dist/components/toggle.d.ts +1 -0
  28. package/dist/helper/config.d.ts +2 -1
  29. package/dist/helper/dom.d.ts +2 -0
  30. package/dist/main.d.ts +9 -1
  31. package/dist/main.js +1 -1
  32. package/dist/main.js.map +1 -1
  33. package/dist/static.d.ts +21 -1
  34. package/docs/CONFIG.md +311 -0
  35. package/docs/DATAMODEL.md +2078 -0
  36. package/docs/DEVELOPER.md +499 -0
  37. package/docs/PROPERTIES.md +863 -0
  38. package/docs/STARTUP.md +51 -0
  39. package/docs/STYLING.md +195 -0
  40. package/docs/USAGE.md +502 -0
  41. package/docs/img/code-attachment.png +0 -0
  42. package/docs/img/customForm.png +0 -0
  43. package/docs/img/data-model/chatItems/actions.png +0 -0
  44. package/docs/img/data-model/chatItems/answer.png +0 -0
  45. package/docs/img/data-model/chatItems/answerStream.png +0 -0
  46. package/docs/img/data-model/chatItems/body.png +0 -0
  47. package/docs/img/data-model/chatItems/canBeVoted.png +0 -0
  48. package/docs/img/data-model/chatItems/codeInsertAndCopyButtons.png +0 -0
  49. package/docs/img/data-model/chatItems/codeReference-1.png +0 -0
  50. package/docs/img/data-model/chatItems/codeReference-2.png +0 -0
  51. package/docs/img/data-model/chatItems/codeResult.png +0 -0
  52. package/docs/img/data-model/chatItems/customRenderer_html.png +0 -0
  53. package/docs/img/data-model/chatItems/customRenderer_json.png +0 -0
  54. package/docs/img/data-model/chatItems/followUp-1.png +0 -0
  55. package/docs/img/data-model/chatItems/followUp-2.png +0 -0
  56. package/docs/img/data-model/chatItems/icon.png +0 -0
  57. package/docs/img/data-model/chatItems/notification-1.png +0 -0
  58. package/docs/img/data-model/chatItems/notification-2.png +0 -0
  59. package/docs/img/data-model/chatItems/notification-3.png +0 -0
  60. package/docs/img/data-model/chatItems/notification-4.png +0 -0
  61. package/docs/img/data-model/chatItems/options-all-filled.png +0 -0
  62. package/docs/img/data-model/chatItems/options-mandatory-filled.png +0 -0
  63. package/docs/img/data-model/chatItems/options-submitted.png +0 -0
  64. package/docs/img/data-model/chatItems/options.png +0 -0
  65. package/docs/img/data-model/chatItems/prompt.png +0 -0
  66. package/docs/img/data-model/chatItems/relatedContent-1.png +0 -0
  67. package/docs/img/data-model/chatItems/relatedContent-2.png +0 -0
  68. package/docs/img/data-model/chatItems/relatedContent-3.png +0 -0
  69. package/docs/img/data-model/chatItems/status.png +0 -0
  70. package/docs/img/data-model/chatItems/systemPrompt.png +0 -0
  71. package/docs/img/data-model/tabStore/contextCommands.png +0 -0
  72. package/docs/img/data-model/tabStore/loadingChat-1.png +0 -0
  73. package/docs/img/data-model/tabStore/loadingChat-2.png +0 -0
  74. package/docs/img/data-model/tabStore/promptInputDisabledState.png +0 -0
  75. package/docs/img/data-model/tabStore/promptInputPlaceholder.png +0 -0
  76. package/docs/img/data-model/tabStore/promptInputStickyCard.png +0 -0
  77. package/docs/img/data-model/tabStore/quickActionCommands.png +0 -0
  78. package/docs/img/data-model/tabStore/selectedCodeSnippet.png +0 -0
  79. package/docs/img/data-model/tabStore/stopChatResponse.png +0 -0
  80. package/docs/img/data-model/tabStore/tabBarButtons1.png +0 -0
  81. package/docs/img/data-model/tabStore/tabBarButtons2.png +0 -0
  82. package/docs/img/data-model/tabStore/tabTitle.png +0 -0
  83. package/docs/img/developer/comp0.png +0 -0
  84. package/docs/img/developer/comp1.png +0 -0
  85. package/docs/img/developer/comp2.png +0 -0
  86. package/docs/img/feedbackOptions.png +0 -0
  87. package/docs/img/maxTabs1.png +0 -0
  88. package/docs/img/noPrompt.png +0 -0
  89. package/docs/img/notification.png +0 -0
  90. package/docs/img/onBeforeTabRemove.png +0 -0
  91. package/docs/img/onBodyActionClicked.png +0 -0
  92. package/docs/img/onChatItemEngagement.png +0 -0
  93. package/docs/img/onChatPrompt.png +0 -0
  94. package/docs/img/onCodeInsertToCursorPosition.png +0 -0
  95. package/docs/img/onCopyCodeToClipboard.png +0 -0
  96. package/docs/img/onCustomFormAction.png +0 -0
  97. package/docs/img/onFileActionClick.png +0 -0
  98. package/docs/img/onFollowupClicked.png +0 -0
  99. package/docs/img/onInfoLinkClick.png +0 -0
  100. package/docs/img/onLinkClick.png +0 -0
  101. package/docs/img/onOpenDiff.png +0 -0
  102. package/docs/img/onSendFeedback-1.png +0 -0
  103. package/docs/img/onSendFeedback-2.png +0 -0
  104. package/docs/img/onSendFeedback-3.png +0 -0
  105. package/docs/img/onShowMoreClick.png +0 -0
  106. package/docs/img/onSourceLinkClick.png +0 -0
  107. package/docs/img/onStopChatResponse.png +0 -0
  108. package/docs/img/onTabAdd.png +0 -0
  109. package/docs/img/onTabChange.png +0 -0
  110. package/docs/img/onTabRemove.png +0 -0
  111. package/docs/img/onVote.png +0 -0
  112. package/docs/img/prompt-with-code-attached.png +0 -0
  113. package/docs/img/splash.gif +0 -0
  114. package/docs/img/texts/codeFileSuggestions.png +0 -0
  115. package/docs/img/texts/copyInsertToCursor.png +0 -0
  116. package/docs/img/texts/feedbackForm.png +0 -0
  117. package/docs/img/texts/fileTreeTitle.png +0 -0
  118. package/docs/img/texts/mainTitle.png +0 -0
  119. package/docs/img/texts/noMoreTabs.png +0 -0
  120. package/docs/img/texts/noTabsOpen.png +0 -0
  121. package/docs/img/texts/pleaseSelect.png +0 -0
  122. package/docs/img/texts/spinnerText.png +0 -0
  123. package/docs/img/texts/stopGenerating.png +0 -0
  124. package/docs/img/texts/tabCloseConfirmation.png +0 -0
  125. package/docs/img/texts/voteAndSourceActions.png +0 -0
  126. package/docs/img/theming-1.png +0 -0
  127. package/docs/img/theming-2.png +0 -0
  128. package/package.json +2 -2
  129. package/dist/__test__/main.spec.d.ts +0 -1
  130. package/dist/components/__test__/button.spec.d.ts +0 -1
  131. package/dist/components/__test__/chat-item/chat-item-followup.spec.d.ts +0 -1
  132. package/dist/components/__test__/chat-item/chat-prompt-input.spec.d.ts +0 -1
  133. package/dist/components/__test__/feedback-form/feedback-form.spec.d.ts +0 -1
  134. package/dist/components/__test__/notification.spec.d.ts +0 -1
  135. package/dist/components/__test__/syntax-highlighter.spec.d.ts +0 -1
  136. package/dist/components/__test__/toggle.spec.d.ts +0 -1
  137. package/dist/helper/__test__/date-time.spec.d.ts +0 -1
  138. package/dist/helper/__test__/dom.spec.d.ts +0 -1
  139. package/dist/helper/__test__/events.spec.d.ts +0 -1
  140. package/dist/helper/__test__/file-tree.spec.d.ts +0 -1
package/dist/static.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import { MynahIcons } from './components/icon';
6
6
  import { ChatItemBodyRenderer } from './helper/dom';
7
+ import { SelectAbstract, SelectProps, RadioGroupAbstract, RadioGroupProps, ButtonAbstract, ButtonProps, TextInputProps, TextInputAbstract, TextAreaProps, TextAreaAbstract } from './main';
7
8
  export interface QuickActionCommand {
8
9
  command: string;
9
10
  disabled?: boolean;
@@ -51,6 +52,10 @@ export interface MynahUIDataModel {
51
52
  */
52
53
  quickActionCommands?: QuickActionCommandGroup[];
53
54
  /**
55
+ * Context commands to show when user hits @ to the input any point
56
+ */
57
+ contextCommands?: QuickActionCommandGroup[];
58
+ /**
54
59
  * Placeholder to be shown on prompt input
55
60
  */
56
61
  promptInputPlaceholder?: string;
@@ -191,7 +196,7 @@ export interface ChatItem {
191
196
  }
192
197
  export interface ChatItemFormItem {
193
198
  id: string;
194
- type: 'select' | 'textarea' | 'textinput' | 'numericinput' | 'stars' | 'radiogroup';
199
+ type: 'select' | 'textarea' | 'textinput' | 'numericinput' | 'stars' | 'radiogroup' | 'email';
195
200
  mandatory?: boolean;
196
201
  title?: string;
197
202
  placeholder?: string;
@@ -205,6 +210,7 @@ export interface ChatPrompt {
205
210
  prompt?: string;
206
211
  escapedPrompt?: string;
207
212
  command?: string;
213
+ context?: string[];
208
214
  }
209
215
  export interface ChatItemAction extends ChatPrompt {
210
216
  type?: string;
@@ -262,6 +268,7 @@ export declare enum KeyMap {
262
268
  SHIFT = "Shift",
263
269
  CONTROL = "Control",
264
270
  ALT = "Alt",
271
+ AT = "@",
265
272
  SLASH = "/",
266
273
  BACK_SLASH = "\\"
267
274
  }
@@ -361,6 +368,17 @@ export interface ConfigTexts {
361
368
  noTabsOpen: string;
362
369
  openNewTab: string;
363
370
  }
371
+ type PickMatching<T, V> = {
372
+ [K in keyof T as T[K] extends V ? K : never]: T[K];
373
+ };
374
+ type ExtractMethods<T> = PickMatching<T, any>;
375
+ export interface ComponentOverrides {
376
+ Button?: new (props: ButtonProps) => ExtractMethods<ButtonAbstract>;
377
+ RadioGroup?: new (props: RadioGroupProps) => ExtractMethods<RadioGroupAbstract>;
378
+ Select?: new (props: SelectProps) => ExtractMethods<SelectAbstract>;
379
+ TextInput?: new (props: TextInputProps) => ExtractMethods<TextInputAbstract>;
380
+ TextArea?: new (props: TextAreaProps) => ExtractMethods<TextAreaAbstract>;
381
+ }
364
382
  export interface ConfigOptions {
365
383
  feedbackOptions: Array<{
366
384
  label: string;
@@ -376,7 +394,9 @@ export interface ConfigOptions {
376
394
  }
377
395
  export interface ConfigModel extends ConfigOptions {
378
396
  texts: Partial<ConfigTexts>;
397
+ componentOverrides: Partial<ComponentOverrides>;
379
398
  }
380
399
  export interface CardRenderDetails {
381
400
  totalNumberOfCodeBlocks?: number;
382
401
  }
402
+ export {};
package/docs/CONFIG.md ADDED
@@ -0,0 +1,311 @@
1
+ # MynahUI Config
2
+
3
+ You can set the config from the constructor parameters while creating a new instance of `mynah-ui`.
4
+
5
+ _**Note:** You cannot set it on runtime. It is getting used just once during the initialization._
6
+
7
+ ```typescript
8
+ ...
9
+ interface ConfigModel {
10
+ // Do not forget that you have to provide all of them
11
+ // Config allows partial set of texts
12
+ texts: {
13
+ mainTitle?: string;
14
+ feedbackFormTitle?: string;
15
+ feedbackFormOptionsLabel?: string;
16
+ feedbackFormCommentLabel?: string;
17
+ feedbackThanks?: string;
18
+ feedbackReportButtonLabel?: string;
19
+ codeSuggestions?: string;
20
+ files?: string;
21
+ insertAtCursorLabel?: string;
22
+ copy?: string;
23
+ showMore?: string;
24
+ save?: string;
25
+ cancel?: string;
26
+ submit?: string;
27
+ pleaseSelect?: string;
28
+ stopGenerating?: string;
29
+ copyToClipboard?: string;
30
+ noMoreTabsTooltip?: string;
31
+ codeSuggestionWithReferenceTitle?: string;
32
+ spinnerText?: string;
33
+ tabCloseConfirmationMessage?: string;
34
+ tabCloseConfirmationKeepButton?: string;
35
+ tabCloseConfirmationCloseButton?: string;
36
+ noTabsOpen: string; // Supports markdown
37
+ openNewTab: string;
38
+ };
39
+ // Options to show up on the overlay feedback form
40
+ // after user clicks to downvote on a chat item
41
+ // and clicks 'Report' again
42
+ feedbackOptions: Array<{
43
+ label: string;
44
+ value: string;
45
+ }>;
46
+ tabBarButtons?: TabBarMainAction[]; // Tab bar buttons will be shown on the right of the tab
47
+ maxUserInput: number; // max number of chars for the input field
48
+ codeInsertToCursorEnabled?: boolean; // show or hide copy buttons on code blocks system wide
49
+ codeCopyToClipboardEnabled?: boolean; // show or hide insert to cursor buttons on code blocks system wide
50
+ autoFocus: boolean; // auto focuses to input panel after every action
51
+ maxTabs: number; // set 1 to hide tabs panel
52
+ showPromptField: boolean; // shows prompt field (default: true)
53
+ }
54
+ ...
55
+ ```
56
+ ---
57
+
58
+ <p><br/></p>
59
+
60
+
61
+ # `tabBarButtons`
62
+
63
+ You can put buttons on the right of the tab bar also with some inner buttons inside a menu. You can do it in two different ways. If you want the buttons globally available for every tab you can use the `tabBarButtons` in the config. If you want them set individually for different tabs check the **[DATAMODEL Documentation](./DATAMODEL.md#tabbarbuttons)**.
64
+
65
+ ```typescript
66
+ const mynahUI = new MynahUI({
67
+ ...
68
+ config: {
69
+ ...
70
+ tabBarButtons: [
71
+ {
72
+ id: 'clear',
73
+ description: 'Clear messages in this tab',
74
+ icon: MynahIcons.REFRESH,
75
+ },
76
+ {
77
+ id: 'multi',
78
+ icon: MynahIcons.ELLIPSIS,
79
+ items: [
80
+ {
81
+ id: 'menu-action-1',
82
+ text: 'Menu action 1!',
83
+ icon: MynahIcons.CHAT,
84
+ },
85
+ {
86
+ id: 'menu-action-2',
87
+ text: 'Menu action 2!',
88
+ icon: MynahIcons.CODE_BLOCK,
89
+ },
90
+ {
91
+ id: 'menu-action-3',
92
+ text: 'Menu action 3!'
93
+ }
94
+ ]
95
+ }
96
+ ]
97
+ }
98
+ ...
99
+ });
100
+ ```
101
+
102
+ <p align="center">
103
+ <img src="./img/data-model/tabStore/tabBarButtons1.png" alt="mainTitle" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
104
+ <br/>
105
+ <img src="./img/data-model/tabStore/tabBarButtons2.png" alt="mainTitle" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
106
+ </p>
107
+
108
+ ---
109
+
110
+
111
+
112
+ # `texts`
113
+ All static texts will be shown on UI.
114
+ Please take a look at each image to identify which text blongs to which item on UI.
115
+
116
+ ## mainTitle
117
+ Default tab title text if it is not set through store data for that tab.
118
+
119
+ <p align="center">
120
+ <img src="./img/texts/mainTitle.png" alt="mainTitle" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
121
+ </p>
122
+
123
+ ---
124
+
125
+ ## feedbackFormTitle, feedbackFormOptionsLabel, feedbackFormCommentLabel, submit, cancel
126
+ <p align="center">
127
+ <img src="./img/texts/feedbackForm.png" alt="feedbackForm" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
128
+ </p>
129
+
130
+
131
+ ---
132
+
133
+ ## fileTreeTitle, rootFolderTitle, feedbackFormCommentLabel, submit, cancel
134
+ <p align="center">
135
+ <img src="./img/texts/fileTreeTitle.png" alt="fileTree" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
136
+ </p>
137
+
138
+
139
+ ---
140
+
141
+ ## pleaseSelect
142
+ <p align="center">
143
+ <img src="./img/texts/pleaseSelect.png" alt="feedbackForm" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
144
+ </p>
145
+
146
+ ---
147
+
148
+ ## feedbackThanks, feedbackReportButtonLabel, showMore
149
+ <p align="center">
150
+ <img src="./img/texts/voteAndSourceActions.png" alt="voteAndSourceActions" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
151
+ </p>
152
+
153
+ ---
154
+
155
+ ## stopGenerating
156
+ <p align="center">
157
+ <img src="./img/texts/stopGenerating.png" alt="stopGenerating" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
158
+ </p>
159
+
160
+ ---
161
+
162
+ ## insertAtCursorLabel, copy
163
+ <p align="center">
164
+ <img src="./img/texts/copyInsertToCursor.png" alt="copyInsertToCursor" style="border-radius: 10px; max-width:500px; width:100%;border: 1px solid #e0e0e0;">
165
+ </p>
166
+
167
+ ---
168
+
169
+ ## codeSuggestions, files, codeSuggestionWithReferenceTitle
170
+ <p align="center">
171
+ <img src="./img/texts/codeFileSuggestions.png" alt="codeFileSuggestions" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
172
+ </p>
173
+
174
+ ---
175
+
176
+ ## spinnerText
177
+ <p align="center">
178
+ <img src="./img/texts/spinnerText.png" alt="spinnerText" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
179
+ </p>
180
+
181
+ ---
182
+
183
+ ## tabCloseConfirmationMessage, tabCloseConfirmationKeepButton, tabCloseConfirmationCloseButton
184
+ <p align="center">
185
+ <img src="./img/texts/tabCloseConfirmation.png" alt="tabCloseConfirmation" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
186
+ </p>
187
+
188
+ ---
189
+
190
+ ## noMoreTabsTooltip
191
+ <p align="center">
192
+ <img src="./img/texts/noMoreTabs.png" alt="noMoreTabsTooltip" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
193
+ </p>
194
+
195
+ ---
196
+
197
+ ## noTabsOpen, openNewTab
198
+ <p align="center">
199
+ <img src="./img/texts/noTabsOpen.png" alt="noTabsOpen" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
200
+ </p>
201
+
202
+ ---
203
+
204
+ <p><br/></p>
205
+
206
+ # `feedbackOptions`
207
+
208
+ Feedback type options to be shown on feedback form.
209
+ defaults:
210
+ ```typescript
211
+ ...
212
+ feedbackOptions: [
213
+ {
214
+ value: 'inaccurate-response',
215
+ label: 'Inaccurate response',
216
+ },
217
+ {
218
+ value: 'harmful-content',
219
+ label: 'Harmful content'
220
+ },
221
+ {
222
+ value: 'overlap',
223
+ label: 'Overlaps with existing content'
224
+ },
225
+ {
226
+ value: 'incorrect-syntax',
227
+ label: 'Incorrect syntax'
228
+ },
229
+ {
230
+ value: 'buggy-code',
231
+ label: 'Buggy code'
232
+ },
233
+ {
234
+ value: 'low-quality',
235
+ label: 'Low quality'
236
+ },
237
+ {
238
+ value: 'other',
239
+ label: 'Other'
240
+ }
241
+ ],
242
+ ...
243
+ ```
244
+
245
+ <p align="center">
246
+ <img src="./img/feedbackOptions.png" alt="feedbackOptions" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
247
+ </p>
248
+
249
+ ---
250
+
251
+ <p><br/></p>
252
+
253
+ # `maxTabs`
254
+ Maximum number of tabs user/system can open in a single instance of `mynah-ui`.
255
+
256
+ default: `1000`
257
+
258
+ An important note here is that if you provide **`1`** to maxTabs, it will not show the tab bar at all. However you still need to add a tab then initially to show a content.
259
+
260
+ And finally, if you try to add tabs more than given `maxTabs` amount while initializing the MynahUI with [Constructor Properties](./PROPERTIES.md), it will only generate the tabs till it reaches the `maxTabs` limit.
261
+
262
+ _Assume that you've provided `1` for `maxTabs`._
263
+
264
+
265
+ <p align="center">
266
+ <img src="./img/maxTabs1.png" alt="maxTabs1" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
267
+ </p>
268
+
269
+ ---
270
+
271
+ <p><br/></p>
272
+
273
+ # `autoFocus`
274
+ Just auto focus to prompt input field after every response arrival or initialization.
275
+
276
+ default: `true`
277
+
278
+ ---
279
+
280
+ <p><br/></p>
281
+
282
+ # `maxUserInput`
283
+ Max number of chars user can insert into the prompt field. But, as might know you can also add code attachments under the prompt field. A treshold of `96` chars will be automatically reduced from the `maxUserInput`.
284
+
285
+ **So beware that if you want 4000 chars exact, you need to give 4096 to the config.**
286
+
287
+ default: `4096`
288
+
289
+ ---
290
+
291
+ ## `codeInsertToCursorEnabled` and `codeCopyToClipboardEnabled` (default: true)
292
+ These two parameters allow you to make copy and insert buttons disabled system wide. If you want to disable it specifically for a message you can do it through `ChatItem` object. Please see [DATAMODEL Documentation](./DATAMODEL.md#codeinserttocursorenabled-and-codecopytoclipboardenabled-default-true).
293
+
294
+ <p align="center">
295
+ <img src="./img/data-model/chatItems/codeInsertAndCopyButtons.png" alt="codeInsertAndCopy" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
296
+ </p>
297
+
298
+ ---
299
+
300
+ <p><br/></p>
301
+
302
+ # `showPromptField`
303
+ Show or hide the prompt input field completely. You may want to hide the prompt field by setting `showPromptField` to `false` to make the chat work one way only. Just to provide answers or information.
304
+
305
+ default: `true`
306
+
307
+ _If you set `showPromptField` to `false`_
308
+
309
+ <p align="center">
310
+ <img src="./img/noPrompt.png" alt="noPrompt" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
311
+ </p>