@opentiny/tiny-robot 0.3.0-alpha.12 → 0.3.0-alpha.14
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/action-group/index.js +17 -17
- package/dist/attachments/index.js +83 -83
- package/dist/bubble/index.js +1905 -1171
- package/dist/container/index.js +26 -26
- package/dist/dropdown-menu/index.js +116 -49
- package/dist/feedback/index.js +41 -41
- package/dist/flow-layout-buttons/index.js +10 -10
- package/dist/history/index.js +45 -45
- package/dist/index.d.ts +583 -346
- package/dist/index.js +65 -55
- package/dist/index2.js +7 -6
- package/dist/index3.js +426 -418
- package/dist/index4.js +67 -67
- package/dist/index5.js +22 -21
- package/dist/index6.js +795 -599
- package/dist/index7.js +3622 -1717
- package/dist/loading.js +4 -0
- package/dist/mcp-server-picker/index.js +29972 -0
- package/dist/question/index.js +61 -61
- package/dist/sender/index.js +127 -127
- package/dist/style.css +1 -1
- package/dist/suggestion/index.js +54 -54
- package/dist/suggestion-pills/index.js +11 -11
- package/dist/suggestion-popover/index.js +185 -184
- package/dist/tiny-robot-svgs.js +421 -247
- package/dist/useSlotRefs.js +13 -13
- package/dist/utils.js +8 -2
- package/package.json +11 -3
package/dist/history/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as V, createElementBlock as u, openBlock as n, normalizeStyle as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as V, createElementBlock as u, openBlock as n, normalizeStyle as J, normalizeClass as D, createElementVNode as p, toDisplayString as k, createVNode as m, unref as e, ref as G, watchEffect as Y, nextTick as Z, mergeModels as N, useCssVars as q, computed as h, useModel as P, createCommentVNode as B, Fragment as T, renderList as E, createBlock as R, withDirectives as ee, mergeProps as te, withCtx as H, withModifiers as S, vModelText as re } from "vue";
|
|
2
|
+
import { B as oe, e as se, k as ae, X as ne, x as ie } from "../tiny-robot-svgs.js";
|
|
3
3
|
import { I as le } from "../index6.js";
|
|
4
|
-
import { T as
|
|
5
|
-
import
|
|
4
|
+
import { T as U } from "../index2.js";
|
|
5
|
+
import $ from "../icon-button/index.js";
|
|
6
6
|
import { o as ce } from "../index3.js";
|
|
7
|
-
import { _ as
|
|
7
|
+
import { _ as M } from "../_plugin-vue_export-helper.js";
|
|
8
8
|
const ue = /* @__PURE__ */ V({
|
|
9
9
|
__name: "item-tag",
|
|
10
10
|
props: {
|
|
@@ -16,12 +16,12 @@ const ue = /* @__PURE__ */ V({
|
|
|
16
16
|
const t = i;
|
|
17
17
|
return (a, _) => (n(), u("div", {
|
|
18
18
|
class: D(["tr-history__item-tag", t.type]),
|
|
19
|
-
style:
|
|
19
|
+
style: J(t.style)
|
|
20
20
|
}, [
|
|
21
21
|
p("span", null, k(t.text), 1)
|
|
22
22
|
], 6));
|
|
23
23
|
}
|
|
24
|
-
}), de = /* @__PURE__ */
|
|
24
|
+
}), de = /* @__PURE__ */ M(ue, [["__scopeId", "data-v-346767bb"]]), _e = { class: "tr-history__empty" }, pe = { class: "tr-history__empty-icon" }, he = { class: "tr-history__empty-text" }, me = /* @__PURE__ */ V({
|
|
25
25
|
__name: "search-empty",
|
|
26
26
|
props: {
|
|
27
27
|
text: { default: "暂无内容" }
|
|
@@ -35,14 +35,14 @@ const ue = /* @__PURE__ */ V({
|
|
|
35
35
|
p("span", he, k(t.text), 1)
|
|
36
36
|
]));
|
|
37
37
|
}
|
|
38
|
-
}), ve = /* @__PURE__ */
|
|
39
|
-
const t =
|
|
38
|
+
}), ve = /* @__PURE__ */ M(me, [["__scopeId", "data-v-b21f5bc0"]]), ye = (i) => {
|
|
39
|
+
const t = G(), a = (l) => {
|
|
40
40
|
t.value = {
|
|
41
41
|
id: l.id,
|
|
42
42
|
title: l.title,
|
|
43
43
|
rawData: l
|
|
44
44
|
};
|
|
45
|
-
}, _ =
|
|
45
|
+
}, _ = G(null), v = (l) => {
|
|
46
46
|
l && Z(() => {
|
|
47
47
|
_.value = l, _.value.focus();
|
|
48
48
|
});
|
|
@@ -78,9 +78,9 @@ const ue = /* @__PURE__ */ V({
|
|
|
78
78
|
}, xe = { class: "tr-history__content" }, Ce = {
|
|
79
79
|
key: 0,
|
|
80
80
|
class: "tr-history__group-title"
|
|
81
|
-
}, Te = ["onClick"], Ie = { class: "tr-history__item-title" }, we = { class: "tr-history__item-actions" },
|
|
81
|
+
}, Te = ["onClick"], Ie = { class: "tr-history__item-title" }, we = { class: "tr-history__item-actions" }, Be = { class: "tr-history__close" }, Ee = /* @__PURE__ */ V({
|
|
82
82
|
__name: "index",
|
|
83
|
-
props: /* @__PURE__ */
|
|
83
|
+
props: /* @__PURE__ */ N({
|
|
84
84
|
tabTitle: {},
|
|
85
85
|
data: {},
|
|
86
86
|
activeTab: {},
|
|
@@ -96,33 +96,33 @@ const ue = /* @__PURE__ */ V({
|
|
|
96
96
|
searchQuery: {},
|
|
97
97
|
searchQueryModifiers: {}
|
|
98
98
|
}),
|
|
99
|
-
emits: /* @__PURE__ */
|
|
99
|
+
emits: /* @__PURE__ */ N(["close", "item-click", "item-title-change", "item-delete"], ["update:activeTab", "update:searchQuery"]),
|
|
100
100
|
setup(i, { emit: t }) {
|
|
101
101
|
q((c) => ({
|
|
102
102
|
d4b77bae: b.value ? "1px solid rgb(240, 240, 240)" : "none",
|
|
103
103
|
"659130e6": b.value ? "2px solid rgb(25, 25, 25)" : "none"
|
|
104
104
|
}));
|
|
105
|
-
const a = i, _ =
|
|
105
|
+
const a = i, _ = P(i, "activeTab"), v = P(i, "searchQuery"), r = t, y = h(() => Array.isArray(a.tabs) ? a.tabs : [{ title: a.tabTitle, id: "0" }]), g = h(() => _.value || y.value[0].id), b = h(() => y.value.length > 1), l = (c) => {
|
|
106
106
|
var s;
|
|
107
107
|
const o = typeof ((s = c[0]) == null ? void 0 : s.group);
|
|
108
108
|
return o === "string" || o === "symbol";
|
|
109
|
-
}, I = h(() => Array.isArray(a.data) ? a.data || [] : a.data[g.value] || []), w = Symbol("NO_GROUP"),
|
|
109
|
+
}, I = h(() => Array.isArray(a.data) ? a.data || [] : a.data[g.value] || []), w = Symbol("NO_GROUP"), O = h(() => {
|
|
110
110
|
const c = I.value;
|
|
111
111
|
return l(c) ? c : [{ group: w, items: c }];
|
|
112
|
-
}), x = h(() => a.searchBar ?
|
|
112
|
+
}), x = h(() => a.searchBar ? O.value.map((o) => ({
|
|
113
113
|
...o,
|
|
114
114
|
items: o.items.filter((s) => a.searchFn(v.value || "", s))
|
|
115
|
-
})).filter((o) => o.items.length > 0) :
|
|
115
|
+
})).filter((o) => o.items.length > 0) : O.value), L = h(() => x.value.length === 0 ? !1 : x.value[0].group === w ? x.value[0].items.length > 0 : !0), z = (c) => {
|
|
116
116
|
var o;
|
|
117
117
|
c.id !== ((o = C.value) == null ? void 0 : o.id) && r("item-click", c);
|
|
118
118
|
}, W = () => {
|
|
119
119
|
r("close");
|
|
120
|
-
},
|
|
120
|
+
}, X = (c) => {
|
|
121
121
|
r("item-delete", c);
|
|
122
|
-
}, { editingItem: C, handleEdit:
|
|
122
|
+
}, { editingItem: C, handleEdit: F, handleEditorInputRef: j, handleKeyDown: Q } = ye(r);
|
|
123
123
|
return (c, o) => (n(), u("div", fe, [
|
|
124
124
|
p("div", ke, [
|
|
125
|
-
(n(!0), u(T, null,
|
|
125
|
+
(n(!0), u(T, null, E(y.value, (s) => (n(), u("div", {
|
|
126
126
|
key: s.id,
|
|
127
127
|
class: D(["tr-history__tab", { active: g.value === s.id }]),
|
|
128
128
|
onClick: (d) => _.value = s.id
|
|
@@ -136,53 +136,53 @@ const ue = /* @__PURE__ */ V({
|
|
|
136
136
|
"prefix-icon": e(se),
|
|
137
137
|
clearable: ""
|
|
138
138
|
}, null, 8, ["modelValue", "placeholder", "prefix-icon"])
|
|
139
|
-
])) :
|
|
139
|
+
])) : B("", !0),
|
|
140
140
|
p("div", xe, [
|
|
141
|
-
L.value ? (n(!0), u(T, { key: 0 },
|
|
141
|
+
L.value ? (n(!0), u(T, { key: 0 }, E(x.value, (s) => (n(), u("div", {
|
|
142
142
|
key: s.group,
|
|
143
143
|
class: "tr-history__group"
|
|
144
144
|
}, [
|
|
145
145
|
s.group !== e(w) ? (n(), u("div", Ce, [
|
|
146
146
|
p("span", null, k(s.group), 1)
|
|
147
|
-
])) :
|
|
148
|
-
(n(!0), u(T, null,
|
|
149
|
-
var
|
|
147
|
+
])) : B("", !0),
|
|
148
|
+
(n(!0), u(T, null, E(s.items, (d) => {
|
|
149
|
+
var A;
|
|
150
150
|
return n(), u("div", {
|
|
151
151
|
key: `${d.id}-${d.title}`,
|
|
152
152
|
class: D(["tr-history__item", { selected: a.selected === d.id }]),
|
|
153
153
|
onClick: (f) => z(d)
|
|
154
154
|
}, [
|
|
155
|
-
((
|
|
155
|
+
((A = e(C)) == null ? void 0 : A.id) !== d.id ? (n(), u(T, { key: 0 }, [
|
|
156
156
|
p("span", Ie, k(d.title), 1),
|
|
157
|
-
d.tag ? (n(),
|
|
157
|
+
d.tag ? (n(), R(e(de), te({
|
|
158
158
|
key: 0,
|
|
159
159
|
class: "tr-history__item-tag"
|
|
160
|
-
}, { ref_for: !0 }, d.tag), null, 16)) :
|
|
160
|
+
}, { ref_for: !0 }, d.tag), null, 16)) : B("", !0),
|
|
161
161
|
p("div", we, [
|
|
162
|
-
m(e(
|
|
162
|
+
m(e(U), {
|
|
163
163
|
content: "编辑",
|
|
164
164
|
effect: "dark",
|
|
165
165
|
placement: "top",
|
|
166
166
|
"open-delay": 500
|
|
167
167
|
}, {
|
|
168
|
-
default:
|
|
169
|
-
m(e(
|
|
168
|
+
default: H(() => [
|
|
169
|
+
m(e($), {
|
|
170
170
|
icon: e(ae),
|
|
171
|
-
onClick:
|
|
171
|
+
onClick: S((f) => e(F)(d), ["stop"])
|
|
172
172
|
}, null, 8, ["icon", "onClick"])
|
|
173
173
|
]),
|
|
174
174
|
_: 2
|
|
175
175
|
}, 1024),
|
|
176
|
-
m(e(
|
|
176
|
+
m(e(U), {
|
|
177
177
|
content: "删除",
|
|
178
178
|
effect: "dark",
|
|
179
179
|
placement: "top",
|
|
180
180
|
"open-delay": 500
|
|
181
181
|
}, {
|
|
182
|
-
default:
|
|
183
|
-
m(e(
|
|
182
|
+
default: H(() => [
|
|
183
|
+
m(e($), {
|
|
184
184
|
icon: e(ne),
|
|
185
|
-
onClick:
|
|
185
|
+
onClick: S((f) => X(d), ["stop"])
|
|
186
186
|
}, null, 8, ["icon", "onClick"])
|
|
187
187
|
]),
|
|
188
188
|
_: 2
|
|
@@ -193,21 +193,21 @@ const ue = /* @__PURE__ */ V({
|
|
|
193
193
|
"onUpdate:modelValue": o[1] || (o[1] = (f) => e(C).title = f),
|
|
194
194
|
class: "tr-history__item-edit",
|
|
195
195
|
ref_for: !0,
|
|
196
|
-
ref: e(
|
|
196
|
+
ref: e(j),
|
|
197
197
|
onKeydown: o[2] || (o[2] = //@ts-ignore
|
|
198
|
-
(...f) => e(
|
|
198
|
+
(...f) => e(Q) && e(Q)(...f))
|
|
199
199
|
}, null, 544)), [
|
|
200
200
|
[re, e(C).title]
|
|
201
201
|
])
|
|
202
202
|
], 10, Te);
|
|
203
203
|
}), 128))
|
|
204
|
-
]))), 128)) : (n(),
|
|
204
|
+
]))), 128)) : (n(), R(e(ve), {
|
|
205
205
|
key: 1,
|
|
206
206
|
text: v.value ? "暂无搜索结果" : "暂无内容"
|
|
207
207
|
}, null, 8, ["text"]))
|
|
208
208
|
]),
|
|
209
|
-
p("div",
|
|
210
|
-
m(e(
|
|
209
|
+
p("div", Be, [
|
|
210
|
+
m(e($), {
|
|
211
211
|
icon: e(ie),
|
|
212
212
|
rounded: "",
|
|
213
213
|
onClick: W
|
|
@@ -215,13 +215,13 @@ const ue = /* @__PURE__ */ V({
|
|
|
215
215
|
])
|
|
216
216
|
]));
|
|
217
217
|
}
|
|
218
|
-
}), K = /* @__PURE__ */
|
|
218
|
+
}), K = /* @__PURE__ */ M(Ee, [["__scopeId", "data-v-8aa5fd59"]]), $e = function(i) {
|
|
219
219
|
i.component("TrHistory", K);
|
|
220
|
-
},
|
|
220
|
+
}, Ne = {
|
|
221
221
|
...K,
|
|
222
|
-
install:
|
|
222
|
+
install: $e,
|
|
223
223
|
name: "TrHistory"
|
|
224
224
|
};
|
|
225
225
|
export {
|
|
226
|
-
|
|
226
|
+
Ne as default
|
|
227
227
|
};
|