@aipanel/ui 1.2.14 → 1.2.15

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.
@@ -1 +1 @@
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}}
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-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}}
@@ -29,6 +29,7 @@ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
29
29
  const showSkeleton = computed(() => {
30
30
  if (isAnimating.value) return true;
31
31
  if (showSessionListSkeleton.value) return true;
32
+ if (loadingSessionList.value) return true;
32
33
  return false;
33
34
  });
34
35
  const ONGOING_CELLS = [
@@ -99,25 +100,21 @@ const _hoisted_3 = {
99
100
  role: "listbox",
100
101
  "aria-labelledby": "aipanel-session-list-title"
101
102
  };
102
- const _hoisted_4 = {
103
- key: 0,
104
- class: "aipanel-session-list-loading-overlay"
105
- };
106
- const _hoisted_5 = ["aria-selected", "onClick"];
103
+ const _hoisted_4 = ["aria-selected", "onClick"];
104
+ const _hoisted_5 = ["title"];
107
105
  const _hoisted_6 = ["title"];
108
- const _hoisted_7 = ["title"];
109
- const _hoisted_8 = ["x", "y"];
110
- const _hoisted_9 = {
106
+ const _hoisted_7 = ["x", "y"];
107
+ const _hoisted_8 = {
111
108
  key: 2,
112
109
  class: "aipanel-session-state aipanel-session-state-completed",
113
110
  title: "\u5DF2\u5B8C\u6210"
114
111
  };
115
- const _hoisted_10 = { class: "aipanel-session-title-text" };
116
- const _hoisted_11 = {
112
+ const _hoisted_9 = { class: "aipanel-session-title-text" };
113
+ const _hoisted_10 = {
117
114
  key: 3,
118
115
  class: "aipanel-session-meta"
119
116
  };
120
- const _hoisted_12 = ["aria-label", "onClick"];
117
+ const _hoisted_11 = ["aria-label", "onClick"];
121
118
  function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
122
119
  return _openBlock(), _createElementBlock(
123
120
  "div",
@@ -217,18 +214,9 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
217
214
  [
218
215
  _createCommentVNode(" Content "),
219
216
  _createElementVNode("div", _hoisted_3, [
220
- $setup.loadingSessionList ? (_openBlock(), _createElementBlock("div", _hoisted_4, [..._cache[5] || (_cache[5] = [
221
- _createElementVNode(
222
- "div",
223
- { class: "aipanel-loading-spinner small" },
224
- null,
225
- -1
226
- /* CACHED */
227
- )
228
- ])])) : _createCommentVNode("v-if", true),
229
217
  $setup.sessions.length > 0 ? (_openBlock(true), _createElementBlock(
230
218
  _Fragment,
231
- { key: 1 },
219
+ { key: 0 },
232
220
  _renderList($setup.sessions, (item) => {
233
221
  return _openBlock(), _createElementBlock("div", {
234
222
  key: item[$setup.sessionKey],
@@ -242,7 +230,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
242
230
  key: 0,
243
231
  class: "aipanel-session-state aipanel-session-state-pending",
244
232
  title: $setup.pendingLabel(item.id)
245
- }, null, 8, _hoisted_6)) : $setup.isSessionActive(item.id) ? (_openBlock(), _createElementBlock("svg", {
233
+ }, null, 8, _hoisted_5)) : $setup.isSessionActive(item.id) ? (_openBlock(), _createElementBlock("svg", {
246
234
  key: 1,
247
235
  class: "aipanel-session-state aipanel-session-state-ongoing",
248
236
  title: $setup.runningLabel(item.id),
@@ -263,22 +251,22 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
263
251
  height: "2",
264
252
  style: _normalizeStyle({ animationDelay: c.delay }),
265
253
  class: "aipanel-session-ongoing-cell"
266
- }, null, 12, _hoisted_8);
254
+ }, null, 12, _hoisted_7);
267
255
  }),
268
256
  64
269
257
  /* STABLE_FRAGMENT */
270
258
  ))
271
- ], 8, _hoisted_7)) : $setup.isSessionCompleted(item.id) ? (_openBlock(), _createElementBlock("span", _hoisted_9)) : _createCommentVNode("v-if", true),
259
+ ], 8, _hoisted_6)) : $setup.isSessionCompleted(item.id) ? (_openBlock(), _createElementBlock("span", _hoisted_8)) : _createCommentVNode("v-if", true),
272
260
  _createElementVNode(
273
261
  "span",
274
- _hoisted_10,
262
+ _hoisted_9,
275
263
  _toDisplayString(item.title),
276
264
  1
277
265
  /* TEXT */
278
266
  ),
