@opentiny/next-remoter 0.2.0 → 0.2.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/README.md +1 -1
- package/dist/components/GenUISwitch.vue.d.ts +6 -0
- package/dist/components/ModelSwitch.vue.d.ts +14 -1
- package/dist/composable/CustomAgentModelProvider.d.ts +5 -4
- package/dist/composable/useModel.d.ts +6 -4
- package/dist/composable/usePlugin.d.ts +98 -0
- package/dist/index.d.ts +1 -5
- package/dist/next-remoter-runtime.es.js +73066 -76057
- package/dist/next-remoter.cjs.js +55 -55
- package/dist/next-remoter.css +1 -1
- package/dist/next-remoter.es.js +10596 -10772
- package/dist/style.css +1 -1
- package/dist/types/model-config.d.ts +5 -11
- package/package.json +3 -3
- package/dist/config/model-config.d.ts +0 -17
- package/dist/utils/storage-keys.d.ts +0 -25
- package/dist/utils/storage-manager.d.ts +0 -153
- /package/dist/components/{qr-code-scan.vue.d.ts → QrCodeScan.vue.d.ts} +0 -0
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { ICustomAgentModelProviderLlmConfig } from './type';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* 统一模型配置接口
|
|
6
|
+
* 基于 ICustomAgentModelProviderLlmConfig,额外添加了 UI 展示相关的字段
|
|
6
7
|
* Unified model configuration interface
|
|
8
|
+
* Based on ICustomAgentModelProviderLlmConfig, with additional UI display fields
|
|
7
9
|
*/
|
|
8
|
-
export
|
|
10
|
+
export type UnifiedModelConfig = ICustomAgentModelProviderLlmConfig & {
|
|
9
11
|
/** 模型唯一标识 Model unique identifier */
|
|
10
12
|
id: string;
|
|
11
13
|
/** 显示名称 Display name */
|
|
12
14
|
label: string;
|
|
13
|
-
/** API 配置 - API Key */
|
|
14
|
-
apiKey: string;
|
|
15
|
-
/** API 配置 - Base URL */
|
|
16
|
-
apiUrl: string;
|
|
17
|
-
/** 模型提供商类型 Provider type */
|
|
18
|
-
providerType: 'deepseek' | 'openai' | ((options: any) => ProviderV2);
|
|
19
15
|
/** 模型图标组件 Icon component */
|
|
20
16
|
icon?: Component;
|
|
21
17
|
/** 是否为默认模型 Is default model */
|
|
22
18
|
isDefault?: boolean;
|
|
23
19
|
/** 模型描述(可选)Description (optional) */
|
|
24
20
|
description?: string;
|
|
25
|
-
|
|
26
|
-
useReActMode?: boolean;
|
|
27
|
-
}
|
|
21
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/next-remoter",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@modelcontextprotocol/sdk": "~1.
|
|
14
|
+
"@modelcontextprotocol/sdk": "~1.25.2",
|
|
15
15
|
"@opentiny/genui-sdk": "0.0.1-alpha.0",
|
|
16
16
|
"@opentiny/genui-sdk-vue": "0.0.1-alpha.8",
|
|
17
17
|
"@opentiny/tiny-robot": "0.3.1-alpha.6",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@ai-sdk/deepseek": "1.0.30",
|
|
30
30
|
"@ai-sdk/openai": "^2.0.76",
|
|
31
31
|
"@ai-sdk/provider": "^2.0.0",
|
|
32
|
-
"@opentiny/next-sdk": "0.2.
|
|
32
|
+
"@opentiny/next-sdk": "0.2.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@opentiny/unplugin-tiny-vue": "^1.0.0",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { UnifiedModelConfig } from '../types/model-config';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 统一的模型配置列表
|
|
5
|
-
* Unified model configuration list
|
|
6
|
-
*/
|
|
7
|
-
export declare const UNIFIED_MODEL_CONFIGS: UnifiedModelConfig[];
|
|
8
|
-
/**
|
|
9
|
-
* 获取默认模型配置
|
|
10
|
-
* Get default model configuration
|
|
11
|
-
*/
|
|
12
|
-
export declare function getDefaultModelConfig(): UnifiedModelConfig;
|
|
13
|
-
/**
|
|
14
|
-
* 根据模型 ID 获取模型配置
|
|
15
|
-
* Get model configuration by model ID
|
|
16
|
-
*/
|
|
17
|
-
export declare function getModelConfig(modelId: string): UnifiedModelConfig | undefined;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 存储键常量定义
|
|
3
|
-
* 统一管理所有存储相关的 key,避免硬编码
|
|
4
|
-
* Storage key constants
|
|
5
|
-
* Unified management of all storage-related keys to avoid hardcoding
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* 存储键枚举
|
|
9
|
-
* Storage key enumeration
|
|
10
|
-
*/
|
|
11
|
-
export declare const StorageKeys: {
|
|
12
|
-
/** 选中的模型ID Selected model ID */
|
|
13
|
-
readonly SELECTED_MODEL: "next-remoter-selected-model";
|
|
14
|
-
/** 生成式UI启用状态 GenUI enabled state */
|
|
15
|
-
readonly GENUI_ENABLED: "next-remoter-genui-enabled";
|
|
16
|
-
/** 本地工具存储 Local tool storage */
|
|
17
|
-
readonly LOCAL_TOOL_STORAGE: "local-tool-storage";
|
|
18
|
-
/** MCP Session ID */
|
|
19
|
-
readonly MCP_SESSION_ID: "mcp-sessionId";
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* 存储键类型
|
|
23
|
-
* Storage key type
|
|
24
|
-
*/
|
|
25
|
-
export type StorageKey = (typeof StorageKeys)[keyof typeof StorageKeys];
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { StorageKeys, StorageKey } from './storage-keys';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 存储适配器接口
|
|
5
|
-
* 定义存储操作的统一接口,可以轻松切换实现(localStorage、API等)
|
|
6
|
-
* Storage adapter interface
|
|
7
|
-
* Defines unified interface for storage operations, can easily switch implementations (localStorage, API, etc.)
|
|
8
|
-
*/
|
|
9
|
-
export interface IStorageAdapter {
|
|
10
|
-
/**
|
|
11
|
-
* 获取存储值
|
|
12
|
-
* Get storage value
|
|
13
|
-
*/
|
|
14
|
-
getItem<T = any>(key: string): Promise<T | null> | T | null;
|
|
15
|
-
/**
|
|
16
|
-
* 设置存储值
|
|
17
|
-
* Set storage value
|
|
18
|
-
*/
|
|
19
|
-
setItem<T = any>(key: string, value: T): Promise<void> | void;
|
|
20
|
-
/**
|
|
21
|
-
* 删除存储值
|
|
22
|
-
* Remove storage value
|
|
23
|
-
*/
|
|
24
|
-
removeItem(key: string): Promise<void> | void;
|
|
25
|
-
/**
|
|
26
|
-
* 清空所有存储
|
|
27
|
-
* Clear all storage
|
|
28
|
-
*/
|
|
29
|
-
clear(): Promise<void> | void;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* 存储管理器配置
|
|
33
|
-
* Storage manager configuration
|
|
34
|
-
*/
|
|
35
|
-
export interface StorageManagerConfig {
|
|
36
|
-
/**
|
|
37
|
-
* 存储适配器
|
|
38
|
-
* 默认使用 LocalStorageAdapter
|
|
39
|
-
* 可以通过自定义适配器对接后台服务
|
|
40
|
-
* Storage adapter
|
|
41
|
-
* Defaults to LocalStorageAdapter
|
|
42
|
-
* Can use custom adapter to integrate with backend services
|
|
43
|
-
*/
|
|
44
|
-
adapter?: IStorageAdapter;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* 统一存储管理器
|
|
48
|
-
* 提供类型安全的存储操作接口
|
|
49
|
-
* Unified storage manager
|
|
50
|
-
* Provides type-safe storage operation interface
|
|
51
|
-
*/
|
|
52
|
-
export declare class StorageManager {
|
|
53
|
-
private adapter;
|
|
54
|
-
constructor(config?: StorageManagerConfig);
|
|
55
|
-
/**
|
|
56
|
-
* 获取存储值
|
|
57
|
-
* Get storage value
|
|
58
|
-
*/
|
|
59
|
-
getItem<T = any>(key: StorageKey): T | null;
|
|
60
|
-
/**
|
|
61
|
-
* 异步获取存储值
|
|
62
|
-
* Get storage value asynchronously
|
|
63
|
-
*/
|
|
64
|
-
getItemAsync<T = any>(key: StorageKey): Promise<T | null>;
|
|
65
|
-
/**
|
|
66
|
-
* 设置存储值
|
|
67
|
-
* Set storage value
|
|
68
|
-
*/
|
|
69
|
-
setItem<T = any>(key: StorageKey, value: T): void;
|
|
70
|
-
/**
|
|
71
|
-
* 异步设置存储值
|
|
72
|
-
* Set storage value asynchronously
|
|
73
|
-
*/
|
|
74
|
-
setItemAsync<T = any>(key: StorageKey, value: T): Promise<void>;
|
|
75
|
-
/**
|
|
76
|
-
* 删除存储值
|
|
77
|
-
* Remove storage value
|
|
78
|
-
*/
|
|
79
|
-
removeItem(key: StorageKey): void;
|
|
80
|
-
/**
|
|
81
|
-
* 异步删除存储值
|
|
82
|
-
* Remove storage value asynchronously
|
|
83
|
-
*/
|
|
84
|
-
removeItemAsync(key: StorageKey): Promise<void>;
|
|
85
|
-
/**
|
|
86
|
-
* 清空所有存储
|
|
87
|
-
* Clear all storage
|
|
88
|
-
*/
|
|
89
|
-
clear(): void;
|
|
90
|
-
/**
|
|
91
|
-
* 异步清空所有存储
|
|
92
|
-
* Clear all storage asynchronously
|
|
93
|
-
*/
|
|
94
|
-
clearAsync(): Promise<void>;
|
|
95
|
-
/**
|
|
96
|
-
* 切换存储适配器
|
|
97
|
-
* Switch storage adapter
|
|
98
|
-
*/
|
|
99
|
-
setAdapter(adapter: IStorageAdapter): void;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* 获取默认存储管理器实例
|
|
103
|
-
* Get default storage manager instance
|
|
104
|
-
*/
|
|
105
|
-
export declare function getStorageManager(config?: StorageManagerConfig): StorageManager;
|
|
106
|
-
/**
|
|
107
|
-
* 创建新的存储管理器实例
|
|
108
|
-
* Create a new storage manager instance
|
|
109
|
-
*/
|
|
110
|
-
export declare function createStorageManager(config?: StorageManagerConfig): StorageManager;
|
|
111
|
-
export { StorageKeys };
|
|
112
|
-
export declare const storage: {
|
|
113
|
-
/**
|
|
114
|
-
* 获取存储值
|
|
115
|
-
* Get storage value
|
|
116
|
-
*/
|
|
117
|
-
getItem: <T = any>(key: StorageKey) => T | null;
|
|
118
|
-
/**
|
|
119
|
-
* 异步获取存储值
|
|
120
|
-
* Get storage value asynchronously
|
|
121
|
-
*/
|
|
122
|
-
getItemAsync: <T = any>(key: StorageKey) => Promise<T | null>;
|
|
123
|
-
/**
|
|
124
|
-
* 设置存储值
|
|
125
|
-
* Set storage value
|
|
126
|
-
*/
|
|
127
|
-
setItem: <T = any>(key: StorageKey, value: T) => void;
|
|
128
|
-
/**
|
|
129
|
-
* 异步设置存储值
|
|
130
|
-
* Set storage value asynchronously
|
|
131
|
-
*/
|
|
132
|
-
setItemAsync: <T = any>(key: StorageKey, value: T) => Promise<void>;
|
|
133
|
-
/**
|
|
134
|
-
* 删除存储值
|
|
135
|
-
* Remove storage value
|
|
136
|
-
*/
|
|
137
|
-
removeItem: (key: StorageKey) => void;
|
|
138
|
-
/**
|
|
139
|
-
* 异步删除存储值
|
|
140
|
-
* Remove storage value asynchronously
|
|
141
|
-
*/
|
|
142
|
-
removeItemAsync: (key: StorageKey) => Promise<void>;
|
|
143
|
-
/**
|
|
144
|
-
* 清空所有存储
|
|
145
|
-
* Clear all storage
|
|
146
|
-
*/
|
|
147
|
-
clear: () => void;
|
|
148
|
-
/**
|
|
149
|
-
* 异步清空所有存储
|
|
150
|
-
* Clear all storage asynchronously
|
|
151
|
-
*/
|
|
152
|
-
clearAsync: () => Promise<void>;
|
|
153
|
-
};
|
|
File without changes
|