@aipanel/dsh-client 1.2.25 → 1.2.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/client.js +27 -20
  2. package/package.json +2 -2
package/lib/client.js CHANGED
@@ -365,6 +365,32 @@ function registerDiagnosticsView(ctx, enabled = true) {
365
365
  });
366
366
  }
367
367
 
368
+ // dsh-client/src/client/layout-overrides.ts
369
+ var LAYOUT_STYLE_ID = "aipanel-layout-overrides";
370
+ var SIDEBAR_COLUMN_SELECTOR = '[class*="sidebarCol"]';
371
+ var MAIN_COLUMN_SELECTOR = '[class*="centerCol"]';
372
+ function buildLayoutOverridesCss() {
373
+ return [
374
+ // 侧栏列(grid 容器的直接子级)
375
+ `:has(> ${SIDEBAR_COLUMN_SELECTOR}) > ${SIDEBAR_COLUMN_SELECTOR} {`,
376
+ " display: none !important;",
377
+ "}",
378
+ // 主列跨过侧栏轨道:既回收侧栏宽度,又保留 AppFrame 的三轨结构。
379
+ // 1 / -2 = 由首条网格线跨到最后一条之前,即吃掉除右侧栏外的全部轨道。
380
+ `:has(> ${SIDEBAR_COLUMN_SELECTOR}) > ${MAIN_COLUMN_SELECTOR} {`,
381
+ " grid-column: 1 / -2 !important;",
382
+ "}",
383
+ // 展开态会渲染侧栏拖拽手柄,一并隐藏
384
+ '[data-side="sidebar"] {',
385
+ " display: none !important;",
386
+ "}",
387
+ // 工作区下拉(portal 到 body,随侧栏一起隐藏)
388
+ '[aria-label="\u9009\u62E9\u5DE5\u4F5C\u533A"] {',
389
+ " display: none !important;",
390
+ "}"
391
+ ].join("\n");
392
+ }
393
+
368
394
  // dsh-client/src/client/index.ts
369
395
  var MSG = WIDGET_MSG;
370
396
  var inject = ["slots", "sessions", "inputTriggers", "conversation", "uiWorkspace"];
@@ -547,32 +573,13 @@ function apply(ctx, config = {}) {
547
573
  } catch {
548
574
  }
549
575
  };
550
- const LAYOUT_STYLE_ID = "aipanel-layout-overrides";
551
- const SIDEBAR_COLUMN_SELECTOR = '[class*="sidebarCol"]';
552
576
  const injectLayoutOverrides = () => {
553
577
  if (!embedded) return;
554
578
  try {
555
579
  if (document.getElementById(LAYOUT_STYLE_ID)) return;
556
580
  const style = document.createElement("style");
557
581
  style.id = LAYOUT_STYLE_ID;
558
- style.textContent = [
559
- // 侧栏列(grid 容器的直接子级)
560
- `:has(> ${SIDEBAR_COLUMN_SELECTOR}) > ${SIDEBAR_COLUMN_SELECTOR} {`,
561
- " display: none !important;",
562
- "}",
563
- // grid 容器:回收侧栏轨道,覆盖内联 grid-template-columns
564
- `:has(> ${SIDEBAR_COLUMN_SELECTOR}) {`,
565
- " grid-template-columns: auto !important;",
566
- "}",
567
- // 展开态会渲染侧栏拖拽手柄,一并隐藏
568
- '[data-side="sidebar"] {',
569
- " display: none !important;",
570
- "}",
571
- // 工作区下拉
572
- '[aria-label="\u9009\u62E9\u5DE5\u4F5C\u533A"] {',
573
- " display: none !important;",
574
- "}"
575
- ].join("\n");
582
+ style.textContent = buildLayoutOverridesCss();
576
583
  document.head.appendChild(style);
577
584
  } catch {
578
585
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aipanel/dsh-client",
3
- "version": "1.2.25",
3
+ "version": "1.2.26",
4
4
  "type": "module",
5
5
  "description": "AIPanel 浏览器侧插件(dsh web Web Client):注册 @aipanel 文件引用 source,选中元素以 file chip 高亮插入并可供模型解析。",
6
6
  "publishConfig": {
@@ -11,7 +11,7 @@
11
11
  "lib"
12
12
  ],
13
13
  "devDependencies": {
14
- "@aipanel/core": "1.2.25",
14
+ "@aipanel/core": "1.2.26",
15
15
  "@deepseek-ai/cordis": "^4.0.2",
16
16
  "@deepseek-ai/dsh-api-session-controller": "^0.1.6-alpha.2",
17
17
  "@deepseek-ai/dsh-client-store": "^0.1.6-alpha.2",