279
267
  item.meta ? (_openBlock(), _createElementBlock(
280
268
  "span",
281
- _hoisted_11,
269
+ _hoisted_10,
282
270
  _toDisplayString(item.meta),
283
271
  1
284
272
  /* TEXT */
@@ -288,14 +276,14 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
288
276
  type: "button",
289
277
  "aria-label": `\u5220\u9664\u4F1A\u8BDD: ${item.title}`,
290
278
  onClick: _withModifiers(($event) => $setup.handleDeleteSession(item), ["stop"])
291
- }, " \xD7 ", 8, _hoisted_12)
292
- ], 10, _hoisted_5);
279
+ }, " \xD7 ", 8, _hoisted_11)
280
+ ], 10, _hoisted_4);
293
281
  }),
294
282
  128
295
283
  /* KEYED_FRAGMENT */
296
284
  )) : (_openBlock(), _createElementBlock(
297
285
  _Fragment,
298
- { key: 2 },
286
+ { key: 1 },
299
287
  [
300
288
  _createCommentVNode(" Empty State "),
301
289
  _renderSlot(_ctx.$slots, "empty")
package/es/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { App } from 'vue';
2
- declare const version = "1.2.14";
2
+ declare const version = "1.2.15";
3
3
  declare function install(app: App<any>, options?: any): void;
4
4
  export { install, version, };
5
5
  export * from './AI-panel-widget';
package/es/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AIPanelWidget } from "./AI-panel-widget/index.mjs";
2
- const version = "1.2.14";
2
+ const version = "1.2.15";
3
3
  function install(app, options) {
4
4
  const components = [
5
5
  AIPanelWidget
@@ -1 +1 @@
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}}
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-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}}
@@ -52,6 +52,7 @@ const __vue_sfc__ = /* @__PURE__ */ (0, import_vue.defineComponent)({
52
52
  const showSkeleton = (0, import_vue2.computed)(() => {
53
53
  if (isAnimating.value) return true;
54
54
  if (showSessionListSkeleton.value) return true;
55
+ if (loadingSessionList.value) return true;
55
56
  return false;
56
57
  });
57
58
  const ONGOING_CELLS = [
@@ -121,25 +122,21 @@ const _hoisted_3 = {
121
122
  role: "listbox",
122
123
  "aria-labelledby": "aipanel-session-list-title"
123
124
  };
124
- const _hoisted_4 = {
125
- key: 0,
126
- class: "aipanel-session-list-loading-overlay"
127
- };
128
- const _hoisted_5 = ["aria-selected", "onClick"];
125
+ const _hoisted_4 = ["aria-selected", "onClick"];
126
+ const _hoisted_5 = ["title"];
129
127
  const _hoisted_6 = ["title"];
130
- const _hoisted_7 = ["title"];
131
- const _hoisted_8 = ["x", "y"];
132
- const _hoisted_9 = {
128
+ const _hoisted_7 = ["x", "y"];
129
+ const _hoisted_8 = {
133
130
  key: 2,
134
131
  class: "aipanel-session-state aipanel-session-state-completed",
135
132
  title: "\u5DF2\u5B8C\u6210"
136
133
  };
137
- const _hoisted_10 = { class: "aipanel-session-title-text" };
138
- const _hoisted_11 = {
134
+ const _hoisted_9 = { class: "aipanel-session-title-text" };
135
+ const _hoisted_10 = {
139
136
  key: 3,
140
137
  class: "aipanel-session-meta"
141
138
  };
142
- const _hoisted_12 = ["aria-label", "onClick"];
139
+ const _hoisted_11 = ["aria-label", "onClick"];
143
140
  function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
144
141
  return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
145
142
  "div",
@@ -239,18 +236,9 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
239
236
  [
240
237
  (0, import_vue3.createCommentVNode)(" Content "),
241
238
  (0, import_vue3.createElementVNode)("div", _hoisted_3, [
242
- $setup.loadingSessionList ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("div", _hoisted_4, [..._cache[5] || (_cache[5] = [
243
- (0, import_vue3.createElementVNode)(
244
- "div",
245
- { class: "aipanel-loading-spinner small" },
246
- null,
247
- -1
248
- /* CACHED */
249
- )
250
- ])])) : (0, import_vue3.createCommentVNode)("v-if", true),
251
239
  $setup.sessions.length > 0 ? ((0, import_vue3.openBlock)(true), (0, import_vue3.createElementBlock)(
252
240
  import_vue3.Fragment,
253
- { key: 1 },
241
+ { key: 0 },
254
242
  (0, import_vue3.renderList)($setup.sessions, (item) => {
255
243
  return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("div", {
256
244
  key: item[$setup.sessionKey],
@@ -264,7 +252,7 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
264
252
  key: 0,
265
253
  class: "aipanel-session-state aipanel-session-state-pending",
266
254
  title: $setup.pendingLabel(item.id)
267
- }, null, 8, _hoisted_6)) : $setup.isSessionActive(item.id) ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("svg", {
255
+ }, null, 8, _hoisted_5)) : $setup.isSessionActive(item.id) ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("svg", {
268
256
  key: 1,
269
257
  class: "aipanel-session-state aipanel-session-state-ongoing",
270
258
  title: $setup.runningLabel(item.id),
@@ -285,22 +273,22 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
285
273
  height: "2",
286
274
  style: (0, import_vue3.normalizeStyle)({ animationDelay: c.delay }),
287
275
  class: "aipanel-session-ongoing-cell"
288
- }, null, 12, _hoisted_8);
276
+ }, null, 12, _hoisted_7);
289
277
  }),
290
278
  64
291
279
  /* STABLE_FRAGMENT */
292
280
  ))
293
- ], 8, _hoisted_7)) : $setup.isSessionCompleted(item.id) ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("span", _hoisted_9)) : (0, import_vue3.createCommentVNode)("v-if", true),
281
+ ], 8, _hoisted_6)) : $setup.isSessionCompleted(item.id) ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("span", _hoisted_8)) : (0, import_vue3.createCommentVNode)("v-if", true),
294
282
  (0, import_vue3.createElementVNode)(
295
283
  "span",
296
- _hoisted_10,
284
+ _hoisted_9,
297
285
  (0, import_vue3.toDisplayString)(item.title),
298
286
  1
299
287
  /* TEXT */
300
288
  ),
