@opentiny/tiny-robot 0.3.0-rc.0 → 0.3.0-rc.2
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 +459 -458
- package/dist/container/index.js +44 -40
- package/dist/drag-overlay/index.js +5 -5
- package/dist/feedback/index.js +18 -19
- package/dist/icon-button/index.js +1 -1
- package/dist/index.d.ts +160 -60
- 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
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 b } from "../_plugin-vue_export-helper.js";
|
|
5
|
+
const E = { class: "tr-container__header" }, F = { class: "tr-container__title" }, N = { class: "tr-container__header-operations" }, T = { 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", E, [
|
|
29
|
+
l(n.$slots, "title", {}, () => [
|
|
30
|
+
e("h3", F, I(m.title), 1)
|
|
29
31
|
], !0),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
e("div", N, [
|
|
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", T, [
|
|
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__ */ b(D, [["__scopeId", "data-v-1ebfc5e5"]]);
|
|
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
|
|
@@ -20,7 +20,7 @@ const _ = /* @__PURE__ */ r({
|
|
|
20
20
|
}, null, 8, ["style"]))
|
|
21
21
|
], 6));
|
|
22
22
|
}
|
|
23
|
-
}), t = /* @__PURE__ */ f(_, [["__scopeId", "data-v-
|
|
23
|
+
}), t = /* @__PURE__ */ f(_, [["__scopeId", "data-v-30fef9fd"]]);
|
|
24
24
|
t.name = "TrIconButton";
|
|
25
25
|
const v = function(o) {
|
|
26
26
|
o.component(t.name, t);
|