@opentiny/tiny-robot 0.3.0-rc.0 → 0.3.0-rc.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/dist/attachments/index.js +4 -4
- package/dist/bubble/index.js +2 -2
- package/dist/container/index.js +44 -40
- package/dist/drag-overlay/index.js +5 -5
- package/dist/feedback/index.js +18 -19
- package/dist/index.d.ts +155 -59
- package/dist/index.js +59 -53
- package/dist/index2.js +29 -29
- package/dist/mcp-server-picker/index.js +306 -312
- package/dist/prompts/index.js +36 -39
- package/dist/sender/index.js +674 -681
- package/dist/style.css +1 -1
- package/dist/theme-provider/index.js +83 -0
- package/package.json +3 -3
|
@@ -360,9 +360,9 @@ const Ce = ["data-file-type"], Fe = {
|
|
|
360
360
|
alt: r.file.name,
|
|
361
361
|
class: "tr-file-card__picture-img"
|
|
362
362
|
}, null, 8, xe),
|
|
363
|
-
m.value ? (o(), d("div", Pe, _[4] || (_[4] = [
|
|
363
|
+
m.value ? (o(), d("div", Pe, [..._[4] || (_[4] = [
|
|
364
364
|
p("span", { class: "tr-file-card__picture-overlay-text" }, "预览", -1)
|
|
365
|
-
]))) : k("", !0),
|
|
365
|
+
])])) : k("", !0),
|
|
366
366
|
c.value || e.value ? (o(), d("div", Me, [
|
|
367
367
|
c.value ? (o(), d("div", Re, [
|
|
368
368
|
F(f(j)),
|
|
@@ -426,9 +426,9 @@ const Ce = ["data-file-type"], Fe = {
|
|
|
426
426
|
}, x(y.label), 11, qe))
|
|
427
427
|
]))), 128))
|
|
428
428
|
])) : k("", !0)
|
|
429
|
-
])) : c.value ? (o(), d("div", Ke, _[5] || (_[5] = [
|
|
429
|
+
])) : c.value ? (o(), d("div", Ke, [..._[5] || (_[5] = [
|
|
430
430
|
p("span", { class: "tr-file-card__uploading-text" }, "上传中...", -1)
|
|
431
|
-
]))) : e.value ? (o(), d("div", Ge, [
|
|
431
|
+
])])) : e.value ? (o(), d("div", Ge, [
|
|
432
432
|
_[6] || (_[6] = p("span", { class: "tr-file-card__error-text" }, "上传失败", -1)),
|
|
433
433
|
p("button", {
|
|
434
434
|
class: "tr-file-card__retry-btn",
|
package/dist/bubble/index.js
CHANGED
|
@@ -3817,13 +3817,13 @@ const hi = {
|
|
|
3817
3817
|
}, () => [
|
|
3818
3818
|
Z("div", {
|
|
3819
3819
|
class: Mu(["tr-bubble__content", { "border-corner": e.shape === "corner" }])
|
|
3820
|
-
}, d[0] || (d[0] = [
|
|
3820
|
+
}, [...d[0] || (d[0] = [
|
|
3821
3821
|
Z("img", {
|
|
3822
3822
|
src: Dn,
|
|
3823
3823
|
alt: "loading",
|
|
3824
3824
|
class: "tr-bubble__loading"
|
|
3825
3825
|
}, null, -1)
|
|
3826
|
-
]), 2)
|
|
3826
|
+
])], 2)
|
|
3827
3827
|
], !0) : (S(), $("div", {
|
|
3828
3828
|
key: 1,
|
|
3829
3829
|
class: Mu(["tr-bubble__content", { "border-corner": e.shape === "corner" }])
|
package/dist/container/index.js
CHANGED
|
@@ -1,60 +1,64 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { IconCancelFullScreen as
|
|
3
|
-
import
|
|
4
|
-
import { _ as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as g, mergeModels as c, useModel as u, computed as w, withDirectives as C, createElementBlock as B, openBlock as S, normalizeClass as y, createElementVNode as e, renderSlot as l, toDisplayString as I, createVNode as d, unref as i, vShow as z } from "vue";
|
|
2
|
+
import { IconCancelFullScreen as $, IconFullScreen as k, IconClose as M } from "@opentiny/tiny-robot-svgs";
|
|
3
|
+
import f from "../icon-button/index.js";
|
|
4
|
+
import { _ as E } from "../_plugin-vue_export-helper.js";
|
|
5
|
+
const F = { class: "tr-container__header" }, N = { class: "tr-container__title" }, T = { class: "tr-container__header-operations" }, b = { class: "tr-container__footer" }, D = /* @__PURE__ */ g({
|
|
6
6
|
__name: "index",
|
|
7
|
-
props: {
|
|
7
|
+
props: /* @__PURE__ */ c({
|
|
8
|
+
show: { type: Boolean },
|
|
9
|
+
fullscreen: { type: Boolean },
|
|
10
|
+
title: { default: "OpenTiny NEXT" }
|
|
11
|
+
}, {
|
|
8
12
|
show: { type: Boolean, required: !0 },
|
|
9
13
|
showModifiers: {},
|
|
10
14
|
fullscreen: { type: Boolean },
|
|
11
15
|
fullscreenModifiers: {}
|
|
12
|
-
},
|
|
13
|
-
emits: ["update:show", "update:fullscreen"],
|
|
14
|
-
setup(
|
|
15
|
-
m((
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
e[3] || (e[3] = o("div", { class: "tr-container__dragging-bar-wrapper" }, [
|
|
24
|
-
o("div", { class: "tr-container__dragging-bar" })
|
|
16
|
+
}),
|
|
17
|
+
emits: /* @__PURE__ */ c(["close"], ["update:show", "update:fullscreen"]),
|
|
18
|
+
setup(o, { emit: p }) {
|
|
19
|
+
const m = o, a = u(o, "show"), t = u(o, "fullscreen"), v = w(() => t.value ? $ : k), _ = p, h = () => {
|
|
20
|
+
a.value = !1, _("close");
|
|
21
|
+
};
|
|
22
|
+
return (n, s) => C((S(), B("div", {
|
|
23
|
+
class: y(["tr-container", { fullscreen: t.value }])
|
|
24
|
+
}, [
|
|
25
|
+
s[1] || (s[1] = e("div", { class: "tr-container__dragging-bar-wrapper" }, [
|
|
26
|
+
e("div", { class: "tr-container__dragging-bar" })
|
|
25
27
|
], -1)),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
e
|
|
28
|
+
e("div", F, [
|
|
29
|
+
l(n.$slots, "title", {}, () => [
|
|
30
|
+
e("h3", N, I(m.title), 1)
|
|
29
31
|
], !0),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
e("div", T, [
|
|
33
|
+
l(n.$slots, "operations", {}, void 0, !0),
|
|
34
|
+
d(i(f), {
|
|
33
35
|
size: "28",
|
|
34
36
|
"svg-size": "20",
|
|
35
|
-
icon:
|
|
36
|
-
onClick:
|
|
37
|
+
icon: v.value,
|
|
38
|
+
onClick: s[0] || (s[0] = (q) => t.value = !t.value)
|
|
37
39
|
}, null, 8, ["icon"]),
|
|
38
|
-
|
|
40
|
+
d(i(f), {
|
|
39
41
|
size: "28",
|
|
40
42
|
"svg-size": "20",
|
|
41
|
-
icon:
|
|
42
|
-
onClick:
|
|
43
|
+
icon: i(M),
|
|
44
|
+
onClick: h
|
|
43
45
|
}, null, 8, ["icon"])
|
|
44
46
|
])
|
|
45
47
|
]),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
l(n.$slots, "default", {}, void 0, !0),
|
|
49
|
+
e("div", b, [
|
|
50
|
+
l(n.$slots, "footer", {}, void 0, !0)
|
|
49
51
|
])
|
|
50
|
-
]))
|
|
52
|
+
], 2)), [
|
|
53
|
+
[z, a.value]
|
|
54
|
+
]);
|
|
51
55
|
}
|
|
52
|
-
}),
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
+
}), r = /* @__PURE__ */ E(D, [["__scopeId", "data-v-d064089c"]]);
|
|
57
|
+
r.name = "TrContainer";
|
|
58
|
+
const V = function(o) {
|
|
59
|
+
o.component(r.name, r);
|
|
56
60
|
};
|
|
57
|
-
|
|
61
|
+
r.install = V;
|
|
58
62
|
export {
|
|
59
|
-
|
|
63
|
+
r as default
|
|
60
64
|
};
|
|
@@ -11,10 +11,10 @@ const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20
|
|
|
11
11
|
fullscreen: { type: Boolean }
|
|
12
12
|
},
|
|
13
13
|
setup(r) {
|
|
14
|
-
const a = r, { top:
|
|
14
|
+
const a = r, { top: c, left: d, width: p, height: C } = M(() => a.dragTarget), f = y(() => !a.isDragging || !a.dragTarget ? { display: "none" } : {
|
|
15
15
|
position: "fixed",
|
|
16
|
-
top: `${
|
|
17
|
-
left: `${
|
|
16
|
+
top: `${c.value}px`,
|
|
17
|
+
left: `${d.value}px`,
|
|
18
18
|
width: `${p.value}px`,
|
|
19
19
|
height: `${C.value}px`
|
|
20
20
|
});
|
|
@@ -22,7 +22,7 @@ const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20
|
|
|
22
22
|
default: m(() => [
|
|
23
23
|
e.isDragging ? (t(), o("div", {
|
|
24
24
|
key: 0,
|
|
25
|
-
class: w(["tr-drag-overlay", {
|
|
25
|
+
class: w(["tr-drag-overlay", { fullscreen: e.fullscreen }]),
|
|
26
26
|
style: _(f.value)
|
|
27
27
|
}, [
|
|
28
28
|
x(e.$slots, "overlay", { isDragging: e.isDragging }, () => [
|
|
@@ -46,7 +46,7 @@ const k = "data:image/svg+xml,%3csvg%20width='80.000000'%20height='80.000000'%20
|
|
|
46
46
|
_: 3
|
|
47
47
|
}));
|
|
48
48
|
}
|
|
49
|
-
}), i = /* @__PURE__ */ Z(z, [["__scopeId", "data-v-
|
|
49
|
+
}), i = /* @__PURE__ */ Z(z, [["__scopeId", "data-v-93553cc8"]]);
|
|
50
50
|
i.name = "TrDragOverlay";
|
|
51
51
|
const N = function(r) {
|
|
52
52
|
r.component(i.name, i);
|
package/dist/feedback/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as V, ref as g, computed as P, onMounted as z, watch as O, createElementBlock as r, openBlock as t, createCommentVNode as k, Fragment as A, renderList as w, toDisplayString as y, createVNode as b, unref as l, nextTick as q, createElementVNode as
|
|
1
|
+
import { defineComponent as V, ref as g, computed as P, onMounted as z, watch as O, createElementBlock as r, openBlock as t, createCommentVNode as k, Fragment as A, renderList as w, toDisplayString as y, createVNode as b, unref as l, nextTick as q, createElementVNode as d, createBlock as _, withCtx as f, createTextVNode as U, resolveDynamicComponent as x } from "vue";
|
|
2
2
|
import { IconArrowUp as T, IconArrowDown as N, IconDislike as j, IconLike as H, IconRefresh as J, IconCopy as K } from "@opentiny/tiny-robot-svgs";
|
|
3
3
|
import { TinyButton as G } from "@opentiny/vue";
|
|
4
4
|
import $, { ActionGroupItem as D } from "../action-group/index.js";
|
|
@@ -82,9 +82,9 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
82
82
|
return (n, s) => {
|
|
83
83
|
var o, a, v, S, F, M, R, B;
|
|
84
84
|
return t(), r("div", te, [
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
(o = e.operations) != null && o.length ? (t(),
|
|
85
|
+
d("div", oe, [
|
|
86
|
+
d("div", se, [
|
|
87
|
+
(o = e.operations) != null && o.length ? (t(), _(l($), {
|
|
88
88
|
key: 0,
|
|
89
89
|
"max-num": e.operationsLimit,
|
|
90
90
|
"drop-down-show-label-only": !0,
|
|
@@ -99,15 +99,14 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
99
99
|
class: "tr-feedback__operations-more-btn"
|
|
100
100
|
}, {
|
|
101
101
|
default: f(() => [
|
|
102
|
-
s[0] || (s[0] =
|
|
102
|
+
s[0] || (s[0] = d("span", null, "更多", -1)),
|
|
103
103
|
b(l(N))
|
|
104
104
|
]),
|
|
105
|
-
_: 1
|
|
106
|
-
__: [0]
|
|
105
|
+
_: 1
|
|
107
106
|
})
|
|
108
107
|
]),
|
|
109
108
|
default: f(() => [
|
|
110
|
-
(t(!0), r(A, null, w(e.operations, (i) => (t(),
|
|
109
|
+
(t(!0), r(A, null, w(e.operations, (i) => (t(), _(l(D), {
|
|
111
110
|
key: i.name,
|
|
112
111
|
name: i.name,
|
|
113
112
|
label: i.label
|
|
@@ -129,32 +128,32 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
129
128
|
]),
|
|
130
129
|
_: 1
|
|
131
130
|
}, 8, ["max-num"])) : (a = e.sources) != null && a.length ? (t(), r("div", ne, [
|
|
132
|
-
|
|
131
|
+
d("span", {
|
|
133
132
|
class: "tr-feedback__source",
|
|
134
133
|
onClick: u
|
|
135
134
|
}, [
|
|
136
|
-
|
|
137
|
-
(t(),
|
|
135
|
+
d("span", null, y((v = e.sources) == null ? void 0 : v.length) + "条来源", 1),
|
|
136
|
+
(t(), _(x(p.value ? l(T) : l(N))))
|
|
138
137
|
])
|
|
139
138
|
])) : k("", !0)
|
|
140
139
|
]),
|
|
141
|
-
|
|
140
|
+
d("div", le, [
|
|
142
141
|
b(l($), {
|
|
143
142
|
"max-num": e.actionsLimit,
|
|
144
143
|
"show-tooltip": !0,
|
|
145
144
|
onItemClick: E
|
|
146
145
|
}, {
|
|
147
146
|
default: f(() => [
|
|
148
|
-
(t(!0), r(A, null, w(e.actions, (i) => (t(),
|
|
147
|
+
(t(!0), r(A, null, w(e.actions, (i) => (t(), _(l(D), {
|
|
149
148
|
key: i.name,
|
|
150
149
|
name: i.name,
|
|
151
150
|
label: i.label
|
|
152
151
|
}, {
|
|
153
152
|
default: f(() => [
|
|
154
|
-
typeof i.icon == "string" ? (t(),
|
|
153
|
+
typeof i.icon == "string" ? (t(), _(l(Q), {
|
|
155
154
|
key: 0,
|
|
156
155
|
icon: I[i.icon]
|
|
157
|
-
}, null, 8, ["icon"])) : (t(),
|
|
156
|
+
}, null, 8, ["icon"])) : (t(), _(x(i.icon), { key: 1 }))
|
|
158
157
|
]),
|
|
159
158
|
_: 2
|
|
160
159
|
}, 1032, ["name", "label"]))), 128))
|
|
@@ -165,15 +164,15 @@ const W = { class: "tr-feedback__source-list" }, Y = ["href"], Z = /* @__PURE__
|
|
|
165
164
|
]),
|
|
166
165
|
(S = e.operations) != null && S.length && ((F = e.sources) != null && F.length) || p.value && e.sources ? (t(), r("div", re, [
|
|
167
166
|
(M = e.operations) != null && M.length && ((R = e.sources) != null && R.length) ? (t(), r("div", ae, [
|
|
168
|
-
|
|
167
|
+
d("span", {
|
|
169
168
|
class: "tr-feedback__source",
|
|
170
169
|
onClick: u
|
|
171
170
|
}, [
|
|
172
|
-
|
|
173
|
-
(t(),
|
|
171
|
+
d("span", null, y((B = e.sources) == null ? void 0 : B.length) + "条来源", 1),
|
|
172
|
+
(t(), _(x(p.value ? l(T) : l(N))))
|
|
174
173
|
])
|
|
175
174
|
])) : k("", !0),
|
|
176
|
-
p.value && e.sources ? (t(),
|
|
175
|
+
p.value && e.sources ? (t(), _(l(ee), {
|
|
177
176
|
key: 1,
|
|
178
177
|
sources: e.sources,
|
|
179
178
|
"lines-limit": e.sourcesLinesLimit
|