@opentiny/next-remoter 0.2.6-beta.1 → 0.2.7
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/TinyRobotChat.vue.d.ts +31 -6
- package/dist/composable/CustomAgentModelProvider.d.ts +2 -2
- package/dist/composable/usePluginSession.d.ts +6 -1
- package/dist/composable/useRouteBasedTools.d.ts +23 -0
- package/dist/next-remoter-runtime.es.js +32997 -32877
- package/dist/next-remoter.cjs.js +34 -34
- package/dist/next-remoter.css +1 -1
- package/dist/next-remoter.es.js +5903 -5813
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -22,10 +22,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
22
22
|
selectedModelId: import('vue').PropType<any>;
|
|
23
23
|
genUiAble: import('vue').PropType<any>;
|
|
24
24
|
enabledTools: import('vue').PropType<any>;
|
|
25
|
-
/**
|
|
25
|
+
/** 会话 id,可选;未传时仅显示「打开对话框」,不展示扫码等菜单 */
|
|
26
26
|
sessionId: {
|
|
27
27
|
type: StringConstructor;
|
|
28
|
-
default:
|
|
28
|
+
default: undefined;
|
|
29
29
|
};
|
|
30
30
|
/** 后端的代理服务器地址 */
|
|
31
31
|
agentRoot: {
|
|
@@ -86,7 +86,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
86
86
|
/** 大语言模型配置对象 */
|
|
87
87
|
llmConfig: {
|
|
88
88
|
type: () => ICustomAgentModelProviderLlmConfig | undefined;
|
|
89
|
-
default:
|
|
89
|
+
default: () => {
|
|
90
|
+
baseURL: string;
|
|
91
|
+
genuiUrl: string;
|
|
92
|
+
};
|
|
90
93
|
};
|
|
91
94
|
/** 设置组件运行在普通页面还是浏览器的扩展中 */
|
|
92
95
|
inBrowserExt: {
|
|
@@ -131,6 +134,15 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
131
134
|
type: BooleanConstructor;
|
|
132
135
|
default: boolean;
|
|
133
136
|
};
|
|
137
|
+
/**
|
|
138
|
+
* 开启页面工具按需加载:仅当前激活路由对应的 withPageTools 工具对 LLM 可见,
|
|
139
|
+
* 并在插件面板中展示;未加载页面的工具不会暴露给模型,也不显示在面板上。
|
|
140
|
+
* 默认 false(关闭),需显式传入 :pageToolsOnDemand="true" 开启。
|
|
141
|
+
*/
|
|
142
|
+
pageToolsOnDemand: {
|
|
143
|
+
type: BooleanConstructor;
|
|
144
|
+
default: boolean;
|
|
145
|
+
};
|
|
134
146
|
}>, {
|
|
135
147
|
/** 大模型代理 */
|
|
136
148
|
agent: import('@opentiny/next-sdk').AgentModelProvider;
|
|
@@ -249,10 +261,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
249
261
|
selectedModelId: import('vue').PropType<any>;
|
|
250
262
|
genUiAble: import('vue').PropType<any>;
|
|
251
263
|
enabledTools: import('vue').PropType<any>;
|
|
252
|
-
/**
|
|
264
|
+
/** 会话 id,可选;未传时仅显示「打开对话框」,不展示扫码等菜单 */
|
|
253
265
|
sessionId: {
|
|
254
266
|
type: StringConstructor;
|
|
255
|
-
default:
|
|
267
|
+
default: undefined;
|
|
256
268
|
};
|
|
257
269
|
/** 后端的代理服务器地址 */
|
|
258
270
|
agentRoot: {
|
|
@@ -313,7 +325,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
313
325
|
/** 大语言模型配置对象 */
|
|
314
326
|
llmConfig: {
|
|
315
327
|
type: () => ICustomAgentModelProviderLlmConfig | undefined;
|
|
316
|
-
default:
|
|
328
|
+
default: () => {
|
|
329
|
+
baseURL: string;
|
|
330
|
+
genuiUrl: string;
|
|
331
|
+
};
|
|
317
332
|
};
|
|
318
333
|
/** 设置组件运行在普通页面还是浏览器的扩展中 */
|
|
319
334
|
inBrowserExt: {
|
|
@@ -358,6 +373,15 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
358
373
|
type: BooleanConstructor;
|
|
359
374
|
default: boolean;
|
|
360
375
|
};
|
|
376
|
+
/**
|
|
377
|
+
* 开启页面工具按需加载:仅当前激活路由对应的 withPageTools 工具对 LLM 可见,
|
|
378
|
+
* 并在插件面板中展示;未加载页面的工具不会暴露给模型,也不显示在面板上。
|
|
379
|
+
* 默认 false(关闭),需显式传入 :pageToolsOnDemand="true" 开启。
|
|
380
|
+
*/
|
|
381
|
+
pageToolsOnDemand: {
|
|
382
|
+
type: BooleanConstructor;
|
|
383
|
+
default: boolean;
|
|
384
|
+
};
|
|
361
385
|
}>> & Readonly<{}>, {
|
|
362
386
|
title: string;
|
|
363
387
|
systemPrompt: string;
|
|
@@ -378,6 +402,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
378
402
|
skills: Record<string, string>;
|
|
379
403
|
layoutMode: "absolute" | "fixed" | "static" | "relative" | "sticky";
|
|
380
404
|
debugStream: boolean;
|
|
405
|
+
pageToolsOnDemand: boolean;
|
|
381
406
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
382
407
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
383
408
|
export default _default;
|
|
@@ -25,8 +25,8 @@ export declare class CustomAgentModelProvider extends BaseModelProvider {
|
|
|
25
25
|
* @param providerType 提供商类型
|
|
26
26
|
* @param useReActMode 是否使用 ReAct 模式
|
|
27
27
|
*/
|
|
28
|
-
updateLLMConfig({
|
|
29
|
-
|
|
28
|
+
updateLLMConfig({ model, baseURL, genuiUrl, apiKey, providerType, useReActMode, llm, providerOptions, headers }: {
|
|
29
|
+
model: string;
|
|
30
30
|
baseURL?: string;
|
|
31
31
|
genuiUrl?: string;
|
|
32
32
|
apiKey?: string;
|
|
@@ -6,7 +6,12 @@ import { MenuItemConfig } from '@opentiny/next-sdk';
|
|
|
6
6
|
* 用于处理 sessionId 相关的所有逻辑:扫码添加插件、识别码输入、遥控器初始化等
|
|
7
7
|
*/
|
|
8
8
|
export declare function usePluginSession(options: {
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* 会话 ID:
|
|
11
|
+
* - 初始为 undefined 或空字符串时:先渲染仅含「打开对话框」的 Logo
|
|
12
|
+
* - 后续变为非空字符串时:自动升级为带二维码 / 遥控器等完整菜单
|
|
13
|
+
*/
|
|
14
|
+
sessionId: Ref<string | undefined>;
|
|
10
15
|
agentRoot: string;
|
|
11
16
|
mode: string;
|
|
12
17
|
qrCodeUrl?: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { PluginInfo } from '@opentiny/tiny-robot';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 路由感知工具过滤 composable
|
|
6
|
+
*
|
|
7
|
+
* 支持两种场景:
|
|
8
|
+
* - 同窗口:业务页面与 Remoter 在同一 window,直接读取 getToolRouteMap/getActiveRoutes
|
|
9
|
+
* - iframe:Remoter 在 iframe 内,通过 remoter-ready 握手获取父窗口的路由状态,
|
|
10
|
+
* 并接收父窗口广播的 page-ready/page-leave,实现按需加载
|
|
11
|
+
*
|
|
12
|
+
* 默认关闭(enabled = false),需显式传入 :pageToolsOnDemand="true" 开启。
|
|
13
|
+
*/
|
|
14
|
+
export declare function useRouteBasedTools(options: {
|
|
15
|
+
/** 是否启用路由感知模式,默认 false,支持运行时动态切换 */
|
|
16
|
+
enabled: Ref<boolean>;
|
|
17
|
+
/** 仅依赖 ignoreToolnames 的最小 Agent 约束 */
|
|
18
|
+
agent: {
|
|
19
|
+
ignoreToolnames: string[];
|
|
20
|
+
};
|
|
21
|
+
/** 已安装插件列表的响应式引用,用于同步 UI 开关状态 */
|
|
22
|
+
installedPlugins: Ref<PluginInfo[]>;
|
|
23
|
+
}): void;
|