@opentiny/tiny-robot 0.3.0-alpha.37 → 0.3.0-alpha.38
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/bubble/index.js +1268 -1269
- package/dist/flow-layout-buttons/index.js +1 -1
- package/dist/index.d.ts +1 -51
- package/dist/index2.js +15 -15
- package/dist/mcp-server-picker/index.js +1 -1
- package/dist/prompts/index.js +5 -5
- package/dist/sender/index.js +949 -1073
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -115,7 +115,7 @@ const P = ["onClick"], Q = {
|
|
|
115
115
|
])
|
|
116
116
|
], 512));
|
|
117
117
|
}
|
|
118
|
-
}), p = /* @__PURE__ */ K(ee, [["__scopeId", "data-v-
|
|
118
|
+
}), p = /* @__PURE__ */ K(ee, [["__scopeId", "data-v-f82cf3dc"]]);
|
|
119
119
|
p.name = "TrFlowLayout";
|
|
120
120
|
const te = function(d) {
|
|
121
121
|
d.component(p.name, p);
|
package/dist/index.d.ts
CHANGED
|
@@ -376,8 +376,8 @@ allowSpeech: boolean;
|
|
|
376
376
|
allowFiles: boolean;
|
|
377
377
|
submitType: SubmitTrigger;
|
|
378
378
|
stopText: string;
|
|
379
|
-
autoSize: AutoSize;
|
|
380
379
|
suggestions: ISuggestionItem[];
|
|
380
|
+
autoSize: AutoSize;
|
|
381
381
|
clearable: boolean;
|
|
382
382
|
maxLength: number;
|
|
383
383
|
showWordLimit: boolean;
|
|
@@ -389,11 +389,6 @@ senderRef: HTMLDivElement;
|
|
|
389
389
|
inputWrapperRef: HTMLDivElement;
|
|
390
390
|
templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
391
391
|
modelValue?: UserItem[];
|
|
392
|
-
} & {
|
|
393
|
-
autoSize: boolean | {
|
|
394
|
-
minRows: number;
|
|
395
|
-
maxRows: number;
|
|
396
|
-
};
|
|
397
392
|
}> & Readonly<{
|
|
398
393
|
onSubmit?: (() => any) | undefined;
|
|
399
394
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
@@ -415,11 +410,6 @@ M: {};
|
|
|
415
410
|
Defaults: {};
|
|
416
411
|
}, Readonly<{
|
|
417
412
|
modelValue?: UserItem[];
|
|
418
|
-
} & {
|
|
419
|
-
autoSize: boolean | {
|
|
420
|
-
minRows: number;
|
|
421
|
-
maxRows: number;
|
|
422
|
-
};
|
|
423
413
|
}> & Readonly<{
|
|
424
414
|
onSubmit?: (() => any) | undefined;
|
|
425
415
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
@@ -1231,7 +1221,6 @@ declare function __VLS_template_7(): {
|
|
|
1231
1221
|
slots: {
|
|
1232
1222
|
header?(_: {}): any;
|
|
1233
1223
|
prefix?(_: {}): any;
|
|
1234
|
-
content?(_: {}): any;
|
|
1235
1224
|
decorativeContent?(_: {}): any;
|
|
1236
1225
|
actions?(_: {}): any;
|
|
1237
1226
|
'footer-left'?(_: {}): any;
|
|
@@ -1243,11 +1232,6 @@ declare function __VLS_template_7(): {
|
|
|
1243
1232
|
inputWrapperRef: HTMLDivElement;
|
|
1244
1233
|
templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
1245
1234
|
modelValue?: UserItem[];
|
|
1246
|
-
} & {
|
|
1247
|
-
autoSize: boolean | {
|
|
1248
|
-
minRows: number;
|
|
1249
|
-
maxRows: number;
|
|
1250
|
-
};
|
|
1251
1235
|
}> & Readonly<{
|
|
1252
1236
|
onSubmit?: (() => any) | undefined;
|
|
1253
1237
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
@@ -1269,11 +1253,6 @@ declare function __VLS_template_7(): {
|
|
|
1269
1253
|
Defaults: {};
|
|
1270
1254
|
}, Readonly<{
|
|
1271
1255
|
modelValue?: UserItem[];
|
|
1272
|
-
} & {
|
|
1273
|
-
autoSize: boolean | {
|
|
1274
|
-
minRows: number;
|
|
1275
|
-
maxRows: number;
|
|
1276
|
-
};
|
|
1277
1256
|
}> & Readonly<{
|
|
1278
1257
|
onSubmit?: (() => any) | undefined;
|
|
1279
1258
|
"onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
|
|
@@ -2058,26 +2037,18 @@ export declare type BubbleRoleConfig = BubbleCommonProps & {
|
|
|
2058
2037
|
export declare interface BubbleSlots {
|
|
2059
2038
|
default?: (slotProps: {
|
|
2060
2039
|
bubbleProps: BubbleProps;
|
|
2061
|
-
index?: number;
|
|
2062
2040
|
}) => unknown;
|
|
2063
2041
|
footer?: (slotProps: {
|
|
2064
2042
|
bubbleProps: BubbleProps;
|
|
2065
|
-
index?: number;
|
|
2066
2043
|
}) => unknown;
|
|
2067
2044
|
loading?: (slotProps: {
|
|
2068
2045
|
bubbleProps: BubbleProps;
|
|
2069
|
-
index?: number;
|
|
2070
|
-
}) => unknown;
|
|
2071
|
-
trailer?: (slotProps: {
|
|
2072
|
-
bubbleProps: BubbleProps;
|
|
2073
|
-
index?: number;
|
|
2074
2046
|
}) => unknown;
|
|
2075
2047
|
}
|
|
2076
2048
|
|
|
2077
2049
|
export declare interface ButtonGroupConfig {
|
|
2078
2050
|
file?: ControlState & fileUploadConfig;
|
|
2079
2051
|
submit?: ControlState;
|
|
2080
|
-
voice?: VoiceButtonConfig;
|
|
2081
2052
|
}
|
|
2082
2053
|
|
|
2083
2054
|
export declare type ColorMode = 'light' | 'dark' | 'auto';
|
|
@@ -2108,7 +2079,6 @@ export declare interface ContainerSlots {
|
|
|
2108
2079
|
export declare interface ControlState {
|
|
2109
2080
|
tooltips?: string | TooltipRender;
|
|
2110
2081
|
disabled?: boolean;
|
|
2111
|
-
tooltipPlacement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
2112
2082
|
}
|
|
2113
2083
|
|
|
2114
2084
|
declare const _default: {
|
|
@@ -2950,30 +2920,14 @@ export declare interface SenderProps {
|
|
|
2950
2920
|
stopText?: string;
|
|
2951
2921
|
}
|
|
2952
2922
|
|
|
2953
|
-
export declare interface SpeechCallbacks {
|
|
2954
|
-
onStart: () => void;
|
|
2955
|
-
onInterim: (transcript: string) => void;
|
|
2956
|
-
onFinal: (transcript: string) => void;
|
|
2957
|
-
onEnd: (transcript?: string) => void;
|
|
2958
|
-
onError: (error: Error) => void;
|
|
2959
|
-
}
|
|
2960
|
-
|
|
2961
2923
|
export declare interface SpeechConfig {
|
|
2962
|
-
customHandler?: SpeechHandler;
|
|
2963
2924
|
lang?: string;
|
|
2964
2925
|
continuous?: boolean;
|
|
2965
2926
|
interimResults?: boolean;
|
|
2966
2927
|
autoReplace?: boolean;
|
|
2967
|
-
onVoiceButtonClick?: (isRecording: boolean, preventDefault: () => void) => void | Promise<void>;
|
|
2968
2928
|
}
|
|
2969
2929
|
|
|
2970
2930
|
export declare interface SpeechHandler {
|
|
2971
|
-
start: (callbacks: SpeechCallbacks) => Promise<void> | void;
|
|
2972
|
-
stop: () => Promise<void> | void;
|
|
2973
|
-
isSupported: () => boolean;
|
|
2974
|
-
}
|
|
2975
|
-
|
|
2976
|
-
export declare interface SpeechHandlerResult {
|
|
2977
2931
|
speechState: SpeechState;
|
|
2978
2932
|
start: () => void;
|
|
2979
2933
|
stop: () => void;
|
|
@@ -3227,10 +3181,6 @@ export declare function useTouchDevice(): {
|
|
|
3227
3181
|
*/
|
|
3228
3182
|
export declare const vDropzone: Directive<DragAwareElement, DropzoneBinding>;
|
|
3229
3183
|
|
|
3230
|
-
declare interface VoiceButtonConfig {
|
|
3231
|
-
icon?: VNode | Component;
|
|
3232
|
-
}
|
|
3233
|
-
|
|
3234
3184
|
export declare interface WelcomeProps {
|
|
3235
3185
|
title: string;
|
|
3236
3186
|
description: string;
|
package/dist/index2.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ref as y, onMounted as ee, onBeforeUnmount as te, defineComponent as N, createElementBlock as r, openBlock as s, createElementVNode as R, createVNode as
|
|
1
|
+
import { ref as y, onMounted as ee, onBeforeUnmount as te, defineComponent as N, createElementBlock as r, openBlock as s, createElementVNode as R, createVNode as b, unref as n, toDisplayString as B, mergeModels as K, useModel as W, computed as x, normalizeStyle as ne, Fragment as O, renderList as V, createBlock as Q, resolveDynamicComponent as oe, nextTick as ie, normalizeClass as S, withDirectives as j, createCommentVNode as U, withKeys as q, withModifiers as A, isRef as se, vModelText as le, vShow as re } from "vue";
|
|
2
2
|
import { IconEmptySearch as ae, IconEditPen as ue, IconDelete as ce, IconCheck as de, IconClose as me, IconMenu2 as fe } from "@opentiny/tiny-robot-svgs";
|
|
3
3
|
import { _ as P } from "./_plugin-vue_export-helper.js";
|
|
4
4
|
import { o as X, a as pe, d as ve, c as _e } from "./index3.js";
|
|
5
5
|
import { t as G } from "./utils.js";
|
|
6
6
|
const D = y(!1);
|
|
7
|
-
let
|
|
7
|
+
let T = 0, $;
|
|
8
8
|
function ge() {
|
|
9
9
|
const i = window.matchMedia("(hover: none) and (pointer: coarse)"), m = () => {
|
|
10
10
|
D.value = i.matches;
|
|
@@ -24,9 +24,9 @@ function he() {
|
|
|
24
24
|
return typeof window > "u" ? {
|
|
25
25
|
isTouchDevice: D
|
|
26
26
|
} : (ee(() => {
|
|
27
|
-
|
|
27
|
+
T++, T === 1 && ($ = ge());
|
|
28
28
|
}), te(() => {
|
|
29
|
-
|
|
29
|
+
T = Math.max(0, T - 1), T === 0 && ye();
|
|
30
30
|
}), {
|
|
31
31
|
isTouchDevice: D
|
|
32
32
|
});
|
|
@@ -40,7 +40,7 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
|
|
|
40
40
|
const m = i;
|
|
41
41
|
return (t, c) => (s(), r("div", Ce, [
|
|
42
42
|
R("span", ke, [
|
|
43
|
-
|
|
43
|
+
b(n(ae))
|
|
44
44
|
]),
|
|
45
45
|
R("span", Le, B(m.text), 1)
|
|
46
46
|
]));
|
|
@@ -92,7 +92,7 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
|
|
|
92
92
|
], 8, Re))), 128))
|
|
93
93
|
], 4));
|
|
94
94
|
}
|
|
95
|
-
}), Ie = /* @__PURE__ */ P(xe, [["__scopeId", "data-v-
|
|
95
|
+
}), Ie = /* @__PURE__ */ P(xe, [["__scopeId", "data-v-c8365732"]]), Me = ({
|
|
96
96
|
renameControlOnClickOutside: i,
|
|
97
97
|
onItemTitleChange: m
|
|
98
98
|
}) => {
|
|
@@ -131,10 +131,10 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
|
|
|
131
131
|
handleEditCancel: k,
|
|
132
132
|
handleEditConfirm: w
|
|
133
133
|
};
|
|
134
|
-
}, J = Symbol("NO_GROUP"),
|
|
134
|
+
}, J = Symbol("NO_GROUP"), Te = {
|
|
135
135
|
key: 0,
|
|
136
136
|
class: "tr-history__group-title"
|
|
137
|
-
},
|
|
137
|
+
}, be = { class: "tr-history__group-items" }, $e = ["onClick"], Ge = ["title"], Oe = ["onClick"], Be = /* @__PURE__ */ N({
|
|
138
138
|
__name: "index",
|
|
139
139
|
props: {
|
|
140
140
|
data: {},
|
|
@@ -191,8 +191,8 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
|
|
|
191
191
|
class: "tr-history__group",
|
|
192
192
|
key: f.group
|
|
193
193
|
}, [
|
|
194
|
-
f.group !== n(J) ? (s(), r("div",
|
|
195
|
-
R("div",
|
|
194
|
+
f.group !== n(J) ? (s(), r("div", Te, B(f.group), 1)) : U("", !0),
|
|
195
|
+
R("div", be, [
|
|
196
196
|
(s(!0), r(O, null, V(f.items, (u, Z) => (s(), r("div", {
|
|
197
197
|
class: S(["tr-history__item", {
|
|
198
198
|
selected: u.id && u.id === t.selected,
|
|
@@ -245,7 +245,7 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
|
|
|
245
245
|
onClick: e[4] || (e[4] = //@ts-ignore
|
|
246
246
|
(...d) => n(v) && n(v)(...d))
|
|
247
247
|
}, [
|
|
248
|
-
|
|
248
|
+
b(n(de))
|
|
249
249
|
], 512)) : U("", !0),
|
|
250
250
|
t.showRenameControls && n(p) === u ? (s(), r("button", {
|
|
251
251
|
key: 1,
|
|
@@ -256,19 +256,19 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
|
|
|
256
256
|
onClick: e[5] || (e[5] = //@ts-ignore
|
|
257
257
|
(...d) => n(o) && n(o)(...d))
|
|
258
258
|
}, [
|
|
259
|
-
|
|
259
|
+
b(n(me))
|
|
260
260
|
], 512)) : U("", !0),
|
|
261
261
|
R("button", {
|
|
262
262
|
class: S(["menu", { hidden: n(p) === u }]),
|
|
263
263
|
onClick: (d) => z(d, u)
|
|
264
264
|
}, [
|
|
265
|
-
|
|
265
|
+
b(n(fe))
|
|
266
266
|
], 10, Oe)
|
|
267
267
|
])
|
|
268
268
|
], 10, $e))), 128))
|
|
269
269
|
])
|
|
270
270
|
]))), 128)),
|
|
271
|
-
j(
|
|
271
|
+
j(b(Ie, {
|
|
272
272
|
trigger: _.value,
|
|
273
273
|
"onUpdate:trigger": e[7] || (e[7] = (f) => _.value = f),
|
|
274
274
|
data: a.value,
|
|
@@ -282,7 +282,7 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
|
|
|
282
282
|
], 64))
|
|
283
283
|
], 2));
|
|
284
284
|
}
|
|
285
|
-
}), H = /* @__PURE__ */ P(Be, [["__scopeId", "data-v-
|
|
285
|
+
}), H = /* @__PURE__ */ P(Be, [["__scopeId", "data-v-18ccfabf"]]), De = function(i) {
|
|
286
286
|
i.component(H.name, H);
|
|
287
287
|
};
|
|
288
288
|
Object.assign(H, {
|
|
@@ -171,7 +171,7 @@ const $e = { class: "plugin-card__main" }, Be = ["src"], Ve = { class: "plugin-c
|
|
|
171
171
|
})) : v("", !0)
|
|
172
172
|
], 2));
|
|
173
173
|
}
|
|
174
|
-
}), te = /* @__PURE__ */ z(We, [["__scopeId", "data-v-
|
|
174
|
+
}), te = /* @__PURE__ */ z(We, [["__scopeId", "data-v-c4e722eb"]]), Xe = {
|
|
175
175
|
key: 0,
|
|
176
176
|
class: "plugin-editor__backdrop"
|
|
177
177
|
}, Ye = { class: "plugin-editor__header" }, Ze = /* @__PURE__ */ q({
|
package/dist/prompts/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as f, createElementBlock as r, openBlock as e, normalizeClass as y, createBlock as m, createElementVNode as i, resolveDynamicComponent as u, createCommentVNode as h, toDisplayString as l, Fragment as k, createTextVNode as P, renderSlot as B, renderList as w, mergeProps as x, toRaw as S } from "vue";
|
|
2
2
|
import { _ as v } from "../_plugin-vue_export-helper.js";
|
|
3
3
|
const z = { class: "tr-prompt__content" }, N = { class: "tr-prompt__content-title" }, T = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "tr-prompt__content-description"
|
|
6
|
-
}, V = { class: "tr-prompt__badge" }, $ = /* @__PURE__ */
|
|
6
|
+
}, V = { class: "tr-prompt__badge" }, $ = /* @__PURE__ */ f({
|
|
7
7
|
__name: "prompt",
|
|
8
8
|
props: {
|
|
9
9
|
label: {},
|
|
@@ -17,7 +17,7 @@ const z = { class: "tr-prompt__content" }, N = { class: "tr-prompt__content-titl
|
|
|
17
17
|
setup(o) {
|
|
18
18
|
const t = o;
|
|
19
19
|
return (s, d) => (e(), r("div", {
|
|
20
|
-
class:
|
|
20
|
+
class: y(["tr-prompt", { disabled: t.disabled }, t.size])
|
|
21
21
|
}, [
|
|
22
22
|
(e(), m(u(t.icon))),
|
|
23
23
|
i("div", z, [
|
|
@@ -31,7 +31,7 @@ const z = { class: "tr-prompt__content" }, N = { class: "tr-prompt__content-titl
|
|
|
31
31
|
])
|
|
32
32
|
], 2));
|
|
33
33
|
}
|
|
34
|
-
}), n = /* @__PURE__ */ v($, [["__scopeId", "data-v-
|
|
34
|
+
}), n = /* @__PURE__ */ v($, [["__scopeId", "data-v-fdc72803"]]), D = { class: "tr-prompts" }, E = /* @__PURE__ */ f({
|
|
35
35
|
__name: "prompts",
|
|
36
36
|
props: {
|
|
37
37
|
items: {},
|
|
@@ -47,7 +47,7 @@ const z = { class: "tr-prompt__content" }, N = { class: "tr-prompt__content-titl
|
|
|
47
47
|
};
|
|
48
48
|
return (a, _) => (e(), r("div", D, [
|
|
49
49
|
i("div", {
|
|
50
|
-
class:
|
|
50
|
+
class: y(["tr-prompts__list-container", { wrap: s.wrap, vertical: s.vertical }])
|
|
51
51
|
}, [
|
|
52
52
|
(e(!0), r(k, null, w(s.items, (p, b) => (e(), m(n, x({
|
|
53
53
|
key: p.id || b
|