@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
@@ -137,7 +137,7 @@ var __vue_sfc__$8 = /* @__PURE__ */ (0, vue.defineComponent)({
137
137
  __name: "Header",
138
138
  setup(__props, { expose: __expose }) {
139
139
  __expose();
140
- const { title, sessionListTitle, sessionListCollapsed, selectMode, selectEnabled, theme, resolvedTheme, minimized, promptDockVisible, mode, handleToggleSessionList, handleToggleSelectMode, handleToggleTheme, handleClose, handleToggleMinimize, handleTogglePromptDock } = useOpenCodeWidgetContext();
140
+ const { title, sessionListTitle, sessionListCollapsed, selectMode, selectEnabled, theme, resolvedTheme, minimized, promptDockVisible, mode, displayMode, splitPosition, handleToggleSessionList, handleToggleSelectMode, handleToggleTheme, handleToggleDisplayMode, handleToggleSplitPosition, handleClose, handleToggleMinimize, handleTogglePromptDock } = useOpenCodeWidgetContext();
141
141
  const __returned__ = {
142
142
  title,
143
143
  sessionListTitle,
@@ -149,9 +149,13 @@ var __vue_sfc__$8 = /* @__PURE__ */ (0, vue.defineComponent)({
149
149
  minimized,
150
150
  promptDockVisible,
151
151
  mode,
152
+ displayMode,
153
+ splitPosition,
152
154
  handleToggleSessionList,
153
155
  handleToggleSelectMode,
154
156
  handleToggleTheme,
157
+ handleToggleDisplayMode,
158
+ handleToggleSplitPosition,
155
159
  handleClose,
156
160
  handleToggleMinimize,
157
161
  handleTogglePromptDock,
@@ -169,6 +173,35 @@ var __vue_sfc__$8 = /* @__PURE__ */ (0, vue.defineComponent)({
169
173
  light: "亮色主题",
170
174
  dark: "暗色主题"
171
175
  }[theme.value]}`;
176
+ }),
177
+ displayModeIconTitle: (0, vue.computed)(() => {
178
+ return `\u5C55\u793A\u6A21\u5F0F: ${{
179
+ bubble: "气泡模式",
180
+ split: "分屏模式",
181
+ auto: "自动模式"
182
+ }[displayMode.value]}`;
183
+ }),
184
+ displayModeIconLabel: (0, vue.computed)(() => {
185
+ const displayModeLabels = {
186
+ bubble: "气泡模式",
187
+ split: "分屏模式",
188
+ auto: "自动模式"
189
+ };
190
+ const modes = [
191
+ "bubble",
192
+ "split",
193
+ "auto"
194
+ ];
195
+ return `\u5207\u6362\u5C55\u793A\u6A21\u5F0F - \u4E0B\u4E00\u4E2A: ${displayModeLabels[modes[(modes.indexOf(displayMode.value) + 1) % modes.length]]}`;
196
+ }),
197
+ splitPositionIconTitle: (0, vue.computed)(() => {
198
+ return `\u5206\u680F\u4F4D\u7F6E: ${{
199
+ left: "左侧",
200
+ right: "右侧"
201
+ }[splitPosition.value]}`;
202
+ }),
203
+ splitPositionIconLabel: (0, vue.computed)(() => {
204
+ return `\u5207\u6362\u5206\u680F\u4F4D\u7F6E - \u4E0B\u4E00\u4E2A: ${splitPosition.value === "right" ? "左侧" : "右侧"}`;
172
205
  })
173
206
  };
174
207
  Object.defineProperty(__returned__, "__isScriptSetup", {
@@ -197,7 +230,7 @@ var _hoisted_6$4 = {
197
230
  "stroke-width": "2",
198
231
  "aria-hidden": "true"
199
232
  };
200
- var _hoisted_7$2 = {
233
+ var _hoisted_7$3 = {
201
234
  key: 1,
202
235
  viewBox: "0 0 24 24",
203
236
  width: "16",
@@ -207,7 +240,38 @@ var _hoisted_7$2 = {
207
240
  "stroke-width": "2",
208
241
  "aria-hidden": "true"
209
242
  };
210
- var _hoisted_8$1 = {
243
+ var _hoisted_8$2 = {
244
+ key: 2,
245
+ viewBox: "0 0 24 24",
246
+ width: "16",
247
+ height: "16",
248
+ fill: "none",
249
+ stroke: "currentColor",
250
+ "stroke-width": "2",
251
+ "aria-hidden": "true"
252
+ };
253
+ var _hoisted_9$1 = ["title", "aria-label"];
254
+ var _hoisted_10$1 = {
255
+ key: 0,
256
+ viewBox: "0 0 24 24",
257
+ width: "16",
258
+ height: "16",
259
+ fill: "none",
260
+ stroke: "currentColor",
261
+ "stroke-width": "2",
262
+ "aria-hidden": "true"
263
+ };
264
+ var _hoisted_11 = {
265
+ key: 1,
266
+ viewBox: "0 0 24 24",
267
+ width: "16",
268
+ height: "16",
269
+ fill: "none",
270
+ stroke: "currentColor",
271
+ "stroke-width": "2",
272
+ "aria-hidden": "true"
273
+ };
274
+ var _hoisted_12 = {
211
275
  key: 2,
212
276
  viewBox: "0 0 24 24",
213
277
  width: "16",
@@ -217,19 +281,40 @@ var _hoisted_8$1 = {
217
281
  "stroke-width": "2",
218
282
  "aria-hidden": "true"
219
283
  };
220
- var _hoisted_9$1 = { class: "opencode-chat-header-title" };
221
- var _hoisted_10$1 = { class: "opencode-chat-header-actions" };
222
- var _hoisted_11 = [
284
+ var _hoisted_13 = { class: "opencode-chat-header-title" };
285
+ var _hoisted_14 = { class: "opencode-chat-header-actions" };
286
+ var _hoisted_15 = ["title", "aria-label"];
287
+ var _hoisted_16 = {
288
+ key: 0,
289
+ viewBox: "0 0 24 24",
290
+ width: "16",
291
+ height: "16",
292
+ fill: "none",
293
+ stroke: "currentColor",
294
+ "stroke-width": "2",
295
+ "aria-hidden": "true"
296
+ };
297
+ var _hoisted_17 = {
298
+ key: 1,
299
+ viewBox: "0 0 24 24",
300
+ width: "16",
301
+ height: "16",
302
+ fill: "none",
303
+ stroke: "currentColor",
304
+ "stroke-width": "2",
305
+ "aria-hidden": "true"
306
+ };
307
+ var _hoisted_18 = [
223
308
  "title",
224
309
  "aria-label",
225
310
  "aria-pressed"
226
311
  ];
227
- var _hoisted_12 = [
312
+ var _hoisted_19 = [
228
313
  "title",
229
314
  "aria-label",
230
315
  "aria-pressed"
231
316
  ];
232
- var _hoisted_13 = {
317
+ var _hoisted_20 = {
233
318
  key: 0,
234
319
  viewBox: "0 0 24 24",
235
320
  width: "14",
@@ -239,7 +324,7 @@ var _hoisted_13 = {
239
324
  "stroke-width": "2",
240
325
  "aria-hidden": "true"
241
326
  };
242
- var _hoisted_14 = {
327
+ var _hoisted_21 = {
243
328
  key: 1,
244
329
  viewBox: "0 0 24 24",
245
330
  width: "14",
@@ -259,7 +344,7 @@ function __vue_render__$8(_ctx, _cache, $props, $setup, $data, $options) {
259
344
  "aria-label": $setup.sessionListTitle,
260
345
  "aria-expanded": !$setup.sessionListCollapsed,
261
346
  onClick: _cache[0] || (_cache[0] = (...args) => $setup.handleToggleSessionList && $setup.handleToggleSessionList(...args))
262
- }, [(0, vue.renderSlot)(_ctx.$slots, "session-toggle-icon", {}, () => [_cache[6] || (_cache[6] = (0, vue.createElementVNode)("svg", {
347
+ }, [(0, vue.renderSlot)(_ctx.$slots, "session-toggle-icon", {}, () => [_cache[8] || (_cache[8] = (0, vue.createElementVNode)("svg", {
263
348
  viewBox: "0 0 24 24",
264
349
  width: "16",
265
350
  height: "16",
@@ -279,7 +364,7 @@ function __vue_render__$8(_ctx, _cache, $props, $setup, $data, $options) {
279
364
  "aria-pressed": $setup.selectMode,
280
365
  disabled: !$setup.selectEnabled,
281
366
  onClick: _cache[1] || (_cache[1] = (...args) => $setup.handleToggleSelectMode && $setup.handleToggleSelectMode(...args))
282
- }, [(0, vue.renderSlot)(_ctx.$slots, "select-icon", {}, () => [_cache[7] || (_cache[7] = (0, vue.createElementVNode)("svg", {
367
+ }, [(0, vue.renderSlot)(_ctx.$slots, "select-icon", {}, () => [_cache[9] || (_cache[9] = (0, vue.createElementVNode)("svg", {
283
368
  viewBox: "0 0 1024 1024",
284
369
  width: "16",
285
370
  height: "16",
@@ -297,19 +382,118 @@ function __vue_render__$8(_ctx, _cache, $props, $setup, $data, $options) {
297
382
  title: $setup.themeIconTitle,
298
383
  "aria-label": $setup.themeIconLabel,
299
384
  onClick: _cache[2] || (_cache[2] = (...args) => $setup.handleToggleTheme && $setup.handleToggleTheme(...args))
300
- }, [(0, vue.renderSlot)(_ctx.$slots, "theme-icon", {}, () => [$setup.theme === "light" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_6$4, [..._cache[8] || (_cache[8] = [(0, vue.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" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_7$2, [..._cache[9] || (_cache[9] = [(0, vue.createElementVNode)("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }, null, -1)])])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_8$1, [..._cache[10] || (_cache[10] = [(0, vue.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)
385
+ }, [(0, vue.renderSlot)(_ctx.$slots, "theme-icon", {}, () => [$setup.theme === "light" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_6$4, [..._cache[10] || (_cache[10] = [(0, vue.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" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_7$3, [..._cache[11] || (_cache[11] = [(0, vue.createElementVNode)("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }, null, -1)])])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_8$2, [..._cache[12] || (_cache[12] = [(0, vue.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),
386
+ (0, vue.createElementVNode)("button", {
387
+ class: "opencode-header-btn display-mode-btn",
388
+ type: "button",
389
+ title: $setup.displayModeIconTitle,
390
+ "aria-label": $setup.displayModeIconLabel,
391
+ onClick: _cache[3] || (_cache[3] = (...args) => $setup.handleToggleDisplayMode && $setup.handleToggleDisplayMode(...args))
392
+ }, [(0, vue.renderSlot)(_ctx.$slots, "display-mode-icon", {}, () => [$setup.displayMode === "bubble" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_10$1, [..._cache[13] || (_cache[13] = [
393
+ (0, vue.createElementVNode)("circle", {
394
+ cx: "12",
395
+ cy: "12",
396
+ r: "10"
397
+ }, null, -1),
398
+ (0, vue.createElementVNode)("path", {
399
+ d: "M8 14s1.5 2 4 2 4-2 4-2",
400
+ "stroke-linecap": "round"
401
+ }, null, -1),
402
+ (0, vue.createElementVNode)("line", {
403
+ x1: "9",
404
+ y1: "9",
405
+ x2: "9.01",
406
+ y2: "9",
407
+ "stroke-linecap": "round"
408
+ }, null, -1),
409
+ (0, vue.createElementVNode)("line", {
410
+ x1: "15",
411
+ y1: "9",
412
+ x2: "15.01",
413
+ y2: "9",
414
+ "stroke-linecap": "round"
415
+ }, null, -1)
416
+ ])])) : $setup.displayMode === "split" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_11, [..._cache[14] || (_cache[14] = [(0, vue.createElementVNode)("rect", {
417
+ x: "3",
418
+ y: "3",
419
+ width: "18",
420
+ height: "18",
421
+ rx: "2"
422
+ }, null, -1), (0, vue.createElementVNode)("line", {
423
+ x1: "12",
424
+ y1: "3",
425
+ x2: "12",
426
+ y2: "21"
427
+ }, null, -1)])])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_12, [..._cache[15] || (_cache[15] = [
428
+ (0, vue.createElementVNode)("rect", {
429
+ x: "3",
430
+ y: "3",
431
+ width: "8",
432
+ height: "8",
433
+ rx: "1"
434
+ }, null, -1),
435
+ (0, vue.createElementVNode)("rect", {
436
+ x: "15",
437
+ y: "3",
438
+ width: "6",
439
+ height: "8",
440
+ rx: "1"
441
+ }, null, -1),
442
+ (0, vue.createElementVNode)("rect", {
443
+ x: "3",
444
+ y: "15",
445
+ width: "8",
446
+ height: "6",
447
+ rx: "1"
448
+ }, null, -1),
449
+ (0, vue.createElementVNode)("circle", {
450
+ cx: "18",
451
+ cy: "18",
452
+ r: "3"
453
+ }, null, -1)
454
+ ])]))])], 8, _hoisted_9$1)
301
455
  ]),
302
- (0, vue.createElementVNode)("span", _hoisted_9$1, (0, vue.toDisplayString)($setup.title), 1),
303
- (0, vue.createElementVNode)("div", _hoisted_10$1, [
304
- !$setup.isSplitMode ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
456
+ (0, vue.createElementVNode)("span", _hoisted_13, (0, vue.toDisplayString)($setup.title), 1),
457
+ (0, vue.createElementVNode)("div", _hoisted_14, [
458
+ $setup.isSplitMode ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
305
459
  key: 0,
460
+ class: "opencode-header-btn split-position-btn",
461
+ type: "button",
462
+ title: $setup.splitPositionIconTitle,
463
+ "aria-label": $setup.splitPositionIconLabel,
464
+ onClick: _cache[4] || (_cache[4] = (...args) => $setup.handleToggleSplitPosition && $setup.handleToggleSplitPosition(...args))
465
+ }, [(0, vue.renderSlot)(_ctx.$slots, "split-position-icon", {}, () => [$setup.splitPosition === "right" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_16, [..._cache[16] || (_cache[16] = [(0, vue.createElementVNode)("rect", {
466
+ x: "3",
467
+ y: "3",
468
+ width: "18",
469
+ height: "18",
470
+ rx: "2"
471
+ }, null, -1), (0, vue.createElementVNode)("line", {
472
+ x1: "15",
473
+ y1: "3",
474
+ x2: "15",
475
+ y2: "21"
476
+ }, null, -1)])])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_17, [..._cache[17] || (_cache[17] = [(0, vue.createElementVNode)("rect", {
477
+ x: "3",
478
+ y: "3",
479
+ width: "18",
480
+ height: "18",
481
+ rx: "2"
482
+ }, null, -1), (0, vue.createElementVNode)("line", {
483
+ x1: "9",
484
+ y1: "3",
485
+ x2: "9",
486
+ y2: "21"
487
+ }, null, -1)])]))])], 8, _hoisted_15)) : (0, vue.createCommentVNode)("v-if", true),
488
+ !$setup.isSplitMode ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
489
+ key: 1,
306
490
  class: "opencode-header-btn prompt-dock",
307
491
  type: "button",
308
492
  title: $setup.promptDockVisible ? "隐藏对话框" : "显示对话框",
309
493
  "aria-label": $setup.promptDockVisible ? "隐藏对话框" : "显示对话框",
310
494
  "aria-pressed": $setup.promptDockVisible,
311
- onClick: _cache[3] || (_cache[3] = (...args) => $setup.handleTogglePromptDock && $setup.handleTogglePromptDock(...args))
312
- }, [(0, vue.renderSlot)(_ctx.$slots, "prompt-dock-icon", {}, () => [_cache[11] || (_cache[11] = (0, vue.createElementVNode)("svg", {
495
+ onClick: _cache[5] || (_cache[5] = (...args) => $setup.handleTogglePromptDock && $setup.handleTogglePromptDock(...args))
496
+ }, [(0, vue.renderSlot)(_ctx.$slots, "prompt-dock-icon", {}, () => [_cache[18] || (_cache[18] = (0, vue.createElementVNode)("svg", {
313
497
  viewBox: "0 0 24 24",
314
498
  width: "14",
315
499
  height: "14",
@@ -317,24 +501,24 @@ function __vue_render__$8(_ctx, _cache, $props, $setup, $data, $options) {
317
501
  stroke: "currentColor",
318
502
  "stroke-width": "2",
319
503
  "aria-hidden": "true"
320
- }, [(0, vue.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)) : (0, vue.createCommentVNode)("v-if", true),
504
+ }, [(0, vue.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)) : (0, vue.createCommentVNode)("v-if", true),
321
505
  !$setup.isSplitMode ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
322
- key: 1,
506
+ key: 2,
323
507
  class: "opencode-header-btn minimize",
324
508
  type: "button",
325
509
  title: $setup.minimized ? "展开" : "最小化",
326
510
  "aria-label": $setup.minimized ? "展开面板" : "最小化面板",
327
511
  "aria-pressed": $setup.minimized,
328
- onClick: _cache[4] || (_cache[4] = (...args) => $setup.handleToggleMinimize && $setup.handleToggleMinimize(...args))
329
- }, [(0, vue.renderSlot)(_ctx.$slots, "minimize-icon", {}, () => [$setup.minimized ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_13, [..._cache[12] || (_cache[12] = [(0, vue.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)])])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_14, [..._cache[13] || (_cache[13] = [(0, vue.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)) : (0, vue.createCommentVNode)("v-if", true),
512
+ onClick: _cache[6] || (_cache[6] = (...args) => $setup.handleToggleMinimize && $setup.handleToggleMinimize(...args))
513
+ }, [(0, vue.renderSlot)(_ctx.$slots, "minimize-icon", {}, () => [$setup.minimized ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_20, [..._cache[19] || (_cache[19] = [(0, vue.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)])])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_21, [..._cache[20] || (_cache[20] = [(0, vue.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)) : (0, vue.createCommentVNode)("v-if", true),
330
514
  !$setup.isSplitMode ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
331
- key: 2,
515
+ key: 3,
332
516
  class: "opencode-header-btn close",
333
517
  type: "button",
334
518
  title: "关闭",
335
519
  "aria-label": "关闭面板",
336
- onClick: _cache[5] || (_cache[5] = (...args) => $setup.handleClose && $setup.handleClose(...args))
337
- }, [(0, vue.renderSlot)(_ctx.$slots, "close-icon", {}, () => [_cache[14] || (_cache[14] = (0, vue.createElementVNode)("svg", {
520
+ onClick: _cache[7] || (_cache[7] = (...args) => $setup.handleClose && $setup.handleClose(...args))
521
+ }, [(0, vue.renderSlot)(_ctx.$slots, "close-icon", {}, () => [_cache[21] || (_cache[21] = (0, vue.createElementVNode)("svg", {
338
522
  viewBox: "0 0 24 24",
339
523
  width: "14",
340
524
  height: "14",
@@ -420,8 +604,8 @@ var _hoisted_4$3 = {
420
604
  };
421
605
  var _hoisted_5$3 = ["aria-selected", "onClick"];
422
606
  var _hoisted_6$3 = { class: "opencode-session-header" };
423
- var _hoisted_7$1 = { class: "opencode-session-title" };
424
- var _hoisted_8 = {
607
+ var _hoisted_7$2 = { class: "opencode-session-title" };
608
+ var _hoisted_8$1 = {
425
609
  key: 0,
426
610
  class: "opencode-thinking-loading"
427
611
  };
@@ -453,7 +637,7 @@ function __vue_render__$7(_ctx, _cache, $props, $setup, $data, $options) {
453
637
  role: "option",
454
638
  "aria-selected": item.active,
455
639
  onClick: ($event) => $setup.handleSelectSession(item)
456
- }, [(0, vue.createElementVNode)("div", _hoisted_6$3, [(0, vue.createElementVNode)("div", _hoisted_7$1, [$setup.isSessionThinking(item.id) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_8)) : (0, vue.createCommentVNode)("v-if", true), (0, vue.createTextVNode)(" " + (0, vue.toDisplayString)(item.title), 1)]), (0, vue.createElementVNode)("button", {
640
+ }, [(0, vue.createElementVNode)("div", _hoisted_6$3, [(0, vue.createElementVNode)("div", _hoisted_7$2, [$setup.isSessionThinking(item.id) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_8$1)) : (0, vue.createCommentVNode)("v-if", true), (0, vue.createTextVNode)(" " + (0, vue.toDisplayString)(item.title), 1)]), (0, vue.createElementVNode)("button", {
457
641
  class: "opencode-session-delete-btn",
458
642
  type: "button",
459
643
  "aria-label": `\u5220\u9664\u4F1A\u8BDD: ${item.title}`,
@@ -740,6 +924,11 @@ var __vue_sfc__$4 = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps$2(__s
740
924
  type: String,
741
925
  required: false,
742
926
  default: "light"
927
+ },
928
+ splitPosition: {
929
+ type: String,
930
+ required: false,
931
+ default: "right"
743
932
  }
744
933
  },
745
934
  emits: [
@@ -796,7 +985,9 @@ var __vue_sfc__$4 = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps$2(__s
796
985
  minimized: props.minimized,
797
986
  dragging: props.dragging,
798
987
  "no-transition": props.noTransition,
799
- "split-mode": props.mode === "split"
988
+ "split-mode": props.mode === "split",
989
+ "split-left": props.mode === "split" && props.splitPosition === "left",
990
+ "split-right": props.mode === "split" && props.splitPosition === "right"
800
991
  }]),
801
992
  Frame: Frame_vue_default,
802
993
  Header: Header_vue_default,
@@ -832,11 +1023,29 @@ var _hoisted_4$1 = {
832
1023
  "stroke-width": "2"
833
1024
  };
834
1025
  var _hoisted_5$1 = {
1026
+ key: 2,
1027
+ viewBox: "0 0 24 24",
1028
+ width: "16",
1029
+ height: "16",
1030
+ fill: "none",
1031
+ stroke: "currentColor",
1032
+ "stroke-width": "2"
1033
+ };
1034
+ var _hoisted_6$1 = {
1035
+ key: 3,
1036
+ viewBox: "0 0 24 24",
1037
+ width: "16",
1038
+ height: "16",
1039
+ fill: "none",
1040
+ stroke: "currentColor",
1041
+ "stroke-width": "2"
1042
+ };
1043
+ var _hoisted_7$1 = {
835
1044
  key: 2,
836
1045
  class: "opencode-notification",
837
1046
  role: "alert"
838
1047
  };
839
- var _hoisted_6$1 = { class: "opencode-chat-content" };
1048
+ var _hoisted_8 = { class: "opencode-chat-content" };
840
1049
  function __vue_render__$4(_ctx, _cache, $props, $setup, $data, $options) {
841
1050
  return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
842
1051
  class: (0, vue.normalizeClass)($setup.panelClasses),
@@ -861,20 +1070,34 @@ function __vue_render__$4(_ctx, _cache, $props, $setup, $data, $options) {
861
1070
  class: (0, vue.normalizeClass)(["opencode-split-toggle-btn", {
862
1071
  open: $setup.props.open,
863
1072
  thinking: $setup.props.thinking,
864
- "opencode-theme-dark": $props.resolvedTheme === "dark"
1073
+ "opencode-theme-dark": $props.resolvedTheme === "dark",
1074
+ "split-left": $props.splitPosition === "left"
865
1075
  }]),
866
1076
  "aria-expanded": $props.open,
867
1077
  "aria-label": "切换面板",
868
1078
  onClick: $setup.handleToggle
869
- }, [(0, vue.createElementVNode)("span", _hoisted_2$1, [$props.open ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_3$1, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", {
870
- d: "M9 18l6-6-6-6",
871
- "stroke-linecap": "round",
872
- "stroke-linejoin": "round"
873
- }, null, -1)])])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_4$1, [..._cache[1] || (_cache[1] = [(0, vue.createElementVNode)("path", {
874
- d: "M15 18l-6-6 6-6",
875
- "stroke-linecap": "round",
876
- "stroke-linejoin": "round"
877
- }, null, -1)])]))])], 10, _hoisted_1$3)) : (0, vue.createCommentVNode)("v-if", true),
1079
+ }, [(0, vue.createElementVNode)("span", _hoisted_2$1, [
1080
+ $props.open && $props.splitPosition === "right" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_3$1, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", {
1081
+ d: "M9 18l6-6-6-6",
1082
+ "stroke-linecap": "round",
1083
+ "stroke-linejoin": "round"
1084
+ }, null, -1)])])) : (0, vue.createCommentVNode)("v-if", true),
1085
+ !$props.open && $props.splitPosition === "right" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_4$1, [..._cache[1] || (_cache[1] = [(0, vue.createElementVNode)("path", {
1086
+ d: "M15 18l-6-6 6-6",
1087
+ "stroke-linecap": "round",
1088
+ "stroke-linejoin": "round"
1089
+ }, null, -1)])])) : (0, vue.createCommentVNode)("v-if", true),
1090
+ $props.open && $props.splitPosition === "left" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_5$1, [..._cache[2] || (_cache[2] = [(0, vue.createElementVNode)("path", {
1091
+ d: "M15 18l-6-6 6-6",
1092
+ "stroke-linecap": "round",
1093
+ "stroke-linejoin": "round"
1094
+ }, null, -1)])])) : (0, vue.createCommentVNode)("v-if", true),
1095
+ !$props.open && $props.splitPosition === "left" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_6$1, [..._cache[3] || (_cache[3] = [(0, vue.createElementVNode)("path", {
1096
+ d: "M9 18l6-6-6-6",
1097
+ "stroke-linecap": "round",
1098
+ "stroke-linejoin": "round"
1099
+ }, null, -1)])])) : (0, vue.createCommentVNode)("v-if", true)
1100
+ ])], 10, _hoisted_1$3)) : (0, vue.createCommentVNode)("v-if", true),
878
1101
  (0, vue.createVNode)($setup["Header"], null, (0, vue.createSlots)({ _: 2 }, [
879
1102
  $setup.slots["session-toggle-icon"] ? {
880
1103
  name: "session-toggle-icon",
@@ -892,10 +1115,10 @@ function __vue_render__$4(_ctx, _cache, $props, $setup, $data, $options) {
892
1115
  key: "2"
893
1116
  } : void 0
894
1117
  ]), 1024),
895
- $props.notificationVisible && $props.notificationMode === "widget" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_5$1, (0, vue.toDisplayString)($props.notificationMessage), 1)) : (0, vue.createCommentVNode)("v-if", true),
896
- (0, vue.createElementVNode)("div", _hoisted_6$1, [
1118
+ $props.notificationVisible && $props.notificationMode === "widget" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_7$1, (0, vue.toDisplayString)($props.notificationMessage), 1)) : (0, vue.createCommentVNode)("v-if", true),
1119
+ (0, vue.createElementVNode)("div", _hoisted_8, [
897
1120
  (0, vue.createVNode)($setup["SessionList"], null, {
898
- empty: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "sessions-empty", {}, () => [_cache[2] || (_cache[2] = (0, vue.createElementVNode)("div", { class: "opencode-session-empty" }, "暂无会话", -1))])]),
1121
+ empty: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "sessions-empty", {}, () => [_cache[4] || (_cache[4] = (0, vue.createElementVNode)("div", { class: "opencode-session-empty" }, "暂无会话", -1))])]),
899
1122
  _: 3
900
1123
  }),
901
1124
  (0, vue.createVNode)($setup["Frame"], { ref: "frameRef" }, (0, vue.createSlots)({ _: 2 }, [
@@ -1987,7 +2210,7 @@ function usePersistState(options) {
1987
2210
  return saved;
1988
2211
  };
1989
2212
  const getCurrentState = () => {
1990
- var _a;
2213
+ var _a, _b, _c;
1991
2214
  return {
1992
2215
  open: options.open.value,
1993
2216
  minimized: options.minimized.value,
@@ -1995,7 +2218,9 @@ function usePersistState(options) {
1995
2218
  bubbleOffset: options.bubbleOffset.value,
1996
2219
  theme: options.theme.value,
1997
2220
  sessionListCollapsed: options.sessionListCollapsed.value,
1998
- splitPanelWidth: (_a = options.splitPanelWidth) == null ? void 0 : _a.value
2221
+ splitPanelWidth: (_a = options.splitPanelWidth) == null ? void 0 : _a.value,
2222
+ displayMode: (_b = options.displayMode) == null ? void 0 : _b.value,
2223
+ splitPosition: (_c = options.splitPosition) == null ? void 0 : _c.value
1999
2224
  };
2000
2225
  };
2001
2226
  const persistState = () => {
@@ -2010,6 +2235,8 @@ function usePersistState(options) {
2010
2235
  options.sessionListCollapsed
2011
2236
  ];
2012
2237
  if (options.splitPanelWidth) watchers.push(options.splitPanelWidth);
2238
+ if (options.displayMode) watchers.push(options.displayMode);
2239
+ if (options.splitPosition) watchers.push(options.splitPosition);
2013
2240
  (0, vue.onMounted)(() => {
2014
2241
  restoreState();
2015
2242
  (0, vue.watch)(watchers, () => {
@@ -2025,17 +2252,20 @@ function usePersistState(options) {
2025
2252
  //#region es/open-code-widget/composables/use-split.js
2026
2253
  var AUTO_MODE_THRESHOLD = 1440;
2027
2254
  function useSplitMode(options) {
2255
+ var _a, _b;
2028
2256
  const windowWidth = (0, vue.ref)(typeof window !== "undefined" ? window.innerWidth : 0);
2257
+ const localSplitPosition = (0, vue.ref)((_b = (_a = options.splitPosition) == null ? void 0 : _a.value) != null ? _b : "right");
2029
2258
  const splitConfig = (0, vue.computed)(() => {
2030
- var _a, _b, _c, _d, _e, _f;
2259
+ var _a2, _b2, _c, _d, _e, _f, _g;
2031
2260
  const config = options.splitMode.value || {};
2032
2261
  return {
2033
- width: (_a = config.width) != null ? _a : 500,
2034
- minWidth: (_b = config.minWidth) != null ? _b : 400,
2262
+ width: (_a2 = config.width) != null ? _a2 : 500,
2263
+ minWidth: (_b2 = config.minWidth) != null ? _b2 : 400,
2035
2264
  maxWidth: (_c = config.maxWidth) != null ? _c : 800,
2036
2265
  resizable: (_d = config.resizable) != null ? _d : true,
2037
2266
  shrinkPage: (_e = config.shrinkPage) != null ? _e : true,
2038
- defaultOpen: (_f = config.defaultOpen) != null ? _f : true
2267
+ defaultOpen: (_f = config.defaultOpen) != null ? _f : true,
2268
+ position: (_g = config.position) != null ? _g : localSplitPosition.value
2039
2269
  };
2040
2270
  });
2041
2271
  const panelWidth = (0, vue.ref)(splitConfig.value.width);
@@ -2045,15 +2275,22 @@ function useSplitMode(options) {
2045
2275
  return windowWidth.value >= AUTO_MODE_THRESHOLD ? "split" : "bubble";
2046
2276
  });
2047
2277
  const isSplitMode = (0, vue.computed)(() => effectiveMode.value === "split");
2278
+ const splitPosition = (0, vue.computed)(() => splitConfig.value.position);
2048
2279
  const handleResize = (width) => {
2049
- var _a;
2280
+ var _a2;
2050
2281
  panelWidth.value = width;
2051
- (_a = options.onWidthChange) == null || _a.call(options, width);
2282
+ (_a2 = options.onWidthChange) == null || _a2.call(options, width);
2052
2283
  };
2053
2284
  const handleToggle = () => {
2054
- var _a;
2285
+ var _a2;
2055
2286
  const nextOpen = !options.open.value;
2056
- (_a = options.onOpenChange) == null || _a.call(options, nextOpen);
2287
+ (_a2 = options.onOpenChange) == null || _a2.call(options, nextOpen);
2288
+ };
2289
+ const handleTogglePosition = () => {
2290
+ var _a2;
2291
+ const nextPosition = localSplitPosition.value === "right" ? "left" : "right";
2292
+ localSplitPosition.value = nextPosition;
2293
+ (_a2 = options.onPositionChange) == null || _a2.call(options, nextPosition);
2057
2294
  };
2058
2295
  const handleWindowResize = () => {
2059
2296
  if (typeof window !== "undefined") windowWidth.value = window.innerWidth;
@@ -2063,31 +2300,49 @@ function useSplitMode(options) {
2063
2300
  if (isSplitMode.value && options.open.value && splitConfig.value.shrinkPage) {
2064
2301
  document.body.classList.add("has-opencode-split");
2065
2302
  document.body.style.setProperty("--opencode-split-width", `${panelWidth.value}px`);
2303
+ if (splitPosition.value === "left") {
2304
+ document.body.classList.add("has-opencode-split-left");
2305
+ document.body.classList.remove("has-opencode-split-right");
2306
+ } else {
2307
+ document.body.classList.add("has-opencode-split-right");
2308
+ document.body.classList.remove("has-opencode-split-left");
2309
+ }
2066
2310
  } else {
2067
2311
  document.body.classList.remove("has-opencode-split");
2312
+ document.body.classList.remove("has-opencode-split-left");
2313
+ document.body.classList.remove("has-opencode-split-right");
2068
2314
  document.body.style.removeProperty("--opencode-split-width");
2069
2315
  }
2070
2316
  };
2071
2317
  (0, vue.watch)([
2072
2318
  isSplitMode,
2073
2319
  options.open,
2074
- panelWidth
2320
+ panelWidth,
2321
+ splitPosition
2075
2322
  ], updateBodyClass, { immediate: true });
2076
2323
  (0, vue.watch)(splitConfig, (config) => {
2077
2324
  if (panelWidth.value < config.minWidth) panelWidth.value = config.minWidth;
2078
2325
  if (panelWidth.value > config.maxWidth) panelWidth.value = config.maxWidth;
2079
2326
  });
2327
+ (0, vue.watch)(() => {
2328
+ var _a2;
2329
+ return (_a2 = options.splitPosition) == null ? void 0 : _a2.value;
2330
+ }, (val) => {
2331
+ if (val && val !== localSplitPosition.value) localSplitPosition.value = val;
2332
+ });
2080
2333
  (0, vue.onMounted)(() => {
2081
- var _a;
2334
+ var _a2;
2082
2335
  if (typeof window !== "undefined") {
2083
2336
  window.addEventListener("resize", handleWindowResize);
2084
- if (isSplitMode.value && splitConfig.value.defaultOpen && !options.open.value) (_a = options.onOpenChange) == null || _a.call(options, true);
2337
+ if (isSplitMode.value && splitConfig.value.defaultOpen && !options.open.value) (_a2 = options.onOpenChange) == null || _a2.call(options, true);
2085
2338
  }
2086
2339
  });
2087
2340
  (0, vue.onUnmounted)(() => {
2088
2341
  if (typeof window !== "undefined") {
2089
2342
  window.removeEventListener("resize", handleWindowResize);
2090
2343
  document.body.classList.remove("has-opencode-split");
2344
+ document.body.classList.remove("has-opencode-split-left");
2345
+ document.body.classList.remove("has-opencode-split-right");
2091
2346
  document.body.style.removeProperty("--opencode-split-width");
2092
2347
  }
2093
2348
  });
@@ -2096,8 +2351,10 @@ function useSplitMode(options) {
2096
2351
  isSplitMode,
2097
2352
  panelWidth,
2098
2353
  splitConfig,
2354
+ splitPosition,
2099
2355
  handleResize,
2100
- handleToggle
2356
+ handleToggle,
2357
+ handleTogglePosition
2101
2358
  };
2102
2359
  }
2103
2360
  //#endregion
@@ -2280,6 +2537,7 @@ var __vue_sfc__ = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps(__sprea
2280
2537
  "split-panel-width-change"
2281
2538
  ],
2282
2539
  setup(__props, { expose: __expose, emit: __emit }) {
2540
+ var _a, _b;
2283
2541
  (0, vue.useCssVars)((_ctx) => ({
2284
2542
  "-chatAnimationOrigin.x": chatAnimationOrigin.value.x,
2285
2543
  "-chatAnimationOrigin.y": chatAnimationOrigin.value.y
@@ -2322,10 +2580,12 @@ var __vue_sfc__ = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps(__sprea
2322
2580
  const frameRef = (0, vue.ref)(null);
2323
2581
  const triggerRef = (0, vue.ref)(null);
2324
2582
  const sendMessageToIframe = (type, data) => {
2325
- var _a;
2326
- (_a = frameRef.value) == null || _a.sendMessageToIframe(type, data);
2583
+ var _a2;
2584
+ (_a2 = frameRef.value) == null || _a2.sendMessageToIframe(type, data);
2327
2585
  };
2328
2586
  const localSessionListCollapsed = (0, vue.ref)(props.sessionListCollapsed);
2587
+ const localDisplayMode = (0, vue.ref)(props.displayMode);
2588
+ const localSplitPosition = (0, vue.ref)((_b = (_a = props.splitMode) == null ? void 0 : _a.position) != null ? _b : "right");
2329
2589
  const minimized = (0, vue.ref)(false);
2330
2590
  const promptDockVisible = (0, vue.ref)(true);
2331
2591
  const isRestoring = (0, vue.ref)(true);
@@ -2347,6 +2607,17 @@ var __vue_sfc__ = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps(__sprea
2347
2607
  (0, vue.watch)(() => props.splitPanelWidth, (val) => {
2348
2608
  splitPanelWidth.value = val;
2349
2609
  });
2610
+ (0, vue.watch)(() => props.displayMode, (val) => {
2611
+ localDisplayMode.value = val;
2612
+ });
2613
+ const handleToggleDisplayMode = () => {
2614
+ const modes = [
2615
+ "bubble",
2616
+ "split",
2617
+ "auto"
2618
+ ];
2619
+ localDisplayMode.value = modes[(modes.indexOf(localDisplayMode.value) + 1) % modes.length];
2620
+ };
2350
2621
  const { buttonActive, containerClasses, iframeSource, sessionListTitle, resolvedTheme, handleClose, handleEmptyAction, handleToggle, handleToggleSessionList, handleToggleTheme } = useWidget({
2351
2622
  theme: (0, vue.toRef)(props, "theme"),
2352
2623
  open: (0, vue.toRef)(props, "open"),
@@ -2419,10 +2690,11 @@ var __vue_sfc__ = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps(__sprea
2419
2690
  }
2420
2691
  });
2421
2692
  const bubbleOffset = (0, vue.ref)(void 0);
2422
- const { effectiveMode, isSplitMode, panelWidth, splitConfig, handleResize, handleToggle: handleSplitToggle } = useSplitMode({
2423
- displayMode: (0, vue.toRef)(props, "displayMode"),
2693
+ const { effectiveMode, isSplitMode, panelWidth, splitConfig, splitPosition, handleResize, handleToggle: handleSplitToggle, handleTogglePosition } = useSplitMode({
2694
+ displayMode: localDisplayMode,
2424
2695
  splitMode: (0, vue.toRef)(props, "splitMode"),
2425
2696
  open: (0, vue.toRef)(props, "open"),
2697
+ splitPosition: localSplitPosition,
2426
2698
  onOpenChange: (nextOpen) => {
2427
2699
  emit("update:open", nextOpen);
2428
2700
  emit("toggle", nextOpen);
@@ -2431,6 +2703,9 @@ var __vue_sfc__ = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps(__sprea
2431
2703
  splitPanelWidth.value = width;
2432
2704
  emit("update:splitPanelWidth", width);
2433
2705
  emit("split-panel-width-change", width);
2706
+ },
2707
+ onPositionChange: (position) => {
2708
+ localSplitPosition.value = position;
2434
2709
  }
2435
2710
  });
2436
2711
  usePersistState({
@@ -2441,6 +2716,8 @@ var __vue_sfc__ = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps(__sprea
2441
2716
  theme: (0, vue.toRef)(props, "theme"),
2442
2717
  sessionListCollapsed: localSessionListCollapsed,
2443
2718
  splitPanelWidth,
2719
+ displayMode: localDisplayMode,
2720
+ splitPosition: localSplitPosition,
2444
2721
  onRestore: (state) => {
2445
2722
  if (state.open !== void 0 && state.open !== props.open) {
2446
2723
  emit("update:open", state.open);
@@ -2468,6 +2745,8 @@ var __vue_sfc__ = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps(__sprea
2468
2745
  if (state.promptDockVisible !== void 0) promptDockVisible.value = state.promptDockVisible;
2469
2746
  else if (minimized.value) promptDockVisible.value = false;
2470
2747
  if (state.splitPanelWidth !== void 0 && state.splitPanelWidth !== props.splitPanelWidth) handleResize(state.splitPanelWidth);
2748
+ if (state.displayMode !== void 0 && state.displayMode !== props.displayMode) localDisplayMode.value = state.displayMode;
2749
+ if (state.splitPosition !== void 0) localSplitPosition.value = state.splitPosition;
2471
2750
  (0, vue.nextTick)(() => {
2472
2751
  syncStateToIframe();
2473
2752
  setTimeout(() => {
@@ -2501,12 +2780,12 @@ var __vue_sfc__ = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps(__sprea
2501
2780
  if (typeof window !== "undefined") window.removeEventListener("resize", handleWindowResize);
2502
2781
  });
2503
2782
  const bubbleQuadrant = (0, vue.computed)(() => {
2504
- var _a, _b, _c, _d;
2783
+ var _a2, _b2, _c, _d;
2505
2784
  if (typeof window === "undefined") return "bottom-right";
2506
2785
  const centerX = windowWidth.value / 2;
2507
2786
  const centerY = windowHeight.value / 2;
2508
2787
  const bubbleSize = 44;
2509
- const currentOffset = (_b = (_a = triggerRef.value) == null ? void 0 : _a.offset) != null ? _b : bubbleOffset.value;
2788
+ const currentOffset = (_b2 = (_a2 = triggerRef.value) == null ? void 0 : _a2.offset) != null ? _b2 : bubbleOffset.value;
2510
2789
  const effectiveX = ((_c = currentOffset == null ? void 0 : currentOffset.x) != null ? _c : windowWidth.value - bubbleSize - 24) + bubbleSize / 2;
2511
2790
  const effectiveY = ((_d = currentOffset == null ? void 0 : currentOffset.y) != null ? _d : windowHeight.value - bubbleSize - 24) + bubbleSize / 2;
2512
2791
  if (effectiveX >= centerX && effectiveY >= centerY) return "bottom-right";
@@ -2519,14 +2798,14 @@ var __vue_sfc__ = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps(__sprea
2519
2798
  return quadrant === "top-right" || quadrant === "bottom-right";
2520
2799
  });
2521
2800
  const chatPositionStyle = (0, vue.computed)(() => {
2522
- var _a, _b, _c;
2801
+ var _a2, _b2, _c;
2523
2802
  if (typeof window === "undefined") return {};
2524
2803
  const chatWidth = minimized.value ? 300 : 700;
2525
2804
  const chatHeight = minimized.value ? 300 : Math.min(windowHeight.value * .86, windowHeight.value - 40);
2526
2805
  const gap = 24;
2527
2806
  const bubbleSize = 44;
2528
2807
  const screenMargin = 20;
2529
- const effectiveOffset = (_c = (_b = (_a = triggerRef.value) == null ? void 0 : _a.offset) != null ? _b : bubbleOffset.value) != null ? _c : {
2808
+ const effectiveOffset = (_c = (_b2 = (_a2 = triggerRef.value) == null ? void 0 : _a2.offset) != null ? _b2 : bubbleOffset.value) != null ? _c : {
2530
2809
  x: windowWidth.value - bubbleSize - gap,
2531
2810
  y: windowHeight.value - bubbleSize - gap
2532
2811
  };
@@ -2619,9 +2898,11 @@ var __vue_sfc__ = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps(__sprea
2619
2898
  promptDockVisible,
2620
2899
  bubbleOffset,
2621
2900
  mode: effectiveMode,
2901
+ displayMode: localDisplayMode,
2902
+ splitPosition,
2622
2903
  sessionStates: (0, vue.computed)(() => {
2623
- var _a;
2624
- return (_a = props.sessionStates) != null ? _a : {};
2904
+ var _a2;
2905
+ return (_a2 = props.sessionStates) != null ? _a2 : {};
2625
2906
  }),
2626
2907
  iframeSource,
2627
2908
  buttonActive,
@@ -2636,6 +2917,8 @@ var __vue_sfc__ = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps(__sprea
2636
2917
  handleTogglePromptDock,
2637
2918
  handleToggleSessionList,
2638
2919
  handleToggleTheme,
2920
+ handleToggleDisplayMode,
2921
+ handleToggleSplitPosition: handleTogglePosition,
2639
2922
  handleEmptyAction,
2640
2923
  handleCreateSession,
2641
2924
  handleSelectSession,
@@ -2682,6 +2965,8 @@ var __vue_sfc__ = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps(__sprea
2682
2965
  triggerRef,
2683
2966
  sendMessageToIframe,
2684
2967
  localSessionListCollapsed,
2968
+ localDisplayMode,
2969
+ localSplitPosition,
2685
2970
  minimized,
2686
2971
  promptDockVisible,
2687
2972
  isRestoring,
@@ -2689,6 +2974,7 @@ var __vue_sfc__ = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps(__sprea
2689
2974
  splitPanelWidth,
2690
2975
  syncStateToIframe,
2691
2976
  handleFrameLoaded,
2977
+ handleToggleDisplayMode,
2692
2978
  buttonActive,
2693
2979
  containerClasses,
2694
2980
  iframeSource,
@@ -2720,8 +3006,10 @@ var __vue_sfc__ = /* @__PURE__ */ (0, vue.defineComponent)(__spreadProps(__sprea
2720
3006
  isSplitMode,
2721
3007
  panelWidth,
2722
3008
  splitConfig,
3009
+ splitPosition,
2723
3010
  handleResize,
2724
3011
  handleSplitToggle,
3012
+ handleTogglePosition,
2725
3013
  handleToggleMinimize,
2726
3014
  handleTogglePromptDock,
2727
3015
  windowWidth,
@@ -2802,6 +3090,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
2802
3090
  "notification-mode": $setup.notificationMode,
2803
3091
  thinking: $props.thinking,
2804
3092
  "resolved-theme": $setup.resolvedTheme,
3093
+ "split-position": $setup.splitPosition,
2805
3094
  onResize: $setup.handleResize,
2806
3095
  onResizeStart: $setup.handleResizeStart,
2807
3096
  onResizeEnd: $setup.handleResizeEnd,
@@ -2862,6 +3151,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
2862
3151
  "notification-mode",
2863
3152
  "thinking",
2864
3153
  "resolved-theme",
3154
+ "split-position",
2865
3155
  "onResize",
2866
3156
  "onToggle"
2867
3157
  ]),
@@ -2890,7 +3180,7 @@ __vue_sfc__.render = __vue_render__;
2890
3180
  var open_code_widget_default = __vue_sfc__;
2891
3181
  //#endregion
2892
3182
  //#region es/index.js
2893
- var version = "1.0.47";
3183
+ var version = "1.0.49";
2894
3184
  function install(app, options) {
2895
3185
  [open_code_widget_default].forEach((item) => {
2896
3186
  if (item.install) app.use(item, options);