@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.
Files changed (35) hide show
  1. package/es/index.d.ts +1 -1
  2. package/es/index.js +1 -1
  3. package/es/open-code-widget/composables/use-persist-state.d.ts +5 -1
  4. package/es/open-code-widget/composables/use-persist-state.js +10 -2
  5. package/es/open-code-widget/composables/use-split.d.ts +5 -0
  6. package/es/open-code-widget/composables/use-split.js +46 -12
  7. package/es/open-code-widget/src/components/ChatPanel-sfc.css +1 -1
  8. package/es/open-code-widget/src/components/ChatPanel.vue.d.ts +2 -0
  9. package/es/open-code-widget/src/components/ChatPanel.vue.js +58 -10
  10. package/es/open-code-widget/src/components/Header.vue.d.ts +8 -4
  11. package/es/open-code-widget/src/components/Header.vue.js +313 -27
  12. package/es/open-code-widget/src/context.d.ts +5 -1
  13. package/es/open-code-widget/src/index-sfc.css +1 -1
  14. package/es/open-code-widget/src/index.vue.d.ts +1 -1
  15. package/es/open-code-widget/src/index.vue.js +48 -12
  16. package/lib/@vite-plugin-opencode-assistant/components.cjs.js +357 -67
  17. package/lib/@vite-plugin-opencode-assistant/components.es.js +357 -67
  18. package/lib/components.css +2 -2
  19. package/lib/index.d.ts +1 -1
  20. package/lib/index.js +1 -1
  21. package/lib/open-code-widget/composables/use-persist-state.d.ts +5 -1
  22. package/lib/open-code-widget/composables/use-persist-state.js +10 -2
  23. package/lib/open-code-widget/composables/use-split.d.ts +5 -0
  24. package/lib/open-code-widget/composables/use-split.js +46 -12
  25. package/lib/open-code-widget/src/components/ChatPanel-sfc.css +1 -1
  26. package/lib/open-code-widget/src/components/ChatPanel.vue.d.ts +2 -0
  27. package/lib/open-code-widget/src/components/ChatPanel.vue.js +58 -10
  28. package/lib/open-code-widget/src/components/Header.vue.d.ts +8 -4
  29. package/lib/open-code-widget/src/components/Header.vue.js +313 -27
  30. package/lib/open-code-widget/src/context.d.ts +5 -1
  31. package/lib/open-code-widget/src/index-sfc.css +1 -1
  32. package/lib/open-code-widget/src/index.vue.d.ts +1 -1
  33. package/lib/open-code-widget/src/index.vue.js +48 -12
  34. package/lib/web-types.json +1 -1
  35. package/package.json +2 -2
