@aipanel/ui 1.2.10 → 1.2.12
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/AI-panel-widget/composables/use-inspector.mjs +4 -4
- package/es/AI-panel-widget/composables/use-selection.mjs +4 -4
- package/es/AI-panel-widget/composables/use-session.mjs +16 -5
- package/es/AI-panel-widget/src/components/ChatPanel-sfc.css +1 -1
- package/es/AI-panel-widget/src/components/ChatPanel.vue.d.ts +3 -0
- package/es/AI-panel-widget/src/components/ChatPanel.vue.mjs +13 -4
- package/es/AI-panel-widget/src/components/Frame-sfc.css +1 -1
- package/es/AI-panel-widget/src/components/Header-sfc.css +1 -1
- package/es/AI-panel-widget/src/components/Header.vue.mjs +14 -5
- package/es/AI-panel-widget/src/components/ResizeHandle-sfc.css +1 -1
- package/es/AI-panel-widget/src/components/SelectedBubbles-sfc.css +1 -1
- package/es/AI-panel-widget/src/components/SelectedBubbles.vue.mjs +1 -1
- package/es/AI-panel-widget/src/components/SelectedNodes-sfc.css +1 -1
- package/es/AI-panel-widget/src/components/SessionList-sfc.css +1 -1
- package/es/AI-panel-widget/src/components/SessionList.vue.mjs +135 -37
- package/es/AI-panel-widget/src/context.d.ts +5 -1
- package/es/AI-panel-widget/src/index-sfc.css +1 -1
- package/es/AI-panel-widget/src/index.vue.d.ts +3 -1
- package/es/AI-panel-widget/src/index.vue.mjs +43 -9
- package/es/AI-panel-widget/src/types.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/lib/AI-panel-widget/composables/use-inspector.cjs +4 -4
- package/lib/AI-panel-widget/composables/use-selection.cjs +4 -4
- package/lib/AI-panel-widget/composables/use-session.cjs +16 -5
- package/lib/AI-panel-widget/src/components/ChatPanel-sfc.css +1 -1
- package/lib/AI-panel-widget/src/components/ChatPanel.vue.cjs +13 -4
- package/lib/AI-panel-widget/src/components/ChatPanel.vue.d.ts +3 -0
- package/lib/AI-panel-widget/src/components/Frame-sfc.css +1 -1
- package/lib/AI-panel-widget/src/components/Header-sfc.css +1 -1
- package/lib/AI-panel-widget/src/components/Header.vue.cjs +14 -5
- package/lib/AI-panel-widget/src/components/ResizeHandle-sfc.css +1 -1
- package/lib/AI-panel-widget/src/components/SelectedBubbles-sfc.css +1 -1
- package/lib/AI-panel-widget/src/components/SelectedBubbles.vue.cjs +1 -1
- package/lib/AI-panel-widget/src/components/SelectedNodes-sfc.css +1 -1
- package/lib/AI-panel-widget/src/components/SessionList-sfc.css +1 -1
- package/lib/AI-panel-widget/src/components/SessionList.vue.cjs +134 -36
- package/lib/AI-panel-widget/src/context.d.ts +5 -1
- package/lib/AI-panel-widget/src/index-sfc.css +1 -1
- package/lib/AI-panel-widget/src/index.vue.cjs +43 -9
- package/lib/AI-panel-widget/src/index.vue.d.ts +3 -1
- package/lib/AI-panel-widget/src/types.d.ts +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/package.json +2 -2
- package/es/AI-panel-widget/src/components/SplitTrigger-sfc.css +0 -1
- package/es/AI-panel-widget/src/components/SplitTrigger.vue.d.ts +0 -18
- package/es/AI-panel-widget/src/components/SplitTrigger.vue.mjs +0 -112
- package/lib/AI-panel-widget/src/components/SplitTrigger-sfc.css +0 -1
- package/lib/AI-panel-widget/src/components/SplitTrigger.vue.cjs +0 -131
- package/lib/AI-panel-widget/src/components/SplitTrigger.vue.d.ts +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
.aipanel-widget{--ap-bg-main: #ffffff;--ap-bg-secondary: #
|
|
1
|
+
.aipanel-widget{--ap-bg-main: #ffffff;--ap-bg-secondary: #f9fafb;--ap-bg-tertiary: #ebeef2;--ap-overlay-bg: rgba(249, 250, 251, .92);--ap-text-primary: #0f1115;--ap-text-secondary: #61666b;--ap-text-tertiary: #81858c;--ap-text-placeholder: #adb2b8;--ap-border-faint: rgba(15, 17, 21, .04);--ap-border-primary: rgba(15, 17, 21, .1);--ap-border-secondary: rgba(15, 17, 21, .12);--ap-hover-bg: rgba(38, 49, 72, .06);--ap-elevated-fill: #ffffff;--ap-elevated-hover: #f1f3f5;--ap-press-bg: rgba(38, 49, 72, .1);--ap-primary: #0f1115;--ap-primary-hover: #43454a;--ap-on-primary: #ffffff;--ap-accent: #4176e6;--ap-accent-hover: #5686fe;--ap-accent-bg: rgba(65, 118, 230, .1);--ap-danger: #ec1313;--ap-danger-hover: #c40f0f;--ap-state-pending: #f59e0b;--ap-state-completed: #22c55e;--ap-state-ongoing: #5686fe;--ap-tooltip-bg: #1e1e1e;--ap-dialog-overlay: rgba(0, 0, 0, .24);--ap-dialog-bg: #ffffff;--ap-scrollbar-thumb: #e5e5e5;--ap-scrollbar-thumb-hover: #d4d4d4;--ap-thinking-glow: rgba(86, 134, 254, .3);--ap-thinking-glow-strong: rgba(86, 134, 254, .55);--ap-skeleton-bg: rgba(15, 17, 21, .06);--ap-skeleton-gradient: linear-gradient( 90deg, rgba(15, 17, 21, .04) 25%, rgba(15, 17, 21, .1) 50%, rgba(15, 17, 21, .04) 75% );--ap-shadow-sm: 0 1px 2px rgba(15, 17, 21, .04), 0 1px 3px rgba(15, 17, 21, .06);--ap-shadow-md: 0 2px 8px rgba(15, 17, 21, .06), 0 4px 16px rgba(15, 17, 21, .06);--ap-shadow-lg: 0 0 0 .5px rgba(15, 17, 21, .06), 0 4px 16px rgba(15, 17, 21, .08), 0 16px 48px rgba(15, 17, 21, .1);--ap-shadow-xl: 0 0 0 .5px rgba(15, 17, 21, .08), 0 8px 32px rgba(15, 17, 21, .12), 0 24px 72px rgba(15, 17, 21, .14);--ap-shadow-accent: 0 1px 2px rgba(65, 118, 230, .14), 0 0 0 1px rgba(65, 118, 230, .18);position:fixed;z-index:999999;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}.aipanel-widget.aipanel-theme-dark{--ap-bg-main: #151517;--ap-bg-secondary: #1b1b1c;--ap-bg-tertiary: #2c2c2e;--ap-overlay-bg: rgba(21, 21, 23, .92);--ap-text-primary: #f9fafb;--ap-text-secondary: #cfd3d6;--ap-text-tertiary: #adb2b8;--ap-text-placeholder: #81858c;--ap-border-faint: rgba(255, 255, 255, .06);--ap-border-primary: rgba(255, 255, 255, .12);--ap-border-secondary: rgba(255, 255, 255, .16);--ap-hover-bg: rgba(255, 255, 255, .08);--ap-elevated-fill: #43454a;--ap-elevated-hover: #353638;--ap-press-bg: rgba(255, 255, 255, .14);--ap-primary: #f9fafb;--ap-primary-hover: #ebeef2;--ap-on-primary: #0f1115;--ap-accent: #679efe;--ap-accent-hover: #5686fe;--ap-accent-bg: rgba(103, 158, 254, .16);--ap-danger: #f25a5a;--ap-danger-hover: #ff8383;--ap-state-pending: #f59e0b;--ap-state-completed: #22c55e;--ap-state-ongoing: #5686fe;--ap-tooltip-bg: #282828;--ap-dialog-overlay: rgba(0, 0, 0, .5);--ap-dialog-bg: #2c2c2e;--ap-scrollbar-thumb: #3c3c3d;--ap-scrollbar-thumb-hover: #545557;--ap-thinking-glow: rgba(103, 158, 254, .35);--ap-thinking-glow-strong: rgba(103, 158, 254, .6);--ap-skeleton-bg: rgba(255, 255, 255, .07);--ap-skeleton-gradient: linear-gradient( 90deg, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .12) 50%, rgba(255, 255, 255, .05) 75% );--ap-shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 3px rgba(0, 0, 0, .24);--ap-shadow-md: 0 2px 8px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .2);--ap-shadow-lg: 0 0 0 .5px rgba(255, 255, 255, .06), 0 4px 16px rgba(0, 0, 0, .3), 0 16px 48px rgba(0, 0, 0, .25);--ap-shadow-xl: 0 0 0 .5px rgba(255, 255, 255, .08), 0 8px 32px rgba(0, 0, 0, .36), 0 24px 72px rgba(0, 0, 0, .3);--ap-shadow-accent: 0 1px 2px rgba(103, 158, 254, .2), 0 0 0 1px rgba(103, 158, 254, .25)}@supports not selector(::-webkit-scrollbar){.aipanel-widget,.aipanel-widget *{scrollbar-width:thin;scrollbar-color:var(--ap-scrollbar-thumb) transparent}}.aipanel-widget ::-webkit-scrollbar,.aipanel-widget *::-webkit-scrollbar{width:8px;height:8px}.aipanel-widget ::-webkit-scrollbar-track,.aipanel-widget *::-webkit-scrollbar-track{background:transparent}.aipanel-widget ::-webkit-scrollbar-thumb,.aipanel-widget *::-webkit-scrollbar-thumb{border-radius:4px;background:var(--ap-scrollbar-thumb)}.aipanel-widget ::-webkit-scrollbar-thumb:hover,.aipanel-widget *::-webkit-scrollbar-thumb:hover{background:var(--ap-scrollbar-thumb-hover)}.aipanel-widget ::-webkit-scrollbar-corner,.aipanel-widget *::-webkit-scrollbar-corner{background:transparent}.aipanel-chat{position:fixed;bottom:20px;width:700px;height:86vh;max-height:calc(100vh - 40px);background:var(--ap-bg-main);border-radius:16px;box-shadow:var(--ap-shadow-lg);overflow:hidden;opacity:0;visibility:hidden;transform:translate3d(var(---chatAnimationOrigin\.x),var(---chatAnimationOrigin\.y),0) scale(.95);transition:all .3s ease;display:flex;flex-direction:column;z-index:99999}.aipanel-chat.open{opacity:1;visibility:visible;transform:translateZ(0) scale(1)}.aipanel-chat.no-transition,.aipanel-chat.no-transition.open{transition:none!important}.aipanel-chat.minimized{width:320px;height:320px}.aipanel-chat.minimized .aipanel-iframe-container{margin-top:-146px}.aipanel-chat-content{display:flex;flex:1;overflow:hidden}.aipanel-notification{position:absolute;top:20px;left:50%;transform:translate(-50%);padding:12px 24px;background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;border-radius:10px;font-size:14px;font-weight:500;box-shadow:0 4px 16px #3b82f666,0 0 0 2px #3b82f633;animation:slideDown .3s ease;z-index:10000000;display:flex;align-items:center;gap:10px}.aipanel-notification:before{content:"\1f4a1";font-size:16px}.aipanel-dialog-overlay{position:fixed;inset:0;background:var(--ap-dialog-overlay);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;z-index:9999999;animation:fadeIn .2s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.aipanel-dialog{width:min(380px,100%);background:var(--ap-dialog-bg);border-radius:24px;padding:24px 24px 20px;box-shadow:var(--ap-shadow-xl);animation:scaleIn .2s ease}@keyframes scaleIn{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.aipanel-dialog-content{margin-bottom:20px}.aipanel-dialog-message{font-size:14px;line-height:22px;font-weight:400;color:var(--ap-text-primary)}.aipanel-dialog-actions{display:flex;gap:8px;justify-content:flex-end}.aipanel-dialog-btn{height:36px;padding:0 20px;border-radius:999px;border:1px solid transparent;font-size:14px;line-height:22px;font-weight:500;cursor:pointer;transition:all .2s}.aipanel-dialog-btn.cancel{background:transparent;border-color:var(--ap-border-primary);color:var(--ap-text-secondary)}.aipanel-dialog-btn.cancel:hover{background:var(--ap-hover-bg);color:var(--ap-text-primary)}.aipanel-dialog-btn.confirm{background:var(--ap-danger);color:#fff}.aipanel-dialog-btn.confirm:hover{background:var(--ap-danger-hover)}@keyframes slideDown{0%{transform:translate(-50%) translateY(-100%);opacity:0}to{transform:translate(-50%) translateY(0);opacity:1}}.aipanel-page-notification{position:fixed;top:20px;left:50%;transform:translate(-50%);padding:12px 24px;background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;border-radius:10px;font-size:14px;font-weight:500;box-shadow:0 4px 16px #3b82f666,0 0 0 2px #3b82f633;animation:slideDown .3s ease;z-index:2147483647;display:flex;align-items:center;gap:10px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.aipanel-page-notification:before{content:"\1f4a1";font-size:16px}.aipanel-element-highlight{position:fixed;pointer-events:none;z-index:999998;border-radius:4px}#vue-inspector-container{display:none!important}.aipanel-element-tooltip{position:fixed;background:var(--ap-tooltip-bg);color:#fff;padding:8px 12px;border-radius:6px;font-size:12px;z-index:9999998;box-shadow:var(--ap-shadow-md);max-width:300px;pointer-events:none;line-height:1}.aipanel-tooltip-tag{font-weight:500;margin-bottom:4px;word-break:break-all}.aipanel-tooltip-file{font-size:11px;color:var(--ap-text-placeholder);word-break:break-all}.aipanel-element-highlight-temp{position:absolute;pointer-events:none;z-index:999998;border-radius:4px;animation:highlight-pulse 2s ease-out forwards}@keyframes highlight-pulse{0%{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(1.02)}to{opacity:0;transform:scale(1)}}@media(max-width:768px){.aipanel-chat{width:calc(100vw - 40px);height:calc(100vh - 100px)}}body.has-aipanel-split{transition:padding .3s ease;min-width:auto}body.has-aipanel-split-right{padding-right:var(--aipanel-split-width, 500px)}body.has-aipanel-split-left{padding-left:var(--aipanel-split-width, 500px)}.aipanel-widget.extension-mode{position:relative;width:100%;height:100%;display:flex}.aipanel-widget.extension-mode .aipanel-select-mode-hint,.aipanel-widget.extension-mode .aipanel-dialog-overlay{position:absolute}
|
|
@@ -44,11 +44,13 @@ declare const __VLS_base: import("vue").DefineComponent<AIPanelWidgetProps, {
|
|
|
44
44
|
selectEnabled: boolean;
|
|
45
45
|
theme: import("@aipanel/core").AIPanelWidgetTheme;
|
|
46
46
|
reviewPanelEnabled: boolean;
|
|
47
|
+
providerSidebar: boolean;
|
|
48
|
+
sidebarCollapseControl: import("@aipanel/core").ProviderSidebarCollapseControl;
|
|
47
49
|
displayMode: import("@aipanel/core").DisplayMode;
|
|
48
50
|
showSessionListSkeleton: boolean;
|
|
49
51
|
sessionKey: string;
|
|
50
|
-
sessions: import("@aipanel/core").AIPanelWidgetSession[];
|
|
51
52
|
thinking: boolean;
|
|
53
|
+
sessions: import("@aipanel/core").AIPanelWidgetSession[];
|
|
52
54
|
showClearAll: boolean;
|
|
53
55
|
open: boolean;
|
|
54
56
|
selectShortcutLabel: string;
|
|
@@ -45,7 +45,9 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
|
|
|
45
45
|
splitMode: { type: Object, required: false, default: void 0 },
|
|
46
46
|
splitPanelWidth: { type: Number, required: false, default: 500 },
|
|
47
47
|
hideBubble: { type: Boolean, required: false, default: false },
|
|
48
|
-
reviewPanelEnabled: { type: Boolean, required: false, default: false }
|
|
48
|
+
reviewPanelEnabled: { type: Boolean, required: false, default: false },
|
|
49
|
+
providerSidebar: { type: Boolean, required: false, default: false },
|
|
50
|
+
sidebarCollapseControl: { type: String, required: false, default: "host" }
|
|
49
51
|
},
|
|
50
52
|
emits: ["update:open", "update:selectMode", "update:sessionListCollapsed", "update:currentSessionId", "update:selectedElements", "update:theme", "update:thinking", "update:splitPanelWidth", "toggle", "close", "toggle-session-list", "toggle-select-mode", "toggle-theme", "create-session", "select-session", "delete-session", "click-selected-node", "remove-selected-node", "clear-selected-nodes", "empty-action", "frame-loaded", "thinking-change", "split-panel-width-change"],
|
|
51
53
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -95,9 +97,7 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
|
|
|
95
97
|
};
|
|
96
98
|
const localSessionListCollapsed = ref(props.sessionListCollapsed);
|
|
97
99
|
const localDisplayMode = ref(props.displayMode);
|
|
98
|
-
const localSplitPosition = ref(
|
|
99
|
-
props.splitMode?.position ?? "right"
|
|
100
|
-
);
|
|
100
|
+
const localSplitPosition = ref(props.splitMode?.position ?? "right");
|
|
101
101
|
const minimized = ref(false);
|
|
102
102
|
const promptDockVisible = ref(true);
|
|
103
103
|
const reviewPanelVisible = ref(false);
|
|
@@ -109,6 +109,14 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
|
|
|
109
109
|
if (!iframeLoaded.value || !iframeReady.value) return;
|
|
110
110
|
sendMessageToIframe(WIDGET_MSG.PROMPT_DOCK_VISIBILITY, { visible: promptDockVisible.value });
|
|
111
111
|
sendMessageToIframe(WIDGET_MSG.MINIMIZE_STATE, { minimized: minimized.value });
|
|
112
|
+
sendMessageToIframe(WIDGET_MSG.SIDEBAR_MODE, {
|
|
113
|
+
mode: props.providerSidebar ? "provider" : "host"
|
|
114
|
+
});
|
|
115
|
+
if (props.providerSidebar && props.sidebarCollapseControl === "host") {
|
|
116
|
+
sendMessageToIframe(WIDGET_MSG.SIDEBAR_COLLAPSE, {
|
|
117
|
+
collapsed: localSessionListCollapsed.value
|
|
118
|
+
});
|
|
119
|
+
}
|
|
112
120
|
if (props.reviewPanelEnabled) {
|
|
113
121
|
sendMessageToIframe(WIDGET_MSG.REVIEW_PANEL_TOGGLE, { visible: reviewPanelVisible.value });
|
|
114
122
|
}
|
|
@@ -135,8 +143,15 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
|
|
|
135
143
|
localDisplayMode.value = val;
|
|
136
144
|
}
|
|
137
145
|
);
|
|
146
|
+
watch(
|
|
147
|
+
() => [props.providerSidebar, props.sidebarCollapseControl],
|
|
148
|
+
() => {
|
|
149
|
+
syncStateToIframe();
|
|
150
|
+
}
|
|
151
|
+
);
|
|
138
152
|
const handleToggleDisplayMode = () => {
|
|
139
|
-
if (localDisplayMode.value === "extension" || localDisplayMode.value === "extension-selector")
|
|
153
|
+
if (localDisplayMode.value === "extension" || localDisplayMode.value === "extension-selector")
|
|
154
|
+
return;
|
|
140
155
|
const modes = ["bubble", "split", "auto"];
|
|
141
156
|
const currentIndex = modes.indexOf(localDisplayMode.value);
|
|
142
157
|
const nextIndex = (currentIndex + 1) % modes.length;
|
|
@@ -175,6 +190,9 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
|
|
|
175
190
|
localSessionListCollapsed.value = collapsed;
|
|
176
191
|
emit("update:sessionListCollapsed", collapsed);
|
|
177
192
|
emit("toggle-session-list", collapsed);
|
|
193
|
+
if (props.providerSidebar && props.sidebarCollapseControl === "host") {
|
|
194
|
+
sendMessageToIframe(WIDGET_MSG.SIDEBAR_COLLAPSE, { collapsed });
|
|
195
|
+
}
|
|
178
196
|
},
|
|
179
197
|
onEmptyAction: () => {
|
|
180
198
|
emit("empty-action");
|
|
@@ -355,6 +373,16 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
|
|
|
355
373
|
iframeReady.value = true;
|
|
356
374
|
syncStateToIframe();
|
|
357
375
|
}
|
|
376
|
+
if (event.data?.type === WIDGET_MSG.SIDEBAR_STATE) {
|
|
377
|
+
if (props.providerSidebar && props.sidebarCollapseControl === "host") {
|
|
378
|
+
const collapsed = event.data.collapsed === true;
|
|
379
|
+
if (collapsed !== localSessionListCollapsed.value) {
|
|
380
|
+
localSessionListCollapsed.value = collapsed;
|
|
381
|
+
emit("update:sessionListCollapsed", collapsed);
|
|
382
|
+
emit("toggle-session-list", collapsed);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
358
386
|
};
|
|
359
387
|
onMounted(() => {
|
|
360
388
|
if (typeof window !== "undefined") {
|
|
@@ -397,7 +425,10 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
|
|
|
397
425
|
const gap = 24;
|
|
398
426
|
const bubbleSize = 44;
|
|
399
427
|
const screenMargin = 20;
|
|
400
|
-
const effectiveOffset = triggerRef.value?.offset ?? bubbleOffset.value ?? {
|
|
428
|
+
const effectiveOffset = triggerRef.value?.offset ?? bubbleOffset.value ?? {
|
|
429
|
+
x: windowWidth.value - bubbleSize - gap,
|
|
430
|
+
y: windowHeight.value - bubbleSize - gap
|
|
431
|
+
};
|
|
401
432
|
const style = {};
|
|
402
433
|
if (isBubbleOnRightSide.value) {
|
|
403
434
|
let rightPos = windowWidth.value - effectiveOffset.x + gap;
|
|
@@ -497,6 +528,8 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
|
|
|
497
528
|
promptDockVisible,
|
|
498
529
|
reviewPanelVisible,
|
|
499
530
|
reviewPanelEnabled: toRef(props, "reviewPanelEnabled"),
|
|
531
|
+
providerSidebar: toRef(props, "providerSidebar"),
|
|
532
|
+
sidebarCollapseControl: toRef(props, "sidebarCollapseControl"),
|
|
500
533
|
bubbleOffset,
|
|
501
534
|
mode: effectiveMode,
|
|
502
535
|
displayMode: localDisplayMode,
|
|
@@ -618,6 +651,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
618
651
|
"resolved-theme": $setup.resolvedTheme,
|
|
619
652
|
"split-position": $setup.splitPosition,
|
|
620
653
|
extension: $setup.isExtensionMode,
|
|
654
|
+
"provider-sidebar": $setup.props.providerSidebar,
|
|
621
655
|
onResize: $setup.handleResize,
|
|
622
656
|
onResizeStart: $setup.handleResizeStart,
|
|
623
657
|
onResizeEnd: $setup.handleResizeEnd,
|
|
@@ -686,7 +720,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
686
720
|
]),
|
|
687
721
|
key: "6"
|
|
688
722
|
} : void 0
|
|
689
|
-
]), 1032, ["mode", "open", "minimized", "position-style", "animation-origin", "panel-width", "resizable", "min-width", "max-width", "no-transition", "dragging", "thinking", "resolved-theme", "split-position", "extension", "onResize", "onToggle"]),
|
|
723
|
+
]), 1032, ["mode", "open", "minimized", "position-style", "animation-origin", "panel-width", "resizable", "min-width", "max-width", "no-transition", "dragging", "thinking", "resolved-theme", "split-position", "extension", "provider-sidebar", "onResize", "onToggle"]),
|
|
690
724
|
_createVNode($setup["SelectHint"])
|
|
691
725
|
],
|
|
692
726
|
64
|
|
@@ -746,11 +780,11 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
746
780
|
_createElementVNode("button", {
|
|
747
781
|
class: "aipanel-dialog-btn cancel",
|
|
748
782
|
onClick: $setup.handleDialogCancel
|
|
749
|
-
}, "\u53D6\u6D88"),
|
|
783
|
+
}, " \u53D6\u6D88 "),
|
|
750
784
|
_createElementVNode("button", {
|
|
751
785
|
class: "aipanel-dialog-btn confirm",
|
|
752
786
|
onClick: $setup.handleDialogConfirm
|
|
753
|
-
}, "\u786E\u8BA4")
|
|
787
|
+
}, " \u786E\u8BA4 ")
|
|
754
788
|
])
|
|
755
789
|
])
|
|
756
790
|
])) : _createCommentVNode("v-if", true),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { AIPanelWidgetTheme, AIPanelWidgetSession, AIPanelSelectedElement, AIPanelRemoveSelectedPayload, AIPanelWidgetSessionItem, AIPanelSelectedElementItem, AIPanelWidgetProps, AIPanelWidgetEmits, AIPanelSessionThinkingState, DisplayMode, SplitModeOptions, } from "@aipanel/core";
|
|
1
|
+
export type { AIPanelWidgetTheme, AIPanelWidgetSession, AIPanelSelectedElement, AIPanelRemoveSelectedPayload, AIPanelWidgetSessionItem, AIPanelSelectedElementItem, AIPanelWidgetProps, AIPanelWidgetEmits, AIPanelSessionThinkingState, DisplayMode, SplitModeOptions, ProviderSidebarCollapseControl, } from "@aipanel/core";
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -229,8 +229,8 @@ function useInspector(options) {
|
|
|
229
229
|
const tooltipStyle = (0, import_vue.ref)({ top: "0px", left: "0px" });
|
|
230
230
|
const tooltipContent = (0, import_vue.ref)({ description: "", fileInfo: "" });
|
|
231
231
|
let inspectorCheckTimer = null;
|
|
232
|
-
let currentPrimary = "#
|
|
233
|
-
let currentPrimaryBg = "rgba(
|
|
232
|
+
let currentPrimary = "#4176e6";
|
|
233
|
+
let currentPrimaryBg = "rgba(65, 118, 230, 0.1)";
|
|
234
234
|
function setPointerEventsNone(elements) {
|
|
235
235
|
elements.forEach((el) => {
|
|
236
236
|
if (el) el.style.pointerEvents = "none";
|
|
@@ -256,8 +256,8 @@ function useInspector(options) {
|
|
|
256
256
|
const widget = document.querySelector(".aipanel-widget");
|
|
257
257
|
if (widget) {
|
|
258
258
|
const style = getComputedStyle(widget);
|
|
259
|
-
currentPrimary = style.getPropertyValue("--ap-
|
|
260
|
-
currentPrimaryBg = style.getPropertyValue("--ap-
|
|
259
|
+
currentPrimary = style.getPropertyValue("--ap-accent").trim() || currentPrimary;
|
|
260
|
+
currentPrimaryBg = style.getPropertyValue("--ap-accent-bg").trim() || currentPrimaryBg;
|
|
261
261
|
}
|
|
262
262
|
const description = getElementDescription(elementToHighlight);
|
|
263
263
|
const fileName = fileInfo.file ? fileInfo.file.split("/").pop() : "";
|
|
@@ -87,12 +87,12 @@ function useSelection(options) {
|
|
|
87
87
|
const highlightOverlay = document.createElement("div");
|
|
88
88
|
highlightOverlay.className = "aipanel-element-highlight-temp";
|
|
89
89
|
const widget = document.querySelector(".aipanel-widget");
|
|
90
|
-
let primary = "#
|
|
91
|
-
let primaryBg = "rgba(
|
|
90
|
+
let primary = "#4176e6";
|
|
91
|
+
let primaryBg = "rgba(65, 118, 230, 0.1)";
|
|
92
92
|
if (widget) {
|
|
93
93
|
const style = getComputedStyle(widget);
|
|
94
|
-
primary = style.getPropertyValue("--ap-
|
|
95
|
-
primaryBg = style.getPropertyValue("--ap-
|
|
94
|
+
primary = style.getPropertyValue("--ap-accent").trim() || primary;
|
|
95
|
+
primaryBg = style.getPropertyValue("--ap-accent-bg").trim() || primaryBg;
|
|
96
96
|
}
|
|
97
97
|
highlightOverlay.style.border = `2px solid ${primary}`;
|
|
98
98
|
highlightOverlay.style.background = primaryBg;
|
|
@@ -21,6 +21,21 @@ __export(use_session_exports, {
|
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(use_session_exports);
|
|
23
23
|
var import_vue = require("vue");
|
|
24
|
+
function formatRelativeTime(ts) {
|
|
25
|
+
const time = new Date(ts).getTime();
|
|
26
|
+
if (Number.isNaN(time)) return "";
|
|
27
|
+
const diff = Date.now() - time;
|
|
28
|
+
if (diff < 0) return "\u521A\u521A";
|
|
29
|
+
const minute = 6e4;
|
|
30
|
+
const hour = 60 * minute;
|
|
31
|
+
const day = 24 * hour;
|
|
32
|
+
if (diff < minute) return "\u521A\u521A";
|
|
33
|
+
if (diff < hour) return `${Math.floor(diff / minute)} \u5206\u949F\u524D`;
|
|
34
|
+
if (diff < day) return `${Math.floor(diff / hour)} \u5C0F\u65F6\u524D`;
|
|
35
|
+
if (diff < 7 * day) return `${Math.floor(diff / day)} \u5929\u524D`;
|
|
36
|
+
const date = new Date(time);
|
|
37
|
+
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
38
|
+
}
|
|
24
39
|
function formatSessionMeta(session) {
|
|
25
40
|
if (session.meta) {
|
|
26
41
|
return session.meta;
|
|
@@ -28,11 +43,7 @@ function formatSessionMeta(session) {
|
|
|
28
43
|
if (!session.updatedAt) {
|
|
29
44
|
return "";
|
|
30
45
|
}
|
|
31
|
-
|
|
32
|
-
if (Number.isNaN(date.getTime())) {
|
|
33
|
-
return "";
|
|
34
|
-
}
|
|
35
|
-
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
46
|
+
return formatRelativeTime(session.updatedAt);
|
|
36
47
|
}
|
|
37
48
|
function useSession(options) {
|
|
38
49
|
const sessionItems = (0, import_vue.computed)(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.aipanel-chat{position:fixed;bottom:20px;width:700px;height:86vh;max-height:calc(100vh - 40px);background:var(--ap-bg-main);border-radius:16px;box-shadow:var(--ap-shadow-lg);overflow:hidden;display:flex;flex-direction:column;z-index:99999}.aipanel-chat:not(.split-mode){opacity:0;visibility:hidden;transition:all .3s ease;transform:translate3d(var(---animationOrigin\.x),var(---animationOrigin\.y),0) scale(.95)}.aipanel-chat.split-mode{position:fixed;top:0;bottom:0;height:100vh;max-height:100vh;border-radius:0;box-shadow:var(--ap-shadow-lg);overflow:visible;opacity:1;visibility:visible;transition:transform .3s ease}.aipanel-chat.split-mode.split-right{right:0;border-left:1px solid var(--ap-border-
|
|
1
|
+
.aipanel-chat{position:fixed;bottom:20px;width:700px;height:86vh;max-height:calc(100vh - 40px);background:var(--ap-bg-main);border-radius:16px;box-shadow:var(--ap-shadow-lg);overflow:hidden;display:flex;flex-direction:column;z-index:99999}.aipanel-chat:not(.split-mode){opacity:0;visibility:hidden;transition:all .3s ease;transform:translate3d(var(---animationOrigin\.x),var(---animationOrigin\.y),0) scale(.95)}.aipanel-chat.split-mode{position:fixed;top:0;bottom:0;height:100vh;max-height:100vh;border-radius:0;box-shadow:var(--ap-shadow-lg);overflow:visible;opacity:1;visibility:visible;transition:transform .3s ease}.aipanel-chat.split-mode.split-right{right:0;border-left:1px solid var(--ap-border-faint);transform:translate(100%)}.aipanel-chat.split-mode.split-left{left:0;border-right:1px solid var(--ap-border-faint);transform:translate(-100%)}.aipanel-chat.split-mode .aipanel-chat-content{overflow:hidden;flex:1}.aipanel-chat.split-mode.open{transform:translate(0)}.aipanel-chat.split-mode.dragging{transition:none}.aipanel-chat.dragging .aipanel-iframe{pointer-events:none}.aipanel-chat.extension-mode{position:static;width:100%;height:100%;bottom:auto;left:auto;right:auto;border-radius:0;border-left:none;border-right:none;max-height:none;box-shadow:none;transform:none;opacity:1;visibility:visible}.aipanel-chat:not(.split-mode){opacity:0;visibility:hidden;transition:all .3s ease}.aipanel-chat:not(.split-mode).open{opacity:1;visibility:visible;transform:translateZ(0) scale(1)}.aipanel-chat.no-transition,.aipanel-chat.no-transition.open{transition:none!important}.aipanel-chat.minimized:not(.split-mode){width:320px;height:320px}.aipanel-chat.minimized:not(.split-mode) .aipanel-iframe-container{margin-top:-146px}.aipanel-chat-content{display:flex;flex:1;overflow:hidden}.aipanel-session-empty{padding:24px;text-align:center;color:var(--ap-text-placeholder);font-size:14px}.aipanel-split-toggle-btn{position:absolute;left:-21px;top:50%;transform:translateY(-50%);width:20px;height:48px;background:var(--ap-bg-main);border:1px solid var(--ap-border-faint);border-right:none;border-radius:8px 0 0 8px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--ap-accent);box-shadow:var(--ap-shadow-sm);transition:all .3s ease;z-index:5;transform-origin:right center}.aipanel-split-toggle-btn.split-left{left:auto;right:-21px;border-radius:0 8px 8px 0;border-right:1px solid var(--ap-border-faint);border-left:none;transform-origin:left center}.aipanel-split-toggle-btn:hover{transform:translateY(-50%) scale(1.1);color:var(--ap-accent-hover);box-shadow:var(--ap-shadow-md)}.aipanel-split-toggle-btn.split-left:hover{transform:translateY(-50%) scale(1.1)}.aipanel-split-toggle-btn.thinking{background:var(--ap-accent);color:#fff;animation:split-thinking-pulse 2s ease-in-out infinite;box-shadow:0 0 12px var(--ap-thinking-glow-strong),0 0 28px var(--ap-thinking-glow)}.aipanel-split-toggle-btn.thinking:hover{box-shadow:0 0 16px var(--ap-thinking-glow-strong),0 0 36px var(--ap-thinking-glow)}@keyframes split-thinking-pulse{0%,to{transform:translateY(-50%) scale(1)}50%{transform:translateY(-50%) scale(.92)}}.aipanel-split-toggle-icon{display:flex;align-items:center;justify-content:center;transition:transform .25s ease}.aipanel-split-toggle-btn:hover .aipanel-split-toggle-icon{transform:scale(1.1)}
|
|
@@ -59,7 +59,8 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)({
|
|
|
59
59
|
thinking: { type: Boolean, required: false, default: false },
|
|
60
60
|
resolvedTheme: { type: String, required: false, default: "light" },
|
|
61
61
|
splitPosition: { type: String, required: false, default: "right" },
|
|
62
|
-
extension: { type: Boolean, required: false, default: false }
|
|
62
|
+
extension: { type: Boolean, required: false, default: false },
|
|
63
|
+
providerSidebar: { type: Boolean, required: false, default: false }
|
|
63
64
|
},
|
|
64
65
|
emits: ["resize", "resize-start", "resize-end", "toggle"],
|
|
65
66
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -179,7 +180,15 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
179
180
|
$props.mode === "split" && $props.resizable ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("button", {
|
|
180
181
|
key: 1,
|
|
181
182
|
type: "button",
|
|
182
|
-
class: (0, import_vue3.normalizeClass)([
|
|
183
|
+
class: (0, import_vue3.normalizeClass)([
|
|
184
|
+
"aipanel-split-toggle-btn",
|
|
185
|
+
{
|
|
186
|
+
open: $setup.props.open,
|
|
187
|
+
thinking: $setup.props.thinking,
|
|
188
|
+
"aipanel-theme-dark": $props.resolvedTheme === "dark",
|
|
189
|
+
"split-left": $props.splitPosition === "left"
|
|
190
|
+
}
|
|
191
|
+
]),
|
|
183
192
|
"aria-expanded": $props.open,
|
|
184
193
|
"aria-label": "\u5207\u6362\u9762\u677F",
|
|
185
194
|
onClick: $setup.handleToggle
|
|
@@ -272,7 +281,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
272
281
|
/* DYNAMIC_SLOTS */
|
|
273
282
|
),
|
|
274
283
|
(0, import_vue3.createElementVNode)("div", _hoisted_7, [
|
|
275
|
-
(0, import_vue3.
|
|
284
|
+
!$props.providerSidebar ? ((0, import_vue3.openBlock)(), (0, import_vue3.createBlock)($setup["SessionList"], { key: 0 }, {
|
|
276
285
|
empty: (0, import_vue3.withCtx)(() => [
|
|
277
286
|
(0, import_vue3.renderSlot)(_ctx.$slots, "sessions-empty", {}, () => [
|
|
278
287
|
_cache[4] || (_cache[4] = (0, import_vue3.createElementVNode)(
|
|
@@ -286,7 +295,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
286
295
|
]),
|
|
287
296
|
_: 3
|
|
288
297
|
/* FORWARDED */
|
|
289
|
-
}),
|
|
298
|
+
})) : (0, import_vue3.createCommentVNode)("v-if", true),
|
|
290
299
|
(0, import_vue3.createVNode)(
|
|
291
300
|
$setup["Frame"],
|
|
292
301
|
{ ref: "frameRef" },
|
|
@@ -17,6 +17,8 @@ type __VLS_Props = {
|
|
|
17
17
|
resolvedTheme?: "light" | "dark";
|
|
18
18
|
splitPosition?: "left" | "right";
|
|
19
19
|
extension?: boolean;
|
|
20
|
+
/** Provider 接管会话侧栏时隐藏原生 SessionList */
|
|
21
|
+
providerSidebar?: boolean;
|
|
20
22
|
};
|
|
21
23
|
declare var __VLS_17: {}, __VLS_20: {}, __VLS_23: {}, __VLS_32: {}, __VLS_43: {}, __VLS_46: {}, __VLS_49: {}, __VLS_52: {};
|
|
22
24
|
type __VLS_Slots = {} & {
|
|
@@ -153,6 +155,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
|
153
155
|
extension: boolean;
|
|
154
156
|
resolvedTheme: "light" | "dark";
|
|
155
157
|
minimized: boolean;
|
|
158
|
+
providerSidebar: boolean;
|
|
156
159
|
mode: "bubble" | "split";
|
|
157
160
|
splitPosition: "left" | "right";
|
|
158
161
|
thinking: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.aipanel-iframe-container{flex:1;position:relative;overflow:hidden;display:flex;flex-direction:column}.aipanel-loading-overlay{position:absolute;inset:0;background:var(--ap-overlay-bg);flex-direction:column;align-items:center;justify-content:center;z-index:10;display:flex;opacity:0;visibility:hidden}.aipanel-loading-overlay.visible{opacity:1;visibility:visible}.aipanel-loading-spinner{width:40px;height:40px;border:3px solid var(--ap-border-primary);border-top-color:var(--ap-
|
|
1
|
+
.aipanel-iframe-container{flex:1;position:relative;overflow:hidden;display:flex;flex-direction:column}.aipanel-loading-overlay{position:absolute;inset:0;background:var(--ap-overlay-bg);flex-direction:column;align-items:center;justify-content:center;z-index:10;display:flex;opacity:0;visibility:hidden}.aipanel-loading-overlay.visible{opacity:1;visibility:visible}.aipanel-loading-spinner{width:40px;height:40px;border:3px solid var(--ap-border-primary);border-top-color:var(--ap-accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.aipanel-loading-text{margin-top:12px;font-size:14px;color:var(--ap-text-placeholder)}.aipanel-error-overlay{position:absolute;inset:0;z-index:15;display:flex;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease}.aipanel-error-overlay.visible{opacity:1;visibility:visible}.aipanel-empty-state-overlay{position:absolute;inset:0;background:var(--ap-bg-secondary);flex-direction:column;align-items:center;justify-content:center;z-index:5;display:flex;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease}.aipanel-empty-state-overlay.visible{opacity:1;visibility:visible}.aipanel-empty-state-icon{color:var(--ap-text-placeholder);margin-bottom:16px}.aipanel-empty-state-text{color:var(--ap-text-primary);font-size:16px;font-weight:500;margin-bottom:24px}.aipanel-empty-state-btn{padding:10px 24px;border-radius:999px;border:none;background:var(--ap-primary);color:var(--ap-on-primary);font-size:14px;font-weight:500;cursor:pointer;transition:all .2s}.aipanel-empty-state-btn:hover{background:var(--ap-primary-hover);transform:translateY(-1px)}.aipanel-empty-state-btn:active{transform:translateY(0)}.aipanel-iframe{width:100%;height:100%;border:none;opacity:0;transition:none}.aipanel-iframe.loaded{opacity:1;transition:opacity .3s ease}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.aipanel-chat-header{position:relative;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 12px;height:40px;background:var(--ap-bg-secondary);border-bottom:1px solid var(--ap-border-
|
|
1
|
+
.aipanel-chat-header{position:relative;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 12px;height:40px;background:var(--ap-bg-secondary);border-bottom:1px solid var(--ap-border-faint);z-index:5}.aipanel-chat-header-left{display:flex;align-items:center;gap:4px}.aipanel-chat-header-title{font-size:14px;font-weight:600;color:var(--ap-text-primary);position:absolute;left:50%;transform:translate(-50%)}.aipanel-chat-header-actions{display:flex;gap:4px}.aipanel-header-btn{width:28px;height:28px;border-radius:8px;border:none;background:transparent;color:var(--ap-text-tertiary);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s}.aipanel-header-btn:hover{background:var(--ap-hover-bg);color:var(--ap-text-primary)}.aipanel-header-btn.close:hover{background:var(--ap-danger);color:#fff}.aipanel-header-btn.select-btn.active,.aipanel-header-btn.session-toggle.active,.aipanel-header-btn.review-panel.active{background:var(--ap-accent-bg);color:var(--ap-accent)}
|
|
@@ -41,6 +41,8 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)({
|
|
|
41
41
|
promptDockVisible,
|
|
42
42
|
reviewPanelVisible,
|
|
43
43
|
reviewPanelEnabled,
|
|
44
|
+
providerSidebar,
|
|
45
|
+
sidebarCollapseControl,
|
|
44
46
|
mode,
|
|
45
47
|
displayMode,
|
|
46
48
|
splitPosition,
|
|
@@ -65,6 +67,12 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)({
|
|
|
65
67
|
};
|
|
66
68
|
const DISPLAY_CYCLE = ["bubble", "split", "auto"];
|
|
67
69
|
const isSplitMode = (0, import_vue2.computed)(() => mode.value === "split");
|
|
70
|
+
const showSidebarToggle = (0, import_vue2.computed)(
|
|
71
|
+
() => !providerSidebar.value || sidebarCollapseControl.value === "host"
|
|
72
|
+
);
|
|
73
|
+
const showNewSessionButton = (0, import_vue2.computed)(
|
|
74
|
+
() => displayMode.value === "extension" || providerSidebar.value
|
|
75
|
+
);
|
|
68
76
|
const themeIconTitle = (0, import_vue2.computed)(() => {
|
|
69
77
|
const themeLabels = {
|
|
70
78
|
auto: "\u81EA\u52A8",
|
|
@@ -100,7 +108,7 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)({
|
|
|
100
108
|
const nextPosition = splitPosition.value === "right" ? "\u5DE6\u4FA7" : "\u53F3\u4FA7";
|
|
101
109
|
return `\u5207\u6362\u5206\u680F\u4F4D\u7F6E - \u4E0B\u4E00\u4E2A: ${nextPosition}`;
|
|
102
110
|
});
|
|
103
|
-
const __returned__ = { title, sessionListTitle, sessionListCollapsed, selectMode, selectEnabled, theme, resolvedTheme, minimized, promptDockVisible, reviewPanelVisible, reviewPanelEnabled, mode, displayMode, splitPosition, handleToggleSessionList, handleToggleSelectMode, handleToggleTheme, handleToggleDisplayMode, handleToggleSplitPosition, handleClose, handleToggleMinimize, handleTogglePromptDock, handleToggleReviewPanel, handleRefresh, handleCreateSession, DISPLAY_MODE_LABELS, DISPLAY_CYCLE, isSplitMode, themeIconTitle, themeIconLabel, displayModeIconTitle, displayModeIconLabel, splitPositionIconTitle, splitPositionIconLabel };
|
|
111
|
+
const __returned__ = { title, sessionListTitle, sessionListCollapsed, selectMode, selectEnabled, theme, resolvedTheme, minimized, promptDockVisible, reviewPanelVisible, reviewPanelEnabled, providerSidebar, sidebarCollapseControl, mode, displayMode, splitPosition, handleToggleSessionList, handleToggleSelectMode, handleToggleTheme, handleToggleDisplayMode, handleToggleSplitPosition, handleClose, handleToggleMinimize, handleTogglePromptDock, handleToggleReviewPanel, handleRefresh, handleCreateSession, DISPLAY_MODE_LABELS, DISPLAY_CYCLE, isSplitMode, showSidebarToggle, showNewSessionButton, themeIconTitle, themeIconLabel, displayModeIconTitle, displayModeIconLabel, splitPositionIconTitle, splitPositionIconLabel };
|
|
104
112
|
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
105
113
|
return __returned__;
|
|
106
114
|
}
|
|
@@ -220,7 +228,8 @@ const _hoisted_22 = {
|
|
|
220
228
|
function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
221
229
|
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("div", _hoisted_1, [
|
|
222
230
|
(0, import_vue3.createElementVNode)("div", _hoisted_2, [
|
|
223
|
-
(0, import_vue3.
|
|
231
|
+
$setup.showSidebarToggle ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("button", {
|
|
232
|
+
key: 0,
|
|
224
233
|
class: (0, import_vue3.normalizeClass)(["aipanel-header-btn session-toggle", { active: !$setup.sessionListCollapsed }]),
|
|
225
234
|
type: "button",
|
|
226
235
|
title: $setup.sessionListTitle,
|
|
@@ -250,7 +259,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
250
259
|
/* CACHED */
|
|
251
260
|
))
|
|
252
261
|
])
|
|
253
|
-
], 10, _hoisted_3),
|
|
262
|
+
], 10, _hoisted_3)) : (0, import_vue3.createCommentVNode)("v-if", true),
|
|
254
263
|
(0, import_vue3.createElementVNode)("button", {
|
|
255
264
|
class: (0, import_vue3.normalizeClass)(["aipanel-header-btn select-btn", { active: $setup.selectMode }]),
|
|
256
265
|
type: "button",
|
|
@@ -308,7 +317,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
308
317
|
])
|
|
309
318
|
], 8, _hoisted_5),
|
|
310
319
|
$setup.displayMode !== "extension" ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("button", {
|
|
311
|
-
key:
|
|
320
|
+
key: 1,
|
|
312
321
|
class: "aipanel-header-btn display-mode-btn",
|
|
313
322
|
type: "button",
|
|
314
323
|
title: $setup.displayModeIconTitle,
|
|
@@ -510,7 +519,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
510
519
|
/* CACHED */
|
|
511
520
|
)
|
|
512
521
|
])])) : (0, import_vue3.createCommentVNode)("v-if", true),
|
|
513
|
-
$setup.
|
|
522
|
+
$setup.showNewSessionButton ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("button", {
|
|
514
523
|
key: 2,
|
|
515
524
|
class: "aipanel-header-btn new-session-btn",
|
|
516
525
|
type: "button",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.aipanel-resize-handle{position:absolute;left:0;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background .2s ease}.aipanel-resize-handle.handle-left{left:auto;right:0}.aipanel-resize-handle:hover,.aipanel-resize-handle.resizing{background:var(--ap-
|
|
1
|
+
.aipanel-resize-handle{position:absolute;left:0;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background .2s ease}.aipanel-resize-handle.handle-left{left:auto;right:0}.aipanel-resize-handle:hover,.aipanel-resize-handle.resizing{background:var(--ap-accent-bg)}.aipanel-resize-handle:after{content:"";position:absolute;left:2px;top:50%;transform:translateY(-50%);width:2px;height:40px;background:var(--ap-border-faint);border-radius:1px;opacity:0;transition:opacity .2s ease}.aipanel-resize-handle.handle-left:after{left:auto;right:2px}.aipanel-resize-handle:hover:after,.aipanel-resize-handle.resizing:after{opacity:1}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.aipanel-selected-bubbles{position:absolute;display:none;flex-direction:column;gap:6px;max-width:220px;max-height:300px;overflow-y:auto}.aipanel-selected-bubbles.visible{display:flex}.aipanel-selected-bubble{display:flex;flex-direction:column;gap:2px;padding:8px 24px 8px 10px;background:var(--ap-bg-main);border:1px solid var(--ap-border-primary);border-radius:8px;font-size:12px;box-shadow:var(--ap-shadow-sm);position:relative;cursor:pointer;transition:all .2s}.aipanel-selected-bubble:hover{border-color:var(--ap-
|
|
1
|
+
.aipanel-selected-bubbles{position:absolute;display:none;flex-direction:column;gap:6px;max-width:220px;max-height:300px;overflow-y:auto}.aipanel-selected-bubbles.visible{display:flex}.aipanel-selected-bubble{display:flex;flex-direction:column;gap:2px;padding:8px 24px 8px 10px;background:var(--ap-bg-main);border:1px solid var(--ap-border-primary);border-radius:8px;font-size:12px;box-shadow:var(--ap-shadow-sm);position:relative;cursor:pointer;transition:all .2s}.aipanel-selected-bubble:hover{border-color:var(--ap-accent);box-shadow:var(--ap-shadow-accent)}.aipanel-bubble-text{color:var(--ap-text-primary);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aipanel-bubble-file{color:var(--ap-text-placeholder);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aipanel-bubble-remove{position:absolute;top:8px;right:6px;width:16px;height:16px;border-radius:50%;border:none;background:transparent;color:var(--ap-text-placeholder);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:12px;transition:all .2s}.aipanel-bubble-remove:hover{background:var(--ap-danger);color:#fff}.aipanel-bubble-empty{padding:8px 12px;background:var(--ap-bg-main);border:1px dashed var(--ap-border-secondary);border-radius:8px;color:var(--ap-text-placeholder);font-size:12px;text-align:center}
|
|
@@ -59,7 +59,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
59
59
|
"aria-label": "\u5DF2\u9009\u5143\u7D20\u5217\u8868"
|
|
60
60
|
},
|
|
61
61
|
[
|
|
62
|
-
$setup.items.length === 0 ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("div", _hoisted_1, "\u6682\u65E0\u9009\u4E2D\u5143\u7D20")) : ((0, import_vue2.openBlock)(true), (0, import_vue2.createElementBlock)(
|
|
62
|
+
$setup.items.length === 0 ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("div", _hoisted_1, " \u6682\u65E0\u9009\u4E2D\u5143\u7D20 ")) : ((0, import_vue2.openBlock)(true), (0, import_vue2.createElementBlock)(
|
|
63
63
|
import_vue2.Fragment,
|
|
64
64
|
{ key: 1 },
|
|
65
65
|
(0, import_vue2.renderList)($setup.items, (item, index) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.aipanel-right-toolbar{width:140px;background:var(--ap-bg-secondary);border-left:1px solid var(--ap-border-
|
|
1
|
+
.aipanel-right-toolbar{width:140px;background:var(--ap-bg-secondary);border-left:1px solid var(--ap-border-faint);display:flex;flex-direction:column;flex-shrink:0;transition:width .2s ease;overflow:hidden}.aipanel-right-toolbar.collapsed{width:0;overflow:hidden}.aipanel-right-toolbar.collapsed .aipanel-selected-nodes-header,.aipanel-right-toolbar.collapsed .aipanel-selected-nodes,.aipanel-right-toolbar.collapsed .aipanel-clear-all-btn{display:none}.aipanel-selected-nodes-header{padding:12px 8px 8px;border-bottom:1px solid var(--ap-border-faint)}.aipanel-selected-nodes-title{font-size:14px;font-weight:600;color:var(--ap-text-primary);margin-bottom:4px}.aipanel-selected-nodes-desc{font-size:11px;color:var(--ap-text-placeholder);line-height:1.4}.aipanel-selected-nodes{flex:1;display:flex;flex-direction:column;padding:8px;gap:6px;overflow-y:auto;overflow-x:hidden}.aipanel-selected-nodes:empty:before{content:"\6682\65e0\9009\4e2d\5143\7d20";color:var(--ap-text-placeholder);font-size:12px;text-align:center;padding:20px 10px}.aipanel-selected-node{display:flex;align-items:center;gap:8px;padding:8px 10px;background:var(--ap-bg-main);border:1px solid var(--ap-border-primary);border-radius:6px;font-size:12px;transition:all .2s}.aipanel-selected-node:hover{border-color:var(--ap-accent);box-shadow:var(--ap-shadow-accent)}.aipanel-node-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.aipanel-node-text{color:var(--ap-text-primary);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aipanel-node-file{color:var(--ap-text-placeholder);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aipanel-node-remove{width:18px;height:18px;border-radius:4px;border:none;background:transparent;color:var(--ap-text-placeholder);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:14px;transition:all .2s;flex-shrink:0}.aipanel-node-remove:hover{background:var(--ap-danger);color:#fff}.aipanel-clear-all-btn{width:calc(100% - 16px);margin:8px;padding:8px 12px;border-radius:6px;border:none;background:var(--ap-danger);color:#fff;font-size:12px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:4px;transition:all .2s}.aipanel-clear-all-btn:hover{background:var(--ap-danger-hover);transform:scale(1.02)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.aipanel-session-list{width:
|
|
1
|
+
.aipanel-session-list{width:236px;background:var(--ap-bg-secondary);border-right:1px solid var(--ap-border-faint);display:flex;flex-direction:column;flex-shrink:0;transition:width .2s ease}.aipanel-session-list.collapsed{width:0;overflow:hidden}.aipanel-session-list.collapsed .aipanel-session-list-header,.aipanel-session-list.collapsed .aipanel-session-list-content{display:none}.aipanel-session-list-header{padding:10px 8px 8px 12px;display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--ap-bg-secondary);border-bottom:1px solid var(--ap-border-faint)}.aipanel-session-list-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;letter-spacing:.02em;line-height:18px;color:var(--ap-text-tertiary)}.aipanel-new-session-btn{flex:none;width:24px;height:24px;border-radius:50%;border:1px solid var(--ap-border-secondary);background:var(--ap-elevated-fill);color:var(--ap-text-primary);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease,border-color .2s ease,color .2s ease}.aipanel-new-session-btn svg{display:block}.aipanel-new-session-btn:hover{background:var(--ap-elevated-hover);color:var(--ap-text-primary)}.aipanel-new-session-btn:active{background:var(--ap-press-bg)}.aipanel-new-session-btn:focus-visible{outline:none;box-shadow:0 0 0 2px var(--ap-accent-bg)}.aipanel-session-list-content{flex:1;min-height:0;overflow-y:auto;padding:8px;position:relative;display:flex;flex-direction:column;gap:2px}.aipanel-session-list-loading-overlay{position:absolute;inset:0;background:var(--ap-overlay-bg);display:flex;align-items:center;justify-content:center;z-index:10;border-radius:8px}.aipanel-loading-spinner.small{width:24px;height:24px;border-width:2px}.aipanel-session-item{position:relative;box-sizing:border-box;display:flex;align-items:center;gap:8px;min-height:36px;padding:8px 10px;border-radius:8px;cursor:pointer;color:var(--ap-text-primary);transition:background-color .15s ease}.aipanel-widget.aipanel-theme-dark .aipanel-session-item{color:var(--ap-text-secondary)}.aipanel-session-item:hover{background:var(--ap-hover-bg)}.aipanel-session-item:active{background:var(--ap-press-bg)}.aipanel-session-item.active{background:var(--ap-hover-bg)}.aipanel-session-title-text{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:400;line-height:20px}.aipanel-session-meta{flex:none;margin-left:auto;font-size:12px;line-height:20px;color:var(--ap-text-placeholder);white-space:nowrap;transition:opacity .15s ease}.aipanel-session-item:hover .aipanel-session-meta{opacity:0}.aipanel-session-delete-btn{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:22px;height:22px;border:none;border-radius:6px;background:transparent;color:var(--ap-text-placeholder);font-size:16px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s ease,background-color .15s ease,color .15s ease}.aipanel-session-item:hover .aipanel-session-delete-btn{opacity:1}.aipanel-session-delete-btn:hover{background:transparent;color:var(--ap-text-primary)}.aipanel-session-state{position:relative;flex:none;width:10px;height:10px;margin-right:-2px}.aipanel-session-state-pending:before,.aipanel-session-state-completed:before{content:"";position:absolute;inset:0;border-radius:50%;background:currentColor;opacity:.1}.aipanel-session-state-pending:after,.aipanel-session-state-completed:after{content:"";position:absolute;inset:20%;border-radius:50%;background:currentColor}.aipanel-session-state-pending{color:var(--ap-state-pending)}.aipanel-session-state-completed{color:var(--ap-state-completed)}.aipanel-session-state-ongoing{color:var(--ap-state-ongoing)}.aipanel-session-ongoing-cell{fill:currentColor;opacity:.15;animation:aipanel-ongoing-chase 1s infinite}@keyframes aipanel-ongoing-chase{0%,12.4%{opacity:1}12.5%,24.9%{opacity:.6}25%,37.4%{opacity:.35}37.5%,to{opacity:.15}}.aipanel-session-item.active .aipanel-session-state-pending{color:var(--ap-state-pending)}.aipanel-session-item.active .aipanel-session-state-completed{color:var(--ap-state-completed)}.aipanel-session-item.active .aipanel-session-state-ongoing{color:var(--ap-accent)}.aipanel-session-header-skeleton{padding:10px 12px 8px;border-bottom:1px solid var(--ap-border-faint);display:none;align-items:center;gap:8px}.aipanel-session-header-skeleton.visible{display:flex}.aipanel-skeleton-header-title{flex:1;height:12px;width:48px;background:var(--ap-skeleton-gradient);background-size:200% 100%;animation:skeleton-loading 1.5s ease-in-out infinite;border-radius:4px}.aipanel-skeleton-header-btn{width:24px;height:24px;background:var(--ap-skeleton-gradient);background-size:200% 100%;animation:skeleton-loading 1.5s ease-in-out infinite;border-radius:50%}.aipanel-session-skeleton{flex:1;min-height:0;overflow-y:auto;padding:8px;display:none}.aipanel-session-skeleton.visible{display:block}.aipanel-skeleton-item{display:flex;align-items:center;gap:8px;min-height:36px;box-sizing:border-box;padding:8px 10px;border-radius:8px;margin-bottom:2px;background:var(--ap-skeleton-bg)}.aipanel-skeleton-title{flex:1 1 auto;height:13px;background:var(--ap-skeleton-gradient);background-size:200% 100%;animation:skeleton-loading 1.5s ease-in-out infinite;border-radius:4px}.aipanel-skeleton-meta{flex:none;width:32px;height:12px;background:var(--ap-skeleton-gradient);background-size:200% 100%;animation:skeleton-loading 1.5s ease-in-out infinite;border-radius:4px}.aipanel-session-empty{padding:32px 16px;text-align:center;color:var(--ap-text-tertiary);font-size:12px}@keyframes skeleton-loading{0%{background-position:200% 0}to{background-position:-200% 0}}
|