@vite-plugin-opencode-assistant/components 1.0.48 → 1.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/open-code-widget/composables/use-persist-state.d.ts +5 -1
- package/es/open-code-widget/composables/use-persist-state.js +10 -2
- package/es/open-code-widget/composables/use-split.d.ts +5 -0
- package/es/open-code-widget/composables/use-split.js +46 -12
- package/es/open-code-widget/src/components/ChatPanel-sfc.css +1 -1
- package/es/open-code-widget/src/components/ChatPanel.vue.d.ts +2 -0
- package/es/open-code-widget/src/components/ChatPanel.vue.js +58 -10
- package/es/open-code-widget/src/components/Header.vue.d.ts +8 -4
- package/es/open-code-widget/src/components/Header.vue.js +313 -27
- package/es/open-code-widget/src/context.d.ts +5 -1
- package/es/open-code-widget/src/index-sfc.css +1 -1
- package/es/open-code-widget/src/index.vue.d.ts +1 -1
- package/es/open-code-widget/src/index.vue.js +48 -12
- package/lib/@vite-plugin-opencode-assistant/components.cjs.js +357 -67
- package/lib/@vite-plugin-opencode-assistant/components.es.js +357 -67
- package/lib/components.css +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/open-code-widget/composables/use-persist-state.d.ts +5 -1
- package/lib/open-code-widget/composables/use-persist-state.js +10 -2
- package/lib/open-code-widget/composables/use-split.d.ts +5 -0
- package/lib/open-code-widget/composables/use-split.js +46 -12
- package/lib/open-code-widget/src/components/ChatPanel-sfc.css +1 -1
- package/lib/open-code-widget/src/components/ChatPanel.vue.d.ts +2 -0
- package/lib/open-code-widget/src/components/ChatPanel.vue.js +58 -10
- package/lib/open-code-widget/src/components/Header.vue.d.ts +8 -4
- package/lib/open-code-widget/src/components/Header.vue.js +313 -27
- package/lib/open-code-widget/src/context.d.ts +5 -1
- package/lib/open-code-widget/src/index-sfc.css +1 -1
- package/lib/open-code-widget/src/index.vue.d.ts +1 -1
- package/lib/open-code-widget/src/index.vue.js +48 -12
- package/lib/web-types.json +1 -1
- package/package.json +2 -2
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.
|
|
3
|
+
declare const version = "1.0.49";
|
|
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,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
|
|
8
|
+
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
7
9
|
const config = options.splitMode.value || {};
|
|
8
10
|
return {
|
|
9
|
-
width: (
|
|
10
|
-
minWidth: (
|
|
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
|
|
33
|
+
var _a2;
|
|
30
34
|
panelWidth.value = width;
|
|
31
|
-
(
|
|
35
|
+
(_a2 = options.onWidthChange) == null ? void 0 : _a2.call(options, width);
|
|
32
36
|
};
|
|
33
37
|
const handleToggle = () => {
|
|
34
|
-
var
|
|
38
|
+
var _a2;
|
|
35
39
|
const nextOpen = !options.open.value;
|
|
36
|
-
(
|
|
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
|
|
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
|
-
(
|
|
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;
|
|
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
|
|
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",
|
|
@@ -147,13 +168,13 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
147
168
|
$props.mode === "split" ? (_openBlock(), _createElementBlock("button", {
|
|
148
169
|
key: 1,
|
|
149
170
|
type: "button",
|
|
150
|
-
class: _normalizeClass(["opencode-split-toggle-btn", { open: $setup.props.open, thinking: $setup.props.thinking, "opencode-theme-dark": $props.resolvedTheme === "dark" }]),
|
|
171
|
+
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
172
|
"aria-expanded": $props.open,
|
|
152
173
|
"aria-label": "\u5207\u6362\u9762\u677F",
|
|
153
174
|
onClick: $setup.handleToggle
|
|
154
175
|
}, [
|
|
155
176
|
_createElementVNode("span", _hoisted_2, [
|
|
156
|
-
$props.open ? (_openBlock(), _createElementBlock("svg", _hoisted_3, [..._cache[0] || (_cache[0] = [
|
|
177
|
+
$props.open && $props.splitPosition === "right" ? (_openBlock(), _createElementBlock("svg", _hoisted_3, [..._cache[0] || (_cache[0] = [
|
|
157
178
|
_createElementVNode(
|
|
158
179
|
"path",
|
|
159
180
|
{
|
|
@@ -165,7 +186,8 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
165
186
|
-1
|
|
166
187
|
/* CACHED */
|
|
167
188
|
)
|
|
168
|
-
])])) : (
|
|
189
|
+
])])) : _createCommentVNode("v-if", true),
|
|
190
|
+
!$props.open && $props.splitPosition === "right" ? (_openBlock(), _createElementBlock("svg", _hoisted_4, [..._cache[1] || (_cache[1] = [
|
|
169
191
|
_createElementVNode(
|
|
170
192
|
"path",
|
|
171
193
|
{
|
|
@@ -177,7 +199,33 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
177
199
|
-1
|
|
178
200
|
/* CACHED */
|
|
179
201
|
)
|
|
180
|
-
])]))
|
|
202
|
+
])])) : _createCommentVNode("v-if", true),
|
|
203
|
+
$props.open && $props.splitPosition === "left" ? (_openBlock(), _createElementBlock("svg", _hoisted_5, [..._cache[2] || (_cache[2] = [
|
|
204
|
+
_createElementVNode(
|
|
205
|
+
"path",
|
|
206
|
+
{
|
|
207
|
+
d: "M15 18l-6-6 6-6",
|
|
208
|
+
"stroke-linecap": "round",
|
|
209
|
+
"stroke-linejoin": "round"
|
|
210
|
+
},
|
|
211
|
+
null,
|
|
212
|
+
-1
|
|
213
|
+
/* CACHED */
|
|
214
|
+
)
|
|
215
|
+
])])) : _createCommentVNode("v-if", true),
|
|
216
|
+
!$props.open && $props.splitPosition === "left" ? (_openBlock(), _createElementBlock("svg", _hoisted_6, [..._cache[3] || (_cache[3] = [
|
|
217
|
+
_createElementVNode(
|
|
218
|
+
"path",
|
|
219
|
+
{
|
|
220
|
+
d: "M9 18l6-6-6-6",
|
|
221
|
+
"stroke-linecap": "round",
|
|
222
|
+
"stroke-linejoin": "round"
|
|
223
|
+
},
|
|
224
|
+
null,
|
|
225
|
+
-1
|
|
226
|
+
/* CACHED */
|
|
227
|
+
)
|
|
228
|
+
])])) : _createCommentVNode("v-if", true)
|
|
181
229
|
])
|
|
182
230
|
], 10, _hoisted_1)) : _createCommentVNode("v-if", true),
|
|
183
231
|
_createVNode(
|
|
@@ -214,16 +262,16 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
214
262
|
),
|
|
215
263
|
$props.notificationVisible && $props.notificationMode === "widget" ? (_openBlock(), _createElementBlock(
|
|
216
264
|
"div",
|
|
217
|
-
|
|
265
|
+
_hoisted_7,
|
|
218
266
|
_toDisplayString($props.notificationMessage),
|
|
219
267
|
1
|
|
220
268
|
/* TEXT */
|
|
221
269
|
)) : _createCommentVNode("v-if", true),
|
|
222
|
-
_createElementVNode("div",
|
|
270
|
+
_createElementVNode("div", _hoisted_8, [
|
|
223
271
|
_createVNode($setup["SessionList"], null, {
|
|
224
272
|
empty: _withCtx(() => [
|
|
225
273
|
_renderSlot(_ctx.$slots, "sessions-empty", {}, () => [
|
|
226
|
-
_cache[
|
|
274
|
+
_cache[4] || (_cache[4] = _createElementVNode(
|
|
227
275
|
"div",
|
|
228
276
|
{ class: "opencode-session-empty" },
|
|
229
277
|
"\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
|
-
'
|
|
9
|
+
'display-mode-icon'?: (props: typeof __VLS_7) => any;
|
|
10
10
|
} & {
|
|
11
|
-
'
|
|
11
|
+
'split-position-icon'?: (props: typeof __VLS_9) => any;
|
|
12
12
|
} & {
|
|
13
|
-
'
|
|
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>;
|