@antscorp/antsomi-ui 1.2.2-beta.4 → 1.2.2-beta.6
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/index.js +1 -1
- package/dist/index.js.LICENSE.txt +17 -0
- package/dist/main.css +9 -1
- package/dist/types/components/molecules/ChatBox/ChatBox.d.ts +1 -0
- package/dist/types/components/molecules/ChatBox/ask.d.ts +3 -0
- package/dist/types/components/molecules/ChatBox/constants.d.ts +3 -6
- package/dist/types/components/molecules/ChatBox/types.d.ts +13 -4
- package/package.json +5 -2
|
@@ -4,8 +4,25 @@
|
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
/*!
|
|
8
|
+
* Determine if an object is a Buffer
|
|
9
|
+
*
|
|
10
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
11
|
+
* @license MIT
|
|
12
|
+
*/
|
|
13
|
+
|
|
7
14
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
8
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @license React
|
|
18
|
+
* react-is.production.min.js
|
|
19
|
+
*
|
|
20
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
21
|
+
*
|
|
22
|
+
* This source code is licensed under the MIT license found in the
|
|
23
|
+
* LICENSE file in the root directory of this source tree.
|
|
24
|
+
*/
|
|
25
|
+
|
|
9
26
|
/** @license React v16.13.1
|
|
10
27
|
* react-is.production.min.js
|
|
11
28
|
*
|
package/dist/main.css
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#1e1e1e;color:#dcdcdc}.hljs-keyword,.hljs-literal,.hljs-name,.hljs-symbol{color:#569cd6}.hljs-link{color:#569cd6;text-decoration:underline}.hljs-built_in,.hljs-type{color:#4ec9b0}.hljs-class,.hljs-number{color:#b8d7a3}.hljs-meta .hljs-string,.hljs-string{color:#d69d85}.hljs-regexp,.hljs-template-tag{color:#9a5334}.hljs-formula,.hljs-function,.hljs-params,.hljs-subst,.hljs-title{color:#dcdcdc}.hljs-comment,.hljs-quote{color:#57a64a;font-style:italic}.hljs-doctag{color:#608b4e}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-tag{color:#9b9b9b}.hljs-template-variable,.hljs-variable{color:#bd63c5}.hljs-attr,.hljs-attribute{color:#9cdcfe}.hljs-section{color:gold}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-bullet,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-selector-pseudo,.hljs-selector-tag{color:#d7ba7d}.hljs-addition{background-color:#144212;display:inline-block;width:100%}.hljs-deletion{background-color:#600;display:inline-block;width:100%}
|
|
2
|
+
.KGc1EPYUUD9g4R6Ib_jB p {
|
|
3
|
+
font-size: 14px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.KGc1EPYUUD9g4R6Ib_jB > p:first-child {
|
|
7
|
+
margin-top: 0 !important;
|
|
8
|
+
}
|
|
9
|
+
@keyframes typing{from{width:0}to{width:100%}}@keyframes blink-caret{from,to{border-color:rgba(0,0,0,0)}50%{border-color:orange}}@keyframes cursor-blink{0%{opacity:0}}.typing-test{pointer-events:none}.typing-test::before{content:"";content:""/"data-content";alt:"data-content";white-space:break-spaces;will-change:content;animation:typed-0 3.44s linear 1s infinite forwards}.typing-test::after{content:"";position:relative;display:inline-block;padding-right:2px;border-right:2px solid currentColor;white-space:nowrap;animation:typed-0-caret 0.75s linear 1s infinite forwards}@keyframes typed-0{0%,1.9369844961%{content:"d";content:"d"/"data-content";alt:"data-content"}1.9379844961%,3.8749689922%{content:"da";content:"da"/"data-content";alt:"data-content"}3.8759689922%,5.8129534884%{content:"dat";content:"dat"/"data-content";alt:"data-content"}5.8139534884%,7.7509379845%{content:"data";content:"data"/"data-content";alt:"data-content"}7.7519379845%,9.6889224806%{content:"data-";content:"data-"/"data-content";alt:"data-content"}9.6899224806%,11.6269069767%{content:"data-c";content:"data-c"/"data-content";alt:"data-content"}11.6279069767%,13.5648914729%{content:"data-co";content:"data-co"/"data-content";alt:"data-content"}13.5658914729%,15.502875969%{content:"data-con";content:"data-con"/"data-content";alt:"data-content"}15.503875969%,17.4408604651%{content:"data-cont";content:"data-cont"/"data-content";alt:"data-content"}17.4418604651%,19.3788449612%{content:"data-conte";content:"data-conte"/"data-content";alt:"data-content"}19.3798449612%,21.3168294574%{content:"data-conten";content:"data-conten"/"data-content";alt:"data-content"}21.3178294574%,63.5648914729%{content:"data-content";content:"data-content"/"data-content";alt:"data-content"}63.5658914729%,65.1152790698%{content:"data-conten";content:"data-conten"/"data-content";alt:"data-content"}65.1162790698%,66.6656666667%{content:"data-conte";content:"data-conte"/"data-content";alt:"data-content"}66.6666666667%,68.2160542636%{content:"data-cont";content:"data-cont"/"data-content";alt:"data-content"}68.2170542636%,69.7664418605%{content:"data-con";content:"data-con"/"data-content";alt:"data-content"}69.7674418605%,71.3168294574%{content:"data-co";content:"data-co"/"data-content";alt:"data-content"}71.3178294574%,72.8672170543%{content:"data-c";content:"data-c"/"data-content";alt:"data-content"}72.8682170543%,74.4176046512%{content:"data-";content:"data-"/"data-content";alt:"data-content"}74.4186046512%,75.9679922481%{content:"data";content:"data"/"data-content";alt:"data-content"}75.9689922481%,77.518379845%{content:"dat";content:"dat"/"data-content";alt:"data-content"}77.519379845%,79.0687674419%{content:"da";content:"da"/"data-content";alt:"data-content"}79.0697674419%,80.6191550388%{content:"d";content:"d"/"data-content";alt:"data-content"}80.6201550388%,100%{content:"";content:""/"data-content";alt:"data-content"}}@keyframes typed-0-caret{75%{border-color:rgba(0,0,0,0)}}.chat{display:flex;flex-direction:column;height:100%;padding:2rem;border-radius:1rem;border:1px solid #ddd;box-shadow:0 4px 6px rgba(49,54,68,.05),0 5px 20px rgba(49,54,68,.08)}.logs{flex:1;overflow-y:auto;margin-bottom:1rem}.log{gap:.4rem;display:flex;flex-direction:column}@keyframes blink{to{visibility:hidden}}.streaming>div{white-space:pre-wrap}.streaming>div>:not(ol):not(ul):not(pre):last-child:after,.streaming>div>ol:last-child li:last-child:after,.streaming>div>pre:last-child code:after,.streaming>div>ul:last-child li:last-child:after{-webkit-animation:blink 1s steps(5, start) infinite;animation:blink 1s steps(5, start) infinite;content:"▋";margin-left:.25rem;vertical-align:baseline}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
GPT: string;
|
|
3
|
-
USER: string;
|
|
4
|
-
};
|
|
1
|
+
import { Role } from "./types";
|
|
5
2
|
export declare const CONVERSATION: {
|
|
6
|
-
|
|
3
|
+
role: Role;
|
|
7
4
|
content: string;
|
|
8
5
|
}[];
|
|
9
|
-
export declare const LIMIT_MESSAGE =
|
|
6
|
+
export declare const LIMIT_MESSAGE = 30;
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare const enum Role {
|
|
2
|
+
Assistant = "assistant",
|
|
3
|
+
User = "user"
|
|
4
|
+
}
|
|
5
|
+
export interface Message {
|
|
6
|
+
id: string;
|
|
7
|
+
role: Role;
|
|
8
|
+
content: string;
|
|
9
|
+
answering?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface IChatBoxMessageProps extends Message {
|
|
12
|
+
role: Role;
|
|
5
13
|
content: string;
|
|
6
14
|
isTyping?: boolean;
|
|
7
15
|
scrollBody: Function;
|
|
8
16
|
renderDone: Function;
|
|
9
17
|
doAnimation: boolean;
|
|
18
|
+
answeringContent: string;
|
|
10
19
|
}
|
|
11
20
|
export interface IChatBoxProps {
|
|
12
21
|
onClose: Function;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antscorp/antsomi-ui",
|
|
3
|
-
"version": "1.2.2-beta.
|
|
3
|
+
"version": "1.2.2-beta.6",
|
|
4
4
|
"description": "An enterprise-class UI design language and React UI library.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -37,7 +37,11 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"antd": "^5.3.2",
|
|
39
39
|
"dayjs": "^1.11.7",
|
|
40
|
+
"highlight.js": "^11.8.0",
|
|
40
41
|
"lodash": "^4.17.21",
|
|
42
|
+
"react-markdown": "^8.0.7",
|
|
43
|
+
"rehype-highlight": "^6.0.0",
|
|
44
|
+
"remark-gfm": "^3.0.1",
|
|
41
45
|
"ts-dedent": "^2.2.0"
|
|
42
46
|
},
|
|
43
47
|
"devDependencies": {
|
|
@@ -50,7 +54,6 @@
|
|
|
50
54
|
"@commitlint/cli": "17.5.0",
|
|
51
55
|
"@commitlint/config-conventional": "17.4.4",
|
|
52
56
|
"@emotion/react": "^11.10.6",
|
|
53
|
-
"@faker-js/faker": "^8.0.0",
|
|
54
57
|
"@storybook/addon-actions": "^6.5.16",
|
|
55
58
|
"@storybook/addon-essentials": "^6.5.16",
|
|
56
59
|
"@storybook/addon-interactions": "^6.5.16",
|