@opentiny/next-remoter 0.2.3 → 0.2.4
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/components/BubbleImageRenderer.vue.d.ts +15 -0
- package/dist/components/TinyRobotChat.vue.d.ts +48 -11
- package/dist/components/tokenUsage.vue.d.ts +18 -6
- package/dist/composable/CustomAgentModelProvider.d.ts +0 -22
- package/dist/composable/streamVisitor.d.ts +75 -0
- package/dist/composable/useConversationHistory.d.ts +24 -0
- package/dist/composable/useMessageRoles.d.ts +54 -0
- package/dist/composable/usePluginSession.d.ts +25 -0
- package/dist/composable/useSkill.d.ts +21 -22
- package/dist/multimodal/index.d.ts +6 -0
- package/dist/multimodal/useMultimodal.d.ts +210 -0
- package/dist/multimodal/utils.d.ts +23 -0
- package/dist/next-remoter-runtime.es.js +245188 -236604
- package/dist/next-remoter.cjs.js +49 -71
- package/dist/next-remoter.css +1 -1
- package/dist/next-remoter.es.js +14541 -14077
- package/dist/style.css +1 -1
- package/dist/types/model-config.d.ts +14 -0
- package/package.json +9 -7
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 多模态消息工具函数
|
|
3
|
+
* 提供文件转base64等基础功能
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* 将文件转换为 base64 DataURL
|
|
7
|
+
* @param file 文件对象
|
|
8
|
+
* @returns Promise<string> base64 DataURL字符串
|
|
9
|
+
*/
|
|
10
|
+
export declare function fileToBase64(file: File): Promise<string>;
|
|
11
|
+
/**
|
|
12
|
+
* 检查文件是否为图片
|
|
13
|
+
* @param file 文件对象
|
|
14
|
+
* @returns boolean
|
|
15
|
+
*/
|
|
16
|
+
export declare function isImageFile(file: File): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 验证文件大小
|
|
19
|
+
* @param file 文件对象
|
|
20
|
+
* @param maxSizeMB 最大大小(MB)
|
|
21
|
+
* @returns boolean
|
|
22
|
+
*/
|
|
23
|
+
export declare function validateFileSize(file: File, maxSizeMB: number): boolean;
|