@next-bricks/ai-portal 0.63.6 → 0.64.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/bricks.json +59 -59
- package/dist/chunks/{4208.f9256bec.js → 4208.9bc0e6c6.js} +2 -2
- package/dist/chunks/4208.9bc0e6c6.js.map +1 -0
- package/dist/chunks/4820.d2a30e2c.js +2 -0
- package/dist/chunks/4820.d2a30e2c.js.map +1 -0
- package/dist/chunks/{chat-box.aa5fd1e3.js → chat-box.3ae83b4f.js} +3 -3
- package/dist/chunks/chat-box.3ae83b4f.js.map +1 -0
- package/dist/chunks/chat-input.e913e9ed.js +3 -0
- package/dist/chunks/chat-input.e913e9ed.js.map +1 -0
- package/dist/chunks/chat-panel.a5cadc0d.js +2 -0
- package/dist/chunks/chat-panel.a5cadc0d.js.map +1 -0
- package/dist/chunks/main.62ff99bd.js +2 -0
- package/dist/chunks/{main.ae8bf1bb.js.map → main.62ff99bd.js.map} +1 -1
- package/dist/examples.json +26 -26
- package/dist/index.a9bf242c.js +2 -0
- package/dist/index.a9bf242c.js.map +1 -0
- package/dist/manifest.json +570 -539
- package/dist/types.json +2668 -1831
- package/dist-types/chat-input/index.d.ts +1 -0
- package/dist-types/chat-panel/index.d.ts +18 -0
- package/dist-types/jsx.d.ts +5 -1
- package/dist-types/shared/interfaces.d.ts +16 -1
- package/package.json +2 -2
- package/dist/chunks/4208.f9256bec.js.map +0 -1
- package/dist/chunks/4820.2f5fb327.js +0 -2
- package/dist/chunks/4820.2f5fb327.js.map +0 -1
- package/dist/chunks/chat-box.aa5fd1e3.js.map +0 -1
- package/dist/chunks/chat-input.eb5871d4.js +0 -3
- package/dist/chunks/chat-input.eb5871d4.js.map +0 -1
- package/dist/chunks/chat-panel.d783204f.js +0 -2
- package/dist/chunks/chat-panel.d783204f.js.map +0 -1
- package/dist/chunks/main.ae8bf1bb.js +0 -2
- package/dist/index.49603b89.js +0 -2
- package/dist/index.49603b89.js.map +0 -1
- /package/dist/chunks/{chat-box.aa5fd1e3.js.LICENSE.txt → chat-box.3ae83b4f.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{chat-input.eb5871d4.js.LICENSE.txt → chat-input.e913e9ed.js.LICENSE.txt} +0 -0
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { ReactNextElement } from "@next-core/react-element";
|
|
3
3
|
import "@next-core/theme";
|
|
4
4
|
import type { ChatPayload, CommandPayload, FileInfo, UploadOptions } from "../shared/interfaces";
|
|
5
|
+
import type { UseBrickConf } from "@next-core/types";
|
|
5
6
|
export interface ChatPanelProps {
|
|
6
7
|
panelTitle?: string;
|
|
7
8
|
aiEmployeeId?: string;
|
|
@@ -10,6 +11,10 @@ export interface ChatPanelProps {
|
|
|
10
11
|
height?: string | number;
|
|
11
12
|
placeholder?: string;
|
|
12
13
|
uploadOptions?: UploadOptions;
|
|
14
|
+
help?: {
|
|
15
|
+
useBrick: UseBrickConf;
|
|
16
|
+
};
|
|
17
|
+
maskClosable?: boolean;
|
|
13
18
|
}
|
|
14
19
|
/**
|
|
15
20
|
* 弹出式对话面板。
|
|
@@ -23,8 +28,21 @@ export declare class ChatPanel extends ReactNextElement implements ChatPanelProp
|
|
|
23
28
|
accessor height: string | number | undefined;
|
|
24
29
|
accessor placeholder: string | undefined;
|
|
25
30
|
accessor uploadOptions: UploadOptions | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Show help messages when no conversation exists.
|
|
33
|
+
*/
|
|
34
|
+
accessor help: {
|
|
35
|
+
useBrick: UseBrickConf;
|
|
36
|
+
} | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Whether to close the panel when clicking the mask.
|
|
39
|
+
*
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
accessor maskClosable: boolean | undefined;
|
|
26
43
|
open(): void;
|
|
27
44
|
close(): void;
|
|
45
|
+
setInputValue(content: string): void;
|
|
28
46
|
send(payload: ChatPayload): void;
|
|
29
47
|
showFile(file: FileInfo): void;
|
|
30
48
|
render(): React.JSX.Element;
|
package/dist-types/jsx.d.ts
CHANGED
|
@@ -135,7 +135,11 @@ declare global {
|
|
|
135
135
|
"ai-portal--tab-list": DetailedHTMLProps<HTMLAttributes<TabList>, TabList> & TabListProps & {
|
|
136
136
|
onTabClick?: (event: CustomEvent<Tab>) => void;
|
|
137
137
|
};
|
|
138
|
-
"ai-portal--chat-panel": DetailedHTMLProps<HTMLAttributes<ChatPanel>, ChatPanel> & ChatPanelProps
|
|
138
|
+
"ai-portal--chat-panel": DetailedHTMLProps<HTMLAttributes<ChatPanel>, ChatPanel> & Omit<ChatPanelProps, "help"> & {
|
|
139
|
+
help?: {
|
|
140
|
+
render: () => React.ReactNode;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
139
143
|
}
|
|
140
144
|
}
|
|
141
145
|
}
|
|
@@ -164,7 +164,7 @@ export interface ConversationError {
|
|
|
164
164
|
taskId?: string;
|
|
165
165
|
error?: string;
|
|
166
166
|
}
|
|
167
|
-
export type CommandPayload = CommandPayloadServiceFlowStart | CommandPayloadServiceFlowCreate | CommandPayloadServiceFlowEdit | CommandPayloadGoalPlan | LegacyCommandPayloadServiceFlowStarting;
|
|
167
|
+
export type CommandPayload = CommandPayloadServiceFlowStart | CommandPayloadServiceFlowCreate | CommandPayloadServiceFlowEdit | CommandPayloadGoalPlan | CommandPayloadBusinessObjectManagement | CommandPayloadBusinessInstanceManagement | LegacyCommandPayloadServiceFlowStarting;
|
|
168
168
|
export interface BaseCommandPayload {
|
|
169
169
|
type: string;
|
|
170
170
|
payload?: unknown;
|
|
@@ -202,6 +202,21 @@ export interface CommandPayloadGoalPlan extends BaseCommandPayload {
|
|
|
202
202
|
description?: string;
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
+
export interface CommandPayloadBusinessObjectManagement extends BaseCommandPayload {
|
|
206
|
+
type: "serviceObject-createOrEdit";
|
|
207
|
+
payload: {
|
|
208
|
+
spaceInstanceId: string;
|
|
209
|
+
serviceObjectId?: string;
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
export interface CommandPayloadBusinessInstanceManagement extends BaseCommandPayload {
|
|
213
|
+
type: "serviceObjectInstance-createOrEdit";
|
|
214
|
+
payload: {
|
|
215
|
+
spaceInstanceId: string;
|
|
216
|
+
serviceObjectId: string;
|
|
217
|
+
instanceId?: string;
|
|
218
|
+
};
|
|
219
|
+
}
|
|
205
220
|
/** @deprecated Use `payload` instead */
|
|
206
221
|
export interface LegacyCommandPayloadServiceFlowStarting {
|
|
207
222
|
type: "serviceFlowStarting";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/ai-portal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.64.1",
|
|
4
4
|
"homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/ai-portal",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"@next-bricks/presentational": "*",
|
|
50
50
|
"@next-bricks/vs": "*"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "d049e2649f0a1c8fb4cd6a6e8f51fdc1656a61ff"
|
|
53
53
|
}
|