@@ -110,7 +110,7 @@ var __vue_sfc__$8 = /* @__PURE__ */ defineComponent({
110
110
  __name: "Header",
111
111
  setup(__props, { expose: __expose }) {
112
112
  __expose();
113
- const { title, sessionListTitle, sessionListCollapsed, selectMode, selectEnabled, theme, resolvedTheme, minimized, promptDockVisible, mode, handleToggleSessionList, handleToggleSelectMode, handleToggleTheme, handleClose, handleToggleMinimize, handleTogglePromptDock } = useOpenCodeWidgetContext();
113
+ const { title, sessionListTitle, sessionListCollapsed, selectMode, selectEnabled, theme, resolvedTheme, minimized, promptDockVisible, mode, displayMode, splitPosition, handleToggleSessionList, handleToggleSelectMode, handleToggleTheme, handleToggleDisplayMode, handleToggleSplitPosition, handleClose, handleToggleMinimize, handleTogglePromptDock } = useOpenCodeWidgetContext();
114
114
  const __returned__ = {
115
115
  title,
116
116
  sessionListTitle,
@@ -122,9 +122,13 @@ var __vue_sfc__$8 = /* @__PURE__ */ defineComponent({
122
122
  minimized,
123
123
  promptDockVisible,
124
124
  mode,
125
+ displayMode,
126
+ splitPosition,
125
127
  handleToggleSessionList,
126
128
  handleToggleSelectMode,
127
129
  handleToggleTheme,
130
+ handleToggleDisplayMode,
131
+ handleToggleSplitPosition,
128
132
  handleClose,
129
133
  handleToggleMinimize,
130
134
  handleTogglePromptDock,
@@ -142,6 +146,35 @@ var __vue_sfc__$8 = /* @__PURE__ */ defineComponent({
142
146
  light: "亮色主题",
143
147
  dark: "暗色主题"
144
148
  }[theme.value]}`;
149
+ }),
150
+ displayModeIconTitle: computed(() => {
151
+ return `\u5C55\u793A\u6A21\u5F0F: ${{
152
+ bubble: "气泡模式",
153
+ split: "分屏模式",
154
+ auto: "自动模式"
155
+ }[displayMode.value]}`;
156
+ }),
157
+ displayModeIconLabel: computed(() => {
158
+ const displayModeLabels = {
159
+ bubble: "气泡模式",
160
+ split: "分屏模式",
161
+ auto: "自动模式"
162
+ };
163
+ const modes = [
164
+ "bubble",
165
+ "split",
166
+ "auto"
167
+ ];
168
+ return `\u5207\u6362\u5C55\u793A\u6A21\u5F0F - \u4E0B\u4E00\u4E2A: ${displayModeLabels[modes[(modes.indexOf(displayMode.value) + 1) % modes.length]]}`;
169
+ }),
170
+ splitPositionIconTitle: computed(() => {
171
+ return `\u5206\u680F\u4F4D\u7F6E: ${{
172
+ left: "左侧",
173
+ right: "右侧"
174
+ }[splitPosition.value]}`;
175
+ }),
176
+ splitPositionIconLabel: computed(() => {
177
+ return `\u5207\u6362\u5206\u680F\u4F4D\u7F6E - \u4E0B\u4E00\u4E2A: ${splitPosition.value === "right" ? "左侧" : "右侧"}`;
145
178
  })
146
179
  };
147
180
  Object.defineProperty(__returned__, "__isScriptSetup", {
@@ -170,7 +203,7 @@ var _hoisted_6$4 = {
170
203
  "stroke-width": "2",
171
204
  "aria-hidden": "true"
172
205
  };
173
- var _hoisted_7$2 = {
206
+ var _hoisted_7$3 = {
174
207
  key: 1,
175
208
  viewBox: "0 0 24 24",
176
209
  width: "16",
@@ -180,7 +213,38 @@ var _hoisted_7$2 = {
180
213
  "stroke-width": "2",
181
214
  "aria-hidden": "true"
182
215
  };
183
- var _hoisted_8$1 = {
216
+ var _hoisted_8$2 = {
217
+ key: 2,
218
+ viewBox: "0 0 24 24",
219
+ width: "16",
220
+ height: "16",
221
+ fill: "none",
222
+ stroke: "currentColor",
223
+ "stroke-width": "2",
224
+ "aria-hidden": "true"
225
+ };
226
+ var _hoisted_9$1 = ["title", "aria-label"];
227
+ var _hoisted_10$1 = {
228
+ key: 0,
229
+ viewBox: "0 0 24 24",
230
+ width: "16",
231
+ height: "16",
232
+ fill: "none",
233
+ stroke: "currentColor",
234
+ "stroke-width": "2",
235
+ "aria-hidden": "true"
236
+ };
237
+ var _hoisted_11 = {
238
+ key: 1,
239
+ viewBox: "0 0 24 24",
240
+ width: "16",
241
+ height: "16",
242
+ fill: "none",
243
+ stroke: "currentColor",
244
+ "stroke-width": "2",
245
+ "aria-hidden": "true"
246
+ };
247
+ var _hoisted_12 = {
184
248
  key: 2,
185
249
  viewBox: "0 0 24 24",
186
250
  width: "16",
@@ -190,19 +254,40 @@ var _hoisted_8$1 = {
190
254
  "stroke-width": "2",
191
255
  "aria-hidden": "true"
192
256
  };
193
- var _hoisted_9$1 = { class: "opencode-chat-header-title" };
194
- var _hoisted_10$1 = { class: "opencode-chat-header-actions" };
195
- var _hoisted_11 = [
257
+ var _hoisted_13 = { class: "opencode-chat-header-title" };
258
+ var _hoisted_14 = { class: "opencode-chat-header-actions" };
259
+ var _hoisted_15 = ["title", "aria-label"];
260
+ var _hoisted_16 = {
261
+ key: 0,
262
+ viewBox: "0 0 24 24",
263
+ width: "16",
264
+ height: "16",
265
+ fill: "none",
266
+ stroke: "currentColor",
267
+ "stroke-width": "2",
268
+ "aria-hidden": "true"
269
+ };
270
+ var _hoisted_17 = {
271
+ key: 1,
272
+ viewBox: "0 0 24 24",
273
+ width: "16",
274
+ height: "16",
275
+ fill: "none",
276
+ stroke: "currentColor",
277
+ "stroke-width": "2",
278
+ "aria-hidden": "true"
279
+ };
280
+ var _hoisted_18 = [
196
281
  "title",
197
282
  "aria-label",
198
283
  "aria-pressed"
199
284
  ];
200
- var _hoisted_12 = [
285
+ var _hoisted_19 = [
201
286
  "title",
202
287
  "aria-label",
203
288
  "aria-pressed"
204
289
  ];
205
- var _hoisted_13 = {
290
+ var _hoisted_20 = {
206
291
  key: 0,
207
292
  viewBox: "0 0 24 24",
208
293
  width: "14",
@@ -212,7 +297,7 @@ var _hoisted_13 = {
212
297
  "stroke-width": "2",
213
298
  "aria-hidden": "true"
214
299
  };
215
- var _hoisted_14 = {
300
+ var _hoisted_21 = {
216
301
  key: 1,
217
302
  viewBox: "0 0 24 24",
218
303
  width: "14",
@@ -232,7 +317,7 @@ function __vue_render__$8(_ctx, _cache, $props, $setup, $data, $options) {
232
317
  "aria-label": $setup.sessionListTitle,
233
318
  "aria-expanded": !$setup.sessionListCollapsed,
234
319
  onClick: _cache[0] || (_cache[0] = (...args) => $setup.handleToggleSessionList && $setup.handleToggleSessionList(...args))
235
- }, [renderSlot(_ctx.$slots, "session-toggle-icon", {}, () => [_cache[6] || (_cache[6] = createElementVNode("svg", {
320
+ }, [renderSlot(_ctx.$slots, "session-toggle-icon", {}, () => [_cache[8] || (_cache[8] = createElementVNode("svg", {
236
321
  viewBox: "0 0 24 24",
237
322
  width: "16",
238
323
  height: "16",
@@ -252,7 +337,7 @@ function __vue_render__$8(_ctx, _cache, $props, $setup, $data, $options) {
252
337
  "aria-pressed": $setup.selectMode,
253
338
  disabled: !$setup.selectEnabled,
254
339
  onClick: _cache[1] || (_cache[1] = (...args) => $setup.handleToggleSelectMode && $setup.handleToggleSelectMode(...args))
255
- }, [renderSlot(_ctx.$slots, "select-icon", {}, () => [_cache[7] || (_cache[7] = createElementVNode("svg", {
340
+ }, [renderSlot(_ctx.$slots, "select-icon", {}, () => [_cache[9] || (_cache[9] = createElementVNode("svg", {
256
341
  viewBox: "0 0 1024 1024",
257
342
  width: "16",
258
343
  height: "16",
@@ -270,19 +355,118 @@ function __vue_render__$8(_ctx, _cache, $props, $setup, $data, $options) {
270
355
  title: $setup.themeIconTitle,
271
356
  "aria-label": $setup.themeIconLabel,
272
357
  onClick: _cache[2] || (_cache[2] = (...args) => $setup.handleToggleTheme && $setup.handleToggleTheme(...args))
273
- }, [renderSlot(_ctx.$slots, "theme-icon", {}, () => [$setup.theme === "light" ? (openBlock(), createElementBlock("svg", _hoisted_6$4, [..._cache[8] || (_cache[8] = [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)])])) : $setup.theme === "dark" ? (openBlock(), createElementBlock("svg", _hoisted_7$2, [..._cache[9] || (_cache[9] = [createElementVNode("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_8$1, [..._cache[10] || (_cache[10] = [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)])]))])], 8, _hoisted_5$4)
358
+ }, [renderSlot(_ctx.$slots, "theme-icon", {}, () => [$setup.theme === "light" ? (openBlock(), createElementBlock("svg", _hoisted_6$4, [..._cache[10] || (_cache[10] = [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)])])) : $setup.theme === "dark" ? (openBlock(), createElementBlock("svg", _hoisted_7$3, [..._cache[11] || (_cache[11] = [createElementVNode("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_8$2, [..._cache[12] || (_cache[12] = [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)])]))])], 8, _hoisted_5$4),
359
+ createElementVNode("button", {
360
+ class: "opencode-header-btn display-mode-btn",
361
+ type: "button",
362
+ title: $setup.displayModeIconTitle,
363
+ "aria-label": $setup.displayModeIconLabel,
364
+ onClick: _cache[3] || (_cache[3] = (...args) => $setup.handleToggleDisplayMode && $setup.handleToggleDisplayMode(...args))
365
+ }, [renderSlot(_ctx.$slots, "display-mode-icon", {}, () => [$setup.displayMode === "bubble" ? (openBlock(), createElementBlock("svg", _hoisted_10$1, [..._cache[13] || (_cache[13] = [
366
+ createElementVNode("circle", {
367
+ cx: "12",
368
+ cy: "12",
369
+ r: "10"
370
+ }, null, -1),
371
+ createElementVNode("path", {
372
+ d: "M8 14s1.5 2 4 2 4-2 4-2",
373
+ "stroke-linecap": "round"
374
+ }, null, -1),
375
+ createElementVNode("line", {
376
+ x1: "9",
377
+ y1: "9",
378
+ x2: "9.01",
379
+ y2: "9",
380
+ "stroke-linecap": "round"
381
+ }, null, -1),
382
+ createElementVNode("line", {
383
+ x1: "15",
384
+ y1: "9",
385
+ x2: "15.01",
386
+ y2: "9",
387
+ "stroke-linecap": "round"
388
+ }, null, -1)
389
+ ])])) : $setup.displayMode === "split" ? (openBlock(), createElementBlock("svg", _hoisted_11, [..._cache[14] || (_cache[14] = [createElementVNode("rect", {
390
+ x: "3",
391
+ y: "3",
392
+ width: "18",
393
+ height: "18",
394
+ rx: "2"
395
+ }, null, -1), createElementVNode("line", {
396
+ x1: "12",
397
+ y1: "3",
398
+ x2: "12",
399
+ y2: "21"
400
+ }, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_12, [..._cache[15] || (_cache[15] = [
401
+ createElementVNode("rect", {
402
+ x: "3",
403
+ y: "3",
404
+ width: "8",
405
+ height: "8",
406
+ rx: "1"
407
+ }, null, -1),
408
+ createElementVNode("rect", {
409
+ x: "15",
410
+ y: "3",
411
+ width: "6",
412
+ height: "8",
413
+ rx: "1"
414
+ }, null, -1),
415
+ createElementVNode("rect", {
416
+ x: "3",
417
+ y: "15",
418
+ width: "8",
419
+ height: "6",
420
+ rx: "1"
421
+ }, null, -1),
422
+ createElementVNode("circle", {
423
+ cx: "18",
424
+ cy: "18",
425
+ r: "3"
426
+ }, null, -1)
427
+ ])]))])], 8, _hoisted_9$1)
274
428
  ]),
275
- createElementVNode("span", _hoisted_9$1, toDisplayString($setup.title), 1),
276
- createElementVNode("div", _hoisted_10$1, [
277
- !$setup.isSplitMode ? (openBlock(), createElementBlock("button", {
429
+ createElementVNode("span", _hoisted_13, toDisplayString($setup.title), 1),
430
+ createElementVNode("div", _hoisted_14, [
431
+ $setup.isSplitMode ? (openBlock(), createElementBlock("button", {
278
432
  key: 0,
433
+ class: "opencode-header-btn split-position-btn",
434
+ type: "button",
435
+ title: $setup.splitPositionIconTitle,
436
+ "aria-label": $setup.splitPositionIconLabel,
437
+ onClick: _cache[4] || (_cache[4] = (...args) => $setup.handleToggleSplitPosition && $setup.handleToggleSplitPosition(...args))
438
+ }, [renderSlot(_ctx.$slots, "split-position-icon", {}, () => [$setup.splitPosition === "right" ? (openBlock(), createElementBlock("svg", _hoisted_16, [..._cache[16] || (_cache[16] = [createElementVNode("rect", {
439
+ x: "3",
440
+ y: "3",
441
+ width: "18",
442
+ height: "18",
443
+ rx: "2"
444
+ }, null, -1), createElementVNode("line", {
445
+ x1: "15",
446
+ y1: "3",
447
+ x2: "15",
448
+ y2: "21"
449
+ }, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_17, [..._cache[17] || (_cache[17] = [createElementVNode("rect", {
450
+ x: "3",
451
+ y: "3",
452
+ width: "18",
453
+ height: "18",
454
+ rx: "2"
455
+ }, null, -1), createElementVNode("line", {
456
+ x1: "9",
457
+ y1: "3",
458
+ x2: "9",
459
+ y2: "21"
460
+ }, null, -1)])]))])], 8, _hoisted_15)) : createCommentVNode("v-if", true),
461
+ !$setup.isSplitMode ? (openBlock(), createElementBlock("button", {
462
+ key: 1,
279
463
  class: "opencode-header-btn prompt-dock",
280
464
  type: "button",
281
465
  title: $setup.promptDockVisible ? "隐藏对话框" : "显示对话框",
282
466
  "aria-label": $setup.promptDockVisible ? "隐藏对话框" : "显示对话框",
283
467
  "aria-pressed": $setup.promptDockVisible,
284
- onClick: _cache[3] || (_cache[3] = (...args) => $setup.handleTogglePromptDock && $setup.handleTogglePromptDock(...args))
285
- }, [renderSlot(_ctx.$slots, "prompt-dock-icon", {}, () => [_cache[11] || (_cache[11] = createElementVNode("svg", {
468
+ onClick: _cache[5] || (_cache[5] = (...args) => $setup.handleTogglePromptDock && $setup.handleTogglePromptDock(...args))
469
+ }, [renderSlot(_ctx.$slots, "prompt-dock-icon", {}, () => [_cache[18] || (_cache[18] = createElementVNode("svg", {
286
470
  viewBox: "0 0 24 24",
287
471
  width: "14",
288
472
  height: "14",
@@ -290,24 +474,24 @@ function __vue_render__$8(_ctx, _cache, $props, $setup, $data, $options) {
290
474
  stroke: "currentColor",
291
475
  "stroke-width": "2",
292
476
  "aria-hidden": "true"
293
- }, [createElementVNode("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })], -1))])], 8, _hoisted_11)) : createCommentVNode("v-if", true),
477
+ }, [createElementVNode("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })], -1))])], 8, _hoisted_18)) : createCommentVNode("v-if", true),
294
478
  !$setup.isSplitMode ? (openBlock(), createElementBlock("button", {
295
- key: 1,
479
+ key: 2,
296
480
  class: "opencode-header-btn minimize",
297
481
  type: "button",
298
482
  title: $setup.minimized ? "展开" : "最小化",
299
483
  "aria-label": $setup.minimized ? "展开面板" : "最小化面板",
300
484
  "aria-pressed": $setup.minimized,
301
- onClick: _cache[4] || (_cache[4] = (...args) => $setup.handleToggleMinimize && $setup.handleToggleMinimize(...args))
302
- }, [renderSlot(_ctx.$slots, "minimize-icon", {}, () => [$setup.minimized ? (openBlock(), createElementBlock("svg", _hoisted_13, [..._cache[12] || (_cache[12] = [createElementVNode("path", { 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" }, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_14, [..._cache[13] || (_cache[13] = [createElementVNode("path", { 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" }, null, -1)])]))])], 8, _hoisted_12)) : createCommentVNode("v-if", true),
485
+ onClick: _cache[6] || (_cache[6] = (...args) => $setup.handleToggleMinimize && $setup.handleToggleMinimize(...args))
486
+ }, [renderSlot(_ctx.$slots, "minimize-icon", {}, () => [$setup.minimized ? (openBlock(), createElementBlock("svg", _hoisted_20, [..._cache[19] || (_cache[19] = [createElementVNode("path", { 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" }, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_21, [..._cache[20] || (_cache[20] = [createElementVNode("path", { 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" }, null, -1)])]))])], 8, _hoisted_19)) : createCommentVNode("v-if", true),
303
487
  !$setup.isSplitMode ? (openBlock(), createElementBlock("button", {
304
- key: 2,
488
+ key: 3,
305
489
  class: "opencode-header-btn close",
306
490
  type: "button",
307
491
  title: "关闭",
308
492
  "aria-label": "关闭面板",
309
- onClick: _cache[5] || (_cache[5] = (...args) => $setup.handleClose && $setup.handleClose(...args))
310
- }, [renderSlot(_ctx.$slots, "close-icon", {}, () => [_cache[14] || (_cache[14] = createElementVNode("svg", {
493
+ onClick: _cache[7] || (_cache[7] = (...args) => $setup.handleClose && $setup.handleClose(...args))
494
+ }, [renderSlot(_ctx.$slots, "close-icon", {}, () => [_cache[21] || (_cache[21] = createElementVNode("svg", {
311
495
  viewBox: "0 0 24 24",
312
496
  width: "14",
313
497
  height: "14",
@@ -393,8 +577,8 @@ var _hoisted_4$3 = {
393
577
  };
394
578
  var _hoisted_5$3 = ["aria-selected", "onClick"];
395
579
  var _hoisted_6$3 = { class: "opencode-session-header" };
396
- var _hoisted_7$1 = { class: "opencode-session-title" };
397
- var _hoisted_8 = {
580
+ var _hoisted_7$2 = { class: "opencode-session-title" };
581
+ var _hoisted_8$1 = {
398
582
  key: 0,
399
583
  class: "opencode-thinking-loading"
400
584
  };
@@ -426,7 +610,7 @@ function __vue_render__$7(_ctx, _cache, $props, $setup, $data, $options) {
426
610
  role: "option",
427
611
  "aria-selected": item.active,
428
612
  onClick: ($event) => $setup.handleSelectSession(item)
429
- }, [createElementVNode("div", _hoisted_6$3, [createElementVNode("div", _hoisted_7$1, [$setup.isSessionThinking(item.id) ? (openBlock(), createElementBlock("span", _hoisted_8)) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(item.title), 1)]), createElementVNode("button", {
613
+ }, [createElementVNode("div", _hoisted_6$3, [createElementVNode("div", _hoisted_7$2, [$setup.isSessionThinking(item.id) ? (openBlock(), createElementBlock("span", _hoisted_8$1)) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(item.title), 1)]), createElementVNode("button", {
430
614
  class: "opencode-session-delete-btn",
431
615
  type: "button",
432
616
  "aria-label": `\u5220\u9664\u4F1A\u8BDD: ${item.title}`,
@@ -713,6 +897,11 @@ var __vue_sfc__$4 = /* @__PURE__ */ defineComponent(__spreadProps$2(__spreadValu
713
897
  type: String,
714
898
  required: false,
715
899
  default: "light"
900
+ },
901
+ splitPosition: {
902
+ type: String,
903
+ required: false,
904
+ default: "right"
716
905
  }
717
906
  },
718
907
  emits: [
@@ -769,7 +958,9 @@ var __vue_sfc__$4 = /* @__PURE__ */ defineComponent(__spreadProps$2(__spreadValu
769
958
  minimized: props.minimized,
770
959
  dragging: props.dragging,
771
960
  "no-transition": props.noTransition,
772
- "split-mode": props.mode === "split"
961
+ "split-mode": props.mode === "split",
962
+ "split-left": props.mode === "split" && props.splitPosition === "left",
963
+ "split-right": props.mode === "split" && props.splitPosition === "right"
773
964
  }]),
774
965
  Frame: Frame_vue_default,
775
966
  Header: Header_vue_default,
@@ -805,11 +996,29 @@ var _hoisted_4$1 = {
805
996
  "stroke-width": "2"
806
997
  };
807
998
  var _hoisted_5$1 = {
999
+ key: 2,
1000
+ viewBox: "0 0 24 24",
1001
+ width: "16",
1002
+ height: "16",
1003
+ fill: "none",
1004
+ stroke: "currentColor",
1005
+ "stroke-width": "2"
1006
+ };
1007
+ var _hoisted_6$1 = {
1008
+ key: 3,
1009
+ viewBox: "0 0 24 24",
1010
+ width: "16",
1011
+ height: "16",
1012
+ fill: "none",
1013
+ stroke: "currentColor",
1014
+ "stroke-width": "2"
1015
+ };
1016
+ var _hoisted_7$1 = {
808
1017
  key: 2,
809
1018
  class: "opencode-notification",
810
1019
  role: "alert"
811
1020
  };
812
- var _hoisted_6$1 = { class: "opencode-chat-content" };
1021
+ var _hoisted_8 = { class: "opencode-chat-content" };
813
1022
  function __vue_render__$4(_ctx, _cache, $props, $setup, $data, $options) {
814
1023
  return openBlock(), createElementBlock("div", {
815
1024
  class: normalizeClass($setup.panelClasses),
@@ -834,20 +1043,34 @@ function __vue_render__$4(_ctx, _cache, $props, $setup, $data, $options) {
834
1043
  class: normalizeClass(["opencode-split-toggle-btn", {
835
1044
  open: $setup.props.open,
836
1045
  thinking: $setup.props.thinking,
837
- "opencode-theme-dark": $props.resolvedTheme === "dark"
1046
+ "opencode-theme-dark": $props.resolvedTheme === "dark",
1047
+ "split-left": $props.splitPosition === "left"
838
1048
  }]),
839
1049
  "aria-expanded": $props.open,
840
1050
  "aria-label": "切换面板",
841
1051
  onClick: $setup.handleToggle
842
- }, [createElementVNode("span", _hoisted_2$1, [$props.open ? (openBlock(), createElementBlock("svg", _hoisted_3$1, [..._cache[0] || (_cache[0] = [createElementVNode("path", {
843
- d: "M9 18l6-6-6-6",
844
- "stroke-linecap": "round",
845
- "stroke-linejoin": "round"
846
- }, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_4$1, [..._cache[1] || (_cache[1] = [createElementVNode("path", {
847
- d: "M15 18l-6-6 6-6",
848
- "stroke-linecap": "round",
849
- "stroke-linejoin": "round"
850
- }, null, -1)])]))])], 10, _hoisted_1$3)) : createCommentVNode("v-if", true),
1052
+ }, [createElementVNode("span", _hoisted_2$1, [
1053
+ $props.open && $props.splitPosition === "right" ? (openBlock(), createElementBlock("svg", _hoisted_3$1, [..._cache[0] || (_cache[0] = [createElementVNode("path", {
1054
+ d: "M9 18l6-6-6-6",
1055
+ "stroke-linecap": "round",
1056
+ "stroke-linejoin": "round"
1057
+ }, null, -1)])])) : createCommentVNode("v-if", true),
1058
+ !$props.open && $props.splitPosition === "right" ? (openBlock(), createElementBlock("svg", _hoisted_4$1, [..._cache[1] || (_cache[1] = [createElementVNode("path", {
1059
+ d: "M15 18l-6-6 6-6",
1060
+ "stroke-linecap": "round",
1061
+ "stroke-linejoin": "round"
1062
+ }, null, -1)])])) : createCommentVNode("v-if", true),
1063
+ $props.open && $props.splitPosition === "left" ? (openBlock(), createElementBlock("svg", _hoisted_5$1, [..._cache[2] || (_cache[2] = [createElementVNode("path", {
1064
+ d: "M15 18l-6-6 6-6",
1065
+ "stroke-linecap": "round",
1066
+ "stroke-linejoin": "round"
1067
+ }, null, -1)])])) : createCommentVNode("v-if", true),
1068
+ !$props.open && $props.splitPosition === "left" ? (openBlock(), createElementBlock("svg", _hoisted_6$1, [..._cache[3] || (_cache[3] = [createElementVNode("path", {
1069
+ d: "M9 18l6-6-6-6",
1070
+ "stroke-linecap": "round",
1071
+ "stroke-linejoin": "round"
1072
+ }, null, -1)])])) : createCommentVNode("v-if", true)
1073
+ ])], 10, _hoisted_1$3)) : createCommentVNode("v-if", true),
851
1074
  createVNode($setup["Header"], null, createSlots({ _: 2 }, [
852
1075
  $setup.slots["session-toggle-icon"] ? {
853
1076
  name: "session-toggle-icon",
@@ -865,10 +1088,10 @@ function __vue_render__$4(_ctx, _cache, $props, $setup, $data, $options) {
865
1088
  key: "2"
866
1089
  } : void 0
867
1090
  ]), 1024),
868
- $props.notificationVisible && $props.notificationMode === "widget" ? (openBlock(), createElementBlock("div", _hoisted_5$1, toDisplayString($props.notificationMessage), 1)) : createCommentVNode("v-if", true),
869
- createElementVNode("div", _hoisted_6$1, [
1091
+ $props.notificationVisible && $props.notificationMode === "widget" ? (openBlock(), createElementBlock("div", _hoisted_7$1, toDisplayString($props.notificationMessage), 1)) : createCommentVNode("v-if", true),
1092
+ createElementVNode("div", _hoisted_8, [
870
1093
  createVNode($setup["SessionList"], null, {
871
- empty: withCtx(() => [renderSlot(_ctx.$slots, "sessions-empty", {}, () => [_cache[2] || (_cache[2] = createElementVNode("div", { class: "opencode-session-empty" }, "暂无会话", -1))])]),
1094
+ empty: withCtx(() => [renderSlot(_ctx.$slots, "sessions-empty", {}, () => [_cache[4] || (_cache[4] = createElementVNode("div", { class: "opencode-session-empty" }, "暂无会话", -1))])]),
872
1095
  _: 3
873
1096
  }),
874
1097
  createVNode($setup["Frame"], { ref: "frameRef" }, createSlots({ _: 2 }, [
@@ -1960,7 +2183,7 @@ function usePersistState(options) {
1960
2183
  return saved;
1961
2184
  };
1962
2185
  const getCurrentState = () => {
1963
- var _a;
2186
+ var _a, _b, _c;
1964
2187
  return {
1965
2188
  open: options.open.value,
1966
2189
  minimized: options.minimized.value,
@@ -1968,7 +2191,9 @@ function usePersistState(options) {
1968
2191
  bubbleOffset: options.bubbleOffset.value,
1969
2192
  theme: options.theme.value,
1970
2193
  sessionListCollapsed: options.sessionListCollapsed.value,
1971
- splitPanelWidth: (_a = options.splitPanelWidth) == null ? void 0 : _a.value
2194
+ splitPanelWidth: (_a = options.splitPanelWidth) == null ? void 0 : _a.value,
2195
+ displayMode: (_b = options.displayMode) == null ? void 0 : _b.value,
2196
+ splitPosition: (_c = options.splitPosition) == null ? void 0 : _c.value
1972
2197
  };
1973
2198
  };
1974
2199
  const persistState = () => {
@@ -1983,6 +2208,8 @@ function usePersistState(options) {
1983
2208
  options.sessionListCollapsed
1984
2209
  ];
1985
2210
  if (options.splitPanelWidth) watchers.push(options.splitPanelWidth);
2211
+ if (options.displayMode) watchers.push(options.displayMode);
2212
+ if (options.splitPosition) watchers.push(options.splitPosition);
1986
2213
  onMounted(() => {
1987
2214
  restoreState();
1988
2215
  watch(watchers, () => {
@@ -1998,17 +2225,20 @@ function usePersistState(options) {
1998
2225
  //#region es/open-code-widget/composables/use-split.js
1999
2226
  var AUTO_MODE_THRESHOLD = 1440;
2000
2227
  function useSplitMode(options) {
2228
+ var _a, _b;
2001
2229
  const windowWidth = ref(typeof window !== "undefined" ? window.innerWidth : 0);
2230
+ const localSplitPosition = ref((_b = (_a = options.splitPosition) == null ? void 0 : _a.value) != null ? _b : "right");
2002
2231
  const splitConfig = computed(() => {
2003
- var _a, _b, _c, _d, _e, _f;
2232
+ var _a2, _b2, _c, _d, _e, _f, _g;
2004
2233
  const config = options.splitMode.value || {};
2005
2234
  return {
2006
- width: (_a = config.width) != null ? _a : 500,
2007
- minWidth: (_b = config.minWidth) != null ? _b : 400,
2235
+ width: (_a2 = config.width) != null ? _a2 : 500,
2236
+ minWidth: (_b2 = config.minWidth) != null ? _b2 : 400,
2008
2237
  maxWidth: (_c = config.maxWidth) != null ? _c : 800,
2009
2238
  resizable: (_d = config.resizable) != null ? _d : true,
2010
2239
  shrinkPage: (_e = config.shrinkPage) != null ? _e : true,
2011
- defaultOpen: (_f = config.defaultOpen) != null ? _f : true
2240
+ defaultOpen: (_f = config.defaultOpen) != null ? _f : true,
2241
+ position: (_g = config.position) != null ? _g : localSplitPosition.value
2012
2242
  };
2013
2243
  });
2014
2244
  const panelWidth = ref(splitConfig.value.width);
@@ -2018,15 +2248,22 @@ function useSplitMode(options) {
2018
2248
  return windowWidth.value >= AUTO_MODE_THRESHOLD ? "split" : "bubble";
2019
2249
  });
2020
2250
  const isSplitMode = computed(() => effectiveMode.value === "split");
2251
+ const splitPosition = computed(() => splitConfig.value.position);
2021
2252
  const handleResize = (width) => {
2022
- var _a;
2253
+ var _a2;
2023
2254
  panelWidth.value = width;
2024
- (_a = options.onWidthChange) == null || _a.call(options, width);
2255
+ (_a2 = options.onWidthChange) == null || _a2.call(options, width);
2025
2256
  };
2026
2257
  const handleToggle = () => {
2027
- var _a;
2258
+ var _a2;
2028
2259
  const nextOpen = !options.open.value;
2029
- (_a = options.onOpenChange) == null || _a.call(options, nextOpen);
2260
+ (_a2 = options.onOpenChange) == null || _a2.call(options, nextOpen);
2261
+ };
2262
+ const handleTogglePosition = () => {
2263
+ var _a2;
2264
+ const nextPosition = localSplitPosition.value === "right" ? "left" : "right";
2265
+ localSplitPosition.value = nextPosition;
2266
+ (_a2 = options.onPositionChange) == null || _a2.call(options, nextPosition);
2030
2267
  };
2031
2268
  const handleWindowResize = () => {
2032
2269
  if (typeof window !== "undefined") windowWidth.value = window.innerWidth;
@@ -2036,31 +2273,49 @@ function useSplitMode(options) {
2036
2273
  if (isSplitMode.value && options.open.value && splitConfig.value.shrinkPage) {
2037
2274
  document.body.classList.add("has-opencode-split");
2038
2275
  document.body.style.setProperty("--opencode-split-width", `${panelWidth.value}px`);
2276
+ if (splitPosition.value === "left") {
2277
+ document.body.classList.add("has-opencode-split-left");
2278
+ document.body.classList.remove("has-opencode-split-right");
2279
+ } else {
2280
+ document.body.classList.add("has-opencode-split-right");
2281
+ document.body.classList.remove("has-opencode-split-left");
2282
+ }
2039
2283
  } else {
2040
2284
  document.body.classList.remove("has-opencode-split");
2285
+ document.body.classList.remove("has-opencode-split-left");
2286
+ document.body.classList.remove("has-opencode-split-right");
2041
2287
  document.body.style.removeProperty("--opencode-split-width");
2042
2288
  }
2043
2289
  };
2044
2290
  watch([
2045
2291
  isSplitMode,
2046
2292
  options.open,
2047
- panelWidth
2293
+ panelWidth,
2294
+ splitPosition
2048
2295
  ], updateBodyClass, { immediate: true });
2049
2296
  watch(splitConfig, (config) => {
2050
2297
  if (panelWidth.value < config.minWidth) panelWidth.value = config.minWidth;
2051
2298
  if (panelWidth.value > config.maxWidth) panelWidth.value = config.maxWidth;
2052
2299
  });
2300
+ watch(() => {
2301
+ var _a2;
2302
+ return (_a2 = options.splitPosition) == null ? void 0 : _a2.value;
2303
+ }, (val) => {
2304
+ if (val && val !== localSplitPosition.value) localSplitPosition.value = val;
2305
+ });
2053
2306
  onMounted(() => {
2054
- var _a;
2307
+ var _a2;
2055
2308
  if (typeof window !== "undefined") {
2056
2309
  window.addEventListener("resize", handleWindowResize);
2057
- if (isSplitMode.value && splitConfig.value.defaultOpen && !options.open.value) (_a = options.onOpenChange) == null || _a.call(options, true);
2310
+ if (isSplitMode.value && splitConfig.value.defaultOpen && !options.open.value) (_a2 = options.onOpenChange) == null || _a2.call(options, true);
2058
2311
  }
2059
2312
  });
2060
2313
  onUnmounted(() => {
2061
2314
  if (typeof window !== "undefined") {
2062
2315
  window.removeEventListener("resize", handleWindowResize);
2063
2316
  document.body.classList.remove("has-opencode-split");
2317
+ document.body.classList.remove("has-opencode-split-left");
2318
+ document.body.classList.remove("has-opencode-split-right");
2064
2319
  document.body.style.removeProperty("--opencode-split-width");
2065
2320
  }
2066
2321
  });
@@ -2069,8 +2324,10 @@ function useSplitMode(options) {
2069
2324
  isSplitMode,
2070
2325
  panelWidth,
2071
2326
  splitConfig,
2327
+ splitPosition,
2072
2328
  handleResize,
2073
- handleToggle
2329
+ handleToggle,
2330
+ handleTogglePosition
2074
2331
  };
2075
2332
  }
2076
2333
  //#endregion
@@ -2253,6 +2510,7 @@ var __vue_sfc__ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
2253
2510
  "split-panel-width-change"
2254
2511
  ],
2255
2512
  setup(__props, { expose: __expose, emit: __emit }) {
2513
+ var _a, _b;
2256
2514
  useCssVars((_ctx) => ({
2257
2515
  "-chatAnimationOrigin.x": chatAnimationOrigin.value.x,
2258
2516
  "-chatAnimationOrigin.y": chatAnimationOrigin.value.y
@@ -2295,10 +2553,12 @@ var __vue_sfc__ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
2295
2553
  const frameRef = ref(null);
2296
2554
  const triggerRef = ref(null);
2297
2555
  const sendMessageToIframe = (type, data) => {
2298
- var _a;
2299
- (_a = frameRef.value) == null || _a.sendMessageToIframe(type, data);
2556
+ var _a2;
2557
+ (_a2 = frameRef.value) == null || _a2.sendMessageToIframe(type, data);
2300
2558
  };
2301
2559
  const localSessionListCollapsed = ref(props.sessionListCollapsed);
2560
+ const localDisplayMode = ref(props.displayMode);
2561
+ const localSplitPosition = ref((_b = (_a = props.splitMode) == null ? void 0 : _a.position) != null ? _b : "right");
2302
2562
  const minimized = ref(false);
2303
2563
  const promptDockVisible = ref(true);
2304
2564
  const isRestoring = ref(true);
@@ -2320,6 +2580,17 @@ var __vue_sfc__ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
2320
2580
  watch(() => props.splitPanelWidth, (val) => {
2321
2581
  splitPanelWidth.value = val;
2322
2582
  });
2583
+ watch(() => props.displayMode, (val) => {
2584
+ localDisplayMode.value = val;
2585
+ });
2586
+ const handleToggleDisplayMode = () => {
2587
+ const modes = [
2588
+ "bubble",
2589
+ "split",
2590
+ "auto"
2591
+ ];
2592
+ localDisplayMode.value = modes[(modes.indexOf(localDisplayMode.value) + 1) % modes.length];
2593
+ };
2323
2594
  const { buttonActive, containerClasses, iframeSource, sessionListTitle, resolvedTheme, handleClose, handleEmptyAction, handleToggle, handleToggleSessionList, handleToggleTheme } = useWidget({
2324
2595
  theme: toRef(props, "theme"),
2325
2596
  open: toRef(props, "open"),
@@ -2392,10 +2663,11 @@ var __vue_sfc__ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
2392
2663
  }
2393
2664
  });
2394
2665
  const bubbleOffset = ref(void 0);
2395
- const { effectiveMode, isSplitMode, panelWidth, splitConfig, handleResize, handleToggle: handleSplitToggle } = useSplitMode({
2396
- displayMode: toRef(props, "displayMode"),
2666
+ const { effectiveMode, isSplitMode, panelWidth, splitConfig, splitPosition, handleResize, handleToggle: handleSplitToggle, handleTogglePosition } = useSplitMode({
2667
+ displayMode: localDisplayMode,
2397
2668
  splitMode: toRef(props, "splitMode"),
2398
2669
  open: toRef(props, "open"),
2670
+ splitPosition: localSplitPosition,
2399
2671
  onOpenChange: (nextOpen) => {
2400
2672
  emit("update:open", nextOpen);
2401
2673
  emit("toggle", nextOpen);
@@ -2404,6 +2676,9 @@ var __vue_sfc__ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
2404
2676
  splitPanelWidth.value = width;
2405
2677
  emit("update:splitPanelWidth", width);
2406
2678
  emit("split-panel-width-change", width);
2679
+ },
2680
+ onPositionChange: (position) => {
2681
+ localSplitPosition.value = position;
2407
2682
  }
2408
2683
  });
2409
2684
  usePersistState({
@@ -2414,6 +2689,8 @@ var __vue_sfc__ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
2414
2689
  theme: toRef(props, "theme"),
2415
2690
  sessionListCollapsed: localSessionListCollapsed,
2416
2691
  splitPanelWidth,
2692
+ displayMode: localDisplayMode,
2693
+ splitPosition: localSplitPosition,
2417
2694
  onRestore: (state) => {
2418
2695
  if (state.open !== void 0 && state.open !== props.open) {
2419
2696
  emit("update:open", state.open);
@@ -2441,6 +2718,8 @@ var __vue_sfc__ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
2441
2718
  if (state.promptDockVisible !== void 0) promptDockVisible.value = state.promptDockVisible;
2442
2719
  else if (minimized.value) promptDockVisible.value = false;
2443
2720
  if (state.splitPanelWidth !== void 0 && state.splitPanelWidth !== props.splitPanelWidth) handleResize(state.splitPanelWidth);
2721
+ if (state.displayMode !== void 0 && state.displayMode !== props.displayMode) localDisplayMode.value = state.displayMode;
2722
+ if (state.splitPosition !== void 0) localSplitPosition.value = state.splitPosition;
2444
2723
  nextTick(() => {
2445
2724
  syncStateToIframe();
2446
2725
  setTimeout(() => {
@@ -2474,12 +2753,12 @@ var __vue_sfc__ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
2474
2753
  if (typeof window !== "undefined") window.removeEventListener("resize", handleWindowResize);
2475
2754
  });
2476
2755
  const bubbleQuadrant = computed(() => {
2477
- var _a, _b, _c, _d;
2756
+ var _a2, _b2, _c, _d;
2478
2757
  if (typeof window === "undefined") return "bottom-right";
2479
2758
  const centerX = windowWidth.value / 2;
2480
2759
  const centerY = windowHeight.value / 2;
2481
2760
  const bubbleSize = 44;
2482
- const currentOffset = (_b = (_a = triggerRef.value) == null ? void 0 : _a.offset) != null ? _b : bubbleOffset.value;
2761
+ const currentOffset = (_b2 = (_a2 = triggerRef.value) == null ? void 0 : _a2.offset) != null ? _b2 : bubbleOffset.value;
2483
2762
  const effectiveX = ((_c = currentOffset == null ? void 0 : currentOffset.x) != null ? _c : windowWidth.value - bubbleSize - 24) + bubbleSize / 2;
2484
2763
  const effectiveY = ((_d = currentOffset == null ? void 0 : currentOffset.y) != null ? _d : windowHeight.value - bubbleSize - 24) + bubbleSize / 2;
2485
2764
  if (effectiveX >= centerX && effectiveY >= centerY) return "bottom-right";
@@ -2492,14 +2771,14 @@ var __vue_sfc__ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
2492
2771
  return quadrant === "top-right" || quadrant === "bottom-right";
2493
2772
  });
2494
2773
  const chatPositionStyle = computed(() => {
2495
- var _a, _b, _c;
2774
+ var _a2, _b2, _c;
2496
2775
  if (typeof window === "undefined") return {};
2497
2776
  const chatWidth = minimized.value ? 300 : 700;
2498
2777
  const chatHeight = minimized.value ? 300 : Math.min(windowHeight.value * .86, windowHeight.value - 40);
2499
2778
  const gap = 24;
2500
2779
  const bubbleSize = 44;
2501
2780
  const screenMargin = 20;
2502
- const effectiveOffset = (_c = (_b = (_a = triggerRef.value) == null ? void 0 : _a.offset) != null ? _b : bubbleOffset.value) != null ? _c : {
2781
+ const effectiveOffset = (_c = (_b2 = (_a2 = triggerRef.value) == null ? void 0 : _a2.offset) != null ? _b2 : bubbleOffset.value) != null ? _c : {
2503
2782
  x: windowWidth.value - bubbleSize - gap,
2504
2783
  y: windowHeight.value - bubbleSize - gap
2505
2784
  };
@@ -2592,9 +2871,11 @@ var __vue_sfc__ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
2592
2871
  promptDockVisible,
2593
2872
  bubbleOffset,
2594
2873
  mode: effectiveMode,
2874
+ displayMode: localDisplayMode,
2875
+ splitPosition,
2595
2876
  sessionStates: computed(() => {
2596
- var _a;
2597
- return (_a = props.sessionStates) != null ? _a : {};
2877
+ var _a2;
2878
+ return (_a2 = props.sessionStates) != null ? _a2 : {};
2598
2879
  }),
2599
2880
  iframeSource,
2600
2881
  buttonActive,
@@ -2609,6 +2890,8 @@ var __vue_sfc__ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
2609
2890
  handleTogglePromptDock,
2610
2891
  handleToggleSessionList,
2611
2892
  handleToggleTheme,
2893
+ handleToggleDisplayMode,
2894
+ handleToggleSplitPosition: handleTogglePosition,
2612
2895
  handleEmptyAction,
2613
2896
  handleCreateSession,
2614
2897
  handleSelectSession,
@@ -2655,6 +2938,8 @@ var __vue_sfc__ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
2655
2938
  triggerRef,
2656
2939
  sendMessageToIframe,
2657
2940
  localSessionListCollapsed,
2941
+ localDisplayMode,
2942
+ localSplitPosition,
2658
2943
  minimized,
2659
2944
  promptDockVisible,
2660
2945
  isRestoring,
@@ -2662,6 +2947,7 @@ var __vue_sfc__ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
2662
2947
  splitPanelWidth,
2663
2948
  syncStateToIframe,
2664
2949
  handleFrameLoaded,
2950
+ handleToggleDisplayMode,
2665
2951
  buttonActive,
2666
2952
  containerClasses,
2667
2953
  iframeSource,
@@ -2693,8 +2979,10 @@ var __vue_sfc__ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
2693
2979
  isSplitMode,
2694
2980
  panelWidth,
2695
2981
  splitConfig,
2982
+ splitPosition,
2696
2983
  handleResize,
2697
2984
  handleSplitToggle,
2985
+ handleTogglePosition,
2698
2986
  handleToggleMinimize,
2699
2987
  handleTogglePromptDock,
2700
2988
  windowWidth,
@@ -2775,6 +3063,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
2775
3063
  "notification-mode": $setup.notificationMode,
2776
3064
  thinking: $props.thinking,
2777
3065
  "resolved-theme": $setup.resolvedTheme,
3066
+ "split-position": $setup.splitPosition,
2778
3067
  onResize: $setup.handleResize,
2779
3068
  onResizeStart: $setup.handleResizeStart,
2780
3069
  onResizeEnd: $setup.handleResizeEnd,
@@ -2835,6 +3124,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
2835
3124
  "notification-mode",
2836
3125
  "thinking",
2837
3126
  "resolved-theme",
3127
+ "split-position",
2838
3128
  "onResize",
2839
3129
  "onToggle"
2840
3130
  ]),
@@ -2863,7 +3153,7 @@ __vue_sfc__.render = __vue_render__;
2863
3153
  var open_code_widget_default = __vue_sfc__;
2864
3154
  //#endregion
2865
3155
  //#region es/index.js
2866
- var version = "1.0.47";
3156
+ var version = "1.0.49";
2867
3157
  function install(app, options) {
2868
3158
  [open_code_widget_default].forEach((item) => {
2869
3159
  if (item.install) app.use(item, options);