@ibiz-template-plugin/ai-chat 0.0.118 → 0.0.119
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.es.js +10884 -10545
- package/dist/index.legacy.js +2 -2
- package/dist/style.css +2 -2
- package/dist/types/components/chat-net-disk/file-new-panel/file-new-panel.d.ts +27 -0
- package/dist/types/components/chat-search/chat-search.d.ts +4 -0
- package/dist/types/components/common/breadcrumb/breadcrumb.d.ts +1 -8
- package/dist/types/components/common/index.d.ts +2 -2
- package/dist/types/components/common/lazy-list-tree/lazy-list-tree.d.ts +12 -10
- package/dist/types/components/common/lazy-tree/lazy-tree.d.ts +42 -11
- package/dist/types/icons/index.d.ts +1 -1
- package/dist/types/icons/move-file-svg.d.ts +1 -0
- package/dist/types/interface/i-remote-resource/i-remote-resource.d.ts +20 -0
- package/dist/types/locale/en/index.d.ts +6 -2
- package/dist/types/locale/zh-CN/index.d.ts +6 -2
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FileSystemController } from '../../../controller';
|
|
2
|
+
import { LazyTreeNode } from '../../common';
|
|
3
|
+
|
|
4
|
+
interface FileNewPanelProps {
|
|
5
|
+
/**
|
|
6
|
+
* @description 父数据
|
|
7
|
+
* @type {IFile}
|
|
8
|
+
* @memberof FileNewPanelProps
|
|
9
|
+
*/
|
|
10
|
+
parent: LazyTreeNode;
|
|
11
|
+
/**
|
|
12
|
+
* @description 系统文件控制器
|
|
13
|
+
* @type {FileSystemController}
|
|
14
|
+
* @memberof FileNewPanelProps
|
|
15
|
+
*/
|
|
16
|
+
controller: FileSystemController;
|
|
17
|
+
/**
|
|
18
|
+
* @description 关闭
|
|
19
|
+
* @memberof FileNewPanelProps
|
|
20
|
+
*/
|
|
21
|
+
onClose?: (params?: {
|
|
22
|
+
ok: boolean;
|
|
23
|
+
data: LazyTreeNode;
|
|
24
|
+
}) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare const FileNewPanel: (props: FileNewPanelProps) => import("preact").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -5,10 +5,10 @@ export { Slider } from './slider/slider';
|
|
|
5
5
|
export { Switch } from './switch/switch';
|
|
6
6
|
export { Actions, type IAction } from './actions/actions';
|
|
7
7
|
export { Breadcrumb } from './breadcrumb/breadcrumb';
|
|
8
|
-
export { LazyListTree, type LazyListTreeRef, } from './lazy-list-tree/lazy-list-tree';
|
|
8
|
+
export { LazyListTree, type LazyListTreeRef, type LazyListTreeMode, } from './lazy-list-tree/lazy-list-tree';
|
|
9
9
|
export { ContextMenu, type IContextMenuAction, } from './context-menu/context-menu';
|
|
10
10
|
export { Drawer } from './drawer/drawer';
|
|
11
|
-
export { LazyTree, type LazyTreeRef, type LazyTreeNode, } from './lazy-tree/lazy-tree';
|
|
11
|
+
export { LazyTree, type LazyTreeRef, type LazyTreeNode, type INodeEditInfo, } from './lazy-tree/lazy-tree';
|
|
12
12
|
export { Loading } from './loading/loading';
|
|
13
13
|
export { InlineEditor } from './inline-editor/inline-editor';
|
|
14
14
|
export { Modal } from './modal/modal';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { LazyTreeNode } from '../lazy-tree/lazy-tree';
|
|
1
|
+
import { INodeEditInfo, LazyTreeNode } from '../lazy-tree/lazy-tree';
|
|
2
2
|
import { IAction } from '../actions/actions';
|
|
3
3
|
|
|
4
|
+
export type LazyListTreeMode = 'list' | 'card';
|
|
4
5
|
interface LazyListTreeProps {
|
|
5
6
|
/**
|
|
6
7
|
* 根节点数据
|
|
@@ -33,6 +34,7 @@ interface LazyListTreeProps {
|
|
|
33
34
|
path?: LazyTreeNode[];
|
|
34
35
|
/**
|
|
35
36
|
* 是否显示搜索框
|
|
37
|
+
* @default true
|
|
36
38
|
*/
|
|
37
39
|
showSearch?: boolean;
|
|
38
40
|
/**
|
|
@@ -41,10 +43,12 @@ interface LazyListTreeProps {
|
|
|
41
43
|
defaultCheckedKeys?: string[];
|
|
42
44
|
/**
|
|
43
45
|
* 高亮选中
|
|
46
|
+
* @default true
|
|
44
47
|
*/
|
|
45
48
|
highlight?: boolean;
|
|
46
49
|
/**
|
|
47
50
|
* 标识分隔符
|
|
51
|
+
* @default '/'
|
|
48
52
|
*/
|
|
49
53
|
separator?: string;
|
|
50
54
|
/**
|
|
@@ -53,6 +57,7 @@ interface LazyListTreeProps {
|
|
|
53
57
|
filter?: string;
|
|
54
58
|
/**
|
|
55
59
|
* 是否可拖拽
|
|
60
|
+
* @default false
|
|
56
61
|
*/
|
|
57
62
|
draggable?: boolean;
|
|
58
63
|
/**
|
|
@@ -60,28 +65,25 @@ interface LazyListTreeProps {
|
|
|
60
65
|
*/
|
|
61
66
|
actions?: IAction[];
|
|
62
67
|
/**
|
|
63
|
-
*
|
|
68
|
+
* 节点编辑信息
|
|
64
69
|
*/
|
|
65
|
-
|
|
66
|
-
type: 'file' | 'folder';
|
|
67
|
-
parent: LazyTreeNode;
|
|
68
|
-
} | null;
|
|
70
|
+
nodeEditInfo?: INodeEditInfo;
|
|
69
71
|
/**
|
|
70
72
|
* 确认
|
|
71
73
|
* @param name
|
|
72
|
-
* @param node
|
|
73
74
|
* @returns
|
|
74
75
|
*/
|
|
75
|
-
onConfirm?: (name: string
|
|
76
|
+
onConfirm?: (name: string) => Promise<void> | void;
|
|
76
77
|
/**
|
|
77
78
|
* 取消
|
|
78
79
|
* @returns
|
|
79
80
|
*/
|
|
80
81
|
onCancel?: () => void;
|
|
81
82
|
/**
|
|
82
|
-
*
|
|
83
|
+
* 展示模式
|
|
84
|
+
* @default 'list'
|
|
83
85
|
*/
|
|
84
|
-
|
|
86
|
+
mode?: LazyListTreeMode;
|
|
85
87
|
}
|
|
86
88
|
export interface LazyListTreeRef {
|
|
87
89
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VNode } from 'preact';
|
|
1
2
|
import { IAction } from '../actions/actions';
|
|
2
3
|
|
|
3
4
|
export interface LazyTreeNode {
|
|
@@ -54,6 +55,38 @@ export interface LazyTreeNode {
|
|
|
54
55
|
*/
|
|
55
56
|
isRoot?: boolean;
|
|
56
57
|
}
|
|
58
|
+
export interface INodeEditInfo {
|
|
59
|
+
/**
|
|
60
|
+
* @description 图标
|
|
61
|
+
* @type {VNode}
|
|
62
|
+
* @memberof INodeEditInfo
|
|
63
|
+
*/
|
|
64
|
+
icon?: VNode;
|
|
65
|
+
/**
|
|
66
|
+
* @description 默认值
|
|
67
|
+
* @type {string}
|
|
68
|
+
* @memberof INodeEditInfo
|
|
69
|
+
*/
|
|
70
|
+
value?: string;
|
|
71
|
+
/**
|
|
72
|
+
* @description 占位提示
|
|
73
|
+
* @type {string}
|
|
74
|
+
* @memberof INodeEditInfo
|
|
75
|
+
*/
|
|
76
|
+
placeholder?: string;
|
|
77
|
+
/**
|
|
78
|
+
* @description 类型
|
|
79
|
+
* @type {('draft' | 'edit')} 草稿节点 | 节点编辑
|
|
80
|
+
* @memberof INodeEditInfo
|
|
81
|
+
*/
|
|
82
|
+
type: 'draft' | 'edit';
|
|
83
|
+
/**
|
|
84
|
+
* @description 草稿的父节点 | 编辑节点
|
|
85
|
+
* @type {LazyTreeNode}
|
|
86
|
+
* @memberof INodeEditInfo
|
|
87
|
+
*/
|
|
88
|
+
node: LazyTreeNode;
|
|
89
|
+
}
|
|
57
90
|
interface LazyTreeProps {
|
|
58
91
|
/**
|
|
59
92
|
* 根节点数据
|
|
@@ -86,6 +119,7 @@ interface LazyTreeProps {
|
|
|
86
119
|
activePath?: LazyTreeNode[];
|
|
87
120
|
/**
|
|
88
121
|
* 是否显示搜索框
|
|
122
|
+
* @default true
|
|
89
123
|
*/
|
|
90
124
|
showSearch?: boolean;
|
|
91
125
|
/**
|
|
@@ -94,18 +128,22 @@ interface LazyTreeProps {
|
|
|
94
128
|
defaultCheckedKeys?: string[];
|
|
95
129
|
/**
|
|
96
130
|
* 高亮选中
|
|
131
|
+
* @default true
|
|
97
132
|
*/
|
|
98
133
|
highlight?: boolean;
|
|
99
134
|
/**
|
|
100
135
|
* 高亮选中父节点
|
|
136
|
+
* @default true
|
|
101
137
|
*/
|
|
102
138
|
highlightParent?: boolean;
|
|
103
139
|
/**
|
|
104
140
|
* 是否在点击节点的时候展开或者收缩节点
|
|
141
|
+
* @default true
|
|
105
142
|
*/
|
|
106
143
|
expandOnClickNode?: boolean;
|
|
107
144
|
/**
|
|
108
145
|
* 标识分隔符
|
|
146
|
+
* @default '/'
|
|
109
147
|
*/
|
|
110
148
|
separator?: string;
|
|
111
149
|
/**
|
|
@@ -114,6 +152,7 @@ interface LazyTreeProps {
|
|
|
114
152
|
filter?: string;
|
|
115
153
|
/**
|
|
116
154
|
* 是否可拖拽
|
|
155
|
+
* @default false
|
|
117
156
|
*/
|
|
118
157
|
draggable?: boolean;
|
|
119
158
|
/**
|
|
@@ -121,28 +160,20 @@ interface LazyTreeProps {
|
|
|
121
160
|
*/
|
|
122
161
|
actions?: IAction[];
|
|
123
162
|
/**
|
|
124
|
-
*
|
|
163
|
+
* 节点编辑信息
|
|
125
164
|
*/
|
|
126
|
-
|
|
127
|
-
type: 'file' | 'folder';
|
|
128
|
-
parent: LazyTreeNode;
|
|
129
|
-
} | null;
|
|
165
|
+
nodeEditInfo?: INodeEditInfo;
|
|
130
166
|
/**
|
|
131
167
|
* 确认
|
|
132
168
|
* @param name
|
|
133
|
-
* @param node
|
|
134
169
|
* @returns
|
|
135
170
|
*/
|
|
136
|
-
onConfirm?: (name: string
|
|
171
|
+
onConfirm?: (name: string) => Promise<void> | void;
|
|
137
172
|
/**
|
|
138
173
|
* 取消
|
|
139
174
|
* @returns
|
|
140
175
|
*/
|
|
141
176
|
onCancel?: () => void;
|
|
142
|
-
/**
|
|
143
|
-
* 编辑的节点 id
|
|
144
|
-
*/
|
|
145
|
-
editNodeId?: string | null;
|
|
146
177
|
}
|
|
147
178
|
export interface LazyTreeRef {
|
|
148
179
|
/**
|
|
@@ -57,4 +57,4 @@ export { ProjectSvg } from './project-svg';
|
|
|
57
57
|
export { WorlSpaceSvg } from './workspace-svg';
|
|
58
58
|
export { NewFolderSvg, NewFileSvg } from './new-folder-svg';
|
|
59
59
|
export { EyeSvg } from './eye-svg';
|
|
60
|
-
export { MoveFileSvg } from './move-file-svg';
|
|
60
|
+
export { MoveFileSvg, UploadFileSvg } from './move-file-svg';
|
|
@@ -93,4 +93,24 @@ export interface IRemoteMessage {
|
|
|
93
93
|
* 创建时间
|
|
94
94
|
*/
|
|
95
95
|
create_time: string | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* 智能体消息类型,默认 | 工具调用 | 用户消息补充(老数据可能没值)
|
|
98
|
+
*/
|
|
99
|
+
type: 'default' | 'toolcall_step' | 'supplement_step' | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* 输入token数
|
|
102
|
+
*/
|
|
103
|
+
input_tokens: number | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* 输出token数
|
|
106
|
+
*/
|
|
107
|
+
output_tokens: number | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* 总token数
|
|
110
|
+
*/
|
|
111
|
+
total_tokens: number | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* 工具调用数
|
|
114
|
+
*/
|
|
115
|
+
tool_calls: number | undefined;
|
|
96
116
|
}
|
|
@@ -159,12 +159,13 @@ export declare const EN: {
|
|
|
159
159
|
projectPlaceholder: string;
|
|
160
160
|
workSpace: string;
|
|
161
161
|
listMode: string;
|
|
162
|
-
|
|
162
|
+
cardMode: string;
|
|
163
163
|
notYetSupported: string;
|
|
164
164
|
fileName: string;
|
|
165
165
|
size: string;
|
|
166
166
|
type: string;
|
|
167
167
|
folder: string;
|
|
168
|
+
file: string;
|
|
168
169
|
move: string;
|
|
169
170
|
new: string;
|
|
170
171
|
newFile: string;
|
|
@@ -175,5 +176,8 @@ export declare const EN: {
|
|
|
175
176
|
moveToSelf: string;
|
|
176
177
|
moveToDescendant: string;
|
|
177
178
|
moveToSameParent: string;
|
|
178
|
-
|
|
179
|
+
alreadyExists: string;
|
|
180
|
+
uploadFile: string;
|
|
181
|
+
fileContent: string;
|
|
182
|
+
clear: string;
|
|
179
183
|
};
|
|
@@ -159,12 +159,13 @@ export declare const ZH_CN: {
|
|
|
159
159
|
projectPlaceholder: string;
|
|
160
160
|
workSpace: string;
|
|
161
161
|
listMode: string;
|
|
162
|
-
|
|
162
|
+
cardMode: string;
|
|
163
163
|
notYetSupported: string;
|
|
164
164
|
fileName: string;
|
|
165
165
|
size: string;
|
|
166
166
|
type: string;
|
|
167
167
|
folder: string;
|
|
168
|
+
file: string;
|
|
168
169
|
move: string;
|
|
169
170
|
new: string;
|
|
170
171
|
newFile: string;
|
|
@@ -175,5 +176,8 @@ export declare const ZH_CN: {
|
|
|
175
176
|
moveToSelf: string;
|
|
176
177
|
moveToDescendant: string;
|
|
177
178
|
moveToSameParent: string;
|
|
178
|
-
|
|
179
|
+
alreadyExists: string;
|
|
180
|
+
uploadFile: string;
|
|
181
|
+
fileContent: string;
|
|
182
|
+
clear: string;
|
|
179
183
|
};
|