@vite-plugin-opencode-assistant/components 1.0.48 → 1.0.50

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 (41) 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 +60 -11
  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/components/ResizeHandle-sfc.css +1 -1
  13. package/es/open-code-widget/src/components/ResizeHandle.vue.d.ts +2 -0
  14. package/es/open-code-widget/src/components/ResizeHandle.vue.js +9 -3
  15. package/es/open-code-widget/src/context.d.ts +5 -1
  16. package/es/open-code-widget/src/index-sfc.css +1 -1
  17. package/es/open-code-widget/src/index.vue.d.ts +1 -1
  18. package/es/open-code-widget/src/index.vue.js +48 -12
  19. package/lib/@vite-plugin-opencode-assistant/components.cjs.js +372 -70
  20. package/lib/@vite-plugin-opencode-assistant/components.es.js +372 -70
  21. package/lib/components.css +3 -3
  22. package/lib/index.d.ts +1 -1
  23. package/lib/index.js +1 -1
  24. package/lib/open-code-widget/composables/use-persist-state.d.ts +5 -1
  25. package/lib/open-code-widget/composables/use-persist-state.js +10 -2
  26. package/lib/open-code-widget/composables/use-split.d.ts +5 -0
  27. package/lib/open-code-widget/composables/use-split.js +46 -12
  28. package/lib/open-code-widget/src/components/ChatPanel-sfc.css +1 -1
  29. package/lib/open-code-widget/src/components/ChatPanel.vue.d.ts +2 -0
  30. package/lib/open-code-widget/src/components/ChatPanel.vue.js +60 -11
  31. package/lib/open-code-widget/src/components/Header.vue.d.ts +8 -4
  32. package/lib/open-code-widget/src/components/Header.vue.js +313 -27
  33. package/lib/open-code-widget/src/components/ResizeHandle-sfc.css +1 -1
  34. package/lib/open-code-widget/src/components/ResizeHandle.vue.d.ts +2 -0
  35. package/lib/open-code-widget/src/components/ResizeHandle.vue.js +9 -3
  36. package/lib/open-code-widget/src/context.d.ts +5 -1
  37. package/lib/open-code-widget/src/index-sfc.css +1 -1
  38. package/lib/open-code-widget/src/index.vue.d.ts +1 -1
  39. package/lib/open-code-widget/src/index.vue.js +48 -12
  40. package/lib/web-types.json +1 -1
  41. package/package.json +2 -2
package/es/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import OpenCodeWidget from './open-code-widget';
2
2
  import type { App } from 'vue';
3
- declare const version = "1.0.48";
3
+ declare const version = "1.0.50";
4
4
  declare function install(app: App<any>, options?: any): void;
5
5
  export { install, version, OpenCodeWidget };
6
6
  export default install;
