// ==UserScript== // @name AI助手|DeepSeek // @namespace https://scriptcat.org/zh-CN/users/174629 // @version 0.0.7 // @author yycjs // @description AI助手,网页悬浮窗口 // @icon data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3C!-- Icon from Remix Icon by Remix Design - https://github.com/Remix-Design/RemixIcon/blob/master/License --%3E%3Cpath fill='currentColor' d='M13.5 2c0 .444-.193.843-.5 1.118V5h5a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V8a3 3 0 0 1 3-3h5V3.118A1.5 1.5 0 1 1 13.5 2M0 10h2v6H0zm24 0h-2v6h2zM9 14.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m7.5-1.5a1.5 1.5 0 1 0-3 0a1.5 1.5 0 0 0 3 0'/%3E%3C/svg%3E // @match *://*/* // @require https://lib.baomitu.com/vue/3.4.31/vue.global.prod.js // @require https://lib.baomitu.com/marked/16.1.1/lib/marked.umd.min.js // @connect *://api.deepseek.com/* // @connect *://monkey.maigua.top/* // @grant GM.getValue // @grant GM.setValue // @grant GM_addStyle // @grant GM_getValue // @grant GM_setValue // @noframes // ==/UserScript== (e=>{if(typeof GM_addStyle=="function"){GM_addStyle(e);return}const t=document.createElement("style");t.textContent=e,document.head.append(t)})(' @charset "UTF-8";.draggable-box[data-v-6b590c5b]{position:fixed;background:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 10px #0000001a;z-index:999999;width:400px;height:700px;transition:width .3s ease-in-out;transform-origin:left}.draggable-box.expand[data-v-6b590c5b]{width:700px}.draggable-box.minimize[data-v-6b590c5b]{display:none}.draggable-box .box-header[data-v-6b590c5b]{display:flex;justify-content:space-between;align-items:center;padding:8px 12px 8px 8px;background:#f5f5f5;border-bottom:1px solid #eee;-webkit-user-select:none;user-select:none;cursor:move;box-sizing:border-box}.draggable-box .box-header .box-header-left[data-v-6b590c5b]{display:flex;align-items:center;gap:4px}.draggable-box .box-header .box-header-left .expand-icon-wrap[data-v-6b590c5b]{cursor:pointer;width:24px;height:24px;display:flex;align-items:center;justify-content:center}.draggable-box .box-header .box-header-right[data-v-6b590c5b]{display:flex;gap:10px}.draggable-box .box-header .box-header-right .btn[data-v-6b590c5b]{box-sizing:border-box;cursor:pointer}.draggable-box .box-header .box-header-right .btn.close[data-v-6b590c5b]{padding:0;font-size:14px;color:#000;opacity:1}.draggable-box .box-content[data-v-6b590c5b]{cursor:default;height:657px}.show-btn[data-v-6b590c5b]{width:60px;height:40px;line-height:40px;background:#f5f5f5;position:fixed;right:0;top:66%;text-align:center;border-radius:12px 4px 4px 12px;cursor:pointer;-webkit-user-select:none;user-select:none;visibility:hidden;border:1px solid #ccc;z-index:99999}.show-btn.show[data-v-6b590c5b]{visibility:visible}.show-btn[data-v-6b590c5b]:hover{background:#e0e0e0}.setting-wrap[data-v-555c444a]{padding-top:12px;width:100%;height:400px;background-color:#efefef;position:absolute;bottom:0;left:0;right:0;z-index:10;border-top-left-radius:10px;border-top-right-radius:10px;box-shadow:0 -4px 6px #0000001a}.setting-wrap.close[data-v-555c444a]{display:none}.setting-wrap .item[data-v-555c444a]{padding:10px}.setting-wrap .item .label[data-v-555c444a]{width:60px;text-align:left}.setting-wrap .item .tip[data-v-555c444a]{font-size:12px;line-height:14px;color:#999;margin-bottom:4px}.setting-wrap .item .input[data-v-555c444a]{flex:1}.setting-wrap .item .input textarea[data-v-555c444a]{box-sizing:border-box;width:100%;height:70px;border-radius:5px;border:1px solid #ccc;padding:8px 10px}.setting-wrap .close-icon[data-v-555c444a]{position:absolute;top:0;right:0;width:40px;height:40px;cursor:pointer;display:flex;justify-content:center;align-items:center;font-size:12px;font-weight:700}.setting-wrap .save-btn[data-v-555c444a]{width:60px;height:24px;margin:10px 0;background-color:#1890ff;color:#fff;border-radius:4px;cursor:pointer;text-align:center;line-height:24px}.setting-wrap .save-btn[data-v-555c444a]:hover{background-color:#40a9ff}.deepseek-chat[data-v-6dd68792]{box-sizing:border-box;display:flex;flex-direction:column;height:100%;background:#fff;border-radius:8px;overflow:hidden;padding-bottom:150px;font-size:14px}.deepseek-chat .chat-messages[data-v-6dd68792]{flex:1;overflow-y:auto;padding:8px 6px}.deepseek-chat .chat-messages .message[data-v-6dd68792]{margin-bottom:16px;max-width:80%;width:fit-content}.deepseek-chat .chat-messages .message.user[data-v-6dd68792]{margin-left:auto}.deepseek-chat .chat-messages .message.user .message-content[data-v-6dd68792]{background:#1890ff;color:#fff}.deepseek-chat .chat-messages .message .message-content[data-v-6dd68792]{padding:4px 12px;border-radius:12px;background:#f0f2f5;word-break:break-word;font-size:14px}.message-content pre[data-v-6dd68792]{background:#282c34;color:#abb2bf;padding:12px;border-radius:6px;overflow-x:auto;margin:8px 0}.message-content code[data-v-6dd68792]{font-family:Fira Code,monospace;font-size:.9em}.message.user .message-content pre[data-v-6dd68792]{background:#ffffff1a}.message-content blockquote[data-v-6dd68792]{border-left:3px solid #1890ff;padding-left:12px;margin:8px 0;color:#666}.message.user .message-content blockquote[data-v-6dd68792]{border-left-color:#ffffff80;color:#fffc}.message-content :not(pre)>code[data-v-6dd68792]{background:#0000000d;padding:2px 4px;border-radius:3px;font-size:.9em}.message.user .message-content :not(pre)>code[data-v-6dd68792]{background:#fff3}.chat-input-box[data-v-6dd68792]{box-sizing:border-box;position:absolute;bottom:0;width:100%;padding:8px 6px}.chat-input-box .input-wrap .textarea[data-v-6dd68792]{width:100%;height:100px;padding:8px 12px;border:1px solid #ddd;border-radius:4px;resize:none;font-family:inherit;box-sizing:border-box;font-size:14px}.chat-input-box .bottom-menu[data-v-6dd68792]{display:flex;justify-content:space-between}.chat-input-box .bottom-menu .l[data-v-6dd68792]{flex:1}.chat-input-box .bottom-menu .l .menu[data-v-6dd68792]{border:solid 1px #ddd;display:flex;align-items:center;gap:4px;width:fit-content;height:24px;padding:0 4px;border-radius:4px;cursor:pointer}.chat-input-box .bottom-menu .l .menu[data-v-6dd68792]:hover{background-color:#f0f0f0}.chat-input-box .bottom-menu .l .menu svg[data-v-6dd68792]{width:16px;height:16px}.chat-input-box .bottom-menu .r .send-btn[data-v-6dd68792]{padding:0 16px;height:24px;background:#1890ff;color:#fff;border:none;border-radius:4px;cursor:pointer}.chat-input-box .bottom-menu .r .send-btn[data-v-6dd68792]:disabled{background:#ccc;cursor:not-allowed}.chat-input-box .bottom-menu .r .send-btn[data-v-6dd68792]:hover:not(:disabled){background:#40a9ff}.chat-input-box .stop-btn[data-v-6dd68792]{box-sizing:border-box;display:flex;align-items:center;position:absolute;top:-24px;left:50%;transform:translate(-50%);border:solid 1px #ddd;border-radius:6px;padding:4px;color:#666;font-size:12px;gap:4px;cursor:pointer}.chat-input-box .stop-btn[data-v-6dd68792]:hover{background-color:#f0f0f0}p.marked-ai-paragraph{margin:0}.draggable-box.yyy div{margin:unset} '); (function (vue, marked) { 'use strict'; const _export_sfc = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; const _hoisted_1$2 = { class: "box-header-left" }; const _hoisted_2$2 = { key: 0, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "transparent", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-panel-left-close" }; const _hoisted_3$1 = { key: 1, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "transparent", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-panel-left-open" }; const _hoisted_4$1 = { class: "box-header-right" }; const _hoisted_5$1 = { class: "box-content" }; const _sfc_main$3 = { __name: "DraggableBox", setup(__props) { const minimize = vue.ref(true); const boxSize = vue.ref({ width: 400, height: 700 }); const position = vue.ref({ x: 0, y: 0 }); const isDragging = vue.ref(false); const dragOffset = vue.ref({ x: 0, y: 0 }); const expand = vue.ref(false); const startDrag = (e) => { isDragging.value = true; dragOffset.value = { x: window.innerWidth - e.clientX - position.value.x, y: e.clientY - position.value.y }; document.addEventListener("mousemove", onDrag); document.addEventListener("mouseup", stopDrag); }; const onDrag = (e) => { if (!isDragging.value) return; let newRight = window.innerWidth - e.clientX - dragOffset.value.x; let newY = e.clientY - dragOffset.value.y; if (newRight < 0) { newRight = 0; } if (newRight + boxSize.value.width > window.innerWidth) { newRight = window.innerWidth - boxSize.value.width; } if (newY < 0) { newY = 0; } if (newY + boxSize.value.height > window.innerHeight) { newY = window.innerHeight - boxSize.value.height; } position.value = { x: newRight, y: newY }; }; const stopDrag = () => { isDragging.value = false; document.removeEventListener("mousemove", onDrag); document.removeEventListener("mouseup", stopDrag); }; vue.onMounted(() => { window.addEventListener("resize", () => { if (position.value.x + boxSize.value.width > window.innerWidth) { position.value.x = window.innerWidth - boxSize.value.width; } if (position.value.y + boxSize.value.height > window.innerHeight) { position.value.y = window.innerHeight - boxSize.value.height; } }); }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("div", null, [ vue.createElementVNode("div", { class: vue.normalizeClass(["draggable-box yyy", { "minimize": minimize.value, "expand": expand.value }]), style: vue.normalizeStyle({ right: position.value.x + "px", top: position.value.y + "px" }) }, [ vue.createElementVNode("div", { class: "box-header", onMousedown: startDrag }, [ vue.createElementVNode("div", _hoisted_1$2, [ vue.createElementVNode("div", { class: "expand-icon-wrap", onClick: _cache[0] || (_cache[0] = ($event) => expand.value = !expand.value) }, [ !expand.value ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_2$2, _cache[3] || (_cache[3] = [ vue.createElementVNode("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }, null, -1), vue.createElementVNode("path", { d: "M9 3v18" }, null, -1), vue.createElementVNode("path", { d: "m16 15-3-3 3-3" }, null, -1) ]))) : vue.createCommentVNode("", true), expand.value ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_3$1, _cache[4] || (_cache[4] = [ vue.createElementVNode("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }, null, -1), vue.createElementVNode("path", { d: "M9 3v18" }, null, -1), vue.createElementVNode("path", { d: "m14 9 3 3-3 3" }, null, -1) ]))) : vue.createCommentVNode("", true) ]), _cache[5] || (_cache[5] = vue.createElementVNode("div", { class: "name" }, "AI 助手", -1)) ]), vue.createElementVNode("div", _hoisted_4$1, [ vue.createElementVNode("div", { class: "btn close", onClick: _cache[1] || (_cache[1] = ($event) => minimize.value = !minimize.value) }, "关闭") ]) ], 32), vue.createElementVNode("div", _hoisted_5$1, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]) ], 6), vue.createElementVNode("div", { class: vue.normalizeClass(["show-btn", { "show": minimize.value }]), onClick: _cache[2] || (_cache[2] = ($event) => minimize.value = !minimize.value) }, "AI助手", 2) ]); }; } }; const DraggableBox = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-6b590c5b"]]); var _GM_getValue = /* @__PURE__ */ (() => typeof GM_getValue != "undefined" ? GM_getValue : void 0)(); var _GM_setValue = /* @__PURE__ */ (() => typeof GM_setValue != "undefined" ? GM_setValue : void 0)(); const _hoisted_1$1 = { class: "item" }; const _hoisted_2$1 = { class: "input" }; const _sfc_main$2 = { __name: "Setting", props: { show: { type: Boolean, default: false } }, emits: ["closeEvent", "validKey"], setup(__props, { emit: __emit }) { const props = __props; const apiKey = vue.ref(""); const emit = __emit; const getApiKey = () => { if (_GM_getValue) { return new Promise((resolve) => { resolve(_GM_getValue("ds_apiKey")); }); } else if (GM.getValue) { return GM.getValue("ds_apiKey"); } }; const setApiKey = (val) => { if (_GM_setValue) { return new Promise((resolve) => { resolve(_GM_setValue("ds_apiKey", val)); }); } else if (GM.setValue) { return GM.setValue("ds_apiKey", val); } }; const close = () => { emit("closeEvent"); }; const saveEvent = () => { if (apiKey.value && apiKey.value.trim() && apiKey.value.trim().startsWith("sk-")) { setApiKey(apiKey.value).then(() => { emit("validKey", apiKey.value); }); } else { alert("请输入正确的API Key"); } }; vue.onMounted(() => { console.log("Setting onMounted"); setTimeout(() => { getApiKey().then((key) => { console.log("Setting onMounted key", key); apiKey.value = key; emit("validKey", apiKey.value); }); }, 2e3); }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("div", { class: vue.normalizeClass(["setting-wrap", { close: !props.show }]) }, [ vue.createElementVNode("div", { class: "close-icon", onClick: close }, "关闭"), vue.createElementVNode("div", _hoisted_1$1, [ _cache[1] || (_cache[1] = vue.createElementVNode("div", { class: "label" }, "API Key", -1)), _cache[2] || (_cache[2] = vue.createElementVNode("div", { class: "tip" }, "请输入您的deepseek API Key, 形如sk-xxxx", -1)), vue.createElementVNode("div", _hoisted_2$1, [ vue.withDirectives(vue.createElementVNode("textarea", { placeholder: "请输入您的deepseek API Key", type: "text", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => apiKey.value = $event) }, null, 512), [ [vue.vModelText, apiKey.value] ]) ]), vue.createElementVNode("div", { class: "save-btn", onClick: saveEvent }, "保存"), _cache[3] || (_cache[3] = vue.createElementVNode("div", { class: "tip" }, [ vue.createTextVNode("你可以从自己的的deepseek官网获取API Key, "), vue.createElementVNode("a", { href: "https://platform.deepseek.com/api_keys", target: "_blank" }, "点击获取") ], -1)), _cache[4] || (_cache[4] = vue.createElementVNode("div", { class: "tip" }, "获取后,填入上方输入框,点击保存", -1)) ]) ], 2); }; } }; const Setting = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-555c444a"]]); const _hoisted_1 = { class: "deepseek-chat" }; const _hoisted_2 = ["innerHTML"]; const _hoisted_3 = { class: "chat-input-box" }; const _hoisted_4 = { class: "input-wrap" }; const _hoisted_5 = ["onKeydown", "disabled"]; const _hoisted_6 = { class: "bottom-menu" }; const _hoisted_7 = { class: "r" }; const _hoisted_8 = ["disabled"]; const _sfc_main$1 = { __name: "Chat", setup(__props) { const messages = vue.ref([]); const inputMessage = vue.ref(""); const isLoading = vue.ref(false); const messagesContainer = vue.ref(null); const currentAbortController = vue.ref(null); const showConfig = vue.ref(false); const token = vue.ref(""); const scrollToBottom = async () => { await vue.nextTick(); if (messagesContainer.value) { messagesContainer.value.scrollTop = messagesContainer.value.scrollHeight; } }; vue.watch( () => [...messages.value], // 创建一个新的数组来触发深度监听 () => { scrollToBottom(); }, { deep: true, immediate: true } // 添加 immediate 确保初始时也执行 ); vue.onMounted(() => { scrollToBottom(); }); const sendMessage = async () => { if (!inputMessage.value.trim() || isLoading.value) return; if (!token.value) { showConfig.value = true; return; } const userMessage = inputMessage.value.trim(); inputMessage.value = ""; messages.value.push({ role: "user", content: userMessage }); messages.value.push({ role: "assistant", content: "思考中..." }); await scrollToBottom(); isLoading.value = true; recordCount(); try { const requestData = { model: "deepseek-chat", messages: messages.value.slice(0, -1), stream: true }; console.log("发送请求数据:", requestData); const controller = new AbortController(); const signal = controller.signal; currentAbortController.value = controller; const response = await fetch("https://api.deepseek.com/chat/completions", { method: "POST", signal, headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token.value}` }, body: JSON.stringify(requestData) }); if (!response.ok) { if (response.status === 401) { alert("API Key 无效,请检查你的API Key"); showConfig.value = true; } else if (response.status === 402) { alert("API Key 余额不足,请充值"); } else if (response.status === 429) { alert("请求频率过高,请稍后再试"); } throw new Error(`HTTP error! status: ${response.status}`); } const reader = response.body.getReader(); const decoder = new TextDecoder(); while (true) { const { done, value } = await reader.read(); if (done) break; const chunk = decoder.decode(value); const lines = chunk.split("\n").filter((line) => line.trim() !== ""); for (const line of lines) { if (line.startsWith("data: ")) { const jsonStr = line.slice(6); if (jsonStr === "[DONE]") continue; try { const data = JSON.parse(jsonStr); if (data.choices && data.choices[0].delta.content) { const content = data.choices[0].delta.content; const lastMessage = messages.value[messages.value.length - 1]; lastMessage.content = lastMessage.content === "思考中..." ? content : lastMessage.content + content; } } catch (e) { console.error("解析错误:", e, "行内容:", line); } } } } isLoading.value = false; } catch (error) { if (error.name === "AbortError") { console.log("请求被终止"); } else { console.error("发送消息错误:", error); messages.value[messages.value.length - 1].content = "发送消息失败,请重试"; } currentAbortController.value = null; isLoading.value = false; } }; const handleStop = () => { if (currentAbortController.value) { currentAbortController.value.abort(); currentAbortController.value = null; isLoading.value = false; } }; const handleSet = () => { showConfig.value = true; }; const handleValidKey = (key) => { showConfig.value = false; token.value = key; }; const renderer = { paragraph({ text }) { return `

