@aws/mynah-ui 4.10.0-beta.6 → 4.10.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/__test__/main.spec.d.ts +1 -0
- package/dist/components/__test__/button.spec.d.ts +1 -0
- package/dist/components/__test__/chat-item/chat-item-followup.spec.d.ts +1 -0
- package/dist/components/__test__/chat-item/chat-prompt-input.spec.d.ts +1 -0
- package/dist/components/__test__/feedback-form/feedback-form.spec.d.ts +1 -0
- package/dist/components/__test__/notification.spec.d.ts +1 -0
- package/dist/components/__test__/syntax-highlighter.spec.d.ts +1 -0
- package/dist/components/__test__/toggle.spec.d.ts +1 -0
- package/dist/components/button.d.ts +6 -8
- package/dist/components/card/card-body.d.ts +0 -2
- package/dist/components/card/card.d.ts +1 -2
- package/dist/components/chat-item/chat-item-buttons.d.ts +0 -1
- package/dist/components/chat-item/chat-item-card.d.ts +18 -13
- package/dist/components/chat-item/chat-item-form-items.d.ts +0 -1
- package/dist/components/chat-item/chat-item-relevance-vote.d.ts +0 -1
- package/dist/components/chat-item/chat-item-tree-view-wrapper.d.ts +0 -1
- package/dist/components/chat-item/chat-wrapper.d.ts +0 -1
- package/dist/components/chat-item/prompt-input/send-button.d.ts +5 -4
- package/dist/components/collapsible-content.d.ts +0 -1
- package/dist/components/feedback-form/feedback-form.d.ts +0 -1
- package/dist/components/form-items/radio-group.d.ts +1 -15
- package/dist/components/form-items/select.d.ts +1 -16
- package/dist/components/form-items/stars.d.ts +0 -1
- package/dist/components/form-items/text-area.d.ts +1 -15
- package/dist/components/form-items/text-input.d.ts +2 -16
- package/dist/components/icon.d.ts +0 -1
- package/dist/components/navigation-tabs.d.ts +0 -1
- package/dist/components/notification.d.ts +0 -1
- package/dist/components/overlay.d.ts +0 -1
- package/dist/components/syntax-highlighter.d.ts +0 -2
- package/dist/components/toggle.d.ts +0 -1
- package/dist/helper/__test__/date-time.spec.d.ts +1 -0
- package/dist/helper/__test__/dom.spec.d.ts +1 -0
- package/dist/helper/__test__/events.spec.d.ts +1 -0
- package/dist/helper/__test__/file-tree.spec.d.ts +1 -0
- package/dist/helper/config.d.ts +1 -2
- package/dist/helper/dom.d.ts +0 -2
- package/dist/main.d.ts +6 -14
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/static.d.ts +1 -15
- package/package.json +1 -2
- package/cloudscape-wrapper/lib/main.d.ts +0 -3
- package/cloudscape-wrapper/lib/main.es.js +0 -25994
- package/cloudscape-wrapper/lib/main.js +0 -25999
- package/cloudscape-wrapper/package.json +0 -72
- package/dist/components/chat-item/chat-item-card-content.d.ts +0 -35
- package/docs/CONFIG.md +0 -311
- package/docs/DATAMODEL.md +0 -1988
- package/docs/DEVELOPER.md +0 -499
- package/docs/PROPERTIES.md +0 -862
- package/docs/STARTUP.md +0 -51
- package/docs/STYLING.md +0 -195
- package/docs/USAGE.md +0 -502
- package/docs/img/code-attachment.png +0 -0
- package/docs/img/customForm.png +0 -0
- package/docs/img/data-model/chatItems/actions.png +0 -0
- package/docs/img/data-model/chatItems/answer.png +0 -0
- package/docs/img/data-model/chatItems/answerStream.png +0 -0
- package/docs/img/data-model/chatItems/body.png +0 -0
- package/docs/img/data-model/chatItems/canBeVoted.png +0 -0
- package/docs/img/data-model/chatItems/codeInsertAndCopyButtons.png +0 -0
- package/docs/img/data-model/chatItems/codeReference-1.png +0 -0
- package/docs/img/data-model/chatItems/codeReference-2.png +0 -0
- package/docs/img/data-model/chatItems/codeResult.png +0 -0
- package/docs/img/data-model/chatItems/customRenderer_html.png +0 -0
- package/docs/img/data-model/chatItems/customRenderer_json.png +0 -0
- package/docs/img/data-model/chatItems/followUp-1.png +0 -0
- package/docs/img/data-model/chatItems/followUp-2.png +0 -0
- package/docs/img/data-model/chatItems/icon.png +0 -0
- package/docs/img/data-model/chatItems/notification-1.png +0 -0
- package/docs/img/data-model/chatItems/notification-2.png +0 -0
- package/docs/img/data-model/chatItems/notification-3.png +0 -0
- package/docs/img/data-model/chatItems/notification-4.png +0 -0
- package/docs/img/data-model/chatItems/options-all-filled.png +0 -0
- package/docs/img/data-model/chatItems/options-mandatory-filled.png +0 -0
- package/docs/img/data-model/chatItems/options-submitted.png +0 -0
- package/docs/img/data-model/chatItems/options.png +0 -0
- package/docs/img/data-model/chatItems/prompt.png +0 -0
- package/docs/img/data-model/chatItems/relatedContent-1.png +0 -0
- package/docs/img/data-model/chatItems/relatedContent-2.png +0 -0
- package/docs/img/data-model/chatItems/relatedContent-3.png +0 -0
- package/docs/img/data-model/chatItems/status.png +0 -0
- package/docs/img/data-model/chatItems/systemPrompt.png +0 -0
- package/docs/img/data-model/tabStore/loadingChat-1.png +0 -0
- package/docs/img/data-model/tabStore/loadingChat-2.png +0 -0
- package/docs/img/data-model/tabStore/promptInputDisabledState.png +0 -0
- package/docs/img/data-model/tabStore/promptInputPlaceholder.png +0 -0
- package/docs/img/data-model/tabStore/promptInputStickyCard.png +0 -0
- package/docs/img/data-model/tabStore/quickActionCommands.png +0 -0
- package/docs/img/data-model/tabStore/selectedCodeSnippet.png +0 -0
- package/docs/img/data-model/tabStore/stopChatResponse.png +0 -0
- package/docs/img/data-model/tabStore/tabBarButtons1.png +0 -0
- package/docs/img/data-model/tabStore/tabBarButtons2.png +0 -0
- package/docs/img/data-model/tabStore/tabTitle.png +0 -0
- package/docs/img/developer/comp0.png +0 -0
- package/docs/img/developer/comp1.png +0 -0
- package/docs/img/developer/comp2.png +0 -0
- package/docs/img/feedbackOptions.png +0 -0
- package/docs/img/maxTabs1.png +0 -0
- package/docs/img/noPrompt.png +0 -0
- package/docs/img/notification.png +0 -0
- package/docs/img/onBeforeTabRemove.png +0 -0
- package/docs/img/onBodyActionClicked.png +0 -0
- package/docs/img/onChatItemEngagement.png +0 -0
- package/docs/img/onChatPrompt.png +0 -0
- package/docs/img/onCodeInsertToCursorPosition.png +0 -0
- package/docs/img/onCopyCodeToClipboard.png +0 -0
- package/docs/img/onCustomFormAction.png +0 -0
- package/docs/img/onFileActionClick.png +0 -0
- package/docs/img/onFollowupClicked.png +0 -0
- package/docs/img/onInfoLinkClick.png +0 -0
- package/docs/img/onLinkClick.png +0 -0
- package/docs/img/onOpenDiff.png +0 -0
- package/docs/img/onSendFeedback-1.png +0 -0
- package/docs/img/onSendFeedback-2.png +0 -0
- package/docs/img/onSendFeedback-3.png +0 -0
- package/docs/img/onShowMoreClick.png +0 -0
- package/docs/img/onSourceLinkClick.png +0 -0
- package/docs/img/onStopChatResponse.png +0 -0
- package/docs/img/onTabAdd.png +0 -0
- package/docs/img/onTabChange.png +0 -0
- package/docs/img/onTabRemove.png +0 -0
- package/docs/img/onVote.png +0 -0
- package/docs/img/prompt-with-code-attached.png +0 -0
- package/docs/img/splash.gif +0 -0
- package/docs/img/texts/codeFileSuggestions.png +0 -0
- package/docs/img/texts/copyInsertToCursor.png +0 -0
- package/docs/img/texts/feedbackForm.png +0 -0
- package/docs/img/texts/fileTreeTitle.png +0 -0
- package/docs/img/texts/mainTitle.png +0 -0
- package/docs/img/texts/noMoreTabs.png +0 -0
- package/docs/img/texts/noTabsOpen.png +0 -0
- package/docs/img/texts/pleaseSelect.png +0 -0
- package/docs/img/texts/spinnerText.png +0 -0
- package/docs/img/texts/stopGenerating.png +0 -0
- package/docs/img/texts/tabCloseConfirmation.png +0 -0
- package/docs/img/texts/voteAndSourceActions.png +0 -0
- package/docs/img/theming-1.png +0 -0
- package/docs/img/theming-2.png +0 -0
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@aws/mynah-ui-cloudscape-wrapper",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"description": "MynahUI React wrapper with Cloudscape elements",
|
|
5
|
-
"author": "",
|
|
6
|
-
"license": "UNLICENSED",
|
|
7
|
-
"repository": "ssh://git.amazon.com/pkg/MynahUICloudscapeReact",
|
|
8
|
-
"homepage": "https://code.amazon.com/packages/MynahUICloudscapeReact",
|
|
9
|
-
"main": "lib/main.js",
|
|
10
|
-
"typeDefs": "lib/main.d.ts",
|
|
11
|
-
"module": "lib/main.es.js",
|
|
12
|
-
"jsnext:main": "lib/main.es.js",
|
|
13
|
-
"scripts": {
|
|
14
|
-
"clean": "rm -rf build out dist node_modules",
|
|
15
|
-
"test": "jest",
|
|
16
|
-
"testclean": "cross-env BABEL_ENV=test jest -u --passWithNoTests",
|
|
17
|
-
"build": "cross-env BABEL_ENV=production rollup -c",
|
|
18
|
-
"start": "cross-env BABEL_ENV=production rollup -c -w",
|
|
19
|
-
"prepublishOnly": "npm run testclean && npm run build"
|
|
20
|
-
},
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"@aws/mynah-ui": "file:../"
|
|
23
|
-
},
|
|
24
|
-
"peerDependencies": {
|
|
25
|
-
"@cloudscape-design/components": "^3.0.615",
|
|
26
|
-
"@cloudscape-design/design-tokens": "^3.0.35",
|
|
27
|
-
"@cloudscape-design/global-styles": "^1.0.27",
|
|
28
|
-
"react": "^16.8 || ^17 || ^18",
|
|
29
|
-
"react-dom": "^16.8 || ^17 || ^18"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@babel/core": "^7.17.10",
|
|
33
|
-
"@babel/preset-env": "^7.17.10",
|
|
34
|
-
"@babel/preset-react": "^7.16.7",
|
|
35
|
-
"@babel/preset-typescript": "^7.16.7",
|
|
36
|
-
"@rollup/plugin-commonjs": "^26.0.1",
|
|
37
|
-
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
38
|
-
"@testing-library/jest-dom": "^5.16.5",
|
|
39
|
-
"@testing-library/react": "^13.2.0",
|
|
40
|
-
"@types/events": "^3.0.0",
|
|
41
|
-
"@types/jest": "^27.5.1",
|
|
42
|
-
"@types/react": "^18.0.9",
|
|
43
|
-
"@types/react-dom": "^18.0.4",
|
|
44
|
-
"babel-jest": "^28.1.0",
|
|
45
|
-
"babel-preset-jest": "^29.5.0",
|
|
46
|
-
"cross-env": "^7.0.3",
|
|
47
|
-
"jest": "^28.1.0",
|
|
48
|
-
"jest-environment-jsdom": "^28.1.0",
|
|
49
|
-
"rollup": "^2.73.0",
|
|
50
|
-
"rollup-plugin-commonjs": "^10.1.0",
|
|
51
|
-
"rollup-plugin-node-resolve": "^5.2.0",
|
|
52
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
53
|
-
"rollup-plugin-typescript": "^1.0.1",
|
|
54
|
-
"rollup-plugin-typescript2": "^0.31.2",
|
|
55
|
-
"sass": "^1.51.0",
|
|
56
|
-
"ts-jest": "^28.0.2",
|
|
57
|
-
"typescript": "^5.1.3"
|
|
58
|
-
},
|
|
59
|
-
"files": [
|
|
60
|
-
"dist"
|
|
61
|
-
],
|
|
62
|
-
"prettier": {
|
|
63
|
-
"jsxSingleQuote": true,
|
|
64
|
-
"singleQuote": true,
|
|
65
|
-
"trailingComma": "es5",
|
|
66
|
-
"tabWidth": 2
|
|
67
|
-
},
|
|
68
|
-
"npm-pretty-much": {
|
|
69
|
-
"runTest": "never",
|
|
70
|
-
"ciBuild": "always"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { DomBuilderObject, ExtendedHTMLElement } from '../../helper/dom';
|
|
6
|
-
import { CardRenderDetails, OnCopiedToClipboardFunction, OnInsertToCursorPositionFunction, ReferenceTrackerInformation } from '../../static';
|
|
7
|
-
import { CardBody } from '../card/card-body';
|
|
8
|
-
export interface ChatItemCardContentProps {
|
|
9
|
-
body?: string;
|
|
10
|
-
renderAsStream?: boolean;
|
|
11
|
-
classNames?: string[];
|
|
12
|
-
codeReference?: ReferenceTrackerInformation[];
|
|
13
|
-
onAnimationStateChange?: (isAnimating: boolean) => void;
|
|
14
|
-
contentEvents?: {
|
|
15
|
-
onLinkClick?: (url: string, e: MouseEvent) => void;
|
|
16
|
-
onCopiedToClipboard?: OnCopiedToClipboardFunction;
|
|
17
|
-
onInsertToCursorPosition?: OnInsertToCursorPositionFunction;
|
|
18
|
-
};
|
|
19
|
-
children?: Array<ExtendedHTMLElement | HTMLElement | string | DomBuilderObject>;
|
|
20
|
-
}
|
|
21
|
-
export declare class ChatItemCardContent {
|
|
22
|
-
private props;
|
|
23
|
-
render: ExtendedHTMLElement;
|
|
24
|
-
contentBody: CardBody | null;
|
|
25
|
-
private readonly updateStack;
|
|
26
|
-
private typewriterItemIndex;
|
|
27
|
-
private readonly typewriterId;
|
|
28
|
-
private lastAnimationDuration;
|
|
29
|
-
private updateTimer;
|
|
30
|
-
constructor(props: ChatItemCardContentProps);
|
|
31
|
-
private readonly getCardContent;
|
|
32
|
-
private readonly updateCard;
|
|
33
|
-
readonly updateCardStack: (updateWith: Partial<ChatItemCardContentProps>) => void;
|
|
34
|
-
readonly getRenderDetails: () => CardRenderDetails;
|
|
35
|
-
}
|
package/docs/CONFIG.md
DELETED
|
@@ -1,311 +0,0 @@
|
|
|
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>
|