@vite-plugin-opencode-assistant/components 1.0.47 → 1.0.49
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/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/open-code-widget/composables/use-persist-state.d.ts +5 -1
- package/es/open-code-widget/composables/use-persist-state.js +10 -2
- package/es/open-code-widget/composables/use-split.d.ts +5 -0
- package/es/open-code-widget/composables/use-split.js +46 -12
- package/es/open-code-widget/src/components/ChatPanel-sfc.css +1 -1
- package/es/open-code-widget/src/components/ChatPanel.vue.d.ts +2 -0
- package/es/open-code-widget/src/components/ChatPanel.vue.js +58 -10
- package/es/open-code-widget/src/components/Header.vue.d.ts +8 -4
- package/es/open-code-widget/src/components/Header.vue.js +313 -27
- package/es/open-code-widget/src/context.d.ts +5 -1
- package/es/open-code-widget/src/index-sfc.css +1 -1
- package/es/open-code-widget/src/index.vue.d.ts +1 -1
- package/es/open-code-widget/src/index.vue.js +48 -12
- package/lib/@vite-plugin-opencode-assistant/components.cjs.js +357 -67
- package/lib/@vite-plugin-opencode-assistant/components.es.js +357 -67
- package/lib/components.css +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/open-code-widget/composables/use-persist-state.d.ts +5 -1
- package/lib/open-code-widget/composables/use-persist-state.js +10 -2
- package/lib/open-code-widget/composables/use-split.d.ts +5 -0
- package/lib/open-code-widget/composables/use-split.js +46 -12
- package/lib/open-code-widget/src/components/ChatPanel-sfc.css +1 -1
- package/lib/open-code-widget/src/components/ChatPanel.vue.d.ts +2 -0
- package/lib/open-code-widget/src/components/ChatPanel.vue.js +58 -10
- package/lib/open-code-widget/src/components/Header.vue.d.ts +8 -4
- package/lib/open-code-widget/src/components/Header.vue.js +313 -27
- package/lib/open-code-widget/src/context.d.ts +5 -1
- package/lib/open-code-widget/src/index-sfc.css +1 -1
- package/lib/open-code-widget/src/index.vue.d.ts +1 -1
- package/lib/open-code-widget/src/index.vue.js +48 -12
- package/lib/web-types.json +1 -1
- package/package.json +2 -2
|
@@ -17,9 +17,13 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
|
|
|
17
17
|
minimized,
|
|
18
18
|
promptDockVisible,
|
|
19
19
|
mode,
|
|
20
|
+
displayMode,
|
|
21
|
+
splitPosition,
|
|
20
22
|
handleToggleSessionList,
|
|
21
23
|
handleToggleSelectMode,
|
|
22
24
|
handleToggleTheme,
|
|
25
|
+
handleToggleDisplayMode,
|
|
26
|
+
handleToggleSplitPosition,
|
|
23
27
|
handleClose,
|
|
24
28
|
handleToggleMinimize,
|
|
25
29
|
handleTogglePromptDock
|
|
@@ -41,7 +45,37 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
|
|
|
41
45
|
};
|
|
42
46
|
return `\u5207\u6362\u4E3B\u9898 - \u5F53\u524D: ${themeLabels[theme.value]}`;
|
|
43
47
|
});
|
|
44
|
-
const
|
|
48
|
+
const displayModeIconTitle = computed(() => {
|
|
49
|
+
const displayModeLabels = {
|
|
50
|
+
bubble: "\u6C14\u6CE1\u6A21\u5F0F",
|
|
51
|
+
split: "\u5206\u5C4F\u6A21\u5F0F",
|
|
52
|
+
auto: "\u81EA\u52A8\u6A21\u5F0F"
|
|
53
|
+
};
|
|
54
|
+
return `\u5C55\u793A\u6A21\u5F0F: ${displayModeLabels[displayMode.value]}`;
|
|
55
|
+
});
|
|
56
|
+
const displayModeIconLabel = computed(() => {
|
|
57
|
+
const displayModeLabels = {
|
|
58
|
+
bubble: "\u6C14\u6CE1\u6A21\u5F0F",
|
|
59
|
+
split: "\u5206\u5C4F\u6A21\u5F0F",
|
|
60
|
+
auto: "\u81EA\u52A8\u6A21\u5F0F"
|
|
61
|
+
};
|
|
62
|
+
const modes = ["bubble", "split", "auto"];
|
|
63
|
+
const currentIndex = modes.indexOf(displayMode.value);
|
|
64
|
+
const nextMode = modes[(currentIndex + 1) % modes.length];
|
|
65
|
+
return `\u5207\u6362\u5C55\u793A\u6A21\u5F0F - \u4E0B\u4E00\u4E2A: ${displayModeLabels[nextMode]}`;
|
|
66
|
+
});
|
|
67
|
+
const splitPositionIconTitle = computed(() => {
|
|
68
|
+
const positionLabels = {
|
|
69
|
+
left: "\u5DE6\u4FA7",
|
|
70
|
+
right: "\u53F3\u4FA7"
|
|
71
|
+
};
|
|
72
|
+
return `\u5206\u680F\u4F4D\u7F6E: ${positionLabels[splitPosition.value]}`;
|
|
73
|
+
});
|
|
74
|
+
const splitPositionIconLabel = computed(() => {
|
|
75
|
+
const nextPosition = splitPosition.value === "right" ? "\u5DE6\u4FA7" : "\u53F3\u4FA7";
|
|
76
|
+
return `\u5207\u6362\u5206\u680F\u4F4D\u7F6E - \u4E0B\u4E00\u4E2A: ${nextPosition}`;
|
|
77
|
+
});
|
|
78
|
+
const __returned__ = { title, sessionListTitle, sessionListCollapsed, selectMode, selectEnabled, theme, resolvedTheme, minimized, promptDockVisible, mode, displayMode, splitPosition, handleToggleSessionList, handleToggleSelectMode, handleToggleTheme, handleToggleDisplayMode, handleToggleSplitPosition, handleClose, handleToggleMinimize, handleTogglePromptDock, isSplitMode, themeIconTitle, themeIconLabel, displayModeIconTitle, displayModeIconLabel, splitPositionIconTitle, splitPositionIconLabel };
|
|
45
79
|
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
46
80
|
return __returned__;
|
|
47
81
|
}
|
|
@@ -82,11 +116,63 @@ const _hoisted_8 = {
|
|
|
82
116
|
"stroke-width": "2",
|
|
83
117
|
"aria-hidden": "true"
|
|
84
118
|
};
|
|
85
|
-
const _hoisted_9 =
|
|
86
|
-
const _hoisted_10 = {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
119
|
+
const _hoisted_9 = ["title", "aria-label"];
|
|
120
|
+
const _hoisted_10 = {
|
|
121
|
+
key: 0,
|
|
122
|
+
viewBox: "0 0 24 24",
|
|
123
|
+
width: "16",
|
|
124
|
+
height: "16",
|
|
125
|
+
fill: "none",
|
|
126
|
+
stroke: "currentColor",
|
|
127
|
+
"stroke-width": "2",
|
|
128
|
+
"aria-hidden": "true"
|
|
129
|
+
};
|
|
130
|
+
const _hoisted_11 = {
|
|
131
|
+
key: 1,
|
|
132
|
+
viewBox: "0 0 24 24",
|
|
133
|
+
width: "16",
|
|
134
|
+
height: "16",
|
|
135
|
+
fill: "none",
|
|
136
|
+
stroke: "currentColor",
|
|
137
|
+
"stroke-width": "2",
|
|
138
|
+
"aria-hidden": "true"
|
|
139
|
+
};
|
|
140
|
+
const _hoisted_12 = {
|
|
141
|
+
key: 2,
|
|
142
|
+
viewBox: "0 0 24 24",
|
|
143
|
+
width: "16",
|
|
144
|
+
height: "16",
|
|
145
|
+
fill: "none",
|
|
146
|
+
stroke: "currentColor",
|
|
147
|
+
"stroke-width": "2",
|
|
148
|
+
"aria-hidden": "true"
|
|
149
|
+
};
|
|
150
|
+
const _hoisted_13 = { class: "opencode-chat-header-title" };
|
|
151
|
+
const _hoisted_14 = { class: "opencode-chat-header-actions" };
|
|
152
|
+
const _hoisted_15 = ["title", "aria-label"];
|
|
153
|
+
const _hoisted_16 = {
|
|
154
|
+
key: 0,
|
|
155
|
+
viewBox: "0 0 24 24",
|
|
156
|
+
width: "16",
|
|
157
|
+
height: "16",
|
|
158
|
+
fill: "none",
|
|
159
|
+
stroke: "currentColor",
|
|
160
|
+
"stroke-width": "2",
|
|
161
|
+
"aria-hidden": "true"
|
|
162
|
+
};
|
|
163
|
+
const _hoisted_17 = {
|
|
164
|
+
key: 1,
|
|
165
|
+
viewBox: "0 0 24 24",
|
|
166
|
+
width: "16",
|
|
167
|
+
height: "16",
|
|
168
|
+
fill: "none",
|
|
169
|
+
stroke: "currentColor",
|
|
170
|
+
"stroke-width": "2",
|
|
171
|
+
"aria-hidden": "true"
|
|
172
|
+
};
|
|
173
|
+
const _hoisted_18 = ["title", "aria-label", "aria-pressed"];
|
|
174
|
+
const _hoisted_19 = ["title", "aria-label", "aria-pressed"];
|
|
175
|
+
const _hoisted_20 = {
|
|
90
176
|
key: 0,
|
|
91
177
|
viewBox: "0 0 24 24",
|
|
92
178
|
width: "14",
|
|
@@ -96,7 +182,7 @@ const _hoisted_13 = {
|
|
|
96
182
|
"stroke-width": "2",
|
|
97
183
|
"aria-hidden": "true"
|
|
98
184
|
};
|
|
99
|
-
const
|
|
185
|
+
const _hoisted_21 = {
|
|
100
186
|
key: 1,
|
|
101
187
|
viewBox: "0 0 24 24",
|
|
102
188
|
width: "14",
|
|
@@ -118,7 +204,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
118
204
|
onClick: _cache[0] || (_cache[0] = (...args) => $setup.handleToggleSessionList && $setup.handleToggleSessionList(...args))
|
|
119
205
|
}, [
|
|
120
206
|
_renderSlot(_ctx.$slots, "session-toggle-icon", {}, () => [
|
|
121
|
-
_cache[
|
|
207
|
+
_cache[8] || (_cache[8] = _createElementVNode(
|
|
122
208
|
"svg",
|
|
123
209
|
{
|
|
124
210
|
viewBox: "0 0 24 24",
|
|
@@ -150,7 +236,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
150
236
|
onClick: _cache[1] || (_cache[1] = (...args) => $setup.handleToggleSelectMode && $setup.handleToggleSelectMode(...args))
|
|
151
237
|
}, [
|
|
152
238
|
_renderSlot(_ctx.$slots, "select-icon", {}, () => [
|
|
153
|
-
_cache[
|
|
239
|
+
_cache[9] || (_cache[9] = _createElementVNode(
|
|
154
240
|
"svg",
|
|
155
241
|
{
|
|
156
242
|
viewBox: "0 0 1024 1024",
|
|
@@ -181,9 +267,9 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
181
267
|
onClick: _cache[2] || (_cache[2] = (...args) => $setup.handleToggleTheme && $setup.handleToggleTheme(...args))
|
|
182
268
|
}, [
|
|
183
269
|
_renderSlot(_ctx.$slots, "theme-icon", {}, () => [
|
|
184
|
-
$setup.theme === "light" ? (_openBlock(), _createElementBlock("svg", _hoisted_6, [..._cache[
|
|
270
|
+
$setup.theme === "light" ? (_openBlock(), _createElementBlock("svg", _hoisted_6, [..._cache[10] || (_cache[10] = [
|
|
185
271
|
_createStaticVNode('<circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>', 9)
|
|
186
|
-
])])) : $setup.theme === "dark" ? (_openBlock(), _createElementBlock("svg", _hoisted_7, [..._cache[
|
|
272
|
+
])])) : $setup.theme === "dark" ? (_openBlock(), _createElementBlock("svg", _hoisted_7, [..._cache[11] || (_cache[11] = [
|
|
187
273
|
_createElementVNode(
|
|
188
274
|
"path",
|
|
189
275
|
{ d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" },
|
|
@@ -191,31 +277,231 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
191
277
|
-1
|
|
192
278
|
/* CACHED */
|
|
193
279
|
)
|
|
194
|
-
])])) : (_openBlock(), _createElementBlock("svg", _hoisted_8, [..._cache[
|
|
280
|
+
])])) : (_openBlock(), _createElementBlock("svg", _hoisted_8, [..._cache[12] || (_cache[12] = [
|
|
195
281
|
_createStaticVNode('<rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line><circle cx="12" cy="10" r="3"></circle><path d="M7 7l2 2M17 7l-2 2M7 13l2-2M17 13l-2-2"></path>', 5)
|
|
196
282
|
])]))
|
|
197
283
|
])
|
|
198
|
-
], 8, _hoisted_5)
|
|
284
|
+
], 8, _hoisted_5),
|
|
285
|
+
_createElementVNode("button", {
|
|
286
|
+
class: "opencode-header-btn display-mode-btn",
|
|
287
|
+
type: "button",
|
|
288
|
+
title: $setup.displayModeIconTitle,
|
|
289
|
+
"aria-label": $setup.displayModeIconLabel,
|
|
290
|
+
onClick: _cache[3] || (_cache[3] = (...args) => $setup.handleToggleDisplayMode && $setup.handleToggleDisplayMode(...args))
|
|
291
|
+
}, [
|
|
292
|
+
_renderSlot(_ctx.$slots, "display-mode-icon", {}, () => [
|
|
293
|
+
$setup.displayMode === "bubble" ? (_openBlock(), _createElementBlock("svg", _hoisted_10, [..._cache[13] || (_cache[13] = [
|
|
294
|
+
_createElementVNode(
|
|
295
|
+
"circle",
|
|
296
|
+
{
|
|
297
|
+
cx: "12",
|
|
298
|
+
cy: "12",
|
|
299
|
+
r: "10"
|
|
300
|
+
},
|
|
301
|
+
null,
|
|
302
|
+
-1
|
|
303
|
+
/* CACHED */
|
|
304
|
+
),
|
|
305
|
+
_createElementVNode(
|
|
306
|
+
"path",
|
|
307
|
+
{
|
|
308
|
+
d: "M8 14s1.5 2 4 2 4-2 4-2",
|
|
309
|
+
"stroke-linecap": "round"
|
|
310
|
+
},
|
|
311
|
+
null,
|
|
312
|
+
-1
|
|
313
|
+
/* CACHED */
|
|
314
|
+
),
|
|
315
|
+
_createElementVNode(
|
|
316
|
+
"line",
|
|
317
|
+
{
|
|
318
|
+
x1: "9",
|
|
319
|
+
y1: "9",
|
|
320
|
+
x2: "9.01",
|
|
321
|
+
y2: "9",
|
|
322
|
+
"stroke-linecap": "round"
|
|
323
|
+
},
|
|
324
|
+
null,
|
|
325
|
+
-1
|
|
326
|
+
/* CACHED */
|
|
327
|
+
),
|
|
328
|
+
_createElementVNode(
|
|
329
|
+
"line",
|
|
330
|
+
{
|
|
331
|
+
x1: "15",
|
|
332
|
+
y1: "9",
|
|
333
|
+
x2: "15.01",
|
|
334
|
+
y2: "9",
|
|
335
|
+
"stroke-linecap": "round"
|
|
336
|
+
},
|
|
337
|
+
null,
|
|
338
|
+
-1
|
|
339
|
+
/* CACHED */
|
|
340
|
+
)
|
|
341
|
+
])])) : $setup.displayMode === "split" ? (_openBlock(), _createElementBlock("svg", _hoisted_11, [..._cache[14] || (_cache[14] = [
|
|
342
|
+
_createElementVNode(
|
|
343
|
+
"rect",
|
|
344
|
+
{
|
|
345
|
+
x: "3",
|
|
346
|
+
y: "3",
|
|
347
|
+
width: "18",
|
|
348
|
+
height: "18",
|
|
349
|
+
rx: "2"
|
|
350
|
+
},
|
|
351
|
+
null,
|
|
352
|
+
-1
|
|
353
|
+
/* CACHED */
|
|
354
|
+
),
|
|
355
|
+
_createElementVNode(
|
|
356
|
+
"line",
|
|
357
|
+
{
|
|
358
|
+
x1: "12",
|
|
359
|
+
y1: "3",
|
|
360
|
+
x2: "12",
|
|
361
|
+
y2: "21"
|
|
362
|
+
},
|
|
363
|
+
null,
|
|
364
|
+
-1
|
|
365
|
+
/* CACHED */
|
|
366
|
+
)
|
|
367
|
+
])])) : (_openBlock(), _createElementBlock("svg", _hoisted_12, [..._cache[15] || (_cache[15] = [
|
|
368
|
+
_createElementVNode(
|
|
369
|
+
"rect",
|
|
370
|
+
{
|
|
371
|
+
x: "3",
|
|
372
|
+
y: "3",
|
|
373
|
+
width: "8",
|
|
374
|
+
height: "8",
|
|
375
|
+
rx: "1"
|
|
376
|
+
},
|
|
377
|
+
null,
|
|
378
|
+
-1
|
|
379
|
+
/* CACHED */
|
|
380
|
+
),
|
|
381
|
+
_createElementVNode(
|
|
382
|
+
"rect",
|
|
383
|
+
{
|
|
384
|
+
x: "15",
|
|
385
|
+
y: "3",
|
|
386
|
+
width: "6",
|
|
387
|
+
height: "8",
|
|
388
|
+
rx: "1"
|
|
389
|
+
},
|
|
390
|
+
null,
|
|
391
|
+
-1
|
|
392
|
+
/* CACHED */
|
|
393
|
+
),
|
|
394
|
+
_createElementVNode(
|
|
395
|
+
"rect",
|
|
396
|
+
{
|
|
397
|
+
x: "3",
|
|
398
|
+
y: "15",
|
|
399
|
+
width: "8",
|
|
400
|
+
height: "6",
|
|
401
|
+
rx: "1"
|
|
402
|
+
},
|
|
403
|
+
null,
|
|
404
|
+
-1
|
|
405
|
+
/* CACHED */
|
|
406
|
+
),
|
|
407
|
+
_createElementVNode(
|
|
408
|
+
"circle",
|
|
409
|
+
{
|
|
410
|
+
cx: "18",
|
|
411
|
+
cy: "18",
|
|
412
|
+
r: "3"
|
|
413
|
+
},
|
|
414
|
+
null,
|
|
415
|
+
-1
|
|
416
|
+
/* CACHED */
|
|
417
|
+
)
|
|
418
|
+
])]))
|
|
419
|
+
])
|
|
420
|
+
], 8, _hoisted_9)
|
|
199
421
|
]),
|
|
200
422
|
_createElementVNode(
|
|
201
423
|
"span",
|
|
202
|
-
|
|
424
|
+
_hoisted_13,
|
|
203
425
|
_toDisplayString($setup.title),
|
|
204
426
|
1
|
|
205
427
|
/* TEXT */
|
|
206
428
|
),
|
|
207
|
-
_createElementVNode("div",
|
|
208
|
-
|
|
429
|
+
_createElementVNode("div", _hoisted_14, [
|
|
430
|
+
$setup.isSplitMode ? (_openBlock(), _createElementBlock("button", {
|
|
209
431
|
key: 0,
|
|
432
|
+
class: "opencode-header-btn split-position-btn",
|
|
433
|
+
type: "button",
|
|
434
|
+
title: $setup.splitPositionIconTitle,
|
|
435
|
+
"aria-label": $setup.splitPositionIconLabel,
|
|
436
|
+
onClick: _cache[4] || (_cache[4] = (...args) => $setup.handleToggleSplitPosition && $setup.handleToggleSplitPosition(...args))
|
|
437
|
+
}, [
|
|
438
|
+
_renderSlot(_ctx.$slots, "split-position-icon", {}, () => [
|
|
439
|
+
$setup.splitPosition === "right" ? (_openBlock(), _createElementBlock("svg", _hoisted_16, [..._cache[16] || (_cache[16] = [
|
|
440
|
+
_createElementVNode(
|
|
441
|
+
"rect",
|
|
442
|
+
{
|
|
443
|
+
x: "3",
|
|
444
|
+
y: "3",
|
|
445
|
+
width: "18",
|
|
446
|
+
height: "18",
|
|
447
|
+
rx: "2"
|
|
448
|
+
},
|
|
449
|
+
null,
|
|
450
|
+
-1
|
|
451
|
+
/* CACHED */
|
|
452
|
+
),
|
|
453
|
+
_createElementVNode(
|
|
454
|
+
"line",
|
|
455
|
+
{
|
|
456
|
+
x1: "15",
|
|
457
|
+
y1: "3",
|
|
458
|
+
x2: "15",
|
|
459
|
+
y2: "21"
|
|
460
|
+
},
|
|
461
|
+
null,
|
|
462
|
+
-1
|
|
463
|
+
/* CACHED */
|
|
464
|
+
)
|
|
465
|
+
])])) : (_openBlock(), _createElementBlock("svg", _hoisted_17, [..._cache[17] || (_cache[17] = [
|
|
466
|
+
_createElementVNode(
|
|
467
|
+
"rect",
|
|
468
|
+
{
|
|
469
|
+
x: "3",
|
|
470
|
+
y: "3",
|
|
471
|
+
width: "18",
|
|
472
|
+
height: "18",
|
|
473
|
+
rx: "2"
|
|
474
|
+
},
|
|
475
|
+
null,
|
|
476
|
+
-1
|
|
477
|
+
/* CACHED */
|
|
478
|
+
),
|
|
479
|
+
_createElementVNode(
|
|
480
|
+
"line",
|
|
481
|
+
{
|
|
482
|
+
x1: "9",
|
|
483
|
+
y1: "3",
|
|
484
|
+
x2: "9",
|
|
485
|
+
y2: "21"
|
|
486
|
+
},
|
|
487
|
+
null,
|
|
488
|
+
-1
|
|
489
|
+
/* CACHED */
|
|
490
|
+
)
|
|
491
|
+
])]))
|
|
492
|
+
])
|
|
493
|
+
], 8, _hoisted_15)) : _createCommentVNode("v-if", true),
|
|
494
|
+
!$setup.isSplitMode ? (_openBlock(), _createElementBlock("button", {
|
|
495
|
+
key: 1,
|
|
210
496
|
class: "opencode-header-btn prompt-dock",
|
|
211
497
|
type: "button",
|
|
212
498
|
title: $setup.promptDockVisible ? "\u9690\u85CF\u5BF9\u8BDD\u6846" : "\u663E\u793A\u5BF9\u8BDD\u6846",
|
|
213
499
|
"aria-label": $setup.promptDockVisible ? "\u9690\u85CF\u5BF9\u8BDD\u6846" : "\u663E\u793A\u5BF9\u8BDD\u6846",
|
|
214
500
|
"aria-pressed": $setup.promptDockVisible,
|
|
215
|
-
onClick: _cache[
|
|
501
|
+
onClick: _cache[5] || (_cache[5] = (...args) => $setup.handleTogglePromptDock && $setup.handleTogglePromptDock(...args))
|
|
216
502
|
}, [
|
|
217
503
|
_renderSlot(_ctx.$slots, "prompt-dock-icon", {}, () => [
|
|
218
|
-
_cache[
|
|
504
|
+
_cache[18] || (_cache[18] = _createElementVNode(
|
|
219
505
|
"svg",
|
|
220
506
|
{
|
|
221
507
|
viewBox: "0 0 24 24",
|
|
@@ -233,18 +519,18 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
233
519
|
/* CACHED */
|
|
234
520
|
))
|
|
235
521
|
])
|
|
236
|
-
], 8,
|
|
522
|
+
], 8, _hoisted_18)) : _createCommentVNode("v-if", true),
|
|
237
523
|
!$setup.isSplitMode ? (_openBlock(), _createElementBlock("button", {
|
|
238
|
-
key:
|
|
524
|
+
key: 2,
|
|
239
525
|
class: "opencode-header-btn minimize",
|
|
240
526
|
type: "button",
|
|
241
527
|
title: $setup.minimized ? "\u5C55\u5F00" : "\u6700\u5C0F\u5316",
|
|
242
528
|
"aria-label": $setup.minimized ? "\u5C55\u5F00\u9762\u677F" : "\u6700\u5C0F\u5316\u9762\u677F",
|
|
243
529
|
"aria-pressed": $setup.minimized,
|
|
244
|
-
onClick: _cache[
|
|
530
|
+
onClick: _cache[6] || (_cache[6] = (...args) => $setup.handleToggleMinimize && $setup.handleToggleMinimize(...args))
|
|
245
531
|
}, [
|
|
246
532
|
_renderSlot(_ctx.$slots, "minimize-icon", {}, () => [
|
|
247
|
-
$setup.minimized ? (_openBlock(), _createElementBlock("svg",
|
|
533
|
+
$setup.minimized ? (_openBlock(), _createElementBlock("svg", _hoisted_20, [..._cache[19] || (_cache[19] = [
|
|
248
534
|
_createElementVNode(
|
|
249
535
|
"path",
|
|
250
536
|
{ d: "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3" },
|
|
@@ -252,7 +538,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
252
538
|
-1
|
|
253
539
|
/* CACHED */
|
|
254
540
|
)
|
|
255
|
-
])])) : (_openBlock(), _createElementBlock("svg",
|
|
541
|
+
])])) : (_openBlock(), _createElementBlock("svg", _hoisted_21, [..._cache[20] || (_cache[20] = [
|
|
256
542
|
_createElementVNode(
|
|
257
543
|
"path",
|
|
258
544
|
{ d: "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3" },
|
|
@@ -262,17 +548,17 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
262
548
|
)
|
|
263
549
|
])]))
|
|
264
550
|
])
|
|
265
|
-
], 8,
|
|
551
|
+
], 8, _hoisted_19)) : _createCommentVNode("v-if", true),
|
|
266
552
|
!$setup.isSplitMode ? (_openBlock(), _createElementBlock("button", {
|
|
267
|
-
key:
|
|
553
|
+
key: 3,
|
|
268
554
|
class: "opencode-header-btn close",
|
|
269
555
|
type: "button",
|
|
270
556
|
title: "\u5173\u95ED",
|
|
271
557
|
"aria-label": "\u5173\u95ED\u9762\u677F",
|
|
272
|
-
onClick: _cache[
|
|
558
|
+
onClick: _cache[7] || (_cache[7] = (...args) => $setup.handleClose && $setup.handleClose(...args))
|
|
273
559
|
}, [
|
|
274
560
|
_renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
275
|
-
_cache[
|
|
561
|
+
_cache[21] || (_cache[21] = _createElementVNode(
|
|
276
562
|
"svg",
|
|
277
563
|
{
|
|
278
564
|
viewBox: "0 0 24 24",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Ref } from "vue";
|
|
2
|
-
import type { OpenCodeWidgetSessionItem, OpenCodeSelectedElementItem, OpenCodeRemoveSelectedPayload, OpencodeSessionThinkingState } from "./types";
|
|
2
|
+
import type { OpenCodeWidgetSessionItem, OpenCodeSelectedElementItem, OpenCodeRemoveSelectedPayload, OpencodeSessionThinkingState, DisplayMode } from "./types";
|
|
3
3
|
import type { FloatingBubbleOffset } from "./components/FloatingBubble/types";
|
|
4
4
|
export interface OpenCodeWidgetContext {
|
|
5
5
|
theme: Ref<string>;
|
|
@@ -25,6 +25,8 @@ export interface OpenCodeWidgetContext {
|
|
|
25
25
|
promptDockVisible: Ref<boolean>;
|
|
26
26
|
bubbleOffset: Ref<FloatingBubbleOffset | undefined>;
|
|
27
27
|
mode: Ref<"bubble" | "split">;
|
|
28
|
+
displayMode: Ref<DisplayMode>;
|
|
29
|
+
splitPosition: Ref<"left" | "right">;
|
|
28
30
|
sessionStates: Ref<Record<string, OpencodeSessionThinkingState>>;
|
|
29
31
|
iframeSource: Ref<string>;
|
|
30
32
|
buttonActive: Ref<boolean>;
|
|
@@ -39,6 +41,8 @@ export interface OpenCodeWidgetContext {
|
|
|
39
41
|
handleTogglePromptDock: () => void;
|
|
40
42
|
handleToggleSessionList: () => void;
|
|
41
43
|
handleToggleTheme: () => void;
|
|
44
|
+
handleToggleDisplayMode: () => void;
|
|
45
|
+
handleToggleSplitPosition: () => void;
|
|
42
46
|
handleEmptyAction: () => void;
|
|
43
47
|
handleCreateSession: () => void;
|
|
44
48
|
handleSelectSession: (item: OpenCodeWidgetSessionItem) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.opencode-widget{--oc-bg-main: #ffffff;--oc-bg-secondary: #f8f9fa;--oc-bg-tertiary: #f3f4f6;--oc-overlay-bg: rgba(255, 255, 255, .9);--oc-bg-inverse: #1e1e1e;--oc-text-primary: #282828;--oc-text-secondary: #4b5563;--oc-text-tertiary: #6b7280;--oc-text-placeholder: #9ca3af;--oc-text-inverse: #ffffff;--oc-border-primary: #e5e7eb;--oc-border-secondary: #d1d5db;--oc-primary: #3b82f6;--oc-primary-hover: #2563eb;--oc-primary-bg: rgba(59, 130, 246, .1);--oc-danger: #ef4444;--oc-danger-hover: #dc2626;--oc-danger-active: #b91c1c;--oc-success: #10b981;--oc-overlay: rgba(0, 0, 0, .5);--oc-tooltip-bg: #1e1e1e;--oc-dialog-overlay: rgba(0, 0, 0, .5);--oc-thinking-gradient-1: #10b981;--oc-thinking-gradient-2: #059669;--oc-thinking-glow: rgba(16, 185, 129, .3);--oc-thinking-glow-strong: rgba(16, 185, 129, .6);--oc-skeleton-bg: #e5e7eb;--oc-skeleton-gradient: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);--oc-shadow-sm: 0 2px 4px rgba(0, 0, 0, .1);--oc-shadow-md: 0 4px 12px rgba(0, 0, 0, .15);--oc-shadow-lg: 0 8px 32px rgba(0, 0, 0, .12);--oc-shadow-xl: 0 20px 60px rgba(0, 0, 0, .3);--oc-shadow-primary: 0 2px 4px rgba(59, 130, 246, .2);--oc-shadow-primary-hover: 0 4px 6px rgba(59, 130, 246, .3);--oc-shadow-danger: 0 4px 12px rgba(239, 68, 68, .3);--oc-trigger-bg: #3b82f6;--oc-trigger-bg-hover: #2563eb;--oc-trigger-bg-active: #1d4ed8;--oc-trigger-shadow: 0 2px 8px rgba(59, 130, 246, .3);--oc-trigger-shadow-hover: 0 4px 12px rgba(59, 130, 246, .4);--oc-trigger-shadow-active: 0 4px 12px rgba(59, 130, 246, .5);position:fixed;z-index:999999;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.opencode-widget.opencode-theme-dark{--oc-bg-main: #1a1a1a;--oc-bg-secondary: #1e1e1e;--oc-bg-tertiary: #282828;--oc-overlay-bg: rgba(26, 26, 26, .9);--oc-bg-inverse: #ffffff;--oc-text-primary: #f3f4f6;--oc-text-secondary: #d1d5db;--oc-text-tertiary: #9ca3af;--oc-text-placeholder: #6b7280;--oc-text-inverse: #282828;--oc-border-primary: #282828;--oc-border-secondary: #4b5563;--oc-primary: #3b82f6;--oc-primary-hover: #2563eb;--oc-primary-bg: rgba(59, 130, 246, .15);--oc-danger: #ef4444;--oc-danger-hover: #dc2626;--oc-danger-active: #b91c1c;--oc-success: #10b981;--oc-overlay: rgba(26, 26, 26, .9);--oc-tooltip-bg: #282828;--oc-dialog-overlay: rgba(0, 0, 0, .7);--oc-thinking-gradient-1: #34d399;--oc-thinking-gradient-2: #10b981;--oc-thinking-glow: rgba(52, 211, 153, .3);--oc-thinking-glow-strong: rgba(52, 211, 153, .6);--oc-skeleton-bg: #151515;--oc-skeleton-gradient: linear-gradient(90deg, #282828 25%, #4b5563 50%, #282828 75%);--oc-shadow-sm: 0 2px 4px rgba(0, 0, 0, .3);--oc-shadow-md: 0 4px 12px rgba(0, 0, 0, .4);--oc-shadow-lg: 0 8px 32px rgba(0, 0, 0, .4);--oc-shadow-xl: 0 20px 60px rgba(0, 0, 0, .6);--oc-shadow-primary: 0 2px 4px rgba(59, 130, 246, .3);--oc-shadow-primary-hover: 0 4px 6px rgba(59, 130, 246, .4);--oc-shadow-danger: 0 4px 12px rgba(239, 68, 68, .4);--oc-trigger-bg: #60a5fa;--oc-trigger-bg-hover: #3b82f6;--oc-trigger-bg-active: #2563eb;--oc-trigger-shadow: 0 2px 8px rgba(96, 165, 250, .4);--oc-trigger-shadow-hover: 0 4px 12px rgba(96, 165, 250, .5);--oc-trigger-shadow-active: 0 4px 12px rgba(96, 165, 250, .6)}.opencode-chat{position:fixed;bottom:20px;width:700px;height:86vh;max-height:calc(100vh - 40px);background:var(--oc-bg-main);border-radius:16px;box-shadow:var(--oc-shadow-lg);overflow:hidden;opacity:0;visibility:hidden;transform:translate3d(var(---chatAnimationOrigin\.x),var(---chatAnimationOrigin\.y),0) scale(.95);transition:all .3s ease;display:flex;flex-direction:column;z-index:99999}.opencode-chat.open{opacity:1;visibility:visible;transform:translateZ(0) scale(1)}.opencode-chat.no-transition,.opencode-chat.no-transition.open{transition:none!important}.opencode-chat.minimized{width:
|
|
1
|
+
.opencode-widget{--oc-bg-main: #ffffff;--oc-bg-secondary: #f8f9fa;--oc-bg-tertiary: #f3f4f6;--oc-overlay-bg: rgba(255, 255, 255, .9);--oc-bg-inverse: #1e1e1e;--oc-text-primary: #282828;--oc-text-secondary: #4b5563;--oc-text-tertiary: #6b7280;--oc-text-placeholder: #9ca3af;--oc-text-inverse: #ffffff;--oc-border-primary: #e5e7eb;--oc-border-secondary: #d1d5db;--oc-primary: #3b82f6;--oc-primary-hover: #2563eb;--oc-primary-bg: rgba(59, 130, 246, .1);--oc-danger: #ef4444;--oc-danger-hover: #dc2626;--oc-danger-active: #b91c1c;--oc-success: #10b981;--oc-overlay: rgba(0, 0, 0, .5);--oc-tooltip-bg: #1e1e1e;--oc-dialog-overlay: rgba(0, 0, 0, .5);--oc-thinking-gradient-1: #10b981;--oc-thinking-gradient-2: #059669;--oc-thinking-glow: rgba(16, 185, 129, .3);--oc-thinking-glow-strong: rgba(16, 185, 129, .6);--oc-skeleton-bg: #e5e7eb;--oc-skeleton-gradient: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);--oc-shadow-sm: 0 2px 4px rgba(0, 0, 0, .1);--oc-shadow-md: 0 4px 12px rgba(0, 0, 0, .15);--oc-shadow-lg: 0 8px 32px rgba(0, 0, 0, .12);--oc-shadow-xl: 0 20px 60px rgba(0, 0, 0, .3);--oc-shadow-primary: 0 2px 4px rgba(59, 130, 246, .2);--oc-shadow-primary-hover: 0 4px 6px rgba(59, 130, 246, .3);--oc-shadow-danger: 0 4px 12px rgba(239, 68, 68, .3);--oc-trigger-bg: #3b82f6;--oc-trigger-bg-hover: #2563eb;--oc-trigger-bg-active: #1d4ed8;--oc-trigger-shadow: 0 2px 8px rgba(59, 130, 246, .3);--oc-trigger-shadow-hover: 0 4px 12px rgba(59, 130, 246, .4);--oc-trigger-shadow-active: 0 4px 12px rgba(59, 130, 246, .5);position:fixed;z-index:999999;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.opencode-widget.opencode-theme-dark{--oc-bg-main: #1a1a1a;--oc-bg-secondary: #1e1e1e;--oc-bg-tertiary: #282828;--oc-overlay-bg: rgba(26, 26, 26, .9);--oc-bg-inverse: #ffffff;--oc-text-primary: #f3f4f6;--oc-text-secondary: #d1d5db;--oc-text-tertiary: #9ca3af;--oc-text-placeholder: #6b7280;--oc-text-inverse: #282828;--oc-border-primary: #282828;--oc-border-secondary: #4b5563;--oc-primary: #3b82f6;--oc-primary-hover: #2563eb;--oc-primary-bg: rgba(59, 130, 246, .15);--oc-danger: #ef4444;--oc-danger-hover: #dc2626;--oc-danger-active: #b91c1c;--oc-success: #10b981;--oc-overlay: rgba(26, 26, 26, .9);--oc-tooltip-bg: #282828;--oc-dialog-overlay: rgba(0, 0, 0, .7);--oc-thinking-gradient-1: #34d399;--oc-thinking-gradient-2: #10b981;--oc-thinking-glow: rgba(52, 211, 153, .3);--oc-thinking-glow-strong: rgba(52, 211, 153, .6);--oc-skeleton-bg: #151515;--oc-skeleton-gradient: linear-gradient(90deg, #282828 25%, #4b5563 50%, #282828 75%);--oc-shadow-sm: 0 2px 4px rgba(0, 0, 0, .3);--oc-shadow-md: 0 4px 12px rgba(0, 0, 0, .4);--oc-shadow-lg: 0 8px 32px rgba(0, 0, 0, .4);--oc-shadow-xl: 0 20px 60px rgba(0, 0, 0, .6);--oc-shadow-primary: 0 2px 4px rgba(59, 130, 246, .3);--oc-shadow-primary-hover: 0 4px 6px rgba(59, 130, 246, .4);--oc-shadow-danger: 0 4px 12px rgba(239, 68, 68, .4);--oc-trigger-bg: #60a5fa;--oc-trigger-bg-hover: #3b82f6;--oc-trigger-bg-active: #2563eb;--oc-trigger-shadow: 0 2px 8px rgba(96, 165, 250, .4);--oc-trigger-shadow-hover: 0 4px 12px rgba(96, 165, 250, .5);--oc-trigger-shadow-active: 0 4px 12px rgba(96, 165, 250, .6)}.opencode-chat{position:fixed;bottom:20px;width:700px;height:86vh;max-height:calc(100vh - 40px);background:var(--oc-bg-main);border-radius:16px;box-shadow:var(--oc-shadow-lg);overflow:hidden;opacity:0;visibility:hidden;transform:translate3d(var(---chatAnimationOrigin\.x),var(---chatAnimationOrigin\.y),0) scale(.95);transition:all .3s ease;display:flex;flex-direction:column;z-index:99999}.opencode-chat.open{opacity:1;visibility:visible;transform:translateZ(0) scale(1)}.opencode-chat.no-transition,.opencode-chat.no-transition.open{transition:none!important}.opencode-chat.minimized{width:320px;height:320px}.opencode-chat.minimized .opencode-iframe-container{margin-top:-146px}.opencode-chat-content{display:flex;flex:1;overflow:hidden}.opencode-notification{position:absolute;top:20px;left:50%;transform:translate(-50%);padding:12px 24px;background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;border-radius:10px;font-size:14px;font-weight:500;box-shadow:0 4px 16px rgba(59,130,246,.4),0 0 0 2px rgba(59,130,246,.2);animation:slideDown .3s ease;z-index:10000000;display:flex;align-items:center;gap:10px}.opencode-notification:before{content:"\1f4a1";font-size:16px}.opencode-dialog-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:var(--oc-dialog-overlay);display:flex;align-items:center;justify-content:center;z-index:9999999;animation:fadeIn .2s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.opencode-dialog{background:var(--oc-bg-main);border-radius:12px;padding:24px;min-width:320px;max-width:400px;box-shadow:var(--oc-shadow-xl);animation:scaleIn .2s ease}@keyframes scaleIn{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.opencode-dialog-content{margin-bottom:20px}.opencode-dialog-message{font-size:15px;color:var(--oc-text-primary);line-height:1.5}.opencode-dialog-actions{display:flex;gap:12px;justify-content:flex-end}.opencode-dialog-btn{padding:10px 20px;border-radius:8px;border:none;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s}.opencode-dialog-btn.cancel{background:var(--oc-bg-tertiary);color:var(--oc-text-primary)}.opencode-dialog-btn.cancel:hover{background:var(--oc-text-primary);color:var(--oc-bg-main)}.opencode-dialog-btn.confirm{background:var(--oc-danger);color:#fff}.opencode-dialog-btn.confirm:hover{background:var(--oc-danger-hover)}@keyframes slideDown{0%{transform:translate(-50%) translateY(-100%);opacity:0}to{transform:translate(-50%) translateY(0);opacity:1}}.opencode-page-notification{position:fixed;top:20px;left:50%;transform:translate(-50%);padding:12px 24px;background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;border-radius:10px;font-size:14px;font-weight:500;box-shadow:0 4px 16px rgba(59,130,246,.4),0 0 0 2px rgba(59,130,246,.2);animation:slideDown .3s ease;z-index:2147483647;display:flex;align-items:center;gap:10px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.opencode-page-notification:before{content:"\1f4a1";font-size:16px}.opencode-element-highlight{position:fixed;pointer-events:none;z-index:999998;border-radius:4px}#vue-inspector-container{display:none!important}.opencode-element-tooltip{position:fixed;background:var(--oc-tooltip-bg);color:#fff;padding:8px 12px;border-radius:6px;font-size:12px;z-index:9999998;box-shadow:var(--oc-shadow-md);max-width:300px;pointer-events:none}.opencode-tooltip-tag{font-weight:500;margin-bottom:4px;word-break:break-all}.opencode-tooltip-file{font-size:11px;color:var(--oc-text-placeholder);word-break:break-all}.opencode-element-highlight-temp{position:absolute;pointer-events:none;z-index:999998;border-radius:4px;animation:highlight-pulse 2s ease-out forwards}@keyframes highlight-pulse{0%{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(1.02)}to{opacity:0;transform:scale(1)}}@media(max-width:768px){.opencode-chat{width:calc(100vw - 40px);height:calc(100vh - 100px)}}body.has-opencode-split{transition:padding .3s ease;min-width:auto}body.has-opencode-split-right{padding-right:var(--opencode-split-width, 500px)}body.has-opencode-split-left{padding-left:var(--opencode-split-width, 500px)}
|
|
@@ -43,6 +43,7 @@ declare const __VLS_component: import("vue").DefineComponent<OpenCodeWidgetProps
|
|
|
43
43
|
selectMode: boolean;
|
|
44
44
|
selectEnabled: boolean;
|
|
45
45
|
theme: import("@vite-plugin-opencode-assistant/shared").OpenCodeWidgetTheme;
|
|
46
|
+
displayMode: import("@vite-plugin-opencode-assistant/shared").DisplayMode;
|
|
46
47
|
showSessionListSkeleton: boolean;
|
|
47
48
|
sessionKey: string;
|
|
48
49
|
sessions: import("@vite-plugin-opencode-assistant/shared").OpenCodeWidgetSession[];
|
|
@@ -54,7 +55,6 @@ declare const __VLS_component: import("vue").DefineComponent<OpenCodeWidgetProps
|
|
|
54
55
|
splitPanelWidth: number;
|
|
55
56
|
currentSessionId: string | null;
|
|
56
57
|
selectedElements: import("@vite-plugin-opencode-assistant/shared").OpenCodeSelectedElement[];
|
|
57
|
-
displayMode: import("@vite-plugin-opencode-assistant/shared").DisplayMode;
|
|
58
58
|
splitMode: import("@vite-plugin-opencode-assistant/shared").SplitModeOptions;
|
|
59
59
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
60
60
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|