${text}

`; } }; marked.marked.use({ renderer }); const formatMessage = (content) => { return marked.marked.parse(content); }; const recordCount = () => { try { fetch("https://monkey.maigua.top/test", { method: "GET" }); } catch { } }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [ vue.createElementVNode("div", _hoisted_1, [ vue.createElementVNode("div", { class: "chat-messages", ref_key: "messagesContainer", ref: messagesContainer }, [ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(messages.value, (message, index) => { return vue.openBlock(), vue.createElementBlock("div", { key: index, class: vue.normalizeClass(["message", message.role]) }, [ vue.createElementVNode("div", { class: "message-content", innerHTML: formatMessage(message.content) }, null, 8, _hoisted_2) ], 2); }), 128)) ], 512), vue.createElementVNode("div", _hoisted_3, [ vue.createElementVNode("div", _hoisted_4, [ vue.withDirectives(vue.createElementVNode("textarea", { class: "textarea", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputMessage.value = $event), onKeydown: vue.withKeys(vue.withModifiers(sendMessage, ["prevent"]), ["enter"]), placeholder: "输入你的问题...", disabled: isLoading.value }, null, 40, _hoisted_5), [ [vue.vModelText, inputMessage.value] ]) ]), vue.createElementVNode("div", _hoisted_6, [ vue.createElementVNode("div", { class: "l" }, [ vue.createElementVNode("div", { class: "menu", onClick: handleSet }, _cache[2] || (_cache[2] = [ vue.createElementVNode("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 24 24" }, [ vue.createElementVNode("g", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "1.5" }, [ vue.createElementVNode("path", { d: "M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87q.11.06.22.127c.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a8 8 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a7 7 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a7 7 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a7 7 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124q.108-.066.22-.128c.332-.183.582-.495.644-.869z" }), vue.createElementVNode("path", { d: "M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0" }) ]) ], -1), vue.createTextVNode(" 配置 ") ])) ]), vue.createElementVNode("div", _hoisted_7, [ vue.createElementVNode("button", { class: "send-btn", onClick: sendMessage, disabled: isLoading.value || !inputMessage.value.trim() }, vue.toDisplayString(isLoading.value ? "发送中..." : "发送"), 9, _hoisted_8) ]) ]), isLoading.value ? (vue.openBlock(), vue.createElementBlock("div", { key: 0, class: "stop-btn", onClick: handleStop }, _cache[3] || (_cache[3] = [ vue.createElementVNode("svg", { "data-v-1541a8d1": "", xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 8 8" }, [ vue.createElementVNode("rect", { "data-v-1541a8d1": "", width: "6", height: "6", x: "1", y: "1", fill: "currentColor", rx: "1.5" }) ], -1), vue.createTextVNode("停止生成") ]))) : vue.createCommentVNode("", true) ]) ]), vue.createVNode(Setting, { show: showConfig.value, onValidKey: handleValidKey, onCloseEvent: _cache[1] || (_cache[1] = ($event) => showConfig.value = false) }, null, 8, ["show"]) ], 64); }; } }; const Chat = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-6dd68792"]]); const _sfc_main = { __name: "App", setup(__props) { return (_ctx, _cache) => { return vue.openBlock(), vue.createBlock(DraggableBox, null, { default: vue.withCtx(() => [ vue.createVNode(Chat) ]), _: 1 }); }; } }; vue.createApp(_sfc_main).mount( (() => { const app = document.createElement("div"); document.body.append(app); return app; })() ); })(Vue, marked);