@glodon-aiot/agent-cli-ui 3.3.2-beta.15 → 3.3.2-beta.17
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 +119 -109
- package/dist/es/Dialog/AgentChat/HistoryItem/index.mjs +1 -1
- package/dist/es/Dialog/AgentChat/index.mjs +282 -269
- package/dist/es/Dialog/SessionList/index.mjs +35 -34
- package/dist/es/Dialog/index.mjs +101 -94
- package/dist/es/ReactTextGenerationUI/components/TextSiders/index.mjs +124 -120
- package/dist/es/components/FilePreview/index.mjs +26 -25
- package/dist/es/index.mjs +238 -211
- package/dist/es/packages/agent-cli-ui/package.json.mjs +3 -3
- package/dist/es/packages/react-components/dist/es/index.mjs +1 -1
- package/dist/es/src/style.css +1 -1
- package/dist/es/src/style10.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/style15.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/style20.css +1 -1
- package/dist/es/src/style21.css +1 -1
- package/dist/es/src/style22.css +1 -1
- package/dist/es/src/style23.css +1 -1
- package/dist/es/src/style24.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/style3.css +1 -1
- package/dist/es/src/style30.css +1 -1
- package/dist/es/src/style31.css +1 -1
- package/dist/es/src/style5.css +1 -1
- package/dist/es/src/style6.css +1 -1
- package/dist/es/src/style7.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 +30 -30
- package/dist/src/AgentClientUI.d.ts +10 -2
- package/dist/src/Dialog/SessionList/index.d.ts +1 -0
- package/dist/src/Dialog/index.d.ts +9 -1
- package/dist/src/index.d.ts +7 -2
- package/dist/src/types.d.ts +2 -1
- package/package.json +3 -3
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
import { AgentClientProps } from './types';
|
|
3
|
-
|
|
3
|
+
import { Session } from '@glodon-aiot/bot-client-sdk';
|
|
4
|
+
import { IKnowledge, ISessionParams } from '@glodon-aiot/apis';
|
|
5
|
+
export interface AgentClientRefProps {
|
|
6
|
+
sessionCreate: (params: ISessionParams & {
|
|
7
|
+
knowledges?: IKnowledge[];
|
|
8
|
+
}) => Promise<Session> | undefined;
|
|
9
|
+
getSessionList: () => Promise<Session[]> | undefined;
|
|
10
|
+
}
|
|
11
|
+
declare const AgentClientUI: React.ForwardRefExoticComponent<AgentClientProps & React.RefAttributes<AgentClientRefProps>>;
|
|
4
12
|
export default AgentClientUI;
|
|
@@ -16,6 +16,7 @@ export interface SessionListRef {
|
|
|
16
16
|
create: (param: ISessionParams & {
|
|
17
17
|
knowledges?: IKnowledge[];
|
|
18
18
|
}) => Promise<Session> | any;
|
|
19
|
+
list: () => Promise<Session[]>;
|
|
19
20
|
}
|
|
20
21
|
declare const SessionList: React.ForwardRefExoticComponent<SessionListProps & React.RefAttributes<SessionListRef>>;
|
|
21
22
|
export default SessionList;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Session } from '@glodon-aiot/bot-client-sdk';
|
|
2
|
+
import { ISessionParams, IKnowledge } from '@glodon-aiot/apis';
|
|
1
3
|
import { default as React, CSSProperties } from 'react';
|
|
2
4
|
interface DialogProps {
|
|
3
5
|
appId: string;
|
|
@@ -5,5 +7,11 @@ interface DialogProps {
|
|
|
5
7
|
bodyStyle?: CSSProperties;
|
|
6
8
|
sessionId?: string;
|
|
7
9
|
}
|
|
8
|
-
|
|
10
|
+
export interface DialogRefProps {
|
|
11
|
+
sessionCreate: (params: ISessionParams & {
|
|
12
|
+
knowledges?: IKnowledge[];
|
|
13
|
+
}) => Promise<Session> | undefined;
|
|
14
|
+
getSessionList: () => Promise<Session[]> | undefined;
|
|
15
|
+
}
|
|
16
|
+
declare const Dialog: React.ForwardRefExoticComponent<DialogProps & React.RefAttributes<DialogRefProps>>;
|
|
9
17
|
export default Dialog;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AgentClientUIConfig, AgentClientMode, InitalData, Env } from './types';
|
|
2
|
-
import { BotClientApi, ISession } from '@glodon-aiot/apis';
|
|
3
|
-
import { BotClient } from '@glodon-aiot/bot-client-sdk';
|
|
2
|
+
import { BotClientApi, IKnowledge, ISession, ISessionParams } from '@glodon-aiot/apis';
|
|
3
|
+
import { Session, BotClient } from '@glodon-aiot/bot-client-sdk';
|
|
4
4
|
export default class AgentClientUI {
|
|
5
5
|
private _token;
|
|
6
6
|
private _activeSession;
|
|
@@ -8,6 +8,7 @@ export default class AgentClientUI {
|
|
|
8
8
|
private _defaultInputText;
|
|
9
9
|
private _inputDisabled;
|
|
10
10
|
private _defatulSessionId;
|
|
11
|
+
private _agentClientRef;
|
|
11
12
|
readonly apiUrl: string;
|
|
12
13
|
readonly docViewerUrl: string;
|
|
13
14
|
readonly env: Env;
|
|
@@ -34,6 +35,10 @@ export default class AgentClientUI {
|
|
|
34
35
|
input(message: string): void;
|
|
35
36
|
disable(): void;
|
|
36
37
|
enable(): void;
|
|
38
|
+
getSessionList(): Promise<Session[]>;
|
|
39
|
+
sessionCreate(params?: ISessionParams & {
|
|
40
|
+
knowledges?: IKnowledge[];
|
|
41
|
+
}): Promise<Session>;
|
|
37
42
|
createBotClientSDK(): Promise<BotClient>;
|
|
38
43
|
render(): Promise<void>;
|
|
39
44
|
destroy(callback?: VoidFunction): void;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -176,7 +176,6 @@ export interface AgentClientDefaultProps {
|
|
|
176
176
|
customItems?: {
|
|
177
177
|
icon: string;
|
|
178
178
|
name: string;
|
|
179
|
-
onClick: () => void;
|
|
180
179
|
position: 'left' | 'right';
|
|
181
180
|
visible?: boolean;
|
|
182
181
|
}[];
|
|
@@ -216,6 +215,8 @@ export interface InitalData extends AgentClientUIConfig {
|
|
|
216
215
|
refreshToken?: () => Promise<string>;
|
|
217
216
|
};
|
|
218
217
|
bodyStyle?: CSSProperties;
|
|
218
|
+
getSessionList?: any;
|
|
219
|
+
sessionCreate?: any;
|
|
219
220
|
}
|
|
220
221
|
export interface AgentClientProps extends AgentClientDefaultProps {
|
|
221
222
|
service: BotClientApi;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glodon-aiot/agent-cli-ui",
|
|
3
|
-
"version": "3.3.2-beta.
|
|
3
|
+
"version": "3.3.2-beta.17",
|
|
4
4
|
"module": "./dist/es/index.mjs",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"typings": "./dist/src/index.d.ts",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@ant-design/icons": "^5.3.4",
|
|
37
|
-
"@glodon-aiot/apis": "^3.3.2-beta.
|
|
38
|
-
"@glodon-aiot/bot-client-sdk": "^3.3.2-beta.
|
|
37
|
+
"@glodon-aiot/apis": "^3.3.2-beta.17",
|
|
38
|
+
"@glodon-aiot/bot-client-sdk": "^3.3.2-beta.17",
|
|
39
39
|
"@matejmazur/react-mathjax": "^0.1.10",
|
|
40
40
|
"@react-pdf-viewer/core": "^3.12.0",
|
|
41
41
|
"@react-pdf-viewer/default-layout": "^3.12.0",
|