@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
|
@@ -197,8 +197,8 @@ function useInspector(options) {
|
|
|
197
197
|
const tooltipStyle = ref({ top: "0px", left: "0px" });
|
|
198
198
|
const tooltipContent = ref({ description: "", fileInfo: "" });
|
|
199
199
|
let inspectorCheckTimer = null;
|
|
200
|
-
let currentPrimary = "#
|
|
201
|
-
let currentPrimaryBg = "rgba(
|
|
200
|
+
let currentPrimary = "#4176e6";
|
|
201
|
+
let currentPrimaryBg = "rgba(65, 118, 230, 0.1)";
|
|
202
202
|
function setPointerEventsNone(elements) {
|
|
203
203
|
elements.forEach((el) => {
|
|
204
204
|
if (el) el.style.pointerEvents = "none";
|
|
@@ -224,8 +224,8 @@ function useInspector(options) {
|
|
|
224
224
|
const widget = document.querySelector(".aipanel-widget");
|
|
225
225
|
if (widget) {
|
|
226
226
|
const style = getComputedStyle(widget);
|
|
227
|
-
currentPrimary = style.getPropertyValue("--ap-
|
|
228
|
-
currentPrimaryBg = style.getPropertyValue("--ap-
|
|
227
|
+
currentPrimary = style.getPropertyValue("--ap-accent").trim() || currentPrimary;
|
|
228
|
+
currentPrimaryBg = style.getPropertyValue("--ap-accent-bg").trim() || currentPrimaryBg;
|
|
229
229
|
}
|
|
230
230
|
const description = getElementDescription(elementToHighlight);
|
|
231
231
|
const fileName = fileInfo.file ? fileInfo.file.split("/").pop() : "";
|
|
@@ -65,12 +65,12 @@ function useSelection(options) {
|
|
|
65
65
|
const highlightOverlay = document.createElement("div");
|
|
66
66
|
highlightOverlay.className = "aipanel-element-highlight-temp";
|
|
67
67
|
const widget = document.querySelector(".aipanel-widget");
|
|
68
|
-
let primary = "#
|
|
69
|
-
let primaryBg = "rgba(
|
|
68
|
+
let primary = "#4176e6";
|
|
69
|
+
let primaryBg = "rgba(65, 118, 230, 0.1)";
|
|
70
70
|
if (widget) {
|
|
71
71
|
const style = getComputedStyle(widget);
|
|
72
|
-
primary = style.getPropertyValue("--ap-
|
|
73
|
-
primaryBg = style.getPropertyValue("--ap-
|
|
72
|
+
primary = style.getPropertyValue("--ap-accent").trim() || primary;
|
|
73
|
+
primaryBg = style.getPropertyValue("--ap-accent-bg").trim() || primaryBg;
|
|
74
74
|
}
|
|
75
75
|
highlightOverlay.style.border = `2px solid ${primary}`;
|
|
76
76
|
highlightOverlay.style.background = primaryBg;
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { computed } from "vue";
|
|
2
|
+
function formatRelativeTime(ts) {
|
|
3
|
+
const time = new Date(ts).getTime();
|
|
4
|
+
if (Number.isNaN(time)) return "";
|
|
5
|
+
const diff = Date.now() - time;
|
|
6
|
+
if (diff < 0) return "\u521A\u521A";
|
|
7
|
+
const minute = 6e4;
|
|
8
|
+
const hour = 60 * minute;
|
|
9
|
+
const day = 24 * hour;
|
|
10
|
+
if (diff < minute) return "\u521A\u521A";
|
|
11
|
+
if (diff < hour) return `${Math.floor(diff / minute)} \u5206\u949F\u524D`;
|
|
12
|
+
if (diff < day) return `${Math.floor(diff / hour)} \u5C0F\u65F6\u524D`;
|
|
13
|
+
if (diff < 7 * day) return `${Math.floor(diff / day)} \u5929\u524D`;
|
|
14
|
+
const date = new Date(time);
|
|
15
|
+
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
16
|
+
}
|
|
2
17
|
function formatSessionMeta(session) {
|
|
3
18
|
if (session.meta) {
|
|
4
19
|
return session.meta;
|
|
@@ -6,11 +21,7 @@ function formatSessionMeta(session) {
|
|
|
6
21
|
if (!session.updatedAt) {
|
|
7
22
|
return "";
|
|
8
23
|
}
|
|
9
|
-
|
|
10
|
-
if (Number.isNaN(date.getTime())) {
|
|
11
|
-
return "";
|
|
12
|
-
}
|
|
13
|
-
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
24
|
+
return formatRelativeTime(session.updatedAt);
|
|
14
25
|
}
|
|
15
26
|
function useSession(options) {
|
|
16
27
|
const sessionItems = 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)}
|
|
@@ -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;
|
|
@@ -26,7 +26,8 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
|
|
|
26
26
|
thinking: { type: Boolean, required: false, default: false },
|
|
27
27
|
resolvedTheme: { type: String, required: false, default: "light" },
|
|
28
28
|
splitPosition: { type: String, required: false, default: "right" },
|
|
29
|
-
extension: { type: Boolean, required: false, default: false }
|
|
29
|
+
extension: { type: Boolean, required: false, default: false },
|
|
30
|
+
providerSidebar: { type: Boolean, required: false, default: false }
|
|
30
31
|
},
|
|
31
32
|
emits: ["resize", "resize-start", "resize-end", "toggle"],
|
|
32
33
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -147,7 +148,15 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
147
148
|
$props.mode === "split" && $props.resizable ? (_openBlock(), _createElementBlock("button", {
|
|
148
149
|
key: 1,
|
|
149
150
|
type: "button",
|
|
150
|
-
class: _normalizeClass([
|
|
151
|
+
class: _normalizeClass([
|
|
152
|
+
"aipanel-split-toggle-btn",
|
|
153
|
+
{
|
|
154
|
+
open: $setup.props.open,
|
|
155
|
+
thinking: $setup.props.thinking,
|
|
156
|
+
"aipanel-theme-dark": $props.resolvedTheme === "dark",
|
|
157
|
+
"split-left": $props.splitPosition === "left"
|
|
158
|
+
}
|
|
159
|
+
]),
|
|
151
160
|
"aria-expanded": $props.open,
|
|
152
161
|
"aria-label": "\u5207\u6362\u9762\u677F",
|
|
153
162
|
onClick: $setup.handleToggle
|
|
@@ -240,7 +249,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
240
249
|
/* DYNAMIC_SLOTS */
|
|
241
250
|
),
|
|
242
251
|
_createElementVNode("div", _hoisted_7, [
|
|
243
|
-
|
|
252
|
+
!$props.providerSidebar ? (_openBlock(), _createBlock($setup["SessionList"], { key: 0 }, {
|
|
244
253
|
empty: _withCtx(() => [
|
|
245
254
|
_renderSlot(_ctx.$slots, "sessions-empty", {}, () => [
|
|
246
255
|
_cache[4] || (_cache[4] = _createElementVNode(
|
|
@@ -254,7 +263,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
254
263
|
]),
|
|
255
264
|
_: 3
|
|
256
265
|
/* FORWARDED */
|
|
257
|
-
}),
|
|
266
|
+
})) : _createCommentVNode("v-if", true),
|
|
258
267
|
_createVNode(
|
|
259
268
|
$setup["Frame"],
|
|
260
269
|
{ ref: "frameRef" },
|
|
@@ -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)}
|
|
@@ -18,6 +18,8 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
|
|
|
18
18
|
promptDockVisible,
|
|
19
19
|
reviewPanelVisible,
|
|
20
20
|
reviewPanelEnabled,
|
|
21
|
+
providerSidebar,
|
|
22
|
+
sidebarCollapseControl,
|
|
21
23
|
mode,
|
|
22
24
|
displayMode,
|
|
23
25
|
splitPosition,
|
|
@@ -42,6 +44,12 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
|
|
|
42
44
|
};
|
|
43
45
|
const DISPLAY_CYCLE = ["bubble", "split", "auto"];
|
|
44
46
|
const isSplitMode = computed(() => mode.value === "split");
|
|
47
|
+
const showSidebarToggle = computed(
|
|
48
|
+
() => !providerSidebar.value || sidebarCollapseControl.value === "host"
|
|
49
|
+
);
|
|
50
|
+
const showNewSessionButton = computed(
|
|
51
|
+
() => displayMode.value === "extension" || providerSidebar.value
|
|
52
|
+
);
|
|
45
53
|
const themeIconTitle = computed(() => {
|
|
46
54
|
const themeLabels = {
|
|
47
55
|
auto: "\u81EA\u52A8",
|
|
@@ -77,7 +85,7 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
|
|
|
77
85
|
const nextPosition = splitPosition.value === "right" ? "\u5DE6\u4FA7" : "\u53F3\u4FA7";
|
|
78
86
|
return `\u5207\u6362\u5206\u680F\u4F4D\u7F6E - \u4E0B\u4E00\u4E2A: ${nextPosition}`;
|
|
79
87
|
});
|
|
80
|
-
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 };
|
|
88
|
+
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 };
|
|
81
89
|
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
82
90
|
return __returned__;
|
|
83
91
|
}
|
|
@@ -198,7 +206,8 @@ const _hoisted_22 = {
|
|
|
198
206
|
function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
199
207
|
return _openBlock(), _createElementBlock("div", _hoisted_1, [
|
|
200
208
|
_createElementVNode("div", _hoisted_2, [
|
|
201
|
-
|
|
209
|
+
$setup.showSidebarToggle ? (_openBlock(), _createElementBlock("button", {
|
|
210
|
+
key: 0,
|
|
202
211
|
class: _normalizeClass(["aipanel-header-btn session-toggle", { active: !$setup.sessionListCollapsed }]),
|
|
203
212
|
type: "button",
|
|
204
213
|
title: $setup.sessionListTitle,
|
|
@@ -228,7 +237,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
228
237
|
/* CACHED */
|
|
229
238
|
))
|
|
230
239
|
])
|
|
231
|
-
], 10, _hoisted_3),
|
|
240
|
+
], 10, _hoisted_3)) : _createCommentVNode("v-if", true),
|
|
232
241
|
_createElementVNode("button", {
|
|
233
242
|
class: _normalizeClass(["aipanel-header-btn select-btn", { active: $setup.selectMode }]),
|
|
234
243
|
type: "button",
|
|
@@ -286,7 +295,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
286
295
|
])
|
|
287
296
|
], 8, _hoisted_5),
|
|
288
297
|
$setup.displayMode !== "extension" ? (_openBlock(), _createElementBlock("button", {
|
|
289
|
-
key:
|
|
298
|
+
key: 1,
|
|
290
299
|
class: "aipanel-header-btn display-mode-btn",
|
|
291
300
|
type: "button",
|
|
292
301
|
title: $setup.displayModeIconTitle,
|
|
@@ -488,7 +497,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
488
497
|
/* CACHED */
|
|
489
498
|
)
|
|
490
499
|
])])) : _createCommentVNode("v-if", true),
|
|
491
|
-
$setup.
|
|
500
|
+
$setup.showNewSessionButton ? (_openBlock(), _createElementBlock("button", {
|
|
492
501
|
key: 2,
|
|
493
502
|
class: "aipanel-header-btn new-session-btn",
|
|
494
503
|
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}
|
|
@@ -37,7 +37,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
37
37
|
"aria-label": "\u5DF2\u9009\u5143\u7D20\u5217\u8868"
|
|
38
38
|
},
|
|
39
39
|
[
|
|
40
|
-
$setup.items.length === 0 ? (_openBlock(), _createElementBlock("div", _hoisted_1, "\u6682\u65E0\u9009\u4E2D\u5143\u7D20")) : (_openBlock(true), _createElementBlock(
|
|
40
|
+
$setup.items.length === 0 ? (_openBlock(), _createElementBlock("div", _hoisted_1, " \u6682\u65E0\u9009\u4E2D\u5143\u7D20 ")) : (_openBlock(true), _createElementBlock(
|
|
41
41
|
_Fragment,
|
|
42
42
|
{ key: 1 },
|
|
43
43
|
_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}}
|
|
@@ -31,20 +31,61 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
|
|
|
31
31
|
if (showSessionListSkeleton.value) return true;
|
|
32
32
|
return false;
|
|
33
33
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
const ONGOING_CELLS = [
|
|
35
|
+
{ x: 0, y: 0, delay: "-1000ms" },
|
|
36
|
+
{ x: 4, y: 0, delay: "-875ms" },
|
|
37
|
+
{ x: 8, y: 0, delay: "-750ms" },
|
|
38
|
+
{ x: 8, y: 4, delay: "-625ms" },
|
|
39
|
+
{ x: 8, y: 8, delay: "-500ms" },
|
|
40
|
+
{ x: 4, y: 8, delay: "-375ms" },
|
|
41
|
+
{ x: 0, y: 8, delay: "-250ms" },
|
|
42
|
+
{ x: 0, y: 4, delay: "-125ms" }
|
|
43
|
+
];
|
|
44
|
+
const PENDING_LABELS = {
|
|
45
|
+
approval: "\u7B49\u5F85\u5BA1\u6279",
|
|
46
|
+
"plan-review": "\u7B49\u5F85\u8BA1\u5212\u786E\u8BA4",
|
|
47
|
+
question: "\u7B49\u5F85\u56DE\u590D"
|
|
48
|
+
};
|
|
49
|
+
function runningLabel(sessionId) {
|
|
50
|
+
const n = sessionStates?.value?.[sessionId]?.subagentsRunning ?? 0;
|
|
51
|
+
return n > 0 ? "\u5B50\u4EE3\u7406\u8FD0\u884C\u4E2D (" + n + ")" : "\u8FD0\u884C\u4E2D";
|
|
52
|
+
}
|
|
53
|
+
function sessionRowStatus(sessionId) {
|
|
54
|
+
const state = sessionStates?.value?.[sessionId];
|
|
55
|
+
if (!state) return "idle";
|
|
56
|
+
if (state.hasPending) return "pending";
|
|
57
|
+
const subagentsRunning = (state.subagentsRunning ?? 0) > 0;
|
|
58
|
+
if (subagentsRunning) return "running";
|
|
59
|
+
if (state.thinking) return "thinking";
|
|
60
|
+
const running = state.statusType === "running" || state.statusType === "streaming";
|
|
61
|
+
if (running) return "running";
|
|
62
|
+
if (state.completed) return "completed";
|
|
63
|
+
return "idle";
|
|
64
|
+
}
|
|
65
|
+
function pendingLabel(sessionId) {
|
|
66
|
+
const kind = sessionStates?.value?.[sessionId]?.pendingKind;
|
|
67
|
+
return kind && PENDING_LABELS[kind] || "\u7B49\u5F85\u7528\u6237";
|
|
68
|
+
}
|
|
69
|
+
function isSessionActive(sessionId) {
|
|
70
|
+
const status = sessionRowStatus(sessionId);
|
|
71
|
+
return status === "thinking" || status === "running";
|
|
72
|
+
}
|
|
73
|
+
function isSessionPending(sessionId) {
|
|
74
|
+
return sessionRowStatus(sessionId) === "pending";
|
|
75
|
+
}
|
|
76
|
+
function isSessionCompleted(sessionId) {
|
|
77
|
+
return sessionRowStatus(sessionId) === "completed";
|
|
37
78
|
}
|
|
38
79
|
const __returned__ = { collapsed, sessions, loadingSessionList, showSessionListSkeleton, handleCreateSession, handleSelectSession, handleDeleteSession, sessionKey, sessionStates, isAnimating, get animTimer() {
|
|
39
80
|
return animTimer;
|
|
40
81
|
}, set animTimer(v) {
|
|
41
82
|
animTimer = v;
|
|
42
|
-
}, showSkeleton,
|
|
83
|
+
}, showSkeleton, ONGOING_CELLS, PENDING_LABELS, runningLabel, sessionRowStatus, pendingLabel, isSessionActive, isSessionPending, isSessionCompleted };
|
|
43
84
|
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
44
85
|
return __returned__;
|
|
45
86
|
}
|
|
46
87
|
});
|
|
47
|
-
import { createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, Fragment as _Fragment, renderList as _renderList,
|
|
88
|
+
import { createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, Fragment as _Fragment, renderList as _renderList, normalizeStyle as _normalizeStyle, toDisplayString as _toDisplayString, withModifiers as _withModifiers, normalizeClass as _normalizeClass, renderSlot as _renderSlot } from "vue";
|
|
48
89
|
const _hoisted_1 = {
|
|
49
90
|
key: 0,
|
|
50
91
|
class: "aipanel-session-list-header"
|
|
@@ -63,14 +104,20 @@ const _hoisted_4 = {
|
|
|
63
104
|
class: "aipanel-session-list-loading-overlay"
|
|
64
105
|
};
|
|
65
106
|
const _hoisted_5 = ["aria-selected", "onClick"];
|
|
66
|
-
const _hoisted_6 =
|
|
67
|
-
const _hoisted_7 =
|
|
68
|
-
const _hoisted_8 =
|
|
69
|
-
|
|
70
|
-
|
|
107
|
+
const _hoisted_6 = ["title"];
|
|
108
|
+
const _hoisted_7 = ["title"];
|
|
109
|
+
const _hoisted_8 = ["x", "y"];
|
|
110
|
+
const _hoisted_9 = {
|
|
111
|
+
key: 2,
|
|
112
|
+
class: "aipanel-session-state aipanel-session-state-completed",
|
|
113
|
+
title: "\u5DF2\u5B8C\u6210"
|
|
71
114
|
};
|
|
72
|
-
const
|
|
73
|
-
const
|
|
115
|
+
const _hoisted_10 = { class: "aipanel-session-title-text" };
|
|
116
|
+
const _hoisted_11 = {
|
|
117
|
+
key: 3,
|
|
118
|
+
class: "aipanel-session-meta"
|
|
119
|
+
};
|
|
120
|
+
const _hoisted_12 = ["aria-label", "onClick"];
|
|
74
121
|
function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
75
122
|
return _openBlock(), _createElementBlock(
|
|
76
123
|
"div",
|
|
@@ -80,9 +127,12 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
80
127
|
[
|
|
81
128
|
_createCommentVNode(" Header "),
|
|
82
129
|
!$setup.showSkeleton ? (_openBlock(), _createElementBlock("div", _hoisted_1, [
|
|
83
|
-
_cache[
|
|
130
|
+
_cache[2] || (_cache[2] = _createElementVNode(
|
|
84
131
|
"span",
|
|
85
|
-
{
|
|
132
|
+
{
|
|
133
|
+
id: "aipanel-session-list-title",
|
|
134
|
+
class: "aipanel-session-list-title"
|
|
135
|
+
},
|
|
86
136
|
"\u4F1A\u8BDD\u5217\u8868",
|
|
87
137
|
-1
|
|
88
138
|
/* CACHED */
|
|
@@ -93,13 +143,32 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
93
143
|
title: "\u65B0\u5EFA\u4F1A\u8BDD",
|
|
94
144
|
"aria-label": "\u65B0\u5EFA\u4F1A\u8BDD",
|
|
95
145
|
onClick: _cache[0] || (_cache[0] = (...args) => $setup.handleCreateSession && $setup.handleCreateSession(...args))
|
|
96
|
-
},
|
|
146
|
+
}, [..._cache[1] || (_cache[1] = [
|
|
147
|
+
_createElementVNode(
|
|
148
|
+
"svg",
|
|
149
|
+
{
|
|
150
|
+
viewBox: "0 0 16 16",
|
|
151
|
+
width: "12",
|
|
152
|
+
height: "12",
|
|
153
|
+
fill: "none",
|
|
154
|
+
stroke: "currentColor",
|
|
155
|
+
"stroke-width": "1.6",
|
|
156
|
+
"stroke-linecap": "round",
|
|
157
|
+
"aria-hidden": "true"
|
|
158
|
+
},
|
|
159
|
+
[
|
|
160
|
+
_createElementVNode("path", { d: "M8 3v10M3 8h10" })
|
|
161
|
+
],
|
|
162
|
+
-1
|
|
163
|
+
/* CACHED */
|
|
164
|
+
)
|
|
165
|
+
])])
|
|
97
166
|
])) : (_openBlock(), _createElementBlock(
|
|
98
167
|
_Fragment,
|
|
99
168
|
{ key: 1 },
|
|
100
169
|
[
|
|
101
170
|
_createCommentVNode(" Header Skeleton "),
|
|
102
|
-
_cache[
|
|
171
|
+
_cache[3] || (_cache[3] = _createElementVNode(
|
|
103
172
|
"div",
|
|
104
173
|
{ class: "aipanel-session-header-skeleton visible" },
|
|
105
174
|
[
|
|
@@ -122,7 +191,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
122
191
|
return _createElementVNode("div", {
|
|
123
192
|
key: `skeleton-${i}`,
|
|
124
193
|
class: "aipanel-skeleton-item"
|
|
125
|
-
}, [..._cache[
|
|
194
|
+
}, [..._cache[4] || (_cache[4] = [
|
|
126
195
|
_createElementVNode(
|
|
127
196
|
"div",
|
|
128
197
|
{ class: "aipanel-skeleton-title" },
|
|
@@ -148,7 +217,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
148
217
|
[
|
|
149
218
|
_createCommentVNode(" Content "),
|
|
150
219
|
_createElementVNode("div", _hoisted_3, [
|
|
151
|
-
$setup.loadingSessionList ? (_openBlock(), _createElementBlock("div", _hoisted_4, [..._cache[
|
|
220
|
+
$setup.loadingSessionList ? (_openBlock(), _createElementBlock("div", _hoisted_4, [..._cache[5] || (_cache[5] = [
|
|
152
221
|
_createElementVNode(
|
|
153
222
|
"div",
|
|
154
223
|
{ class: "aipanel-loading-spinner small" },
|
|
@@ -163,34 +232,63 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
163
232
|
_renderList($setup.sessions, (item) => {
|
|
164
233
|
return _openBlock(), _createElementBlock("div", {
|
|
165
234
|
key: item[$setup.sessionKey],
|
|
166
|
-
class: _normalizeClass(["aipanel-session-item", { active: item.active, thinking: $setup.
|
|
235
|
+
class: _normalizeClass(["aipanel-session-item", { active: item.active, thinking: $setup.isSessionActive(item.id) }]),
|
|
167
236
|
role: "option",
|
|
168
237
|
"aria-selected": item.active,
|
|
169
238
|
onClick: ($event) => $setup.handleSelectSession(item)
|
|
170
239
|
}, [
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
240
|
+
_createCommentVNode(" \u72B6\u6001\u6307\u793A\uFF1Apending=\u7425\u73C0\u70B9 > \u6D3B\u8DC3(thinking/running/\u5B50\u4EE3\u7406)=\u8F6C\u5708 > completed=\u7EFF\u70B9 > idle "),
|
|
241
|
+
$setup.isSessionPending(item.id) ? (_openBlock(), _createElementBlock("span", {
|
|
242
|
+
key: 0,
|
|
243
|
+
class: "aipanel-session-state aipanel-session-state-pending",
|
|
244
|
+
title: $setup.pendingLabel(item.id)
|
|
245
|
+
}, null, 8, _hoisted_6)) : $setup.isSessionActive(item.id) ? (_openBlock(), _createElementBlock("svg", {
|
|
246
|
+
key: 1,
|
|
247
|
+
class: "aipanel-session-state aipanel-session-state-ongoing",
|
|
248
|
+
title: $setup.runningLabel(item.id),
|
|
249
|
+
viewBox: "0 0 10 10",
|
|
250
|
+
width: "10",
|
|
251
|
+
height: "10",
|
|
252
|
+
"aria-hidden": "true"
|
|
253
|
+
}, [
|
|
254
|
+
(_openBlock(), _createElementBlock(
|
|
255
|
+
_Fragment,
|
|
256
|
+
null,
|
|
257
|
+
_renderList($setup.ONGOING_CELLS, (c) => {
|
|
258
|
+
return _createElementVNode("rect", {
|
|
259
|
+
key: c.x + "-" + c.y,
|
|
260
|
+
x: c.x,
|
|
261
|
+
y: c.y,
|
|
262
|
+
width: "2",
|
|
263
|
+
height: "2",
|
|
264
|
+
style: _normalizeStyle({ animationDelay: c.delay }),
|
|
265
|
+
class: "aipanel-session-ongoing-cell"
|
|
266
|
+
}, null, 12, _hoisted_8);
|
|
267
|
+
}),
|
|
268
|
+
64
|
|
269
|
+
/* STABLE_FRAGMENT */
|
|
270
|
+
))
|
|
271
|
+
], 8, _hoisted_7)) : $setup.isSessionCompleted(item.id) ? (_openBlock(), _createElementBlock("span", _hoisted_9)) : _createCommentVNode("v-if", true),
|
|
187
272
|
_createElementVNode(
|
|
188
|
-
"
|
|
273
|
+
"span",
|
|
189
274
|
_hoisted_10,
|
|
275
|
+
_toDisplayString(item.title),
|
|
276
|
+
1
|
|
277
|
+
/* TEXT */
|
|
278
|
+
),
|
|
279
|
+
item.meta ? (_openBlock(), _createElementBlock(
|
|
280
|
+
"span",
|
|
281
|
+
_hoisted_11,
|
|
190
282
|
_toDisplayString(item.meta),
|
|
191
283
|
1
|
|
192
284
|
/* TEXT */
|
|
193
|
-
)
|
|
285
|
+
)) : _createCommentVNode("v-if", true),
|
|
286
|
+
_createElementVNode("button", {
|
|
287
|
+
class: "aipanel-session-delete-btn",
|
|
288
|
+
type: "button",
|
|
289
|
+
"aria-label": `\u5220\u9664\u4F1A\u8BDD: ${item.title}`,
|
|
290
|
+
onClick: _withModifiers(($event) => $setup.handleDeleteSession(item), ["stop"])
|
|
291
|
+
}, " \xD7 ", 8, _hoisted_12)
|
|
194
292
|
], 10, _hoisted_5);
|
|
195
293
|
}),
|
|
196
294
|
128
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Ref } from "vue";
|
|
2
|
-
import type { AIPanelWidgetSessionItem, AIPanelSelectedElementItem, AIPanelRemoveSelectedPayload, AIPanelSessionThinkingState, DisplayMode } from "./types";
|
|
2
|
+
import type { AIPanelWidgetSessionItem, AIPanelSelectedElementItem, AIPanelRemoveSelectedPayload, AIPanelSessionThinkingState, DisplayMode, ProviderSidebarCollapseControl } from "./types";
|
|
3
3
|
import type { FloatingBubbleOffset } from "./components/FloatingBubble/types";
|
|
4
4
|
export interface AIPanelWidgetContext {
|
|
5
5
|
theme: Ref<string>;
|
|
@@ -26,6 +26,10 @@ export interface AIPanelWidgetContext {
|
|
|
26
26
|
reviewPanelVisible: Ref<boolean>;
|
|
27
27
|
/** 是否支持代码审查面板(右上角 </> 按钮);由 Provider capabilities.reviewPanel 决定 */
|
|
28
28
|
reviewPanelEnabled: Ref<boolean>;
|
|
29
|
+
/** Provider 接管会话侧栏(隐藏原生会话列表,Provider 自家侧栏渲染);由 capabilities.sidebar.takeover 决定 */
|
|
30
|
+
providerSidebar: Ref<boolean>;
|
|
31
|
+
/** 侧栏折叠开关归属(host=宿主左上角按钮驱动 / provider=Provider 自带开关);由 capabilities.sidebar.collapseControl 决定 */
|
|
32
|
+
sidebarCollapseControl: Ref<ProviderSidebarCollapseControl>;
|
|
29
33
|
bubbleOffset: Ref<FloatingBubbleOffset | undefined>;
|
|
30
34
|
mode: Ref<"bubble" | "split">;
|
|
31
35
|
displayMode: Ref<DisplayMode>;
|