@opentiny/tiny-robot 0.3.0-alpha.21 → 0.3.0-alpha.22
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/index.d.ts +2 -0
- package/dist/mcp-add-form/index.js +22 -22
- package/dist/mcp-server-picker/index.js +172 -167
- package/dist/sender/index.js +640 -641
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -2557,6 +2557,7 @@ export declare interface FileTypeMatcher {
|
|
|
2557
2557
|
declare interface fileUploadConfig {
|
|
2558
2558
|
accept?: string;
|
|
2559
2559
|
multiple?: boolean;
|
|
2560
|
+
reset?: boolean;
|
|
2560
2561
|
}
|
|
2561
2562
|
|
|
2562
2563
|
export declare interface Handlers {
|
|
@@ -2922,6 +2923,7 @@ export declare interface SenderProps {
|
|
|
2922
2923
|
showWordLimit?: boolean;
|
|
2923
2924
|
suggestions?: ISuggestionItem[];
|
|
2924
2925
|
suggestionPopupWidth?: string | number;
|
|
2926
|
+
activeSuggestionKeys?: string[];
|
|
2925
2927
|
theme?: ThemeType;
|
|
2926
2928
|
templateData?: UserItem[];
|
|
2927
2929
|
stopText?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as g, ref as b, useModel as k, watch as O, onUnmounted as R, createElementBlock as
|
|
1
|
+
import { defineComponent as g, ref as b, useModel as k, watch as O, onUnmounted as R, createElementBlock as _, openBlock as v, createElementVNode as t, withDirectives as c, vModelText as f, createVNode as y, unref as D, createCommentVNode as $ } from "vue";
|
|
2
2
|
import { TinyRadioGroup as E } from "@opentiny/vue";
|
|
3
3
|
import { d as L } from "../index2.js";
|
|
4
4
|
import { _ as T } from "../_plugin-vue_export-helper.js";
|
|
@@ -37,26 +37,26 @@ const M = { class: "form-editor__container" }, S = { class: "form-editor__item"
|
|
|
37
37
|
};
|
|
38
38
|
return R(() => {
|
|
39
39
|
r();
|
|
40
|
-
}), (m, e) => (v(),
|
|
40
|
+
}), (m, e) => (v(), _("form", M, [
|
|
41
41
|
t("div", S, [
|
|
42
42
|
e[5] || (e[5] = t("label", { class: "form-editor__label" }, "名称", -1)),
|
|
43
|
-
|
|
43
|
+
c(t("input", {
|
|
44
44
|
"onUpdate:modelValue": e[0] || (e[0] = (a) => o.value.name = a),
|
|
45
45
|
class: "form-editor__input",
|
|
46
46
|
type: "text",
|
|
47
47
|
placeholder: "请输入插件名称"
|
|
48
48
|
}, null, 512), [
|
|
49
|
-
[
|
|
49
|
+
[f, o.value.name]
|
|
50
50
|
])
|
|
51
51
|
]),
|
|
52
52
|
t("div", F, [
|
|
53
53
|
e[6] || (e[6] = t("label", { class: "form-editor__label" }, "描述", -1)),
|
|
54
|
-
|
|
54
|
+
c(t("textarea", {
|
|
55
55
|
"onUpdate:modelValue": e[1] || (e[1] = (a) => o.value.description = a),
|
|
56
56
|
class: "form-editor__textarea",
|
|
57
57
|
placeholder: "请输入插件描述"
|
|
58
58
|
}, null, 512), [
|
|
59
|
-
[
|
|
59
|
+
[f, o.value.description]
|
|
60
60
|
])
|
|
61
61
|
]),
|
|
62
62
|
t("div", I, [
|
|
@@ -70,23 +70,23 @@ const M = { class: "form-editor__container" }, S = { class: "form-editor__item"
|
|
|
70
70
|
]),
|
|
71
71
|
t("div", N, [
|
|
72
72
|
e[8] || (e[8] = t("label", { class: "form-editor__label" }, "URL", -1)),
|
|
73
|
-
|
|
73
|
+
c(t("input", {
|
|
74
74
|
"onUpdate:modelValue": e[3] || (e[3] = (a) => o.value.url = a),
|
|
75
75
|
class: "form-editor__input",
|
|
76
76
|
type: "url",
|
|
77
77
|
placeholder: "请输入插件URL"
|
|
78
78
|
}, null, 512), [
|
|
79
|
-
[
|
|
79
|
+
[f, o.value.url]
|
|
80
80
|
])
|
|
81
81
|
]),
|
|
82
82
|
t("div", H, [
|
|
83
83
|
e[9] || (e[9] = t("label", { class: "form-editor__label" }, "请求头", -1)),
|
|
84
|
-
|
|
84
|
+
c(t("textarea", {
|
|
85
85
|
"onUpdate:modelValue": e[4] || (e[4] = (a) => o.value.headers = a),
|
|
86
86
|
class: "form-editor__textarea",
|
|
87
87
|
placeholder: "请输入请求头,格式为JSON"
|
|
88
88
|
}, null, 512), [
|
|
89
|
-
[
|
|
89
|
+
[f, o.value.headers]
|
|
90
90
|
])
|
|
91
91
|
]),
|
|
92
92
|
t("div", w, [
|
|
@@ -107,7 +107,7 @@ const M = { class: "form-editor__container" }, S = { class: "form-editor__item"
|
|
|
107
107
|
])
|
|
108
108
|
]));
|
|
109
109
|
}
|
|
110
|
-
}), h = /* @__PURE__ */ T(P, [["__scopeId", "data-v-
|
|
110
|
+
}), h = /* @__PURE__ */ T(P, [["__scopeId", "data-v-e91567e8"]]), j = { class: "code-editor__container" }, q = { class: "code-editor__section" }, z = { class: "code-editor__area" }, B = /* @__PURE__ */ g({
|
|
111
111
|
__name: "CodeEditor",
|
|
112
112
|
props: {
|
|
113
113
|
codeData: { required: !0 },
|
|
@@ -116,21 +116,21 @@ const M = { class: "form-editor__container" }, S = { class: "form-editor__item"
|
|
|
116
116
|
emits: ["update:codeData"],
|
|
117
117
|
setup(i) {
|
|
118
118
|
const d = k(i, "codeData");
|
|
119
|
-
return (o, s) => (v(),
|
|
119
|
+
return (o, s) => (v(), _("div", j, [
|
|
120
120
|
t("div", q, [
|
|
121
121
|
t("div", z, [
|
|
122
|
-
|
|
122
|
+
c(t("textarea", {
|
|
123
123
|
"onUpdate:modelValue": s[0] || (s[0] = (n) => d.value = n),
|
|
124
124
|
class: "code-editor__textarea",
|
|
125
125
|
placeholder: "请输入 JSON 配置..."
|
|
126
126
|
}, null, 512), [
|
|
127
|
-
[
|
|
127
|
+
[f, d.value]
|
|
128
128
|
])
|
|
129
129
|
])
|
|
130
130
|
])
|
|
131
131
|
]));
|
|
132
132
|
}
|
|
133
|
-
}), J = /* @__PURE__ */ T(B, [["__scopeId", "data-v-
|
|
133
|
+
}), J = /* @__PURE__ */ T(B, [["__scopeId", "data-v-555fb3c4"]]), G = { class: "mcp-add-form" }, W = { class: "mcp-add-form__content" }, K = { class: "mcp-add-form__add-type" }, Q = { key: 0 }, X = { key: 1 }, Y = /* @__PURE__ */ g({
|
|
134
134
|
__name: "index",
|
|
135
135
|
props: {
|
|
136
136
|
addType: { default: "form" },
|
|
@@ -158,30 +158,30 @@ const M = { class: "form-editor__container" }, S = { class: "form-editor__item"
|
|
|
158
158
|
}, a = (V) => {
|
|
159
159
|
s("update:addType", V);
|
|
160
160
|
};
|
|
161
|
-
return (V, l) => (v(),
|
|
161
|
+
return (V, l) => (v(), _("div", G, [
|
|
162
162
|
t("div", W, [
|
|
163
163
|
t("div", K, [
|
|
164
164
|
l[3] || (l[3] = t("span", { class: "mcp-add-form__add-type-label" }, "添加方式", -1)),
|
|
165
165
|
y(D(E), {
|
|
166
166
|
modelValue: r.value,
|
|
167
167
|
"onUpdate:modelValue": [
|
|
168
|
-
l[0] || (l[0] = (
|
|
168
|
+
l[0] || (l[0] = (p) => r.value = p),
|
|
169
169
|
a
|
|
170
170
|
],
|
|
171
171
|
type: "button",
|
|
172
172
|
options: x
|
|
173
173
|
}, null, 8, ["modelValue"])
|
|
174
174
|
]),
|
|
175
|
-
r.value === "form" ? (v(),
|
|
175
|
+
r.value === "form" ? (v(), _("div", Q, [
|
|
176
176
|
y(D(h), {
|
|
177
177
|
"form-data": n.value,
|
|
178
|
-
"onUpdate:formData": l[1] || (l[1] = (
|
|
178
|
+
"onUpdate:formData": l[1] || (l[1] = (p) => n.value = p)
|
|
179
179
|
}, null, 8, ["form-data"])
|
|
180
180
|
])) : $("", !0),
|
|
181
|
-
r.value === "code" ? (v(),
|
|
181
|
+
r.value === "code" ? (v(), _("div", X, [
|
|
182
182
|
y(D(J), {
|
|
183
183
|
"code-data": u.value,
|
|
184
|
-
"onUpdate:codeData": l[2] || (l[2] = (
|
|
184
|
+
"onUpdate:codeData": l[2] || (l[2] = (p) => u.value = p)
|
|
185
185
|
}, null, 8, ["code-data"])
|
|
186
186
|
])) : $("", !0)
|
|
187
187
|
]),
|
|
@@ -201,7 +201,7 @@ const M = { class: "form-editor__container" }, S = { class: "form-editor__item"
|
|
|
201
201
|
])
|
|
202
202
|
]));
|
|
203
203
|
}
|
|
204
|
-
}), U = /* @__PURE__ */ T(Y, [["__scopeId", "data-v-
|
|
204
|
+
}), U = /* @__PURE__ */ T(Y, [["__scopeId", "data-v-e85f1044"]]);
|
|
205
205
|
U.name = "TrMcpAddForm";
|
|
206
206
|
const Z = function(i) {
|
|
207
207
|
i.component(U.name, U);
|