package/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import OpenCodeWidget from "./open-code-widget";
2
- const version = "1.0.48";
2
+ const version = "1.0.50";
3
3
  function install(app, options) {
4
4
  const components = [
5
5
  OpenCodeWidget
@@ -1,6 +1,6 @@
1
1
  import { type Ref } from "vue";
2
2
  import type { FloatingBubbleOffset } from "../src/components/FloatingBubble/types";
3
- import type { OpenCodeWidgetTheme } from "../src/types";
3
+ import type { OpenCodeWidgetTheme, DisplayMode } from "../src/types";
4
4
  export interface WidgetPersistState {
5
5
  open: boolean;
6
6
  minimized: boolean;
@@ -9,6 +9,8 @@ export interface WidgetPersistState {
9
9
  theme: OpenCodeWidgetTheme;
10
10
  sessionListCollapsed: boolean;
11
11
  splitPanelWidth?: number;
12
+ displayMode?: DisplayMode;
13
+ splitPosition?: "left" | "right";
12
14
  }
13
15
  export interface UsePersistStateOptions {
14
16
  open: Ref<boolean>;
@@ -18,6 +20,8 @@ export interface UsePersistStateOptions {
18
20
  theme: Ref<OpenCodeWidgetTheme>;
19
21
  sessionListCollapsed: Ref<boolean>;
20
22
  splitPanelWidth?: Ref<number>;
23
+ displayMode?: Ref<DisplayMode>;
24
+ splitPosition?: Ref<"left" | "right">;
21
25
  onRestore?: (state: Partial<WidgetPersistState>) => void;
22
26
  }
23
27
  export declare function usePersistState(options: UsePersistStateOptions): {
@@ -29,7 +29,7 @@ function usePersistState(options) {
29
29
  return saved;
30
30
  };
31
31
  const getCurrentState = () => {
32
- var _a;
32
+ var _a, _b, _c;
33
33
  return {
34
34
  open: options.open.value,
35
35
  minimized: options.minimized.value,
@@ -37,7 +37,9 @@ function usePersistState(options) {
37
37
  bubbleOffset: options.bubbleOffset.value,
38
38
  theme: options.theme.value,
39
39
  sessionListCollapsed: options.sessionListCollapsed.value,
40
- splitPanelWidth: (_a = options.splitPanelWidth) == null ? void 0 : _a.value
40
+ splitPanelWidth: (_a = options.splitPanelWidth) == null ? void 0 : _a.value,
41
+ displayMode: (_b = options.displayMode) == null ? void 0 : _b.value,
42
+ splitPosition: (_c = options.splitPosition) == null ? void 0 : _c.value
41
43
  };
42
44
  };
43
45
  const persistState = () => {
@@ -54,6 +56,12 @@ function usePersistState(options) {
54
56
  if (options.splitPanelWidth) {
55
57
  watchers.push(options.splitPanelWidth);
56
58
  }
59
+ if (options.displayMode) {
60
+ watchers.push(options.displayMode);
61
+ }
62
+ if (options.splitPosition) {
63
+ watchers.push(options.splitPosition);
64
+ }
57
65
  onMounted(() => {
58
66
  restoreState();
59
67
  watch(
@@ -4,8 +4,10 @@ export interface UseSplitModeOptions {
4
4
  displayMode: Ref<DisplayMode>;
5
5
  splitMode: Ref<SplitModeOptions | undefined>;
6
6
  open: Ref<boolean>;
7
+ splitPosition?: Ref<"left" | "right">;
7
8
  onOpenChange?: (open: boolean) => void;
8
9
  onWidthChange?: (width: number) => void;
10
+ onPositionChange?: (position: "left" | "right") => void;
9
11
  }
10
12
  export declare function useSplitMode(options: UseSplitModeOptions): {
11
13
  effectiveMode: import("vue").ComputedRef<"bubble" | "split">;
@@ -18,7 +20,10 @@ export declare function useSplitMode(options: UseSplitModeOptions): {
18
20
  resizable: boolean;
19
21
  shrinkPage: boolean;
20
22
  defaultOpen: boolean;
23
+ position: "left" | "right";
21
24
  }>;
25
+ splitPosition: import("vue").ComputedRef<"left" | "right">;
22
26
  handleResize: (width: number) => void;
23
27
  handleToggle: () => void;
28
+ handleTogglePosition: () => void;
24
29
  };
@@ -1,17 +1,20 @@
1
1
  import { ref, computed, watch, onMounted, onUnmounted } from "vue";
2
2
  const AUTO_MODE_THRESHOLD = 1440;
3
3
  function useSplitMode(options) {
4
+ var _a, _b;
4
5
  const windowWidth = ref(typeof window !== "undefined" ? window.innerWidth : 0);
6
+ const localSplitPosition = ref((_b = (_a = options.splitPosition) == null ? void 0 : _a.value) != null ? _b : "right");
5
7
  const splitConfig = computed(() => {
6
- var _a, _b, _c, _d, _e, _f;
8
+ var _a2, _b2, _c, _d, _e, _f, _g;
7
9
  const config = options.splitMode.value || {};
8
10
  return {
9
- width: (_a = config.width) != null ? _a : 500,
10
- minWidth: (_b = config.minWidth) != null ? _b : 400,
11
+ width: (_a2 = config.width) != null ? _a2 : 500,
12
+ minWidth: (_b2 = config.minWidth) != null ? _b2 : 400,
11
13
  maxWidth: (_c = config.maxWidth) != null ? _c : 800,
12
14
  resizable: (_d = config.resizable) != null ? _d : true,
13
15
  shrinkPage: (_e = config.shrinkPage) != null ? _e : true,
14
- defaultOpen: (_f = config.defaultOpen) != null ? _f : true
16
+ defaultOpen: (_f = config.defaultOpen) != null ? _f : true,
17
+ position: (_g = config.position) != null ? _g : localSplitPosition.value
15
18
  };
16
19
  });
17
20
  const panelWidth = ref(splitConfig.value.width);
@@ -25,15 +28,22 @@ function useSplitMode(options) {
25
28
  return windowWidth.value >= AUTO_MODE_THRESHOLD ? "split" : "bubble";
26
29
  });
27
30
  const isSplitMode = computed(() => effectiveMode.value === "split");
31
+ const splitPosition = computed(() => splitConfig.value.position);
28
32
  const handleResize = (width) => {
29
- var _a;
33
+ var _a2;
30
34
  panelWidth.value = width;
31
- (_a = options.onWidthChange) == null ? void 0 : _a.call(options, width);
35
+ (_a2 = options.onWidthChange) == null ? void 0 : _a2.call(options, width);
32
36
  };
33
37
  const handleToggle = () => {
34
- var _a;
38
+ var _a2;
35
39
  const nextOpen = !options.open.value;
36
- (_a = options.onOpenChange) == null ? void 0 : _a.call(options, nextOpen);
40
+ (_a2 = options.onOpenChange) == null ? void 0 : _a2.call(options, nextOpen);
41
+ };
42
+ const handleTogglePosition = () => {
43
+ var _a2;
44
+ const nextPosition = localSplitPosition.value === "right" ? "left" : "right";
45
+ localSplitPosition.value = nextPosition;
46
+ (_a2 = options.onPositionChange) == null ? void 0 : _a2.call(options, nextPosition);
37
47
  };
38
48
  const handleWindowResize = () => {
39
49
  if (typeof window !== "undefined") {
@@ -46,12 +56,21 @@ function useSplitMode(options) {
46
56
  if (shouldShrink) {
47
57
  document.body.classList.add("has-opencode-split");
48
58
  document.body.style.setProperty("--opencode-split-width", `${panelWidth.value}px`);
59
+ if (splitPosition.value === "left") {
60
+ document.body.classList.add("has-opencode-split-left");
61
+ document.body.classList.remove("has-opencode-split-right");
62
+ } else {
63
+ document.body.classList.add("has-opencode-split-right");
64
+ document.body.classList.remove("has-opencode-split-left");
65
+ }
49
66
  } else {
50
67
  document.body.classList.remove("has-opencode-split");
68
+ document.body.classList.remove("has-opencode-split-left");
69
+ document.body.classList.remove("has-opencode-split-right");
51
70
  document.body.style.removeProperty("--opencode-split-width");
52
71
  }
53
72
  };
54
- watch([isSplitMode, options.open, panelWidth], updateBodyClass, { immediate: true });
73
+ watch([isSplitMode, options.open, panelWidth, splitPosition], updateBodyClass, { immediate: true });
55
74
  watch(splitConfig, (config) => {
56
75
  if (panelWidth.value < config.minWidth) {
57
76
  panelWidth.value = config.minWidth;
@@ -60,12 +79,23 @@ function useSplitMode(options) {
60
79
  panelWidth.value = config.maxWidth;
61
80
  }
62
81
  });
82
+ watch(
83
+ () => {
84
+ var _a2;
85
+ return (_a2 = options.splitPosition) == null ? void 0 : _a2.value;
86
+ },
87
+ (val) => {
88
+ if (val && val !== localSplitPosition.value) {
89
+ localSplitPosition.value = val;
90
+ }
91
+ }
92
+ );
63
93
  onMounted(() => {
64
- var _a;
94
+ var _a2;
65
95
  if (typeof window !== "undefined") {
66
96
  window.addEventListener("resize", handleWindowResize);
67
97
  if (isSplitMode.value && splitConfig.value.defaultOpen && !options.open.value) {
68
- (_a = options.onOpenChange) == null ? void 0 : _a.call(options, true);
98
+ (_a2 = options.onOpenChange) == null ? void 0 : _a2.call(options, true);
69
99
  }
70
100
  }
71
101
  });
@@ -73,6 +103,8 @@ function useSplitMode(options) {
73
103
  if (typeof window !== "undefined") {
74
104
  window.removeEventListener("resize", handleWindowResize);
75
105
  document.body.classList.remove("has-opencode-split");
106
+ document.body.classList.remove("has-opencode-split-left");
107
+ document.body.classList.remove("has-opencode-split-right");
76
108
  document.body.style.removeProperty("--opencode-split-width");
77
109
  }
78
110
  });
@@ -81,8 +113,10 @@ function useSplitMode(options) {
81
113
  isSplitMode,
82
114
  panelWidth,
83
115
  splitConfig,
116
+ splitPosition,
84
117
  handleResize,
85
- handleToggle
118
+ handleToggle,
119
+ handleTogglePosition
86
120
  };
87
121
  }
88
122
  export {
@@ -1 +1 @@
1
- .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;display:flex;flex-direction:column;z-index:99999}.opencode-chat:not(.split-mode){opacity:0;visibility:hidden;transition:all .3s ease;transform:translate3d(var(---animationOrigin\.x),var(---animationOrigin\.y),0) scale(.95)}.opencode-chat.split-mode{position:fixed;right:0;top:0;bottom:0;height:100vh;max-height:100vh;border-radius:0;border-left:1px solid var(--oc-border-primary);box-shadow:var(--oc-shadow-lg);transform:translate(100%);overflow:visible;opacity:1;visibility:visible;transition:transform .3s ease}.opencode-chat.split-mode .opencode-chat-content{overflow:hidden;flex:1}.opencode-chat.split-mode.open{transform:translate(0)}.opencode-chat.split-mode.dragging{transition:none}.opencode-chat.dragging .opencode-iframe{pointer-events:none}.opencode-chat:not(.split-mode){opacity:0;visibility:hidden;transition:all .3s ease}.opencode-chat:not(.split-mode).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:300px;height:300px}.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;z-index:100;animation:opencode-notification-fade-in .3s ease}@keyframes opencode-notification-fade-in{0%{opacity:0;transform:translate(-50%) translateY(-10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.opencode-session-empty{padding:24px;text-align:center;color:var(--oc-text-placeholder);font-size:14px}.opencode-split-toggle-btn{position:absolute;left:-21px;top:50%;transform:translateY(-50%);width:20px;height:48px;background:#fff;border:none;border-radius:8px 0 0 8px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#667eea;box-shadow:0 4px 12px rgba(102,126,234,.4);transition:all .3s ease;z-index:5;transform-origin:right center}.opencode-split-toggle-btn:hover{transform:translateY(-50%) scale(1.1);box-shadow:0 6px 16px rgba(102,126,234,.5)}.opencode-split-toggle-btn.opencode-theme-dark{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;box-shadow:0 4px 12px rgba(102,126,234,.3)}.opencode-split-toggle-btn.opencode-theme-dark:before{content:"";position:absolute;left:-2px;top:-2px;right:0;bottom:-2px;border-radius:8px 0 0 8px;background:linear-gradient(135deg,#8b9cf5,#9d6bc7);z-index:-1}.opencode-split-toggle-btn.opencode-theme-dark:hover{box-shadow:0 6px 16px rgba(102,126,234,.4)}.opencode-split-toggle-btn.thinking{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;animation:split-thinking-glow 2s ease-in-out infinite,split-thinking-pulse 2s ease-in-out infinite;box-shadow:0 0 20px rgba(102,126,234,.6),0 0 40px rgba(118,75,162,.4),0 0 60px rgba(102,126,234,.2)}.opencode-split-toggle-btn.thinking:before{content:"";position:absolute;left:-2px;top:-2px;right:0;bottom:-2px;border-radius:8px 0 0 8px;background:linear-gradient(135deg,#8b9cf5,#9d6bc7);z-index:-1}.opencode-split-toggle-btn.thinking:after{content:"";position:absolute;left:-3px;top:-3px;right:-1px;bottom:-3px;border-radius:8px 0 0 8px;background:conic-gradient(from 180deg,transparent,rgba(102,126,234,.3),transparent,rgba(118,75,162,.3),transparent);z-index:-2;animation:split-thinking-rotate 2s linear infinite reverse;filter:blur(8px)}@keyframes split-thinking-glow{0%,to{box-shadow:0 0 20px rgba(102,126,234,.6),0 0 40px rgba(118,75,162,.4),0 0 60px rgba(102,126,234,.2)}50%{box-shadow:0 0 30px rgba(102,126,234,.8),0 0 60px rgba(118,75,162,.6),0 0 90px rgba(102,126,234,.3)}}@keyframes split-thinking-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes split-thinking-pulse{0%,to{transform:translateY(-50%) scale(1)}50%{transform:translateY(-50%) scale(.92)}}.opencode-split-toggle-icon{display:flex;align-items:center;justify-content:center;transition:transform .25s ease}.opencode-split-toggle-btn:hover .opencode-split-toggle-icon{transform:scale(1.1)}
1
+ .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;display:flex;flex-direction:column;z-index:99999}.opencode-chat:not(.split-mode){opacity:0;visibility:hidden;transition:all .3s ease;transform:translate3d(var(---animationOrigin\.x),var(---animationOrigin\.y),0) scale(.95)}.opencode-chat.split-mode{position:fixed;top:0;bottom:0;height:100vh;max-height:100vh;border-radius:0;box-shadow:var(--oc-shadow-lg);overflow:visible;opacity:1;visibility:visible;transition:transform .3s ease}.opencode-chat.split-mode.split-right{right:0;border-left:1px solid var(--oc-border-primary);transform:translate(100%)}.opencode-chat.split-mode.split-left{left:0;border-right:1px solid var(--oc-border-primary);transform:translate(-100%)}.opencode-chat.split-mode .opencode-chat-content{overflow:hidden;flex:1}.opencode-chat.split-mode.open{transform:translate(0)}.opencode-chat.split-mode.dragging{transition:none}.opencode-chat.dragging .opencode-iframe{pointer-events:none}.opencode-chat:not(.split-mode){opacity:0;visibility:hidden;transition:all .3s ease}.opencode-chat:not(.split-mode).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:not(.split-mode){width:320px;height:320px}.opencode-chat.minimized:not(.split-mode) .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;z-index:100;animation:opencode-notification-fade-in .3s ease}@keyframes opencode-notification-fade-in{0%{opacity:0;transform:translate(-50%) translateY(-10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.opencode-session-empty{padding:24px;text-align:center;color:var(--oc-text-placeholder);font-size:14px}.opencode-split-toggle-btn{position:absolute;left:-21px;top:50%;transform:translateY(-50%);width:20px;height:48px;background:#fff;border:none;border-radius:8px 0 0 8px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#667eea;box-shadow:0 4px 12px rgba(102,126,234,.4);transition:all .3s ease;z-index:5;transform-origin:right center}.opencode-split-toggle-btn.split-left{left:auto;right:-21px;border-radius:0 8px 8px 0;transform-origin:left center}.opencode-split-toggle-btn:hover{transform:translateY(-50%) scale(1.1);box-shadow:0 6px 16px rgba(102,126,234,.5)}.opencode-split-toggle-btn.split-left:hover{transform:translateY(-50%) scale(1.1)}.opencode-split-toggle-btn.opencode-theme-dark{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;box-shadow:0 4px 12px rgba(102,126,234,.3)}.opencode-split-toggle-btn.opencode-theme-dark:before{content:"";position:absolute;left:-2px;top:-2px;right:0;bottom:-2px;border-radius:8px 0 0 8px;background:linear-gradient(135deg,#8b9cf5,#9d6bc7);z-index:-1}.opencode-split-toggle-btn.opencode-theme-dark.split-left:before{left:0;right:-2px;border-radius:0 8px 8px 0}.opencode-split-toggle-btn.opencode-theme-dark:hover{box-shadow:0 6px 16px rgba(102,126,234,.4)}.opencode-split-toggle-btn.thinking{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;animation:split-thinking-glow 2s ease-in-out infinite,split-thinking-pulse 2s ease-in-out infinite;box-shadow:0 0 20px rgba(102,126,234,.6),0 0 40px rgba(118,75,162,.4),0 0 60px rgba(102,126,234,.2)}.opencode-split-toggle-btn.thinking:before{content:"";position:absolute;left:-2px;top:-2px;right:0;bottom:-2px;border-radius:8px 0 0 8px;background:linear-gradient(135deg,#8b9cf5,#9d6bc7);z-index:-1}.opencode-split-toggle-btn.thinking.split-left:before{left:0;right:-2px;border-radius:0 8px 8px 0}.opencode-split-toggle-btn.thinking:after{content:"";position:absolute;left:-3px;top:-3px;right:-1px;bottom:-3px;border-radius:8px 0 0 8px;background:conic-gradient(from 180deg,transparent,rgba(102,126,234,.3),transparent,rgba(118,75,162,.3),transparent);z-index:-2;animation:split-thinking-rotate 2s linear infinite reverse;filter:blur(8px)}.opencode-split-toggle-btn.thinking.split-left:after{left:-1px;right:-3px;border-radius:0 8px 8px 0}@keyframes split-thinking-glow{0%,to{box-shadow:0 0 20px rgba(102,126,234,.6),0 0 40px rgba(118,75,162,.4),0 0 60px rgba(102,126,234,.2)}50%{box-shadow:0 0 30px rgba(102,126,234,.8),0 0 60px rgba(118,75,162,.6),0 0 90px rgba(102,126,234,.3)}}@keyframes split-thinking-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes split-thinking-pulse{0%,to{transform:translateY(-50%) scale(1)}50%{transform:translateY(-50%) scale(.92)}}.opencode-split-toggle-icon{display:flex;align-items:center;justify-content:center;transition:transform .25s ease}.opencode-split-toggle-btn:hover .opencode-split-toggle-icon{transform:scale(1.1)}
@@ -18,6 +18,7 @@ type __VLS_Props = {
18
18
  notificationMode?: "widget" | "page";
19
19
  thinking?: boolean;
20
20
  resolvedTheme?: "light" | "dark";
21
+ splitPosition?: "left" | "right";
21
22
  };
22
23
  declare var __VLS_13: {}, __VLS_15: {}, __VLS_17: {}, __VLS_22: {}, __VLS_29: {}, __VLS_31: {}, __VLS_33: {}, __VLS_35: {};
23
24
  type __VLS_Slots = {} & {
@@ -154,6 +155,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
154
155
  resolvedTheme: "light" | "dark";
155
156
  minimized: boolean;
156
157
  mode: "bubble" | "split";
158
+ splitPosition: "left" | "right";
157
159
  thinking: boolean;
158
160
  minWidth: number;
159
161
  maxWidth: number;
@@ -45,7 +45,8 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent(__spreadProps(__spreadValue
45
45
  notificationMessage: { type: String, required: false, default: "" },
46
46
  notificationMode: { type: String, required: false, default: "widget" },
47
47
  thinking: { type: Boolean, required: false, default: false },
48
- resolvedTheme: { type: String, required: false, default: "light" }
48
+ resolvedTheme: { type: String, required: false, default: "light" },
49
+ splitPosition: { type: String, required: false, default: "right" }
49
50
  },
50
51
  emits: ["resize", "resize-start", "resize-end", "toggle"],
51
52
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -92,7 +93,9 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent(__spreadProps(__spreadValue
92
93
  minimized: props.minimized,
93
94
  dragging: props.dragging,
94
95
  "no-transition": props.noTransition,
95
- "split-mode": props.mode === "split"
96
+ "split-mode": props.mode === "split",
97
+ "split-left": props.mode === "split" && props.splitPosition === "left",
98
+ "split-right": props.mode === "split" && props.splitPosition === "right"
96
99
  }
97
100
  ]);
98
101
  const __returned__ = { props, emit, slots, frameRef, sendMessageToIframe, handleResizeStart, handleResize, handleResizeEnd, handleToggle, panelStyle, panelClasses, Frame, Header, SessionList, SelectedNodes, ResizeHandle };
@@ -122,11 +125,29 @@ const _hoisted_4 = {
122
125
  "stroke-width": "2"
123
126
  };
124
127
  const _hoisted_5 = {
128
+ key: 2,
129
+ viewBox: "0 0 24 24",
130
+ width: "16",
131
+ height: "16",
132
+ fill: "none",
133
+ stroke: "currentColor",
134
+ "stroke-width": "2"
135
+ };
136
+ const _hoisted_6 = {
137
+ key: 3,
138
+ viewBox: "0 0 24 24",
139
+ width: "16",
140
+ height: "16",
141
+ fill: "none",
142
+ stroke: "currentColor",
143
+ "stroke-width": "2"
144
+ };
145
+ const _hoisted_7 = {
125
146
  key: 2,
126
147
  class: "opencode-notification",
127
148
  role: "alert"
128
149
  };
129
- const _hoisted_6 = { class: "opencode-chat-content" };
150
+ const _hoisted_8 = { class: "opencode-chat-content" };
130
151
  function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
131
152
  return _openBlock(), _createElementBlock(
132
153
  "div",
@@ -140,20 +161,21 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
140
161
  width: $props.panelWidth,
141
162
  "min-width": $props.minWidth,
142
163
  "max-width": $props.maxWidth,
164
+ position: $props.splitPosition,
143
165
  onResize: $setup.handleResize,
144
166
  onResizeStart: $setup.handleResizeStart,
145
167
  onResizeEnd: $setup.handleResizeEnd
146
- }, null, 8, ["width", "min-width", "max-width"])) : _createCommentVNode("v-if", true),
168
+ }, null, 8, ["width", "min-width", "max-width", "position"])) : _createCommentVNode("v-if", true),
147
169
  $props.mode === "split" ? (_openBlock(), _createElementBlock("button", {
148
170
  key: 1,
149
171
  type: "button",
150
- class: _normalizeClass(["opencode-split-toggle-btn", { open: $setup.props.open, thinking: $setup.props.thinking, "opencode-theme-dark": $props.resolvedTheme === "dark" }]),
172
+ class: _normalizeClass(["opencode-split-toggle-btn", { open: $setup.props.open, thinking: $setup.props.thinking, "opencode-theme-dark": $props.resolvedTheme === "dark", "split-left": $props.splitPosition === "left" }]),
151
173
  "aria-expanded": $props.open,
152
174
  "aria-label": "\u5207\u6362\u9762\u677F",
153
175
  onClick: $setup.handleToggle
154
176
  }, [
155
177
  _createElementVNode("span", _hoisted_2, [
156
- $props.open ? (_openBlock(), _createElementBlock("svg", _hoisted_3, [..._cache[0] || (_cache[0] = [
178
+ $props.open && $props.splitPosition === "right" ? (_openBlock(), _createElementBlock("svg", _hoisted_3, [..._cache[0] || (_cache[0] = [
157
179
  _createElementVNode(
158
180
  "path",
159
181
  {
@@ -165,7 +187,8 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
165
187
  -1
166
188
  /* CACHED */
167
189
  )
168
- ])])) : (_openBlock(), _createElementBlock("svg", _hoisted_4, [..._cache[1] || (_cache[1] = [
190
+ ])])) : _createCommentVNode("v-if", true),
191
+ !$props.open && $props.splitPosition === "right" ? (_openBlock(), _createElementBlock("svg", _hoisted_4, [..._cache[1] || (_cache[1] = [
169
192
  _createElementVNode(
170
193
  "path",
171
194
  {
@@ -177,7 +200,33 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
177
200
  -1
178
201
  /* CACHED */
179
202
  )
180
- ])]))
203
+ ])])) : _createCommentVNode("v-if", true),
204
+ $props.open && $props.splitPosition === "left" ? (_openBlock(), _createElementBlock("svg", _hoisted_5, [..._cache[2] || (_cache[2] = [
205
+ _createElementVNode(
206
+ "path",
207
+ {
208
+ d: "M15 18l-6-6 6-6",
209
+ "stroke-linecap": "round",
210
+ "stroke-linejoin": "round"
211
+ },
212
+ null,
213
+ -1
214
+ /* CACHED */
215
+ )
216
+ ])])) : _createCommentVNode("v-if", true),
217
+ !$props.open && $props.splitPosition === "left" ? (_openBlock(), _createElementBlock("svg", _hoisted_6, [..._cache[3] || (_cache[3] = [
218
+ _createElementVNode(
219
+ "path",
220
+ {
221
+ d: "M9 18l6-6-6-6",
222
+ "stroke-linecap": "round",
223
+ "stroke-linejoin": "round"
224
+ },
225
+ null,
226
+ -1
227
+ /* CACHED */
228
+ )
229
+ ])])) : _createCommentVNode("v-if", true)
181
230
  ])
182
231
  ], 10, _hoisted_1)) : _createCommentVNode("v-if", true),
183
232
  _createVNode(
@@ -214,16 +263,16 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
214
263
  ),
215
264
  $props.notificationVisible && $props.notificationMode === "widget" ? (_openBlock(), _createElementBlock(
216
265
  "div",
217
- _hoisted_5,
266
+ _hoisted_7,
218
267
  _toDisplayString($props.notificationMessage),
219
268
  1
220
269
  /* TEXT */
221
270
  )) : _createCommentVNode("v-if", true),
222
- _createElementVNode("div", _hoisted_6, [
271
+ _createElementVNode("div", _hoisted_8, [
223
272
  _createVNode($setup["SessionList"], null, {
224
273
  empty: _withCtx(() => [
225
274
  _renderSlot(_ctx.$slots, "sessions-empty", {}, () => [
226
- _cache[2] || (_cache[2] = _createElementVNode(
275
+ _cache[4] || (_cache[4] = _createElementVNode(
227
276
  "div",
228
277
  { class: "opencode-session-empty" },
229
278
  "\u6682\u65E0\u4F1A\u8BDD",
@@ -1,4 +1,4 @@
1
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_9: {}, __VLS_11: {};
1
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_9: {}, __VLS_11: {}, __VLS_13: {}, __VLS_15: {};
2
2
  type __VLS_Slots = {} & {
3
3
  'session-toggle-icon'?: (props: typeof __VLS_1) => any;
4
4
  } & {
@@ -6,11 +6,15 @@ type __VLS_Slots = {} & {
6
6
  } & {
7
7
  'theme-icon'?: (props: typeof __VLS_5) => any;
8
8
  } & {
9
- 'prompt-dock-icon'?: (props: typeof __VLS_7) => any;
9
+ 'display-mode-icon'?: (props: typeof __VLS_7) => any;
10
10
  } & {
11
- 'minimize-icon'?: (props: typeof __VLS_9) => any;
11
+ 'split-position-icon'?: (props: typeof __VLS_9) => any;
12
12
  } & {
13
- 'close-icon'?: (props: typeof __VLS_11) => any;
13
+ 'prompt-dock-icon'?: (props: typeof __VLS_11) => any;
14
+ } & {
15
+ 'minimize-icon'?: (props: typeof __VLS_13) => any;
16
+ } & {
17
+ 'close-icon'?: (props: typeof __VLS_15) => any;
14
18
  };
15
19
  declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
16
20
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;