@glodon-aiot/agent-cli-ui 3.3.7-beta.1 → 3.3.8-alpha.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/es/AgentClientUI.mjs +107 -94
- package/dist/es/Dialog/AgentChat/HistoryItem/SessionRefer/index.mjs +46 -59
- package/dist/es/Dialog/AgentChat/HistoryItem/index.mjs +46 -47
- package/dist/es/Dialog/AgentChat/index.mjs +378 -376
- package/dist/es/Dialog/SessionList/index.mjs +115 -119
- package/dist/es/Dialog/index.mjs +26 -30
- package/dist/es/QuillEditor/index.mjs +59 -70
- package/dist/es/components/Recommend/index.mjs +34 -52
- package/dist/es/constant.mjs +3 -11
- package/dist/es/index.mjs +293 -285
- package/dist/es/packages/agent-cli-ui/package.json.mjs +26 -27
- package/dist/es/packages/react-components/dist/es/index.mjs +1 -1
- package/dist/es/src/style.css +1 -1
- package/dist/es/src/style11.css +1 -1
- package/dist/es/src/style12.css +1 -1
- package/dist/es/src/style13.css +1 -1
- package/dist/es/src/style14.css +1 -1
- package/dist/es/src/style16.css +1 -1
- package/dist/es/src/style17.css +1 -1
- package/dist/es/src/style18.css +1 -1
- package/dist/es/src/style19.css +1 -1
- package/dist/es/src/style25.css +1 -1
- package/dist/es/src/style26.css +1 -1
- package/dist/es/src/style27.css +1 -1
- package/dist/es/src/style28.css +1 -1
- package/dist/es/src/style29.css +1 -1
- package/dist/es/src/style30.css +1 -1
- package/dist/es/src/style4.css +1 -1
- package/dist/es/src/style5.css +1 -1
- package/dist/es/src/style8.css +1 -1
- package/dist/es/src/style9.css +1 -1
- package/dist/lib/index.css +1 -1
- package/dist/lib/index.js +54 -54
- package/dist/src/AgentClientUI.d.ts +1 -1
- package/dist/src/Dialog/AgentChat/HistoryItem/SessionRefer/index.d.ts +0 -2
- package/dist/src/Dialog/index.d.ts +1 -1
- package/dist/src/Footer/index.d.ts +1 -2
- package/dist/src/components/Greeting/index.d.ts +1 -2
- package/dist/src/components/Header/index.d.ts +1 -2
- package/dist/src/components/Recommend/index.d.ts +0 -1
- package/dist/src/constant.d.ts +0 -4
- package/dist/src/index.d.ts +1 -5
- package/dist/src/types.d.ts +2 -3
- package/dist/src/utils/antdConfig.d.ts +7 -0
- package/dist/src/utils/testAntdPrefix.d.ts +3 -0
- package/package.json +10 -11
|
@@ -3,7 +3,7 @@ import { AgentClientProps } from './types';
|
|
|
3
3
|
import { Session } from '@glodon-aiot/bot-client-sdk';
|
|
4
4
|
import { IKnowledge, ISessionParams } from '@glodon-aiot/apis';
|
|
5
5
|
export interface AgentClientRefProps {
|
|
6
|
-
|
|
6
|
+
sessionCreate: (params: ISessionParams & {
|
|
7
7
|
knowledges?: IKnowledge[];
|
|
8
8
|
}) => Promise<Session> | undefined;
|
|
9
9
|
getSessionList: () => Promise<Session[]> | undefined;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { IHistory } from '@glodon-aiot/apis';
|
|
3
|
-
import { MarkdownProps } from '@glodon-aiot/react-components/dist/src/components/Markdown';
|
|
4
3
|
interface SessionReferProps {
|
|
5
4
|
history?: IHistory;
|
|
6
5
|
docViewerUrl?: string;
|
|
7
|
-
markdown?: Partial<MarkdownProps>;
|
|
8
6
|
}
|
|
9
7
|
declare const SessionRefer: React.FC<SessionReferProps>;
|
|
10
8
|
export default SessionRefer;
|
|
@@ -8,7 +8,7 @@ interface DialogProps {
|
|
|
8
8
|
sessionId?: string;
|
|
9
9
|
}
|
|
10
10
|
export interface DialogRefProps {
|
|
11
|
-
|
|
11
|
+
sessionCreate: (params: ISessionParams & {
|
|
12
12
|
knowledges?: IKnowledge[];
|
|
13
13
|
}) => Promise<Session> | undefined;
|
|
14
14
|
getSessionList: () => Promise<Session[]> | undefined;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
interface FooterProp {
|
|
3
3
|
className?: string;
|
|
4
4
|
tips?: HTMLDivElement | string | boolean;
|
|
5
|
-
children?: React.ReactNode;
|
|
6
5
|
}
|
|
7
6
|
declare const Footer: FC<FooterProp>;
|
|
8
7
|
export default Footer;
|
package/dist/src/constant.d.ts
CHANGED
package/dist/src/index.d.ts
CHANGED
|
@@ -9,8 +9,6 @@ export default class AgentClientUI {
|
|
|
9
9
|
private _inputDisabled;
|
|
10
10
|
private _defatulSessionId;
|
|
11
11
|
private _agentClientRef;
|
|
12
|
-
private _config;
|
|
13
|
-
private _uuid;
|
|
14
12
|
readonly apiUrl: string;
|
|
15
13
|
readonly docViewerUrl: string;
|
|
16
14
|
readonly env: Env;
|
|
@@ -25,8 +23,6 @@ export default class AgentClientUI {
|
|
|
25
23
|
wrapper: HTMLElement;
|
|
26
24
|
botClient: BotClient | null;
|
|
27
25
|
constructor(config: InitalData);
|
|
28
|
-
private updateUIConfig;
|
|
29
|
-
private _initWrapper;
|
|
30
26
|
get token(): string;
|
|
31
27
|
set token(v: string);
|
|
32
28
|
get mode(): AgentClientMode;
|
|
@@ -40,7 +36,7 @@ export default class AgentClientUI {
|
|
|
40
36
|
disable(): void;
|
|
41
37
|
enable(): void;
|
|
42
38
|
getSessionList(): Promise<Session[]>;
|
|
43
|
-
|
|
39
|
+
sessionCreate(params?: ISessionParams & {
|
|
44
40
|
knowledges?: IKnowledge[];
|
|
45
41
|
}): Promise<Session>;
|
|
46
42
|
createBotClientSDK(): Promise<BotClient>;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -47,7 +47,6 @@ export interface AgentFeaturesConfig {
|
|
|
47
47
|
icon?: string;
|
|
48
48
|
text?: string;
|
|
49
49
|
questions?: boolean;
|
|
50
|
-
layoutBreakpoints?: number[];
|
|
51
50
|
};
|
|
52
51
|
sessionList?: boolean;
|
|
53
52
|
metadata?: boolean;
|
|
@@ -148,7 +147,7 @@ export interface AgentClientDefaultProps {
|
|
|
148
147
|
greeting?: string;
|
|
149
148
|
history?: boolean;
|
|
150
149
|
service?: BotClientApi;
|
|
151
|
-
popupContainer?: React.RefObject<HTMLDivElement
|
|
150
|
+
popupContainer?: React.RefObject<HTMLDivElement>;
|
|
152
151
|
token?: string;
|
|
153
152
|
debug?: boolean;
|
|
154
153
|
plugins?: AgentPluginMap;
|
|
@@ -217,7 +216,7 @@ export interface InitalData extends AgentClientUIConfig {
|
|
|
217
216
|
};
|
|
218
217
|
bodyStyle?: CSSProperties;
|
|
219
218
|
getSessionList?: any;
|
|
220
|
-
|
|
219
|
+
sessionCreate?: any;
|
|
221
220
|
}
|
|
222
221
|
export interface AgentClientProps extends AgentClientDefaultProps {
|
|
223
222
|
service: BotClientApi;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const ANTD_PREFIX = "gbot";
|
|
3
|
+
export declare const AntdConfigWrapper: React.FC<{
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
getPopupContainer: () => HTMLElement;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const withAntdConfig: <P extends object>(Component: React.ComponentType<P>, getPopupContainer: () => HTMLElement) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<any>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glodon-aiot/agent-cli-ui",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.8-alpha.1",
|
|
4
4
|
"module": "./dist/es/index.mjs",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"typings": "./dist/src/index.d.ts",
|
|
@@ -30,27 +30,28 @@
|
|
|
30
30
|
"commit": "cz"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"antd": ">=4.0.0",
|
|
34
|
-
"react": ">=16.9.0",
|
|
35
|
-
"react-dom": ">=16.9.0",
|
|
36
33
|
"webpack": "*"
|
|
37
34
|
},
|
|
38
35
|
"dependencies": {
|
|
39
36
|
"@ant-design/icons": "^5.3.4",
|
|
40
|
-
"@glodon-aiot/apis": "^3.3.
|
|
41
|
-
"@glodon-aiot/bot-client-sdk": "^3.3.
|
|
37
|
+
"@glodon-aiot/apis": "^3.3.8-alpha.1",
|
|
38
|
+
"@glodon-aiot/bot-client-sdk": "^3.3.8-alpha.1",
|
|
42
39
|
"@matejmazur/react-mathjax": "^0.1.10",
|
|
43
40
|
"@react-pdf-viewer/core": "^3.12.0",
|
|
44
41
|
"@react-pdf-viewer/default-layout": "^3.12.0",
|
|
45
42
|
"@react-pdf-viewer/locales": "^1.0.0",
|
|
46
43
|
"@react-pdf-viewer/toolbar": "^3.12.0",
|
|
47
44
|
"ahooks": "^3.8.5",
|
|
45
|
+
"antd": "4.x",
|
|
48
46
|
"axios": "0.24.0",
|
|
49
47
|
"classnames": "^2.5.1",
|
|
50
48
|
"copy-to-clipboard": "^3.3.3",
|
|
51
49
|
"dayjs": "^1.11.13",
|
|
52
50
|
"lodash": "^4.17.21",
|
|
51
|
+
"react": "^17.0.2",
|
|
52
|
+
"react-dom": "^17.0.2",
|
|
53
53
|
"react-infinite-scroll-component": "^6.1.0",
|
|
54
|
+
"react-mathjax": "^1.0.1",
|
|
54
55
|
"react-quill": "^2.0.0",
|
|
55
56
|
"react-resizable": "^3.0.5",
|
|
56
57
|
"uuid": "^11.1.0"
|
|
@@ -72,12 +73,12 @@
|
|
|
72
73
|
"@storybook/react": "6.4.9",
|
|
73
74
|
"@storybook/testing-library": "^0.0.13",
|
|
74
75
|
"@types/lodash": "^4",
|
|
75
|
-
"@types/react": "^
|
|
76
|
-
"@types/react-dom": "^
|
|
76
|
+
"@types/react": "^17.0.44",
|
|
77
|
+
"@types/react-dom": "^17.0.17",
|
|
78
|
+
"@types/react-mathjax": "^1",
|
|
77
79
|
"@typescript-eslint/eslint-plugin": "^5.35.1",
|
|
78
80
|
"@typescript-eslint/parser": "^5.35.1",
|
|
79
81
|
"@vitejs/plugin-react": "^3.1.0",
|
|
80
|
-
"antd": "^4.24.0",
|
|
81
82
|
"babel-loader": "^8.3.0",
|
|
82
83
|
"babel-plugin-import": "^1.13.8",
|
|
83
84
|
"commitizen": "^4.3.0",
|
|
@@ -98,8 +99,6 @@
|
|
|
98
99
|
"lint-staged": ">=10",
|
|
99
100
|
"postcss-loader": "^7.2.4",
|
|
100
101
|
"prettier": "2.7.1",
|
|
101
|
-
"react": "^17.0.2",
|
|
102
|
-
"react-dom": "^17.0.2",
|
|
103
102
|
"require-from-string": "^2.0.2",
|
|
104
103
|
"rollup-plugin-visualizer": "^6.0.1",
|
|
105
104
|
"storybook-less-loader": "^0.1.0",
|