301
289
  item.meta ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
302
290
  "span",
303
- _hoisted_11,
291
+ _hoisted_10,
304
292
  (0, import_vue3.toDisplayString)(item.meta),
305
293
  1
306
294
  /* TEXT */
@@ -310,14 +298,14 @@ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
310
298
  type: "button",
311
299
  "aria-label": `\u5220\u9664\u4F1A\u8BDD: ${item.title}`,
312
300
  onClick: (0, import_vue3.withModifiers)(($event) => $setup.handleDeleteSession(item), ["stop"])
313
- }, " \xD7 ", 8, _hoisted_12)
314
- ], 10, _hoisted_5);
301
+ }, " \xD7 ", 8, _hoisted_11)
302
+ ], 10, _hoisted_4);
315
303
  }),
316
304
  128
317
305
  /* KEYED_FRAGMENT */
318
306
  )) : ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
319
307
  import_vue3.Fragment,
320
- { key: 2 },
308
+ { key: 1 },
321
309
  [
322
310
  (0, import_vue3.createCommentVNode)(" Empty State "),
323
311
  (0, import_vue3.renderSlot)(_ctx.$slots, "empty")
package/lib/index.cjs CHANGED
@@ -26,7 +26,7 @@ module.exports = __toCommonJS(lib_exports);
26
26
  var import_AI_panel_widget = require("./AI-panel-widget/index.cjs");
27
27
  __reExport(lib_exports, require("./AI-panel-widget/index.cjs"), module.exports);
28
28
  __reExport(lib_exports, require("./setup.cjs"), module.exports);
29
- const version = "1.2.14";
29
+ const version = "1.2.15";
30
30
  function install(app, options) {
31
31
  const components = [
32
32
  import_AI_panel_widget.AIPanelWidget
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { App } from 'vue';
2
- declare const version = "1.2.14";
2
+ declare const version = "1.2.15";
3
3
  declare function install(app: App<any>, options?: any): void;
4
4
  export { install, version, };
5
5
  export * from './AI-panel-widget';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aipanel/ui",
3
- "version": "1.2.14",
3
+ "version": "1.2.15",
4
4
  "description": "Reusable AIPanel widget components built with Pagoda CLI",
5
5
  "type": "module",
6
6
  "main": "lib/index.cjs",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "css-selector-generator": "^3.9.2",
34
- "@aipanel/core": "1.2.14"
34
+ "@aipanel/core": "1.2.15"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "pagoda-cli build",