vite-plugin-opencode-assistant 1.0.74 → 1.0.76
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/es/core/injector.mjs +6 -2
- package/es/core/proxy-server.mjs +19 -13
- package/es/endpoints/index.d.ts +1 -1
- package/es/endpoints/index.mjs +3 -2
- package/es/endpoints/logs.d.ts +0 -2
- package/es/endpoints/logs.mjs +4 -4
- package/es/endpoints/start.d.ts +2 -1
- package/es/endpoints/start.mjs +6 -2
- package/es/endpoints/types.d.ts +2 -0
- package/es/endpoints/warmup.mjs +2 -2
- package/es/endpoints/widget.mjs +1 -2
- package/es/env.d.ts +1 -0
- package/es/index.mjs +7 -1
- package/lib/client.js +3481 -3287
- package/lib/core/injector.cjs +1 -1
- package/lib/core/proxy-server.cjs +16 -12
- package/lib/endpoints/index.cjs +3 -2
- package/lib/endpoints/index.d.ts +1 -1
- package/lib/endpoints/logs.cjs +2 -5
- package/lib/endpoints/logs.d.ts +0 -2
- package/lib/endpoints/start.cjs +6 -2
- package/lib/endpoints/start.d.ts +2 -1
- package/lib/endpoints/types.d.ts +2 -0
- package/lib/endpoints/warmup.cjs +1 -1
- package/lib/endpoints/widget.cjs +2 -3
- package/lib/env.d.ts +1 -0
- package/lib/index.cjs +7 -1
- package/lib/style.css +1 -1
- package/package.json +8 -4
- package/es/client/App.vue.d.ts +0 -6
- package/es/client/App.vue.mjs +0 -394
- package/es/client/components/ChromeWarmupError-sfc.css +0 -1
- package/es/client/components/ChromeWarmupError.vue.d.ts +0 -19
- package/es/client/components/ChromeWarmupError.vue.mjs +0 -337
- package/es/client/components/LoadingContent.vue.d.ts +0 -5
- package/es/client/components/LoadingContent.vue.mjs +0 -39
- package/es/client/composables/index.d.ts +0 -10
- package/es/client/composables/index.mjs +0 -22
- package/es/client/composables/useContext.d.ts +0 -8
- package/es/client/composables/useContext.mjs +0 -63
- package/es/client/composables/useHotkey.d.ts +0 -12
- package/es/client/composables/useHotkey.mjs +0 -41
- package/es/client/composables/useOpencodeSSE.d.ts +0 -64
- package/es/client/composables/useOpencodeSSE.mjs +0 -29
- package/es/client/composables/useOpencodeSessionSSE.d.ts +0 -66
- package/es/client/composables/useOpencodeSessionSSE.mjs +0 -168
- package/es/client/composables/useSSE.d.ts +0 -87
- package/es/client/composables/useSSE.mjs +0 -118
- package/es/client/composables/useSelectedElements.d.ts +0 -19
- package/es/client/composables/useSelectedElements.mjs +0 -43
- package/es/client/composables/useServerSSE.d.ts +0 -53
- package/es/client/composables/useServerSSE.mjs +0 -36
- package/es/client/composables/useServiceStatus.d.ts +0 -11
- package/es/client/composables/useServiceStatus.mjs +0 -47
- package/es/client/composables/useSessions.d.ts +0 -45
- package/es/client/composables/useSessions.mjs +0 -147
- package/es/client/composables/useTheme.d.ts +0 -12
- package/es/client/composables/useTheme.mjs +0 -42
- package/es/client/index.d.ts +0 -1
- package/es/client/index.mjs +0 -32
- package/es/client/styles.css +0 -1
- package/lib/client/App.vue.cjs +0 -421
- package/lib/client/App.vue.d.ts +0 -6
- package/lib/client/components/ChromeWarmupError-sfc.css +0 -1
- package/lib/client/components/ChromeWarmupError.vue.cjs +0 -356
- package/lib/client/components/ChromeWarmupError.vue.d.ts +0 -19
- package/lib/client/components/LoadingContent.vue.cjs +0 -58
- package/lib/client/components/LoadingContent.vue.d.ts +0 -5
- package/lib/client/composables/index.cjs +0 -54
- package/lib/client/composables/index.d.ts +0 -10
- package/lib/client/composables/useContext.cjs +0 -86
- package/lib/client/composables/useContext.d.ts +0 -8
- package/lib/client/composables/useHotkey.cjs +0 -66
- package/lib/client/composables/useHotkey.d.ts +0 -12
- package/lib/client/composables/useOpencodeSSE.cjs +0 -52
- package/lib/client/composables/useOpencodeSSE.d.ts +0 -64
- package/lib/client/composables/useOpencodeSessionSSE.cjs +0 -187
- package/lib/client/composables/useOpencodeSessionSSE.d.ts +0 -66
- package/lib/client/composables/useSSE.cjs +0 -141
- package/lib/client/composables/useSSE.d.ts +0 -87
- package/lib/client/composables/useSelectedElements.cjs +0 -66
- package/lib/client/composables/useSelectedElements.d.ts +0 -19
- package/lib/client/composables/useServerSSE.cjs +0 -59
- package/lib/client/composables/useServerSSE.d.ts +0 -53
- package/lib/client/composables/useServiceStatus.cjs +0 -70
- package/lib/client/composables/useServiceStatus.d.ts +0 -11
- package/lib/client/composables/useSessions.cjs +0 -168
- package/lib/client/composables/useSessions.d.ts +0 -45
- package/lib/client/composables/useTheme.cjs +0 -65
- package/lib/client/composables/useTheme.d.ts +0 -12
- package/lib/client/index.cjs +0 -54
- package/lib/client/index.d.ts +0 -1
- package/lib/client/styles.css +0 -1
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var ChromeWarmupError_vue_exports = {};
|
|
19
|
-
__export(ChromeWarmupError_vue_exports, {
|
|
20
|
-
default: () => ChromeWarmupError_vue_default
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(ChromeWarmupError_vue_exports);
|
|
23
|
-
var import_ChromeWarmupError_sfc = require("./ChromeWarmupError-sfc.css");
|
|
24
|
-
var import_vue = require("vue");
|
|
25
|
-
var import_vue2 = require("vue");
|
|
26
|
-
var import_shared = require("@vite-plugin-opencode-assistant/shared");
|
|
27
|
-
var import_vue3 = require("vue");
|
|
28
|
-
const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)({
|
|
29
|
-
__name: "ChromeWarmupError",
|
|
30
|
-
props: {
|
|
31
|
-
retrying: { type: Boolean, required: true },
|
|
32
|
-
errorType: { type: String, required: false },
|
|
33
|
-
errorMessage: { type: String, required: false },
|
|
34
|
-
models: { type: Array, required: false }
|
|
35
|
-
},
|
|
36
|
-
emits: ["retry"],
|
|
37
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
38
|
-
__expose();
|
|
39
|
-
const props = __props;
|
|
40
|
-
const emit = __emit;
|
|
41
|
-
const selectedModelValue = (0, import_vue2.ref)("");
|
|
42
|
-
(0, import_vue2.watch)(
|
|
43
|
-
() => props.models,
|
|
44
|
-
(models) => {
|
|
45
|
-
if (models && models.length > 0 && !selectedModelValue.value) {
|
|
46
|
-
selectedModelValue.value = `${models[0].providerID}:${models[0].modelID}`;
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
{ immediate: true }
|
|
50
|
-
);
|
|
51
|
-
const shouldShowModelSelector = (0, import_vue2.computed)(() => {
|
|
52
|
-
return props.errorType === import_shared.ChromeMcpWarmupErrorType.AI_TIMEOUT || props.errorType === import_shared.ChromeMcpWarmupErrorType.AI_RESPONSE_ERROR || props.errorType === import_shared.ChromeMcpWarmupErrorType.UNKNOWN;
|
|
53
|
-
});
|
|
54
|
-
const hasModels = (0, import_vue2.computed)(() => props.models && props.models.length > 0);
|
|
55
|
-
const groupedModels = (0, import_vue2.computed)(() => {
|
|
56
|
-
if (!props.models) return {};
|
|
57
|
-
const groups = {};
|
|
58
|
-
for (const model of props.models) {
|
|
59
|
-
if (!groups[model.providerID]) {
|
|
60
|
-
groups[model.providerID] = [];
|
|
61
|
-
}
|
|
62
|
-
groups[model.providerID].push(model);
|
|
63
|
-
}
|
|
64
|
-
return groups;
|
|
65
|
-
});
|
|
66
|
-
const selectedModel = (0, import_vue2.computed)(() => {
|
|
67
|
-
var _a;
|
|
68
|
-
if (!selectedModelValue.value || !props.models) return ((_a = props.models) == null ? void 0 : _a[0]) || null;
|
|
69
|
-
const [providerID, modelID] = selectedModelValue.value.split(":");
|
|
70
|
-
return props.models.find((m) => m.providerID === providerID && m.modelID === modelID) || null;
|
|
71
|
-
});
|
|
72
|
-
const getProviderDisplayName = (providerID) => {
|
|
73
|
-
const knownProviders = {
|
|
74
|
-
anthropic: "Anthropic",
|
|
75
|
-
openai: "OpenAI",
|
|
76
|
-
google: "Google",
|
|
77
|
-
xai: "xAI",
|
|
78
|
-
opencode: "OpenCode",
|
|
79
|
-
opencode_go: "OpenCode Go"
|
|
80
|
-
};
|
|
81
|
-
return knownProviders[providerID] || providerID;
|
|
82
|
-
};
|
|
83
|
-
const getModelKey = (model) => `${model.providerID}:${model.modelID}`;
|
|
84
|
-
const handleRetry = () => {
|
|
85
|
-
if (shouldShowModelSelector.value && hasModels.value && selectedModel.value) {
|
|
86
|
-
emit("retry", {
|
|
87
|
-
providerID: selectedModel.value.providerID,
|
|
88
|
-
modelID: selectedModel.value.modelID
|
|
89
|
-
});
|
|
90
|
-
} else {
|
|
91
|
-
emit("retry");
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
const __returned__ = { props, emit, selectedModelValue, shouldShowModelSelector, hasModels, groupedModels, selectedModel, getProviderDisplayName, getModelKey, handleRetry, get ChromeMcpWarmupErrorType() {
|
|
95
|
-
return import_shared.ChromeMcpWarmupErrorType;
|
|
96
|
-
} };
|
|
97
|
-
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
98
|
-
return __returned__;
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
const _hoisted_1 = { class: "opencode-chrome-warmup-failed" };
|
|
102
|
-
const _hoisted_2 = { class: "opencode-chrome-warmup-failed-text" };
|
|
103
|
-
const _hoisted_3 = {
|
|
104
|
-
key: 0,
|
|
105
|
-
style: { "margin-top": "12px", "font-weight": "500" }
|
|
106
|
-
};
|
|
107
|
-
const _hoisted_4 = { class: "opencode-chrome-warmup-failed-text" };
|
|
108
|
-
const _hoisted_5 = { class: "opencode-chrome-warmup-error-details" };
|
|
109
|
-
const _hoisted_6 = {
|
|
110
|
-
key: 0,
|
|
111
|
-
style: { "margin-top": "12px" }
|
|
112
|
-
};
|
|
113
|
-
const _hoisted_7 = { class: "opencode-chrome-warmup-failed-text" };
|
|
114
|
-
const _hoisted_8 = { key: 0 };
|
|
115
|
-
const _hoisted_9 = { key: 1 };
|
|
116
|
-
const _hoisted_10 = {
|
|
117
|
-
key: 2,
|
|
118
|
-
style: { "margin-top": "12px" }
|
|
119
|
-
};
|
|
120
|
-
const _hoisted_11 = {
|
|
121
|
-
key: 4,
|
|
122
|
-
class: "opencode-model-selector"
|
|
123
|
-
};
|
|
124
|
-
const _hoisted_12 = { class: "select-wrapper" };
|
|
125
|
-
const _hoisted_13 = ["disabled"];
|
|
126
|
-
const _hoisted_14 = ["label"];
|
|
127
|
-
const _hoisted_15 = ["value"];
|
|
128
|
-
const _hoisted_16 = ["disabled"];
|
|
129
|
-
const _hoisted_17 = {
|
|
130
|
-
key: 5,
|
|
131
|
-
class: "opencode-chrome-warmup-failed-actions"
|
|
132
|
-
};
|
|
133
|
-
const _hoisted_18 = ["disabled"];
|
|
134
|
-
function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
135
|
-
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("div", _hoisted_1, [
|
|
136
|
-
_cache[11] || (_cache[11] = (0, import_vue3.createElementVNode)(
|
|
137
|
-
"div",
|
|
138
|
-
{ class: "opencode-chrome-warmup-failed-icon" },
|
|
139
|
-
[
|
|
140
|
-
(0, import_vue3.createElementVNode)("svg", {
|
|
141
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
142
|
-
fill: "none",
|
|
143
|
-
viewBox: "0 0 24 24",
|
|
144
|
-
width: "48",
|
|
145
|
-
height: "48",
|
|
146
|
-
stroke: "currentColor",
|
|
147
|
-
"stroke-width": "1.5"
|
|
148
|
-
}, [
|
|
149
|
-
(0, import_vue3.createElementVNode)("path", {
|
|
150
|
-
"stroke-linecap": "round",
|
|
151
|
-
"stroke-linejoin": "round",
|
|
152
|
-
d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"
|
|
153
|
-
})
|
|
154
|
-
])
|
|
155
|
-
],
|
|
156
|
-
-1
|
|
157
|
-
/* CACHED */
|
|
158
|
-
)),
|
|
159
|
-
$props.errorType === $setup.ChromeMcpWarmupErrorType.CHROME_NOT_CONNECTED ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
|
160
|
-
import_vue3.Fragment,
|
|
161
|
-
{ key: 0 },
|
|
162
|
-
[
|
|
163
|
-
_cache[2] || (_cache[2] = (0, import_vue3.createElementVNode)(
|
|
164
|
-
"div",
|
|
165
|
-
{ class: "opencode-chrome-warmup-failed-title" },
|
|
166
|
-
"Chrome DevTools MCP \u8FDE\u63A5\u5931\u8D25",
|
|
167
|
-
-1
|
|
168
|
-
/* CACHED */
|
|
169
|
-
)),
|
|
170
|
-
_cache[3] || (_cache[3] = (0, import_vue3.createElementVNode)(
|
|
171
|
-
"div",
|
|
172
|
-
{ class: "opencode-chrome-warmup-failed-text" },
|
|
173
|
-
[
|
|
174
|
-
(0, import_vue3.createElementVNode)("p", null, "\u8BF7\u6309\u4EE5\u4E0B\u6B65\u9AA4\u5F00\u542F Chrome \u8FDC\u7A0B\u8C03\u8BD5\uFF1A"),
|
|
175
|
-
(0, import_vue3.createElementVNode)("div", { class: "opencode-chrome-warmup-steps" }, [
|
|
176
|
-
(0, import_vue3.createElementVNode)("div", null, [
|
|
177
|
-
(0, import_vue3.createTextVNode)(" \u5728 Chrome \u5730\u5740\u680F\u8F93\u5165 "),
|
|
178
|
-
(0, import_vue3.createElementVNode)("code", { class: "opencode-chrome-warmup-code" }, "chrome://inspect/#remote-debugging")
|
|
179
|
-
]),
|
|
180
|
-
(0, import_vue3.createElementVNode)("div", null, "\u52FE\u9009 'Allow remote debugging for this browser instance' \u9009\u9879"),
|
|
181
|
-
(0, import_vue3.createElementVNode)("div", null, "\u91CD\u65B0\u542F\u52A8\u6D4F\u89C8\u5668"),
|
|
182
|
-
(0, import_vue3.createElementVNode)("div", null, "\u5B8C\u6210\u540E\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u91CD\u8BD5")
|
|
183
|
-
])
|
|
184
|
-
],
|
|
185
|
-
-1
|
|
186
|
-
/* CACHED */
|
|
187
|
-
))
|
|
188
|
-
],
|
|
189
|
-
64
|
|
190
|
-
/* STABLE_FRAGMENT */
|
|
191
|
-
)) : $props.errorType === $setup.ChromeMcpWarmupErrorType.AI_TIMEOUT ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
|
192
|
-
import_vue3.Fragment,
|
|
193
|
-
{ key: 1 },
|
|
194
|
-
[
|
|
195
|
-
_cache[6] || (_cache[6] = (0, import_vue3.createElementVNode)(
|
|
196
|
-
"div",
|
|
197
|
-
{ class: "opencode-chrome-warmup-failed-title" },
|
|
198
|
-
"AI \u54CD\u5E94\u8D85\u65F6",
|
|
199
|
-
-1
|
|
200
|
-
/* CACHED */
|
|
201
|
-
)),
|
|
202
|
-
(0, import_vue3.createElementVNode)("div", _hoisted_2, [
|
|
203
|
-
_cache[4] || (_cache[4] = (0, import_vue3.createElementVNode)(
|
|
204
|
-
"p",
|
|
205
|
-
null,
|
|
206
|
-
"AI \u6A21\u578B\u54CD\u5E94\u8D85\u65F6\uFF0C\u53EF\u80FD\u7684\u539F\u56E0\uFF1A",
|
|
207
|
-
-1
|
|
208
|
-
/* CACHED */
|
|
209
|
-
)),
|
|
210
|
-
_cache[5] || (_cache[5] = (0, import_vue3.createElementVNode)(
|
|
211
|
-
"div",
|
|
212
|
-
{ class: "opencode-chrome-warmup-steps" },
|
|
213
|
-
[
|
|
214
|
-
(0, import_vue3.createElementVNode)("div", null, "\u5F53\u524D\u9009\u62E9\u7684 AI \u6A21\u578B\u670D\u52A1\u4E0D\u53EF\u7528\u6216\u54CD\u5E94\u7F13\u6162"),
|
|
215
|
-
(0, import_vue3.createElementVNode)("div", null, "\u7F51\u7EDC\u8FDE\u63A5\u95EE\u9898"),
|
|
216
|
-
(0, import_vue3.createElementVNode)("div", null, "\u6A21\u578B\u914D\u7F6E\u4E0D\u6B63\u786E")
|
|
217
|
-
],
|
|
218
|
-
-1
|
|
219
|
-
/* CACHED */
|
|
220
|
-
)),
|
|
221
|
-
$setup.hasModels ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("p", _hoisted_3, "\u53EF\u9009\u62E9\u5176\u4ED6\u6A21\u578B\u91CD\u8BD5\uFF1A")) : (0, import_vue3.createCommentVNode)("v-if", true)
|
|
222
|
-
])
|
|
223
|
-
],
|
|
224
|
-
64
|
|
225
|
-
/* STABLE_FRAGMENT */
|
|
226
|
-
)) : $props.errorType === $setup.ChromeMcpWarmupErrorType.AI_RESPONSE_ERROR ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
|
227
|
-
import_vue3.Fragment,
|
|
228
|
-
{ key: 2 },
|
|
229
|
-
[
|
|
230
|
-
_cache[8] || (_cache[8] = (0, import_vue3.createElementVNode)(
|
|
231
|
-
"div",
|
|
232
|
-
{ class: "opencode-chrome-warmup-failed-title" },
|
|
233
|
-
"AI \u54CD\u5E94\u9519\u8BEF",
|
|
234
|
-
-1
|
|
235
|
-
/* CACHED */
|
|
236
|
-
)),
|
|
237
|
-
(0, import_vue3.createElementVNode)("div", _hoisted_4, [
|
|
238
|
-
_cache[7] || (_cache[7] = (0, import_vue3.createElementVNode)(
|
|
239
|
-
"p",
|
|
240
|
-
null,
|
|
241
|
-
"AI \u6A21\u578B\u8FD4\u56DE\u4E86\u610F\u5916\u7684\u54CD\u5E94\uFF1A",
|
|
242
|
-
-1
|
|
243
|
-
/* CACHED */
|
|
244
|
-
)),
|
|
245
|
-
(0, import_vue3.createElementVNode)(
|
|
246
|
-
"div",
|
|
247
|
-
_hoisted_5,
|
|
248
|
-
(0, import_vue3.toDisplayString)($props.errorMessage || "\u672A\u77E5\u9519\u8BEF"),
|
|
249
|
-
1
|
|
250
|
-
/* TEXT */
|
|
251
|
-
),
|
|
252
|
-
$setup.hasModels ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("p", _hoisted_6, "\u53EF\u9009\u62E9\u5176\u4ED6\u6A21\u578B\u91CD\u8BD5\uFF1A")) : (0, import_vue3.createCommentVNode)("v-if", true)
|
|
253
|
-
])
|
|
254
|
-
],
|
|
255
|
-
64
|
|
256
|
-
/* STABLE_FRAGMENT */
|
|
257
|
-
)) : ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
|
258
|
-
import_vue3.Fragment,
|
|
259
|
-
{ key: 3 },
|
|
260
|
-
[
|
|
261
|
-
_cache[9] || (_cache[9] = (0, import_vue3.createElementVNode)(
|
|
262
|
-
"div",
|
|
263
|
-
{ class: "opencode-chrome-warmup-failed-title" },
|
|
264
|
-
"Chrome DevTools MCP \u8FDE\u63A5\u5931\u8D25",
|
|
265
|
-
-1
|
|
266
|
-
/* CACHED */
|
|
267
|
-
)),
|
|
268
|
-
(0, import_vue3.createElementVNode)("div", _hoisted_7, [
|
|
269
|
-
$props.errorMessage ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
|
270
|
-
"p",
|
|
271
|
-
_hoisted_8,
|
|
272
|
-
(0, import_vue3.toDisplayString)($props.errorMessage),
|
|
273
|
-
1
|
|
274
|
-
/* TEXT */
|
|
275
|
-
)) : ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("p", _hoisted_9, "\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")),
|
|
276
|
-
$setup.hasModels ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("p", _hoisted_10, "\u53EF\u9009\u62E9\u6A21\u578B\u91CD\u8BD5\uFF1A")) : (0, import_vue3.createCommentVNode)("v-if", true)
|
|
277
|
-
])
|
|
278
|
-
],
|
|
279
|
-
64
|
|
280
|
-
/* STABLE_FRAGMENT */
|
|
281
|
-
)),
|
|
282
|
-
$setup.shouldShowModelSelector && $setup.hasModels ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("div", _hoisted_11, [
|
|
283
|
-
(0, import_vue3.createElementVNode)("div", _hoisted_12, [
|
|
284
|
-
(0, import_vue3.withDirectives)((0, import_vue3.createElementVNode)("select", {
|
|
285
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.selectedModelValue = $event),
|
|
286
|
-
class: "native-select",
|
|
287
|
-
disabled: $props.retrying
|
|
288
|
-
}, [
|
|
289
|
-
((0, import_vue3.openBlock)(true), (0, import_vue3.createElementBlock)(
|
|
290
|
-
import_vue3.Fragment,
|
|
291
|
-
null,
|
|
292
|
-
(0, import_vue3.renderList)($setup.groupedModels, (providerModels, provider) => {
|
|
293
|
-
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("optgroup", {
|
|
294
|
-
key: provider,
|
|
295
|
-
label: $setup.getProviderDisplayName(provider)
|
|
296
|
-
}, [
|
|
297
|
-
((0, import_vue3.openBlock)(true), (0, import_vue3.createElementBlock)(
|
|
298
|
-
import_vue3.Fragment,
|
|
299
|
-
null,
|
|
300
|
-
(0, import_vue3.renderList)(providerModels, (model) => {
|
|
301
|
-
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("option", {
|
|
302
|
-
key: $setup.getModelKey(model),
|
|
303
|
-
value: $setup.getModelKey(model)
|
|
304
|
-
}, (0, import_vue3.toDisplayString)(model.name || model.modelID), 9, _hoisted_15);
|
|
305
|
-
}),
|
|
306
|
-
128
|
|
307
|
-
/* KEYED_FRAGMENT */
|
|
308
|
-
))
|
|
309
|
-
], 8, _hoisted_14);
|
|
310
|
-
}),
|
|
311
|
-
128
|
|
312
|
-
/* KEYED_FRAGMENT */
|
|
313
|
-
))
|
|
314
|
-
], 8, _hoisted_13), [
|
|
315
|
-
[import_vue3.vModelSelect, $setup.selectedModelValue]
|
|
316
|
-
]),
|
|
317
|
-
_cache[10] || (_cache[10] = (0, import_vue3.createElementVNode)(
|
|
318
|
-
"span",
|
|
319
|
-
{ class: "select-arrow" },
|
|
320
|
-
[
|
|
321
|
-
(0, import_vue3.createElementVNode)("svg", {
|
|
322
|
-
viewBox: "0 0 24 24",
|
|
323
|
-
width: "16",
|
|
324
|
-
height: "16",
|
|
325
|
-
fill: "none",
|
|
326
|
-
stroke: "currentColor",
|
|
327
|
-
"stroke-width": "2"
|
|
328
|
-
}, [
|
|
329
|
-
(0, import_vue3.createElementVNode)("path", {
|
|
330
|
-
d: "M6 9l6 6 6-6",
|
|
331
|
-
"stroke-linecap": "round",
|
|
332
|
-
"stroke-linejoin": "round"
|
|
333
|
-
})
|
|
334
|
-
])
|
|
335
|
-
],
|
|
336
|
-
-1
|
|
337
|
-
/* CACHED */
|
|
338
|
-
))
|
|
339
|
-
]),
|
|
340
|
-
(0, import_vue3.createElementVNode)("button", {
|
|
341
|
-
class: "retry-btn",
|
|
342
|
-
disabled: $props.retrying,
|
|
343
|
-
onClick: $setup.handleRetry
|
|
344
|
-
}, (0, import_vue3.toDisplayString)($props.retrying ? "\u8FDE\u63A5\u4E2D..." : "\u91CD\u8BD5\u8FDE\u63A5"), 9, _hoisted_16)
|
|
345
|
-
])) : ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("div", _hoisted_17, [
|
|
346
|
-
(0, import_vue3.createElementVNode)("button", {
|
|
347
|
-
class: "opencode-chrome-warmup-failed-btn primary",
|
|
348
|
-
disabled: $props.retrying,
|
|
349
|
-
onClick: _cache[1] || (_cache[1] = ($event) => $setup.handleRetry())
|
|
350
|
-
}, (0, import_vue3.toDisplayString)($props.retrying ? "\u8FDE\u63A5\u4E2D..." : "\u91CD\u8BD5\u8FDE\u63A5"), 9, _hoisted_18)
|
|
351
|
-
]))
|
|
352
|
-
]);
|
|
353
|
-
}
|
|
354
|
-
__vue_sfc__.render = __vue_render__;
|
|
355
|
-
__vue_sfc__.__scopeId = "data-v-06c8b833";
|
|
356
|
-
var ChromeWarmupError_vue_default = __vue_sfc__;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type ModelInfo } from "@vite-plugin-opencode-assistant/shared";
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
retrying: boolean;
|
|
4
|
-
errorType?: string;
|
|
5
|
-
errorMessage?: string;
|
|
6
|
-
models?: ModelInfo[];
|
|
7
|
-
};
|
|
8
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
-
retry: (selectedModel?: {
|
|
10
|
-
providerID: string;
|
|
11
|
-
modelID: string;
|
|
12
|
-
} | undefined) => any;
|
|
13
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
-
onRetry?: ((selectedModel?: {
|
|
15
|
-
providerID: string;
|
|
16
|
-
modelID: string;
|
|
17
|
-
} | undefined) => any) | undefined;
|
|
18
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
-
export default _default;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var LoadingContent_vue_exports = {};
|
|
19
|
-
__export(LoadingContent_vue_exports, {
|
|
20
|
-
default: () => LoadingContent_vue_default
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(LoadingContent_vue_exports);
|
|
23
|
-
var import_vue = require("vue");
|
|
24
|
-
var import_vue2 = require("vue");
|
|
25
|
-
const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)({
|
|
26
|
-
__name: "LoadingContent",
|
|
27
|
-
props: {
|
|
28
|
-
loadingText: { type: String, required: true }
|
|
29
|
-
},
|
|
30
|
-
setup(__props, { expose: __expose }) {
|
|
31
|
-
__expose();
|
|
32
|
-
const __returned__ = {};
|
|
33
|
-
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
34
|
-
return __returned__;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
const _hoisted_1 = { class: "opencode-custom-loading" };
|
|
38
|
-
const _hoisted_2 = { class: "opencode-loading-text" };
|
|
39
|
-
function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
40
|
-
return (0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("div", _hoisted_1, [
|
|
41
|
-
_cache[0] || (_cache[0] = (0, import_vue2.createElementVNode)(
|
|
42
|
-
"div",
|
|
43
|
-
{ class: "opencode-loading-spinner" },
|
|
44
|
-
null,
|
|
45
|
-
-1
|
|
46
|
-
/* CACHED */
|
|
47
|
-
)),
|
|
48
|
-
(0, import_vue2.createElementVNode)(
|
|
49
|
-
"div",
|
|
50
|
-
_hoisted_2,
|
|
51
|
-
(0, import_vue2.toDisplayString)($props.loadingText),
|
|
52
|
-
1
|
|
53
|
-
/* TEXT */
|
|
54
|
-
)
|
|
55
|
-
]);
|
|
56
|
-
}
|
|
57
|
-
__vue_sfc__.render = __vue_render__;
|
|
58
|
-
var LoadingContent_vue_default = __vue_sfc__;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
loadingText: string;
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
-
export default _default;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var composables_exports = {};
|
|
19
|
-
__export(composables_exports, {
|
|
20
|
-
useContext: () => import_useContext.useContext,
|
|
21
|
-
useHotkey: () => import_useHotkey.useHotkey,
|
|
22
|
-
useOpencodeSSE: () => import_useOpencodeSSE.useOpencodeSSE,
|
|
23
|
-
useOpencodeSessionSSE: () => import_useOpencodeSessionSSE.useOpencodeSessionSSE,
|
|
24
|
-
useSSE: () => import_useSSE.useSSE,
|
|
25
|
-
useSelectedElements: () => import_useSelectedElements.useSelectedElements,
|
|
26
|
-
useServerSSE: () => import_useServerSSE.useServerSSE,
|
|
27
|
-
useServiceStatus: () => import_useServiceStatus.useServiceStatus,
|
|
28
|
-
useSessions: () => import_useSessions.useSessions,
|
|
29
|
-
useTheme: () => import_useTheme.useTheme
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(composables_exports);
|
|
32
|
-
var import_useSSE = require("./useSSE.cjs");
|
|
33
|
-
var import_useServerSSE = require("./useServerSSE.cjs");
|
|
34
|
-
var import_useOpencodeSSE = require("./useOpencodeSSE.cjs");
|
|
35
|
-
var import_useOpencodeSessionSSE = require("./useOpencodeSessionSSE.cjs");
|
|
36
|
-
var import_useHotkey = require("./useHotkey.cjs");
|
|
37
|
-
var import_useSessions = require("./useSessions.cjs");
|
|
38
|
-
var import_useTheme = require("./useTheme.cjs");
|
|
39
|
-
var import_useSelectedElements = require("./useSelectedElements.cjs");
|
|
40
|
-
var import_useServiceStatus = require("./useServiceStatus.cjs");
|
|
41
|
-
var import_useContext = require("./useContext.cjs");
|
|
42
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
-
0 && (module.exports = {
|
|
44
|
-
useContext,
|
|
45
|
-
useHotkey,
|
|
46
|
-
useOpencodeSSE,
|
|
47
|
-
useOpencodeSessionSSE,
|
|
48
|
-
useSSE,
|
|
49
|
-
useSelectedElements,
|
|
50
|
-
useServerSSE,
|
|
51
|
-
useServiceStatus,
|
|
52
|
-
useSessions,
|
|
53
|
-
useTheme
|
|
54
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { useSSE } from "./useSSE";
|
|
2
|
-
export { useServerSSE } from "./useServerSSE";
|
|
3
|
-
export { useOpencodeSSE } from "./useOpencodeSSE";
|
|
4
|
-
export { useOpencodeSessionSSE } from "./useOpencodeSessionSSE";
|
|
5
|
-
export { useHotkey } from "./useHotkey";
|
|
6
|
-
export { useSessions } from "./useSessions";
|
|
7
|
-
export { useTheme } from "./useTheme";
|
|
8
|
-
export { useSelectedElements } from "./useSelectedElements";
|
|
9
|
-
export { useServiceStatus } from "./useServiceStatus";
|
|
10
|
-
export { useContext } from "./useContext";
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var useContext_exports = {};
|
|
19
|
-
__export(useContext_exports, {
|
|
20
|
-
useContext: () => useContext
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(useContext_exports);
|
|
23
|
-
var import_vue = require("vue");
|
|
24
|
-
function useContext(serviceStatus, selectedElements) {
|
|
25
|
-
let currentPageUrl = "";
|
|
26
|
-
let currentPageTitle = "";
|
|
27
|
-
const updateContext = (force = false) => {
|
|
28
|
-
if (serviceStatus.value === "idle") return;
|
|
29
|
-
const newUrl = window.location.href;
|
|
30
|
-
const newTitle = document.title;
|
|
31
|
-
if (force || newUrl !== currentPageUrl || newTitle !== currentPageTitle) {
|
|
32
|
-
currentPageUrl = newUrl;
|
|
33
|
-
currentPageTitle = newTitle;
|
|
34
|
-
fetch("/__opencode_context__", {
|
|
35
|
-
method: "POST",
|
|
36
|
-
headers: { "Content-Type": "application/json" },
|
|
37
|
-
body: JSON.stringify({
|
|
38
|
-
url: newUrl,
|
|
39
|
-
title: newTitle,
|
|
40
|
-
selectedElements: selectedElements.value
|
|
41
|
-
})
|
|
42
|
-
}).catch(() => {
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
const scheduleContextUpdate = () => {
|
|
47
|
-
requestAnimationFrame(() => updateContext());
|
|
48
|
-
};
|
|
49
|
-
let titleObserver = null;
|
|
50
|
-
const originalPushState = history.pushState;
|
|
51
|
-
const originalReplaceState = history.replaceState;
|
|
52
|
-
(0, import_vue.onMounted)(() => {
|
|
53
|
-
history.pushState = function(...args) {
|
|
54
|
-
originalPushState.apply(this, args);
|
|
55
|
-
scheduleContextUpdate();
|
|
56
|
-
};
|
|
57
|
-
history.replaceState = function(...args) {
|
|
58
|
-
originalReplaceState.apply(this, args);
|
|
59
|
-
scheduleContextUpdate();
|
|
60
|
-
};
|
|
61
|
-
window.addEventListener("popstate", scheduleContextUpdate);
|
|
62
|
-
window.addEventListener("hashchange", scheduleContextUpdate);
|
|
63
|
-
titleObserver = new MutationObserver(() => {
|
|
64
|
-
if (document.title !== currentPageTitle) updateContext();
|
|
65
|
-
});
|
|
66
|
-
if (document.head) {
|
|
67
|
-
titleObserver.observe(document.head, { childList: true, subtree: true });
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
(0, import_vue.onUnmounted)(() => {
|
|
71
|
-
history.pushState = originalPushState;
|
|
72
|
-
history.replaceState = originalReplaceState;
|
|
73
|
-
window.removeEventListener("popstate", scheduleContextUpdate);
|
|
74
|
-
window.removeEventListener("hashchange", scheduleContextUpdate);
|
|
75
|
-
if (titleObserver) {
|
|
76
|
-
titleObserver.disconnect();
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
return {
|
|
80
|
-
updateContext
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
84
|
-
0 && (module.exports = {
|
|
85
|
-
useContext
|
|
86
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { OpenCodeSelectedElement, ServiceStatus } from "@vite-plugin-opencode-assistant/shared";
|
|
2
|
-
export declare function useContext(serviceStatus: {
|
|
3
|
-
value: ServiceStatus;
|
|
4
|
-
}, selectedElements: {
|
|
5
|
-
value: OpenCodeSelectedElement[];
|
|
6
|
-
}): {
|
|
7
|
-
updateContext: (force?: boolean) => void;
|
|
8
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var useHotkey_exports = {};
|
|
19
|
-
__export(useHotkey_exports, {
|
|
20
|
-
matchHotkey: () => matchHotkey,
|
|
21
|
-
parseHotkey: () => parseHotkey,
|
|
22
|
-
useHotkey: () => useHotkey
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(useHotkey_exports);
|
|
25
|
-
var import_vue = require("vue");
|
|
26
|
-
function parseHotkey(hotkeyStr) {
|
|
27
|
-
if (!hotkeyStr) return { ctrl: true, shift: false, alt: false, key: "k" };
|
|
28
|
-
const parts = hotkeyStr.toLowerCase().split("+");
|
|
29
|
-
const key = parts.pop();
|
|
30
|
-
return {
|
|
31
|
-
ctrl: parts.includes("ctrl") || parts.includes("meta"),
|
|
32
|
-
shift: parts.includes("shift"),
|
|
33
|
-
alt: parts.includes("alt"),
|
|
34
|
-
key: key || "k"
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function matchHotkey(e, hotkeyConfig) {
|
|
38
|
-
const ctrlMatch = hotkeyConfig.ctrl ? e.ctrlKey || e.metaKey : !(e.ctrlKey || e.metaKey);
|
|
39
|
-
const shiftMatch = hotkeyConfig.shift ? e.shiftKey : !e.shiftKey;
|
|
40
|
-
const altMatch = hotkeyConfig.alt ? e.altKey : !e.altKey;
|
|
41
|
-
const keyMatch = e.key.toLowerCase() === hotkeyConfig.key.toLowerCase();
|
|
42
|
-
return ctrlMatch && shiftMatch && altMatch && keyMatch;
|
|
43
|
-
}
|
|
44
|
-
function useHotkey(hotkeyStr, callback) {
|
|
45
|
-
const hotkeyConfig = parseHotkey(hotkeyStr);
|
|
46
|
-
const handleKeydown = (e) => {
|
|
47
|
-
if (matchHotkey(e, hotkeyConfig)) {
|
|
48
|
-
callback(e);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
(0, import_vue.onMounted)(() => {
|
|
52
|
-
document.addEventListener("keydown", handleKeydown);
|
|
53
|
-
});
|
|
54
|
-
(0, import_vue.onUnmounted)(() => {
|
|
55
|
-
document.removeEventListener("keydown", handleKeydown);
|
|
56
|
-
});
|
|
57
|
-
return {
|
|
58
|
-
hotkeyConfig
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
62
|
-
0 && (module.exports = {
|
|
63
|
-
matchHotkey,
|
|
64
|
-
parseHotkey,
|
|
65
|
-
useHotkey
|
|
66
|
-
});
|