@glodon-aiot/agent-cli-ui 3.3.6 → 3.4.0-alpha.2
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/Dialog/AgentChat/Tools/SessionHistoryDrawer/index.mjs +74 -0
- package/dist/es/Dialog/AgentChat/index.mjs +570 -548
- package/dist/es/Dialog/SessionList/index.mjs +255 -173
- package/dist/es/Dialog/index.mjs +102 -94
- package/dist/es/components/Sider/index.mjs +24 -0
- package/dist/es/constant.mjs +2 -0
- package/dist/es/index.mjs +30 -29
- 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/style10.css +1 -1
- package/dist/es/src/style11.css +1 -1
- package/dist/es/src/style12.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/style30.css +1 -1
- package/dist/es/src/style32.css +1 -0
- package/dist/es/src/style33.css +1 -0
- 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 +56 -56
- package/dist/src/Dialog/AgentChat/HistoryItem/FileItem/index.d.ts +1 -1
- package/dist/src/Dialog/AgentChat/HistoryItem/SessionAction/index.d.ts +1 -1
- package/dist/src/Dialog/AgentChat/HistoryItem/index.d.ts +1 -1
- package/dist/src/Dialog/AgentChat/PromptSetting/index.d.ts +2 -2
- package/dist/src/Dialog/AgentChat/Tools/SessionHistoryDrawer/index.d.ts +2 -2
- package/dist/src/Dialog/AgentChat/index.d.ts +4 -2
- package/dist/src/Dialog/SessionList/index.d.ts +9 -5
- package/dist/src/components/KnowledgeList/index.d.ts +1 -1
- package/dist/src/types.d.ts +1 -0
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@ import { FC } from 'react';
|
|
|
2
2
|
import { KnowledgeFileMetadata } from '@glodon-aiot/apis';
|
|
3
3
|
import { Session } from '@glodon-aiot/bot-client-sdk';
|
|
4
4
|
interface FileItemProp {
|
|
5
|
-
currentSession?: Session;
|
|
5
|
+
currentSession?: Session | null;
|
|
6
6
|
fileId?: string;
|
|
7
7
|
file?: KnowledgeFileMetadata;
|
|
8
8
|
docViewerUrl?: string;
|
|
@@ -4,7 +4,7 @@ import { Session } from '@glodon-aiot/bot-client-sdk';
|
|
|
4
4
|
import { MarkdownProps } from '@glodon-aiot/react-components/dist/src/components/Markdown';
|
|
5
5
|
interface HistoryItemProps {
|
|
6
6
|
application: IApplication;
|
|
7
|
-
currentSession?: Session;
|
|
7
|
+
currentSession?: Session | null;
|
|
8
8
|
isLastHistory?: boolean;
|
|
9
9
|
history: IHistory;
|
|
10
10
|
onRelatedClick?: (val: any) => void;
|
|
@@ -3,10 +3,10 @@ import { IAecSessionPrompt as ISessionPrompt } from '@glodon-aiot/apis';
|
|
|
3
3
|
import { Session } from '@glodon-aiot/bot-client-sdk';
|
|
4
4
|
interface PromptSettingProps {
|
|
5
5
|
appId: string;
|
|
6
|
-
currentSession?: Session;
|
|
6
|
+
currentSession?: Session | null;
|
|
7
7
|
setPromptVariables: Dispatch<SetStateAction<ISessionPrompt[]>>;
|
|
8
8
|
promptVariables: ISessionPrompt[];
|
|
9
|
-
setCurrentSession?: Dispatch<SetStateAction<Session | undefined>>;
|
|
9
|
+
setCurrentSession?: Dispatch<SetStateAction<Session | null | undefined>>;
|
|
10
10
|
}
|
|
11
11
|
export interface PromptSettingtRef {
|
|
12
12
|
clear: () => void;
|
|
@@ -3,10 +3,10 @@ import { Session } from '@glodon-aiot/bot-client-sdk';
|
|
|
3
3
|
import { IApplication } from '@glodon-aiot/apis';
|
|
4
4
|
interface SessionHistoryDrawerProps {
|
|
5
5
|
disabled?: boolean;
|
|
6
|
-
currentSession?: Session;
|
|
6
|
+
currentSession?: Session | null;
|
|
7
7
|
application: IApplication;
|
|
8
8
|
networkStatus: boolean;
|
|
9
|
-
setCurrentSession?: Dispatch<SetStateAction<Session | undefined>>;
|
|
9
|
+
setCurrentSession?: Dispatch<SetStateAction<Session | null | undefined>>;
|
|
10
10
|
sessions: Session[];
|
|
11
11
|
setSessions: Dispatch<SetStateAction<Session[]>>;
|
|
12
12
|
}
|
|
@@ -5,15 +5,17 @@ interface AgentChatProps {
|
|
|
5
5
|
embeddingService?: string;
|
|
6
6
|
docViewerUrl?: string;
|
|
7
7
|
application: IApplication;
|
|
8
|
-
currentSession?: Session;
|
|
8
|
+
currentSession?: Session | null;
|
|
9
9
|
resourceToken?: string;
|
|
10
10
|
onCreateSession?: (param: ISessionParams & {
|
|
11
11
|
knowledges?: IKnowledge[];
|
|
12
12
|
}) => Promise<Session>;
|
|
13
13
|
footer?: HTMLDivElement | string | boolean;
|
|
14
|
-
setCurrentSession?: Dispatch<SetStateAction<Session | undefined>>;
|
|
14
|
+
setCurrentSession?: Dispatch<SetStateAction<Session | null | undefined>>;
|
|
15
15
|
networkStatus: boolean;
|
|
16
16
|
setNetworkStatus: Dispatch<SetStateAction<boolean>>;
|
|
17
|
+
sessions: Session[];
|
|
18
|
+
setSessions: Dispatch<SetStateAction<Session[]>>;
|
|
17
19
|
}
|
|
18
20
|
declare const AgentChat: React.FC<AgentChatProps>;
|
|
19
21
|
export default AgentChat;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { default as React, Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { Session } from '@glodon-aiot/bot-client-sdk';
|
|
3
3
|
import { IKnowledge, IApplication, ISessionParams } from '@glodon-aiot/apis';
|
|
4
|
-
interface SessionListProps {
|
|
5
|
-
appId
|
|
4
|
+
export interface SessionListProps {
|
|
5
|
+
appId?: string;
|
|
6
6
|
application?: IApplication;
|
|
7
|
-
sider?: boolean;
|
|
8
7
|
networkStatus: boolean;
|
|
9
|
-
currentSession?: Session;
|
|
10
|
-
setCurrentSession?: Dispatch<SetStateAction<Session | undefined>>;
|
|
8
|
+
currentSession?: Session | null;
|
|
9
|
+
setCurrentSession?: Dispatch<SetStateAction<Session | null | undefined>>;
|
|
11
10
|
reload?: VoidFunction;
|
|
12
11
|
checkKnowledges?: IKnowledge[];
|
|
13
12
|
setCheckKnowledges?: Dispatch<SetStateAction<IKnowledge[] | undefined>>;
|
|
13
|
+
isShowHeader?: boolean;
|
|
14
|
+
sessions: Session[];
|
|
15
|
+
setSessions: Dispatch<SetStateAction<Session[]>>;
|
|
16
|
+
afterSessionClick?: (session: Session) => void;
|
|
17
|
+
sessionId?: string;
|
|
14
18
|
}
|
|
15
19
|
export interface SessionListRef {
|
|
16
20
|
create: (param: ISessionParams & {
|
|
@@ -3,7 +3,7 @@ import { IApplication, IKnowledge } from '@glodon-aiot/apis';
|
|
|
3
3
|
import { Session } from '@glodon-aiot/bot-client-sdk';
|
|
4
4
|
interface AgentHeaderProps {
|
|
5
5
|
application?: IApplication;
|
|
6
|
-
currentSession?: Session;
|
|
6
|
+
currentSession?: Session | null;
|
|
7
7
|
setCheckKnowledges?: (knowledges?: IKnowledge[]) => void;
|
|
8
8
|
}
|
|
9
9
|
declare const AgentHeader: React.FC<AgentHeaderProps>;
|
package/dist/src/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glodon-aiot/agent-cli-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0-alpha.2",
|
|
4
4
|
"module": "./dist/es/index.mjs",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"typings": "./dist/src/index.d.ts",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@ant-design/icons": "^5.3.4",
|
|
40
|
-
"@glodon-aiot/apis": "^3.
|
|
41
|
-
"@glodon-aiot/bot-client-sdk": "^3.
|
|
40
|
+
"@glodon-aiot/apis": "^3.4.0-alpha.2",
|
|
41
|
+
"@glodon-aiot/bot-client-sdk": "^3.4.0-alpha.2",
|
|
42
42
|
"@matejmazur/react-mathjax": "^0.1.10",
|
|
43
43
|
"@react-pdf-viewer/core": "^3.12.0",
|
|
44
44
|
"@react-pdf-viewer/default-layout": "^3.12.0",
|