@michengai/dsh-codex-ui 1.1.33 → 1.1.34
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/CHANGELOG.md +5 -0
- package/CHANGELOG.zh-CN.md +5 -0
- package/lib/client.js +1013 -989
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -26,8 +26,8 @@ window.__ModuleLoader__.load({
|
|
|
26
26
|
enumerable: true
|
|
27
27
|
}) : target, mod));
|
|
28
28
|
//#endregion
|
|
29
|
-
let react = require("react");
|
|
30
29
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
30
|
+
let react = require("react");
|
|
31
31
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
32
32
|
_deepseek_ai_dsh_client_ui_primitives = __toESM(_deepseek_ai_dsh_client_ui_primitives, 1);
|
|
33
33
|
let react_dom = require("react-dom");
|
|
@@ -389,984 +389,303 @@ window.__ModuleLoader__.load({
|
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
391
|
//#endregion
|
|
392
|
-
//#region
|
|
393
|
-
/**
|
|
394
|
-
* @license lucide-react v1.39.0 - ISC
|
|
395
|
-
*
|
|
396
|
-
* This source code is licensed under the ISC license.
|
|
397
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
398
|
-
*/
|
|
399
|
-
const mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
400
|
-
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
401
|
-
}).join(" ").trim();
|
|
402
|
-
//#endregion
|
|
403
|
-
//#region node_modules/.pnpm/lucide-react@1.39.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs
|
|
404
|
-
/**
|
|
405
|
-
* @license lucide-react v1.39.0 - ISC
|
|
406
|
-
*
|
|
407
|
-
* This source code is licensed under the ISC license.
|
|
408
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
409
|
-
*/
|
|
410
|
-
const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
411
|
-
//#endregion
|
|
412
|
-
//#region node_modules/.pnpm/lucide-react@1.39.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs
|
|
413
|
-
/**
|
|
414
|
-
* @license lucide-react v1.39.0 - ISC
|
|
415
|
-
*
|
|
416
|
-
* This source code is licensed under the ISC license.
|
|
417
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
418
|
-
*/
|
|
419
|
-
const toCamelCase = (string) => string.replace(/^([A-Z])|[\s-_]+(\w)/g, (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase());
|
|
420
|
-
//#endregion
|
|
421
|
-
//#region node_modules/.pnpm/lucide-react@1.39.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs
|
|
422
|
-
/**
|
|
423
|
-
* @license lucide-react v1.39.0 - ISC
|
|
424
|
-
*
|
|
425
|
-
* This source code is licensed under the ISC license.
|
|
426
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
427
|
-
*/
|
|
428
|
-
const toPascalCase = (string) => {
|
|
429
|
-
const camelCase = toCamelCase(string);
|
|
430
|
-
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
431
|
-
};
|
|
432
|
-
//#endregion
|
|
433
|
-
//#region node_modules/.pnpm/lucide-react@1.39.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.mjs
|
|
434
|
-
/**
|
|
435
|
-
* @license lucide-react v1.39.0 - ISC
|
|
436
|
-
*
|
|
437
|
-
* This source code is licensed under the ISC license.
|
|
438
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
439
|
-
*/
|
|
440
|
-
var defaultAttributes = {
|
|
441
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
442
|
-
width: 24,
|
|
443
|
-
height: 24,
|
|
444
|
-
viewBox: "0 0 24 24",
|
|
445
|
-
fill: "none",
|
|
446
|
-
stroke: "currentColor",
|
|
447
|
-
strokeWidth: 2,
|
|
448
|
-
strokeLinecap: "round",
|
|
449
|
-
strokeLinejoin: "round"
|
|
450
|
-
};
|
|
451
|
-
//#endregion
|
|
452
|
-
//#region node_modules/.pnpm/lucide-react@1.39.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs
|
|
453
|
-
/**
|
|
454
|
-
* @license lucide-react v1.39.0 - ISC
|
|
455
|
-
*
|
|
456
|
-
* This source code is licensed under the ISC license.
|
|
457
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
458
|
-
*/
|
|
459
|
-
const hasA11yProp = (props) => {
|
|
460
|
-
for (const prop in props) if (prop.startsWith("aria-") || prop === "role" || prop === "title") return true;
|
|
461
|
-
return false;
|
|
462
|
-
};
|
|
463
|
-
//#endregion
|
|
464
|
-
//#region node_modules/.pnpm/lucide-react@1.39.0_react@18.3.1/node_modules/lucide-react/dist/esm/context.mjs
|
|
392
|
+
//#region src/client/settings-navigation.ts
|
|
465
393
|
/**
|
|
466
|
-
*
|
|
467
|
-
*
|
|
468
|
-
* This source code is licensed under the ISC license.
|
|
469
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
394
|
+
* 自有设置壳通过事件直接打开分区,不依赖账号入口的按钮或菜单结构。
|
|
395
|
+
* 保留的宿主设置壳仍从设置入口触发,再按可访问名称选择页面。
|
|
470
396
|
*/
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
397
|
+
function pickSettingsSectionButton(buttons, labels) {
|
|
398
|
+
for (const label of labels) {
|
|
399
|
+
const match = buttons.find((button) => button.textContent?.trim() === label);
|
|
400
|
+
if (match !== void 0) return match;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
475
403
|
/**
|
|
476
|
-
*
|
|
477
|
-
*
|
|
478
|
-
* This source code is licensed under the ISC license.
|
|
479
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
404
|
+
* 可选插件未注册设置入口时,直接打开兜底页,避免先展示通用设置并等待导航超时。
|
|
480
405
|
*/
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
406
|
+
function routeOptionalSettingsSection(available, openRequested, openFallback) {
|
|
407
|
+
if (available) {
|
|
408
|
+
openRequested();
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
openFallback();
|
|
412
|
+
}
|
|
413
|
+
/** 官方 alpha.2 插件管理页占用 sidebar.panellist / main 的同一 id。 */
|
|
414
|
+
const OFFICIAL_PLUGINS_PANEL_ID = "plugins";
|
|
415
|
+
let cancelPendingNavigation;
|
|
416
|
+
const SETTINGS_NAVIGATION_TIMEOUT_MS = 4e3;
|
|
417
|
+
const SETTINGS_TRIGGER_SELECTOR = "[data-dcu-settings-trigger],[aria-haspopup=\"dialog\"]";
|
|
418
|
+
const SETTINGS_OPEN_SECTION_EVENT = "dcu-settings-open-section";
|
|
419
|
+
const SETTINGS_OPEN_ROOT_EVENT = "dcu-settings-open-root";
|
|
420
|
+
const SETTINGS_OWNER_SELECTOR = "[data-dcu-settings-owner]";
|
|
421
|
+
/** 根入口与分区跳转使用同一触发器合约,兼容保留的宿主设置壳。 */
|
|
422
|
+
function openSettingsRoot(root) {
|
|
423
|
+
const owner = root?.querySelector(SETTINGS_OWNER_SELECTOR);
|
|
424
|
+
if (owner && !owner.dispatchEvent(new CustomEvent("dcu-settings-open-root", { cancelable: true }))) return;
|
|
425
|
+
root?.querySelector(SETTINGS_TRIGGER_SELECTOR)?.click();
|
|
426
|
+
}
|
|
427
|
+
function openSettingsSection(root, label, onMissing, onSelected) {
|
|
428
|
+
const labels = typeof label === "string" ? [label] : label;
|
|
429
|
+
const trigger = root?.querySelector(SETTINGS_OWNER_SELECTOR) ?? root?.querySelector("[data-dcu-settings-trigger],[aria-haspopup=\"dialog\"]");
|
|
430
|
+
if (trigger === null || trigger === void 0) {
|
|
431
|
+
onMissing?.();
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
const opening = cancelPendingNavigation !== void 0;
|
|
435
|
+
cancelPendingNavigation?.();
|
|
436
|
+
const request = new CustomEvent(SETTINGS_OPEN_SECTION_EVENT, {
|
|
437
|
+
detail: { labels },
|
|
438
|
+
cancelable: true
|
|
439
|
+
});
|
|
440
|
+
const detail = { labels };
|
|
441
|
+
const ownerRequest = new CustomEvent(SETTINGS_OPEN_SECTION_EVENT, {
|
|
442
|
+
detail,
|
|
443
|
+
cancelable: true
|
|
444
|
+
});
|
|
445
|
+
if (trigger.hasAttribute("data-dcu-settings-owner")) {
|
|
446
|
+
trigger.dispatchEvent(ownerRequest);
|
|
447
|
+
if (detail.result === "selected") onSelected?.();
|
|
448
|
+
else onMissing?.();
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
if (!trigger.dispatchEvent(request)) {
|
|
452
|
+
onSelected?.();
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
const pageSelector = trigger.hasAttribute("data-dcu-settings-trigger") ? "[data-dcu-settings-page]" : "[role=\"dialog\"]";
|
|
456
|
+
if (!opening && document.querySelector(pageSelector) === null) trigger.click();
|
|
457
|
+
let frame;
|
|
458
|
+
let finished = false;
|
|
459
|
+
const observer = new MutationObserver(() => {
|
|
460
|
+
schedule();
|
|
461
|
+
});
|
|
462
|
+
const cleanup = () => {
|
|
463
|
+
if (finished) return;
|
|
464
|
+
finished = true;
|
|
465
|
+
observer.disconnect();
|
|
466
|
+
window.clearTimeout(timeout);
|
|
467
|
+
if (frame !== void 0) window.cancelAnimationFrame(frame);
|
|
468
|
+
if (cancelPendingNavigation === cleanup) cancelPendingNavigation = void 0;
|
|
469
|
+
};
|
|
470
|
+
const select = () => {
|
|
471
|
+
const target = pickSettingsSectionButton([...document.querySelectorAll(`${pageSelector} nav button`)], labels);
|
|
472
|
+
if (target === void 0) return false;
|
|
473
|
+
cleanup();
|
|
474
|
+
target.click();
|
|
475
|
+
onSelected?.();
|
|
476
|
+
return true;
|
|
477
|
+
};
|
|
478
|
+
const schedule = () => {
|
|
479
|
+
if (finished || frame !== void 0) return;
|
|
480
|
+
frame = window.requestAnimationFrame(() => {
|
|
481
|
+
frame = void 0;
|
|
482
|
+
select();
|
|
483
|
+
});
|
|
484
|
+
};
|
|
485
|
+
const timeout = window.setTimeout(() => {
|
|
486
|
+
if (select()) return;
|
|
487
|
+
cleanup();
|
|
488
|
+
console.warn(`[michengai-codex-ui] 未找到设置分区:${labels.join(" / ")}`);
|
|
489
|
+
onMissing?.();
|
|
490
|
+
}, SETTINGS_NAVIGATION_TIMEOUT_MS);
|
|
491
|
+
observer.observe(document.body, {
|
|
492
|
+
childList: true,
|
|
493
|
+
subtree: true
|
|
494
|
+
});
|
|
495
|
+
cancelPendingNavigation = cleanup;
|
|
496
|
+
schedule();
|
|
497
|
+
}
|
|
496
498
|
//#endregion
|
|
497
|
-
//#region
|
|
498
|
-
/**
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
key
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
499
|
+
//#region src/client/global-panels.tsx
|
|
500
|
+
/** 从宿主注册表读取面板元数据;缓存快照以满足 React 外部状态订阅契约。 */
|
|
501
|
+
function createGlobalPanelSource(slots, locale) {
|
|
502
|
+
let cached = [];
|
|
503
|
+
return {
|
|
504
|
+
getSnapshot() {
|
|
505
|
+
const next = slots.entriesOfSlot("sidebar.panellist").flatMap(({ options }) => {
|
|
506
|
+
if (options.id === void 0 || options.id === "plugins") return [];
|
|
507
|
+
return [{
|
|
508
|
+
id: options.id,
|
|
509
|
+
order: options.order ?? 0,
|
|
510
|
+
label: (typeof options.label === "function" ? options.label() : options.label) ?? options.id
|
|
511
|
+
}];
|
|
512
|
+
}).sort((a, b) => a.order - b.order);
|
|
513
|
+
if (next.length !== cached.length || next.some((panel, index) => {
|
|
514
|
+
const previous = cached[index];
|
|
515
|
+
return previous === void 0 || panel.id !== previous.id || panel.label !== previous.label || panel.order !== previous.order;
|
|
516
|
+
})) cached = next;
|
|
517
|
+
return cached;
|
|
518
|
+
},
|
|
519
|
+
subscribe(listener) {
|
|
520
|
+
const offSlots = slots.subscribe("sidebar.panellist", listener);
|
|
521
|
+
const offLocale = locale.subscribe(listener);
|
|
522
|
+
return () => {
|
|
523
|
+
offSlots();
|
|
524
|
+
offLocale();
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
/** 展开和紧凑侧栏只列出宿主注册的全局面板,不额外插入返回会话的任务入口。 */
|
|
530
|
+
function GlobalPanelButtons({ panels, activeId, wide, selectPanel, renderIcon }) {
|
|
531
|
+
if (panels.length === 0) return null;
|
|
532
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: panels.map((panel) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
533
|
+
type: "button",
|
|
534
|
+
className: wide ? "dcu-global-panel" : "dcu-icon dcu-global-panel",
|
|
535
|
+
"aria-label": panel.label,
|
|
536
|
+
title: wide ? void 0 : panel.label,
|
|
537
|
+
"aria-current": activeId === panel.id ? "page" : void 0,
|
|
538
|
+
onClick: () => selectPanel(panel.id),
|
|
539
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
540
|
+
className: "dcu-menu-icon",
|
|
541
|
+
"aria-hidden": "true",
|
|
542
|
+
children: renderIcon(panel.id, activeId === panel.id)
|
|
543
|
+
}), wide && panel.label]
|
|
544
|
+
}, panel.id)) });
|
|
545
|
+
}
|
|
546
|
+
/** 按用户要求用最窄宽度替代宿主自适应默认;已有有效偏好不重置,拖拽起点沿用宿主存储。 */
|
|
547
|
+
function initializeComposerWidth(storage) {
|
|
548
|
+
const key = "dsh.conversation.contentWidth";
|
|
549
|
+
try {
|
|
550
|
+
const saved = Number(storage.getItem(key));
|
|
551
|
+
if (Number.isFinite(saved) && saved > 0) return;
|
|
552
|
+
storage.setItem(key, String(640));
|
|
553
|
+
} catch (error) {
|
|
554
|
+
console.warn("[codex-ui] 无法初始化输入区宽度,将使用宿主默认值。", error);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
/** 新建页没有宿主 WidthHandle,补充同一宽度偏好的拖拽入口。 */
|
|
558
|
+
function observeHeroWidthHandles(label) {
|
|
559
|
+
const mounted = /* @__PURE__ */ new Map();
|
|
560
|
+
const style = document.createElement("style");
|
|
561
|
+
style.textContent = `[data-phase=hero]:has([data-conversation-scroll]){position:relative}[data-dcu-width-handle]{position:absolute;top:0;bottom:0;width:32px;padding:0;border:0;background:transparent;cursor:col-resize;touch-action:none;z-index:8;outline-offset:-5px}[data-dcu-width-handle=left]{right:calc(50% + var(--dsh-chat-content-width) / 2 + 16px)}[data-dcu-width-handle=right]{left:calc(50% + var(--dsh-chat-content-width) / 2 + 16px)}[data-dcu-width-handle]::after{content:'';position:absolute;top:calc(var(--dcu-pointer-y,50%) - 50px);height:100px;width:3px;left:14px;border-radius:3px;background:linear-gradient(transparent,var(--dsw-alias-scrollbar-hover-l1,#888),transparent);opacity:0}[data-dcu-width-handle]:hover::after,[data-dcu-width-handle]:focus-visible::after,[data-dcu-width-handle][data-dragging]::after{opacity:1}[data-phase=hero]:has([data-conversation-composer-overlay]) [data-dcu-width-handle]{display:none}`;
|
|
562
|
+
document.head.append(style);
|
|
563
|
+
const sync = () => {
|
|
564
|
+
for (const [root, dispose] of mounted) if (!root.isConnected || root.dataset.phase !== "hero") {
|
|
565
|
+
dispose();
|
|
566
|
+
mounted.delete(root);
|
|
567
|
+
}
|
|
568
|
+
for (const root of document.querySelectorAll("[data-phase=hero]")) {
|
|
569
|
+
if (mounted.has(root) || !root.querySelector("[data-conversation-scroll]")) continue;
|
|
570
|
+
const clamp = (value) => Math.min(Math.max(640, value), Math.max(640, root.clientWidth - 176));
|
|
571
|
+
const current = () => {
|
|
572
|
+
const raw = getComputedStyle(root).getPropertyValue("--dsh-chat-user-width");
|
|
573
|
+
return clamp(parseFloat(raw) || 640);
|
|
574
|
+
};
|
|
575
|
+
const publish = (width, save) => {
|
|
576
|
+
const value = clamp(width);
|
|
577
|
+
root.style.setProperty("--dsh-chat-user-width", `${value}px`);
|
|
578
|
+
if (save) try {
|
|
579
|
+
localStorage.setItem("dsh.conversation.contentWidth", String(value));
|
|
580
|
+
} catch (error) {
|
|
581
|
+
console.warn("[codex-ui] 无法保存输入区宽度。", error);
|
|
582
|
+
}
|
|
583
|
+
};
|
|
584
|
+
const handles = ["left", "right"].map((side) => {
|
|
585
|
+
const handle = document.createElement("button");
|
|
586
|
+
handle.type = "button";
|
|
587
|
+
handle.dataset.dcuWidthHandle = side;
|
|
588
|
+
handle.setAttribute("aria-label", label);
|
|
589
|
+
let origin = 0;
|
|
590
|
+
let initial = 640;
|
|
591
|
+
let dragging = false;
|
|
592
|
+
handle.addEventListener("pointerdown", (event) => {
|
|
593
|
+
if (event.button !== 0) return;
|
|
594
|
+
event.preventDefault();
|
|
595
|
+
origin = event.clientX;
|
|
596
|
+
initial = current();
|
|
597
|
+
dragging = true;
|
|
598
|
+
handle.dataset.dragging = "";
|
|
599
|
+
handle.setPointerCapture(event.pointerId);
|
|
600
|
+
});
|
|
601
|
+
handle.addEventListener("pointermove", (event) => {
|
|
602
|
+
handle.style.setProperty("--dcu-pointer-y", `${event.clientY - handle.getBoundingClientRect().top}px`);
|
|
603
|
+
if (dragging) publish(initial + (event.clientX - origin) * (side === "right" ? 2 : -2), false);
|
|
604
|
+
});
|
|
605
|
+
handle.addEventListener("pointerup", (event) => {
|
|
606
|
+
if (!dragging) return;
|
|
607
|
+
publish(initial + (event.clientX - origin) * (side === "right" ? 2 : -2), true);
|
|
608
|
+
dragging = false;
|
|
609
|
+
delete handle.dataset.dragging;
|
|
610
|
+
handle.releasePointerCapture(event.pointerId);
|
|
611
|
+
});
|
|
612
|
+
handle.addEventListener("lostpointercapture", () => {
|
|
613
|
+
if (dragging) publish(initial, false);
|
|
614
|
+
dragging = false;
|
|
615
|
+
delete handle.dataset.dragging;
|
|
616
|
+
});
|
|
617
|
+
handle.addEventListener("keydown", (event) => {
|
|
618
|
+
if (![
|
|
619
|
+
"ArrowLeft",
|
|
620
|
+
"ArrowRight",
|
|
621
|
+
"Home"
|
|
622
|
+
].includes(event.key)) return;
|
|
623
|
+
event.preventDefault();
|
|
624
|
+
const delta = (event.key === "ArrowRight" ? 1 : -1) * (side === "right" ? 1 : -1) * 20;
|
|
625
|
+
publish(event.key === "Home" ? 640 : current() + delta, true);
|
|
626
|
+
});
|
|
627
|
+
root.append(handle);
|
|
628
|
+
return handle;
|
|
629
|
+
});
|
|
630
|
+
mounted.set(root, () => {
|
|
631
|
+
handles.forEach((handle) => handle.remove());
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
};
|
|
635
|
+
const observer = new MutationObserver(sync);
|
|
636
|
+
observer.observe(document.body, {
|
|
637
|
+
childList: true,
|
|
638
|
+
subtree: true,
|
|
639
|
+
attributes: true,
|
|
640
|
+
attributeFilter: ["data-phase"]
|
|
641
|
+
});
|
|
642
|
+
sync();
|
|
643
|
+
return () => {
|
|
644
|
+
observer.disconnect();
|
|
645
|
+
mounted.forEach((dispose) => dispose());
|
|
646
|
+
mounted.clear();
|
|
647
|
+
style.remove();
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
//#endregion
|
|
651
|
+
//#region src/client/tree-expansion.ts
|
|
652
|
+
const WORKSPACE_EXPANSION_STORAGE_KEY = "dsh-codex-ui.workspace-expansion.v1";
|
|
653
|
+
const CHANNEL_EXPANSION_STORAGE_KEY = "dsh-codex-ui.channel-expansion.v1";
|
|
654
|
+
const SCHEDULE_EXPANSION_STORAGE_KEY = "dsh-codex-ui.schedule-expansion.v1";
|
|
655
|
+
const MAX_EXPANSION_ENTRIES = 500;
|
|
656
|
+
const MAX_EXPANSION_KEY_LENGTH = 512;
|
|
657
|
+
function browserStorage() {
|
|
658
|
+
if (typeof window === "undefined") return void 0;
|
|
659
|
+
try {
|
|
660
|
+
return window.localStorage;
|
|
661
|
+
} catch {
|
|
662
|
+
return;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
function parseTreeExpansionState(value) {
|
|
666
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) return {};
|
|
667
|
+
const entries = Object.entries(value).filter(([key, expanded]) => key.length > 0 && key.length <= MAX_EXPANSION_KEY_LENGTH && typeof expanded === "boolean").slice(0, MAX_EXPANSION_ENTRIES);
|
|
668
|
+
return Object.fromEntries(entries);
|
|
669
|
+
}
|
|
670
|
+
function readTreeExpansionState(storage, key) {
|
|
671
|
+
if (storage === void 0) return {};
|
|
672
|
+
try {
|
|
673
|
+
return parseTreeExpansionState(JSON.parse(storage.getItem(key) ?? "{}"));
|
|
674
|
+
} catch {
|
|
675
|
+
return {};
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
function writeTreeExpansionState(storage, key, state) {
|
|
679
|
+
if (storage === void 0) return;
|
|
680
|
+
try {
|
|
681
|
+
storage.setItem(key, JSON.stringify(parseTreeExpansionState(state)));
|
|
682
|
+
} catch {}
|
|
683
|
+
}
|
|
684
|
+
//#endregion
|
|
685
|
+
//#region src/client/host-icons.ts
|
|
571
686
|
/**
|
|
572
|
-
*
|
|
573
|
-
*
|
|
574
|
-
* This source code is licensed under the ISC license.
|
|
575
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
576
|
-
*/
|
|
577
|
-
const Bug = createLucideIcon("bug", [
|
|
578
|
-
["path", {
|
|
579
|
-
d: "M12 20v-9",
|
|
580
|
-
key: "1qisl0"
|
|
581
|
-
}],
|
|
582
|
-
["path", {
|
|
583
|
-
d: "M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",
|
|
584
|
-
key: "uouzyp"
|
|
585
|
-
}],
|
|
586
|
-
["path", {
|
|
587
|
-
d: "M14.12 3.88 16 2",
|
|
588
|
-
key: "qol33r"
|
|
589
|
-
}],
|
|
590
|
-
["path", {
|
|
591
|
-
d: "M21 21a4 4 0 0 0-3.81-4",
|
|
592
|
-
key: "1b0z45"
|
|
593
|
-
}],
|
|
594
|
-
["path", {
|
|
595
|
-
d: "M21 5a4 4 0 0 1-3.55 3.97",
|
|
596
|
-
key: "5cxbf6"
|
|
597
|
-
}],
|
|
598
|
-
["path", {
|
|
599
|
-
d: "M22 13h-4",
|
|
600
|
-
key: "1jl80f"
|
|
601
|
-
}],
|
|
602
|
-
["path", {
|
|
603
|
-
d: "M3 21a4 4 0 0 1 3.81-4",
|
|
604
|
-
key: "1fjd4g"
|
|
605
|
-
}],
|
|
606
|
-
["path", {
|
|
607
|
-
d: "M3 5a4 4 0 0 0 3.55 3.97",
|
|
608
|
-
key: "1d7oge"
|
|
609
|
-
}],
|
|
610
|
-
["path", {
|
|
611
|
-
d: "M6 13H2",
|
|
612
|
-
key: "82j7cp"
|
|
613
|
-
}],
|
|
614
|
-
["path", {
|
|
615
|
-
d: "m8 2 1.88 1.88",
|
|
616
|
-
key: "fmnt4t"
|
|
617
|
-
}],
|
|
618
|
-
["path", {
|
|
619
|
-
d: "M9 7.13V6a3 3 0 1 1 6 0v1.13",
|
|
620
|
-
key: "1vgav8"
|
|
621
|
-
}]
|
|
622
|
-
]);
|
|
623
|
-
/**
|
|
624
|
-
* @license lucide-react v1.39.0 - ISC
|
|
625
|
-
*
|
|
626
|
-
* This source code is licensed under the ISC license.
|
|
627
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
628
|
-
*/
|
|
629
|
-
const CircleQuestionMark = createLucideIcon("circle-question-mark", [
|
|
630
|
-
["circle", {
|
|
631
|
-
cx: "12",
|
|
632
|
-
cy: "12",
|
|
633
|
-
r: "10",
|
|
634
|
-
key: "1mglay"
|
|
635
|
-
}],
|
|
636
|
-
["path", {
|
|
637
|
-
d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",
|
|
638
|
-
key: "1u773s"
|
|
639
|
-
}],
|
|
640
|
-
["path", {
|
|
641
|
-
d: "M12 17h.01",
|
|
642
|
-
key: "p32p05"
|
|
643
|
-
}]
|
|
644
|
-
]);
|
|
645
|
-
/**
|
|
646
|
-
* @license lucide-react v1.39.0 - ISC
|
|
647
|
-
*
|
|
648
|
-
* This source code is licensed under the ISC license.
|
|
649
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
650
|
-
*/
|
|
651
|
-
const Clock = createLucideIcon("clock", [["circle", {
|
|
652
|
-
cx: "12",
|
|
653
|
-
cy: "12",
|
|
654
|
-
r: "10",
|
|
655
|
-
key: "1mglay"
|
|
656
|
-
}], ["path", {
|
|
657
|
-
d: "M12 6v6l4 2",
|
|
658
|
-
key: "mmk7yg"
|
|
659
|
-
}]]);
|
|
660
|
-
/**
|
|
661
|
-
* @license lucide-react v1.39.0 - ISC
|
|
662
|
-
*
|
|
663
|
-
* This source code is licensed under the ISC license.
|
|
664
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
665
|
-
*/
|
|
666
|
-
const Cpu = createLucideIcon("cpu", [
|
|
667
|
-
["path", {
|
|
668
|
-
d: "M12 20v2",
|
|
669
|
-
key: "1lh1kg"
|
|
670
|
-
}],
|
|
671
|
-
["path", {
|
|
672
|
-
d: "M12 2v2",
|
|
673
|
-
key: "tus03m"
|
|
674
|
-
}],
|
|
675
|
-
["path", {
|
|
676
|
-
d: "M17 20v2",
|
|
677
|
-
key: "1rnc9c"
|
|
678
|
-
}],
|
|
679
|
-
["path", {
|
|
680
|
-
d: "M17 2v2",
|
|
681
|
-
key: "11trls"
|
|
682
|
-
}],
|
|
683
|
-
["path", {
|
|
684
|
-
d: "M2 12h2",
|
|
685
|
-
key: "1t8f8n"
|
|
686
|
-
}],
|
|
687
|
-
["path", {
|
|
688
|
-
d: "M2 17h2",
|
|
689
|
-
key: "7oei6x"
|
|
690
|
-
}],
|
|
691
|
-
["path", {
|
|
692
|
-
d: "M2 7h2",
|
|
693
|
-
key: "asdhe0"
|
|
694
|
-
}],
|
|
695
|
-
["path", {
|
|
696
|
-
d: "M20 12h2",
|
|
697
|
-
key: "1q8mjw"
|
|
698
|
-
}],
|
|
699
|
-
["path", {
|
|
700
|
-
d: "M20 17h2",
|
|
701
|
-
key: "1fpfkl"
|
|
702
|
-
}],
|
|
703
|
-
["path", {
|
|
704
|
-
d: "M20 7h2",
|
|
705
|
-
key: "1o8tra"
|
|
706
|
-
}],
|
|
707
|
-
["path", {
|
|
708
|
-
d: "M7 20v2",
|
|
709
|
-
key: "4gnj0m"
|
|
710
|
-
}],
|
|
711
|
-
["path", {
|
|
712
|
-
d: "M7 2v2",
|
|
713
|
-
key: "1i4yhu"
|
|
714
|
-
}],
|
|
715
|
-
["rect", {
|
|
716
|
-
x: "4",
|
|
717
|
-
y: "4",
|
|
718
|
-
width: "16",
|
|
719
|
-
height: "16",
|
|
720
|
-
rx: "2",
|
|
721
|
-
key: "1vbyd7"
|
|
722
|
-
}],
|
|
723
|
-
["rect", {
|
|
724
|
-
x: "8",
|
|
725
|
-
y: "8",
|
|
726
|
-
width: "8",
|
|
727
|
-
height: "8",
|
|
728
|
-
rx: "1",
|
|
729
|
-
key: "z9xiuo"
|
|
730
|
-
}]
|
|
731
|
-
]);
|
|
732
|
-
/**
|
|
733
|
-
* @license lucide-react v1.39.0 - ISC
|
|
734
|
-
*
|
|
735
|
-
* This source code is licensed under the ISC license.
|
|
736
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
737
|
-
*/
|
|
738
|
-
const EyeOff = createLucideIcon("eye-off", [
|
|
739
|
-
["path", {
|
|
740
|
-
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
741
|
-
key: "ct8e1f"
|
|
742
|
-
}],
|
|
743
|
-
["path", {
|
|
744
|
-
d: "M14.084 14.158a3 3 0 0 1-4.242-4.242",
|
|
745
|
-
key: "151rxh"
|
|
746
|
-
}],
|
|
747
|
-
["path", {
|
|
748
|
-
d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
|
|
749
|
-
key: "13bj9a"
|
|
750
|
-
}],
|
|
751
|
-
["path", {
|
|
752
|
-
d: "m2 2 20 20",
|
|
753
|
-
key: "1ooewy"
|
|
754
|
-
}]
|
|
755
|
-
]);
|
|
756
|
-
/**
|
|
757
|
-
* @license lucide-react v1.39.0 - ISC
|
|
758
|
-
*
|
|
759
|
-
* This source code is licensed under the ISC license.
|
|
760
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
761
|
-
*/
|
|
762
|
-
const Eye = createLucideIcon("eye", [["path", {
|
|
763
|
-
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
764
|
-
key: "1nclc0"
|
|
765
|
-
}], ["circle", {
|
|
766
|
-
cx: "12",
|
|
767
|
-
cy: "12",
|
|
768
|
-
r: "3",
|
|
769
|
-
key: "1v7zrd"
|
|
770
|
-
}]]);
|
|
771
|
-
/**
|
|
772
|
-
* @license lucide-react v1.39.0 - ISC
|
|
773
|
-
*
|
|
774
|
-
* This source code is licensed under the ISC license.
|
|
775
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
776
|
-
*/
|
|
777
|
-
const Hammer = createLucideIcon("hammer", [
|
|
778
|
-
["path", {
|
|
779
|
-
d: "m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9",
|
|
780
|
-
key: "1hayfq"
|
|
781
|
-
}],
|
|
782
|
-
["path", {
|
|
783
|
-
d: "m18 15 4-4",
|
|
784
|
-
key: "16gjal"
|
|
785
|
-
}],
|
|
786
|
-
["path", {
|
|
787
|
-
d: "m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",
|
|
788
|
-
key: "15ts47"
|
|
789
|
-
}]
|
|
790
|
-
]);
|
|
791
|
-
/**
|
|
792
|
-
* @license lucide-react v1.39.0 - ISC
|
|
793
|
-
*
|
|
794
|
-
* This source code is licensed under the ISC license.
|
|
795
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
796
|
-
*/
|
|
797
|
-
const Link = createLucideIcon("link", [["path", {
|
|
798
|
-
d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",
|
|
799
|
-
key: "1cjeqo"
|
|
800
|
-
}], ["path", {
|
|
801
|
-
d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",
|
|
802
|
-
key: "19qd67"
|
|
803
|
-
}]]);
|
|
804
|
-
/**
|
|
805
|
-
* @license lucide-react v1.39.0 - ISC
|
|
806
|
-
*
|
|
807
|
-
* This source code is licensed under the ISC license.
|
|
808
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
809
|
-
*/
|
|
810
|
-
const MessageCircle = createLucideIcon("message-circle", [["path", {
|
|
811
|
-
d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
|
|
812
|
-
key: "1sd12s"
|
|
813
|
-
}]]);
|
|
814
|
-
/**
|
|
815
|
-
* @license lucide-react v1.39.0 - ISC
|
|
816
|
-
*
|
|
817
|
-
* This source code is licensed under the ISC license.
|
|
818
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
819
|
-
*/
|
|
820
|
-
const MessageSquare = createLucideIcon("message-square", [["path", {
|
|
821
|
-
d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",
|
|
822
|
-
key: "18887p"
|
|
823
|
-
}]]);
|
|
824
|
-
/**
|
|
825
|
-
* @license lucide-react v1.39.0 - ISC
|
|
826
|
-
*
|
|
827
|
-
* This source code is licensed under the ISC license.
|
|
828
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
829
|
-
*/
|
|
830
|
-
const PanelRight = createLucideIcon("panel-right", [["rect", {
|
|
831
|
-
width: "18",
|
|
832
|
-
height: "18",
|
|
833
|
-
x: "3",
|
|
834
|
-
y: "3",
|
|
835
|
-
rx: "2",
|
|
836
|
-
key: "afitv7"
|
|
837
|
-
}], ["path", {
|
|
838
|
-
d: "M15 3v18",
|
|
839
|
-
key: "14nvp0"
|
|
840
|
-
}]]);
|
|
841
|
-
/**
|
|
842
|
-
* @license lucide-react v1.39.0 - ISC
|
|
843
|
-
*
|
|
844
|
-
* This source code is licensed under the ISC license.
|
|
845
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
846
|
-
*/
|
|
847
|
-
const Pin = createLucideIcon("pin", [["path", {
|
|
848
|
-
d: "M12 17v5",
|
|
849
|
-
key: "bb1du9"
|
|
850
|
-
}], ["path", {
|
|
851
|
-
d: "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",
|
|
852
|
-
key: "1nkz8b"
|
|
853
|
-
}]]);
|
|
854
|
-
/**
|
|
855
|
-
* @license lucide-react v1.39.0 - ISC
|
|
856
|
-
*
|
|
857
|
-
* This source code is licensed under the ISC license.
|
|
858
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
859
|
-
*/
|
|
860
|
-
const ScanLine = createLucideIcon("scan-line", [
|
|
861
|
-
["path", {
|
|
862
|
-
d: "M3 7V5a2 2 0 0 1 2-2h2",
|
|
863
|
-
key: "aa7l1z"
|
|
864
|
-
}],
|
|
865
|
-
["path", {
|
|
866
|
-
d: "M17 3h2a2 2 0 0 1 2 2v2",
|
|
867
|
-
key: "4qcy5o"
|
|
868
|
-
}],
|
|
869
|
-
["path", {
|
|
870
|
-
d: "M21 17v2a2 2 0 0 1-2 2h-2",
|
|
871
|
-
key: "6vwrx8"
|
|
872
|
-
}],
|
|
873
|
-
["path", {
|
|
874
|
-
d: "M7 21H5a2 2 0 0 1-2-2v-2",
|
|
875
|
-
key: "ioqczr"
|
|
876
|
-
}],
|
|
877
|
-
["path", {
|
|
878
|
-
d: "M7 12h10",
|
|
879
|
-
key: "b7w52i"
|
|
880
|
-
}]
|
|
881
|
-
]);
|
|
882
|
-
/**
|
|
883
|
-
* @license lucide-react v1.39.0 - ISC
|
|
884
|
-
*
|
|
885
|
-
* This source code is licensed under the ISC license.
|
|
886
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
887
|
-
*/
|
|
888
|
-
const Search = createLucideIcon("search", [["path", {
|
|
889
|
-
d: "m21 21-4.34-4.34",
|
|
890
|
-
key: "14j7rj"
|
|
891
|
-
}], ["circle", {
|
|
892
|
-
cx: "11",
|
|
893
|
-
cy: "11",
|
|
894
|
-
r: "8",
|
|
895
|
-
key: "4ej97u"
|
|
896
|
-
}]]);
|
|
897
|
-
/**
|
|
898
|
-
* @license lucide-react v1.39.0 - ISC
|
|
899
|
-
*
|
|
900
|
-
* This source code is licensed under the ISC license.
|
|
901
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
902
|
-
*/
|
|
903
|
-
const Settings = createLucideIcon("settings", [["path", {
|
|
904
|
-
d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
|
|
905
|
-
key: "1i5ecw"
|
|
906
|
-
}], ["circle", {
|
|
907
|
-
cx: "12",
|
|
908
|
-
cy: "12",
|
|
909
|
-
r: "3",
|
|
910
|
-
key: "1v7zrd"
|
|
911
|
-
}]]);
|
|
912
|
-
/**
|
|
913
|
-
* @license lucide-react v1.39.0 - ISC
|
|
914
|
-
*
|
|
915
|
-
* This source code is licensed under the ISC license.
|
|
916
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
917
|
-
*/
|
|
918
|
-
const SlidersHorizontal = createLucideIcon("sliders-horizontal", [
|
|
919
|
-
["path", {
|
|
920
|
-
d: "M10 5H3",
|
|
921
|
-
key: "1qgfaw"
|
|
922
|
-
}],
|
|
923
|
-
["path", {
|
|
924
|
-
d: "M12 19H3",
|
|
925
|
-
key: "yhmn1j"
|
|
926
|
-
}],
|
|
927
|
-
["path", {
|
|
928
|
-
d: "M14 3v4",
|
|
929
|
-
key: "1sua03"
|
|
930
|
-
}],
|
|
931
|
-
["path", {
|
|
932
|
-
d: "M16 17v4",
|
|
933
|
-
key: "1q0r14"
|
|
934
|
-
}],
|
|
935
|
-
["path", {
|
|
936
|
-
d: "M21 12h-9",
|
|
937
|
-
key: "1o4lsq"
|
|
938
|
-
}],
|
|
939
|
-
["path", {
|
|
940
|
-
d: "M21 19h-5",
|
|
941
|
-
key: "1rlt1p"
|
|
942
|
-
}],
|
|
943
|
-
["path", {
|
|
944
|
-
d: "M21 5h-7",
|
|
945
|
-
key: "1oszz2"
|
|
946
|
-
}],
|
|
947
|
-
["path", {
|
|
948
|
-
d: "M8 10v4",
|
|
949
|
-
key: "tgpxqk"
|
|
950
|
-
}],
|
|
951
|
-
["path", {
|
|
952
|
-
d: "M8 12H3",
|
|
953
|
-
key: "a7s4jb"
|
|
954
|
-
}]
|
|
955
|
-
]);
|
|
956
|
-
/**
|
|
957
|
-
* @license lucide-react v1.39.0 - ISC
|
|
958
|
-
*
|
|
959
|
-
* This source code is licensed under the ISC license.
|
|
960
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
961
|
-
*/
|
|
962
|
-
const Sparkles = createLucideIcon("sparkles", [
|
|
963
|
-
["path", {
|
|
964
|
-
d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
|
|
965
|
-
key: "1s2grr"
|
|
966
|
-
}],
|
|
967
|
-
["path", {
|
|
968
|
-
d: "M20 2v4",
|
|
969
|
-
key: "1rf3ol"
|
|
970
|
-
}],
|
|
971
|
-
["path", {
|
|
972
|
-
d: "M22 4h-4",
|
|
973
|
-
key: "gwowj6"
|
|
974
|
-
}],
|
|
975
|
-
["circle", {
|
|
976
|
-
cx: "4",
|
|
977
|
-
cy: "20",
|
|
978
|
-
r: "2",
|
|
979
|
-
key: "6kqj1y"
|
|
980
|
-
}]
|
|
981
|
-
]);
|
|
982
|
-
/**
|
|
983
|
-
* @license lucide-react v1.39.0 - ISC
|
|
984
|
-
*
|
|
985
|
-
* This source code is licensed under the ISC license.
|
|
986
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
987
|
-
*/
|
|
988
|
-
const SquarePen = createLucideIcon("square-pen", [["path", {
|
|
989
|
-
d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",
|
|
990
|
-
key: "1m0v6g"
|
|
991
|
-
}], ["path", {
|
|
992
|
-
d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",
|
|
993
|
-
key: "ohrbg2"
|
|
994
|
-
}]]);
|
|
995
|
-
/**
|
|
996
|
-
* @license lucide-react v1.39.0 - ISC
|
|
997
|
-
*
|
|
998
|
-
* This source code is licensed under the ISC license.
|
|
999
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1000
|
-
*/
|
|
1001
|
-
const Store = createLucideIcon("store", [
|
|
1002
|
-
["path", {
|
|
1003
|
-
d: "M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",
|
|
1004
|
-
key: "slp6dd"
|
|
1005
|
-
}],
|
|
1006
|
-
["path", {
|
|
1007
|
-
d: "M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",
|
|
1008
|
-
key: "o0xfot"
|
|
1009
|
-
}],
|
|
1010
|
-
["path", {
|
|
1011
|
-
d: "M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",
|
|
1012
|
-
key: "wn3emo"
|
|
1013
|
-
}]
|
|
1014
|
-
]);
|
|
1015
|
-
/**
|
|
1016
|
-
* @license lucide-react v1.39.0 - ISC
|
|
1017
|
-
*
|
|
1018
|
-
* This source code is licensed under the ISC license.
|
|
1019
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1020
|
-
*/
|
|
1021
|
-
const Telescope = createLucideIcon("telescope", [
|
|
1022
|
-
["path", {
|
|
1023
|
-
d: "m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",
|
|
1024
|
-
key: "k4qptu"
|
|
1025
|
-
}],
|
|
1026
|
-
["path", {
|
|
1027
|
-
d: "m13.56 11.747 4.332-.924",
|
|
1028
|
-
key: "19l80z"
|
|
1029
|
-
}],
|
|
1030
|
-
["path", {
|
|
1031
|
-
d: "m16 21-3.105-6.21",
|
|
1032
|
-
key: "7oh9d"
|
|
1033
|
-
}],
|
|
1034
|
-
["path", {
|
|
1035
|
-
d: "M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",
|
|
1036
|
-
key: "m7xp4m"
|
|
1037
|
-
}],
|
|
1038
|
-
["path", {
|
|
1039
|
-
d: "m6.158 8.633 1.114 4.456",
|
|
1040
|
-
key: "74o979"
|
|
1041
|
-
}],
|
|
1042
|
-
["path", {
|
|
1043
|
-
d: "m8 21 3.105-6.21",
|
|
1044
|
-
key: "1fvxut"
|
|
1045
|
-
}],
|
|
1046
|
-
["circle", {
|
|
1047
|
-
cx: "12",
|
|
1048
|
-
cy: "13",
|
|
1049
|
-
r: "2",
|
|
1050
|
-
key: "1c1ljs"
|
|
1051
|
-
}]
|
|
1052
|
-
]);
|
|
1053
|
-
/**
|
|
1054
|
-
* @license lucide-react v1.39.0 - ISC
|
|
1055
|
-
*
|
|
1056
|
-
* This source code is licensed under the ISC license.
|
|
1057
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1058
|
-
*/
|
|
1059
|
-
const User = createLucideIcon("user", [["path", {
|
|
1060
|
-
d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",
|
|
1061
|
-
key: "975kel"
|
|
1062
|
-
}], ["circle", {
|
|
1063
|
-
cx: "12",
|
|
1064
|
-
cy: "7",
|
|
1065
|
-
r: "4",
|
|
1066
|
-
key: "17ys0d"
|
|
1067
|
-
}]]);
|
|
1068
|
-
//#endregion
|
|
1069
|
-
//#region src/client/settings-navigation.ts
|
|
1070
|
-
/**
|
|
1071
|
-
* 自有设置壳通过事件直接打开分区,不依赖账号入口的按钮或菜单结构。
|
|
1072
|
-
* 保留的宿主设置壳仍从设置入口触发,再按可访问名称选择页面。
|
|
1073
|
-
*/
|
|
1074
|
-
function pickSettingsSectionButton(buttons, labels) {
|
|
1075
|
-
for (const label of labels) {
|
|
1076
|
-
const match = buttons.find((button) => button.textContent?.trim() === label);
|
|
1077
|
-
if (match !== void 0) return match;
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
/**
|
|
1081
|
-
* 可选插件未注册设置入口时,直接打开兜底页,避免先展示通用设置并等待导航超时。
|
|
1082
|
-
*/
|
|
1083
|
-
function routeOptionalSettingsSection(available, openRequested, openFallback) {
|
|
1084
|
-
if (available) {
|
|
1085
|
-
openRequested();
|
|
1086
|
-
return;
|
|
1087
|
-
}
|
|
1088
|
-
openFallback();
|
|
1089
|
-
}
|
|
1090
|
-
/** 官方 alpha.2 插件管理页占用 sidebar.panellist / main 的同一 id。 */
|
|
1091
|
-
const OFFICIAL_PLUGINS_PANEL_ID = "plugins";
|
|
1092
|
-
let cancelPendingNavigation;
|
|
1093
|
-
const SETTINGS_NAVIGATION_TIMEOUT_MS = 4e3;
|
|
1094
|
-
const SETTINGS_TRIGGER_SELECTOR = "[data-dcu-settings-trigger],[aria-haspopup=\"dialog\"]";
|
|
1095
|
-
const SETTINGS_OPEN_SECTION_EVENT = "dcu-settings-open-section";
|
|
1096
|
-
const SETTINGS_OPEN_ROOT_EVENT = "dcu-settings-open-root";
|
|
1097
|
-
const SETTINGS_OWNER_SELECTOR = "[data-dcu-settings-owner]";
|
|
1098
|
-
/** 根入口与分区跳转使用同一触发器合约,兼容保留的宿主设置壳。 */
|
|
1099
|
-
function openSettingsRoot(root) {
|
|
1100
|
-
const owner = root?.querySelector(SETTINGS_OWNER_SELECTOR);
|
|
1101
|
-
if (owner && !owner.dispatchEvent(new CustomEvent("dcu-settings-open-root", { cancelable: true }))) return;
|
|
1102
|
-
root?.querySelector(SETTINGS_TRIGGER_SELECTOR)?.click();
|
|
1103
|
-
}
|
|
1104
|
-
function openSettingsSection(root, label, onMissing, onSelected) {
|
|
1105
|
-
const labels = typeof label === "string" ? [label] : label;
|
|
1106
|
-
const trigger = root?.querySelector(SETTINGS_OWNER_SELECTOR) ?? root?.querySelector("[data-dcu-settings-trigger],[aria-haspopup=\"dialog\"]");
|
|
1107
|
-
if (trigger === null || trigger === void 0) {
|
|
1108
|
-
onMissing?.();
|
|
1109
|
-
return;
|
|
1110
|
-
}
|
|
1111
|
-
const opening = cancelPendingNavigation !== void 0;
|
|
1112
|
-
cancelPendingNavigation?.();
|
|
1113
|
-
const request = new CustomEvent(SETTINGS_OPEN_SECTION_EVENT, {
|
|
1114
|
-
detail: { labels },
|
|
1115
|
-
cancelable: true
|
|
1116
|
-
});
|
|
1117
|
-
const detail = { labels };
|
|
1118
|
-
const ownerRequest = new CustomEvent(SETTINGS_OPEN_SECTION_EVENT, {
|
|
1119
|
-
detail,
|
|
1120
|
-
cancelable: true
|
|
1121
|
-
});
|
|
1122
|
-
if (trigger.hasAttribute("data-dcu-settings-owner")) {
|
|
1123
|
-
trigger.dispatchEvent(ownerRequest);
|
|
1124
|
-
if (detail.result === "selected") onSelected?.();
|
|
1125
|
-
else onMissing?.();
|
|
1126
|
-
return;
|
|
1127
|
-
}
|
|
1128
|
-
if (!trigger.dispatchEvent(request)) {
|
|
1129
|
-
onSelected?.();
|
|
1130
|
-
return;
|
|
1131
|
-
}
|
|
1132
|
-
const pageSelector = trigger.hasAttribute("data-dcu-settings-trigger") ? "[data-dcu-settings-page]" : "[role=\"dialog\"]";
|
|
1133
|
-
if (!opening && document.querySelector(pageSelector) === null) trigger.click();
|
|
1134
|
-
let frame;
|
|
1135
|
-
let finished = false;
|
|
1136
|
-
const observer = new MutationObserver(() => {
|
|
1137
|
-
schedule();
|
|
1138
|
-
});
|
|
1139
|
-
const cleanup = () => {
|
|
1140
|
-
if (finished) return;
|
|
1141
|
-
finished = true;
|
|
1142
|
-
observer.disconnect();
|
|
1143
|
-
window.clearTimeout(timeout);
|
|
1144
|
-
if (frame !== void 0) window.cancelAnimationFrame(frame);
|
|
1145
|
-
if (cancelPendingNavigation === cleanup) cancelPendingNavigation = void 0;
|
|
1146
|
-
};
|
|
1147
|
-
const select = () => {
|
|
1148
|
-
const target = pickSettingsSectionButton([...document.querySelectorAll(`${pageSelector} nav button`)], labels);
|
|
1149
|
-
if (target === void 0) return false;
|
|
1150
|
-
cleanup();
|
|
1151
|
-
target.click();
|
|
1152
|
-
onSelected?.();
|
|
1153
|
-
return true;
|
|
1154
|
-
};
|
|
1155
|
-
const schedule = () => {
|
|
1156
|
-
if (finished || frame !== void 0) return;
|
|
1157
|
-
frame = window.requestAnimationFrame(() => {
|
|
1158
|
-
frame = void 0;
|
|
1159
|
-
select();
|
|
1160
|
-
});
|
|
1161
|
-
};
|
|
1162
|
-
const timeout = window.setTimeout(() => {
|
|
1163
|
-
if (select()) return;
|
|
1164
|
-
cleanup();
|
|
1165
|
-
console.warn(`[michengai-codex-ui] 未找到设置分区:${labels.join(" / ")}`);
|
|
1166
|
-
onMissing?.();
|
|
1167
|
-
}, SETTINGS_NAVIGATION_TIMEOUT_MS);
|
|
1168
|
-
observer.observe(document.body, {
|
|
1169
|
-
childList: true,
|
|
1170
|
-
subtree: true
|
|
1171
|
-
});
|
|
1172
|
-
cancelPendingNavigation = cleanup;
|
|
1173
|
-
schedule();
|
|
1174
|
-
}
|
|
1175
|
-
//#endregion
|
|
1176
|
-
//#region src/client/global-panels.tsx
|
|
1177
|
-
/** 从宿主注册表读取面板元数据;缓存快照以满足 React 外部状态订阅契约。 */
|
|
1178
|
-
function createGlobalPanelSource(slots, locale) {
|
|
1179
|
-
let cached = [];
|
|
1180
|
-
return {
|
|
1181
|
-
getSnapshot() {
|
|
1182
|
-
const next = slots.entriesOfSlot("sidebar.panellist").flatMap(({ options }) => {
|
|
1183
|
-
if (options.id === void 0 || options.id === "plugins") return [];
|
|
1184
|
-
return [{
|
|
1185
|
-
id: options.id,
|
|
1186
|
-
order: options.order ?? 0,
|
|
1187
|
-
label: (typeof options.label === "function" ? options.label() : options.label) ?? options.id
|
|
1188
|
-
}];
|
|
1189
|
-
}).sort((a, b) => a.order - b.order);
|
|
1190
|
-
if (next.length !== cached.length || next.some((panel, index) => {
|
|
1191
|
-
const previous = cached[index];
|
|
1192
|
-
return previous === void 0 || panel.id !== previous.id || panel.label !== previous.label || panel.order !== previous.order;
|
|
1193
|
-
})) cached = next;
|
|
1194
|
-
return cached;
|
|
1195
|
-
},
|
|
1196
|
-
subscribe(listener) {
|
|
1197
|
-
const offSlots = slots.subscribe("sidebar.panellist", listener);
|
|
1198
|
-
const offLocale = locale.subscribe(listener);
|
|
1199
|
-
return () => {
|
|
1200
|
-
offSlots();
|
|
1201
|
-
offLocale();
|
|
1202
|
-
};
|
|
1203
|
-
}
|
|
1204
|
-
};
|
|
1205
|
-
}
|
|
1206
|
-
/** 展开和紧凑侧栏共享同一导航行为,null 回到已有会话而非新建会话。 */
|
|
1207
|
-
function GlobalPanelButtons({ panels, activeId, wide, conversationLabel, selectPanel, renderIcon }) {
|
|
1208
|
-
if (panels.length === 0) return null;
|
|
1209
|
-
const button = (id, label, icon) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
1210
|
-
type: "button",
|
|
1211
|
-
className: wide ? "dcu-global-panel" : "dcu-icon dcu-global-panel",
|
|
1212
|
-
"aria-label": label,
|
|
1213
|
-
title: wide ? void 0 : label,
|
|
1214
|
-
"aria-current": activeId === id ? "page" : void 0,
|
|
1215
|
-
onClick: () => selectPanel(id),
|
|
1216
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1217
|
-
className: "dcu-menu-icon",
|
|
1218
|
-
"aria-hidden": "true",
|
|
1219
|
-
children: icon
|
|
1220
|
-
}), wide && label]
|
|
1221
|
-
}, id ?? "conversation");
|
|
1222
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [button(null, conversationLabel, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MessageSquare, {
|
|
1223
|
-
size: 16,
|
|
1224
|
-
strokeWidth: 1.6
|
|
1225
|
-
})), panels.map((panel) => button(panel.id, panel.label, renderIcon(panel.id, activeId === panel.id)))] });
|
|
1226
|
-
}
|
|
1227
|
-
/** 按用户要求用最窄宽度替代宿主自适应默认;已有有效偏好不重置,拖拽起点沿用宿主存储。 */
|
|
1228
|
-
function initializeComposerWidth(storage) {
|
|
1229
|
-
const key = "dsh.conversation.contentWidth";
|
|
1230
|
-
try {
|
|
1231
|
-
const saved = Number(storage.getItem(key));
|
|
1232
|
-
if (Number.isFinite(saved) && saved > 0) return;
|
|
1233
|
-
storage.setItem(key, String(640));
|
|
1234
|
-
} catch (error) {
|
|
1235
|
-
console.warn("[codex-ui] 无法初始化输入区宽度,将使用宿主默认值。", error);
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
/** 新建页没有宿主 WidthHandle,补充同一宽度偏好的拖拽入口。 */
|
|
1239
|
-
function observeHeroWidthHandles(label) {
|
|
1240
|
-
const mounted = /* @__PURE__ */ new Map();
|
|
1241
|
-
const style = document.createElement("style");
|
|
1242
|
-
style.textContent = `[data-phase=hero]:has([data-conversation-scroll]){position:relative}[data-dcu-width-handle]{position:absolute;top:0;bottom:0;width:32px;padding:0;border:0;background:transparent;cursor:col-resize;touch-action:none;z-index:8;outline-offset:-5px}[data-dcu-width-handle=left]{right:calc(50% + var(--dsh-chat-content-width) / 2 + 16px)}[data-dcu-width-handle=right]{left:calc(50% + var(--dsh-chat-content-width) / 2 + 16px)}[data-dcu-width-handle]::after{content:'';position:absolute;top:calc(var(--dcu-pointer-y,50%) - 50px);height:100px;width:3px;left:14px;border-radius:3px;background:linear-gradient(transparent,var(--dsw-alias-scrollbar-hover-l1,#888),transparent);opacity:0}[data-dcu-width-handle]:hover::after,[data-dcu-width-handle]:focus-visible::after,[data-dcu-width-handle][data-dragging]::after{opacity:1}[data-phase=hero]:has([data-conversation-composer-overlay]) [data-dcu-width-handle]{display:none}`;
|
|
1243
|
-
document.head.append(style);
|
|
1244
|
-
const sync = () => {
|
|
1245
|
-
for (const [root, dispose] of mounted) if (!root.isConnected || root.dataset.phase !== "hero") {
|
|
1246
|
-
dispose();
|
|
1247
|
-
mounted.delete(root);
|
|
1248
|
-
}
|
|
1249
|
-
for (const root of document.querySelectorAll("[data-phase=hero]")) {
|
|
1250
|
-
if (mounted.has(root) || !root.querySelector("[data-conversation-scroll]")) continue;
|
|
1251
|
-
const clamp = (value) => Math.min(Math.max(640, value), Math.max(640, root.clientWidth - 176));
|
|
1252
|
-
const current = () => {
|
|
1253
|
-
const raw = getComputedStyle(root).getPropertyValue("--dsh-chat-user-width");
|
|
1254
|
-
return clamp(parseFloat(raw) || 640);
|
|
1255
|
-
};
|
|
1256
|
-
const publish = (width, save) => {
|
|
1257
|
-
const value = clamp(width);
|
|
1258
|
-
root.style.setProperty("--dsh-chat-user-width", `${value}px`);
|
|
1259
|
-
if (save) try {
|
|
1260
|
-
localStorage.setItem("dsh.conversation.contentWidth", String(value));
|
|
1261
|
-
} catch (error) {
|
|
1262
|
-
console.warn("[codex-ui] 无法保存输入区宽度。", error);
|
|
1263
|
-
}
|
|
1264
|
-
};
|
|
1265
|
-
const handles = ["left", "right"].map((side) => {
|
|
1266
|
-
const handle = document.createElement("button");
|
|
1267
|
-
handle.type = "button";
|
|
1268
|
-
handle.dataset.dcuWidthHandle = side;
|
|
1269
|
-
handle.setAttribute("aria-label", label);
|
|
1270
|
-
let origin = 0;
|
|
1271
|
-
let initial = 640;
|
|
1272
|
-
let dragging = false;
|
|
1273
|
-
handle.addEventListener("pointerdown", (event) => {
|
|
1274
|
-
if (event.button !== 0) return;
|
|
1275
|
-
event.preventDefault();
|
|
1276
|
-
origin = event.clientX;
|
|
1277
|
-
initial = current();
|
|
1278
|
-
dragging = true;
|
|
1279
|
-
handle.dataset.dragging = "";
|
|
1280
|
-
handle.setPointerCapture(event.pointerId);
|
|
1281
|
-
});
|
|
1282
|
-
handle.addEventListener("pointermove", (event) => {
|
|
1283
|
-
handle.style.setProperty("--dcu-pointer-y", `${event.clientY - handle.getBoundingClientRect().top}px`);
|
|
1284
|
-
if (dragging) publish(initial + (event.clientX - origin) * (side === "right" ? 2 : -2), false);
|
|
1285
|
-
});
|
|
1286
|
-
handle.addEventListener("pointerup", (event) => {
|
|
1287
|
-
if (!dragging) return;
|
|
1288
|
-
publish(initial + (event.clientX - origin) * (side === "right" ? 2 : -2), true);
|
|
1289
|
-
dragging = false;
|
|
1290
|
-
delete handle.dataset.dragging;
|
|
1291
|
-
handle.releasePointerCapture(event.pointerId);
|
|
1292
|
-
});
|
|
1293
|
-
handle.addEventListener("lostpointercapture", () => {
|
|
1294
|
-
if (dragging) publish(initial, false);
|
|
1295
|
-
dragging = false;
|
|
1296
|
-
delete handle.dataset.dragging;
|
|
1297
|
-
});
|
|
1298
|
-
handle.addEventListener("keydown", (event) => {
|
|
1299
|
-
if (![
|
|
1300
|
-
"ArrowLeft",
|
|
1301
|
-
"ArrowRight",
|
|
1302
|
-
"Home"
|
|
1303
|
-
].includes(event.key)) return;
|
|
1304
|
-
event.preventDefault();
|
|
1305
|
-
const delta = (event.key === "ArrowRight" ? 1 : -1) * (side === "right" ? 1 : -1) * 20;
|
|
1306
|
-
publish(event.key === "Home" ? 640 : current() + delta, true);
|
|
1307
|
-
});
|
|
1308
|
-
root.append(handle);
|
|
1309
|
-
return handle;
|
|
1310
|
-
});
|
|
1311
|
-
mounted.set(root, () => {
|
|
1312
|
-
handles.forEach((handle) => handle.remove());
|
|
1313
|
-
});
|
|
1314
|
-
}
|
|
1315
|
-
};
|
|
1316
|
-
const observer = new MutationObserver(sync);
|
|
1317
|
-
observer.observe(document.body, {
|
|
1318
|
-
childList: true,
|
|
1319
|
-
subtree: true,
|
|
1320
|
-
attributes: true,
|
|
1321
|
-
attributeFilter: ["data-phase"]
|
|
1322
|
-
});
|
|
1323
|
-
sync();
|
|
1324
|
-
return () => {
|
|
1325
|
-
observer.disconnect();
|
|
1326
|
-
mounted.forEach((dispose) => dispose());
|
|
1327
|
-
mounted.clear();
|
|
1328
|
-
style.remove();
|
|
1329
|
-
};
|
|
1330
|
-
}
|
|
1331
|
-
//#endregion
|
|
1332
|
-
//#region src/client/tree-expansion.ts
|
|
1333
|
-
const WORKSPACE_EXPANSION_STORAGE_KEY = "dsh-codex-ui.workspace-expansion.v1";
|
|
1334
|
-
const CHANNEL_EXPANSION_STORAGE_KEY = "dsh-codex-ui.channel-expansion.v1";
|
|
1335
|
-
const SCHEDULE_EXPANSION_STORAGE_KEY = "dsh-codex-ui.schedule-expansion.v1";
|
|
1336
|
-
const MAX_EXPANSION_ENTRIES = 500;
|
|
1337
|
-
const MAX_EXPANSION_KEY_LENGTH = 512;
|
|
1338
|
-
function browserStorage() {
|
|
1339
|
-
if (typeof window === "undefined") return void 0;
|
|
1340
|
-
try {
|
|
1341
|
-
return window.localStorage;
|
|
1342
|
-
} catch {
|
|
1343
|
-
return;
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
function parseTreeExpansionState(value) {
|
|
1347
|
-
if (value === null || typeof value !== "object" || Array.isArray(value)) return {};
|
|
1348
|
-
const entries = Object.entries(value).filter(([key, expanded]) => key.length > 0 && key.length <= MAX_EXPANSION_KEY_LENGTH && typeof expanded === "boolean").slice(0, MAX_EXPANSION_ENTRIES);
|
|
1349
|
-
return Object.fromEntries(entries);
|
|
1350
|
-
}
|
|
1351
|
-
function readTreeExpansionState(storage, key) {
|
|
1352
|
-
if (storage === void 0) return {};
|
|
1353
|
-
try {
|
|
1354
|
-
return parseTreeExpansionState(JSON.parse(storage.getItem(key) ?? "{}"));
|
|
1355
|
-
} catch {
|
|
1356
|
-
return {};
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
function writeTreeExpansionState(storage, key, state) {
|
|
1360
|
-
if (storage === void 0) return;
|
|
1361
|
-
try {
|
|
1362
|
-
storage.setItem(key, JSON.stringify(parseTreeExpansionState(state)));
|
|
1363
|
-
} catch {}
|
|
1364
|
-
}
|
|
1365
|
-
//#endregion
|
|
1366
|
-
//#region src/client/host-icons.ts
|
|
1367
|
-
/**
|
|
1368
|
-
* 优先使用 0.1.7 的 Medium 导出名,0.1.5 只有旧尺寸名时回退。
|
|
1369
|
-
* 必须动态读取,不能写成静态属性访问,否则旧宿主一加载客户端就会拿到 undefined。
|
|
687
|
+
* 优先使用 0.1.7 的 Medium 导出名,0.1.5 只有旧尺寸名时回退。
|
|
688
|
+
* 必须动态读取,不能写成静态属性访问,否则旧宿主一加载客户端就会拿到 undefined。
|
|
1370
689
|
*/
|
|
1371
690
|
function resolveHostIcon(icons, modern, legacy) {
|
|
1372
691
|
const icon = icons[modern] ?? icons[legacy];
|
|
@@ -1687,6 +1006,683 @@ window.__ModuleLoader__.load({
|
|
|
1687
1006
|
return parseChannelGroups(payload, fallbackLabel);
|
|
1688
1007
|
}
|
|
1689
1008
|
//#endregion
|
|
1009
|
+
//#region node_modules/.pnpm/lucide-react@1.39.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
|
|
1010
|
+
/**
|
|
1011
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1012
|
+
*
|
|
1013
|
+
* This source code is licensed under the ISC license.
|
|
1014
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1015
|
+
*/
|
|
1016
|
+
const mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
1017
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
1018
|
+
}).join(" ").trim();
|
|
1019
|
+
//#endregion
|
|
1020
|
+
//#region node_modules/.pnpm/lucide-react@1.39.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs
|
|
1021
|
+
/**
|
|
1022
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1023
|
+
*
|
|
1024
|
+
* This source code is licensed under the ISC license.
|
|
1025
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1026
|
+
*/
|
|
1027
|
+
const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1028
|
+
//#endregion
|
|
1029
|
+
//#region node_modules/.pnpm/lucide-react@1.39.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs
|
|
1030
|
+
/**
|
|
1031
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1032
|
+
*
|
|
1033
|
+
* This source code is licensed under the ISC license.
|
|
1034
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1035
|
+
*/
|
|
1036
|
+
const toCamelCase = (string) => string.replace(/^([A-Z])|[\s-_]+(\w)/g, (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase());
|
|
1037
|
+
//#endregion
|
|
1038
|
+
//#region node_modules/.pnpm/lucide-react@1.39.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs
|
|
1039
|
+
/**
|
|
1040
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1041
|
+
*
|
|
1042
|
+
* This source code is licensed under the ISC license.
|
|
1043
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1044
|
+
*/
|
|
1045
|
+
const toPascalCase = (string) => {
|
|
1046
|
+
const camelCase = toCamelCase(string);
|
|
1047
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
1048
|
+
};
|
|
1049
|
+
//#endregion
|
|
1050
|
+
//#region node_modules/.pnpm/lucide-react@1.39.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.mjs
|
|
1051
|
+
/**
|
|
1052
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1053
|
+
*
|
|
1054
|
+
* This source code is licensed under the ISC license.
|
|
1055
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1056
|
+
*/
|
|
1057
|
+
var defaultAttributes = {
|
|
1058
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1059
|
+
width: 24,
|
|
1060
|
+
height: 24,
|
|
1061
|
+
viewBox: "0 0 24 24",
|
|
1062
|
+
fill: "none",
|
|
1063
|
+
stroke: "currentColor",
|
|
1064
|
+
strokeWidth: 2,
|
|
1065
|
+
strokeLinecap: "round",
|
|
1066
|
+
strokeLinejoin: "round"
|
|
1067
|
+
};
|
|
1068
|
+
//#endregion
|
|
1069
|
+
//#region node_modules/.pnpm/lucide-react@1.39.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs
|
|
1070
|
+
/**
|
|
1071
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1072
|
+
*
|
|
1073
|
+
* This source code is licensed under the ISC license.
|
|
1074
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1075
|
+
*/
|
|
1076
|
+
const hasA11yProp = (props) => {
|
|
1077
|
+
for (const prop in props) if (prop.startsWith("aria-") || prop === "role" || prop === "title") return true;
|
|
1078
|
+
return false;
|
|
1079
|
+
};
|
|
1080
|
+
//#endregion
|
|
1081
|
+
//#region node_modules/.pnpm/lucide-react@1.39.0_react@18.3.1/node_modules/lucide-react/dist/esm/context.mjs
|
|
1082
|
+
/**
|
|
1083
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1084
|
+
*
|
|
1085
|
+
* This source code is licensed under the ISC license.
|
|
1086
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1087
|
+
*/
|
|
1088
|
+
const LucideContext = (0, react.createContext)({});
|
|
1089
|
+
const useLucideContext = () => (0, react.useContext)(LucideContext);
|
|
1090
|
+
//#endregion
|
|
1091
|
+
//#region node_modules/.pnpm/lucide-react@1.39.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.mjs
|
|
1092
|
+
/**
|
|
1093
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1094
|
+
*
|
|
1095
|
+
* This source code is licensed under the ISC license.
|
|
1096
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1097
|
+
*/
|
|
1098
|
+
const Icon = (0, react.forwardRef)(({ color, size, strokeWidth, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref) => {
|
|
1099
|
+
const { size: contextSize = 24, strokeWidth: contextStrokeWidth = 2, absoluteStrokeWidth: contextAbsoluteStrokeWidth = false, color: contextColor = "currentColor", className: contextClass = "" } = useLucideContext() ?? {};
|
|
1100
|
+
const calculatedStrokeWidth = absoluteStrokeWidth ?? contextAbsoluteStrokeWidth ? Number(strokeWidth ?? contextStrokeWidth) * 24 / Number(size ?? contextSize) : strokeWidth ?? contextStrokeWidth;
|
|
1101
|
+
return (0, react.createElement)("svg", {
|
|
1102
|
+
ref,
|
|
1103
|
+
...defaultAttributes,
|
|
1104
|
+
width: size ?? contextSize ?? defaultAttributes.width,
|
|
1105
|
+
height: size ?? contextSize ?? defaultAttributes.height,
|
|
1106
|
+
stroke: color ?? contextColor,
|
|
1107
|
+
strokeWidth: calculatedStrokeWidth,
|
|
1108
|
+
className: mergeClasses("lucide", contextClass, className),
|
|
1109
|
+
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
1110
|
+
...rest
|
|
1111
|
+
}, [...iconNode.map(([tag, attrs]) => (0, react.createElement)(tag, attrs)), ...Array.isArray(children) ? children : [children]]);
|
|
1112
|
+
});
|
|
1113
|
+
//#endregion
|
|
1114
|
+
//#region node_modules/.pnpm/lucide-react@1.39.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.mjs
|
|
1115
|
+
/**
|
|
1116
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1117
|
+
*
|
|
1118
|
+
* This source code is licensed under the ISC license.
|
|
1119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1120
|
+
*/
|
|
1121
|
+
const createLucideIcon = (iconName, iconNode) => {
|
|
1122
|
+
const Component = (0, react.forwardRef)(({ className, ...props }, ref) => (0, react.createElement)(Icon, {
|
|
1123
|
+
ref,
|
|
1124
|
+
iconNode,
|
|
1125
|
+
className: mergeClasses(`lucide-${toKebabCase(toPascalCase(iconName))}`, `lucide-${iconName}`, className),
|
|
1126
|
+
...props
|
|
1127
|
+
}));
|
|
1128
|
+
Component.displayName = toPascalCase(iconName);
|
|
1129
|
+
return Component;
|
|
1130
|
+
};
|
|
1131
|
+
/**
|
|
1132
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1133
|
+
*
|
|
1134
|
+
* This source code is licensed under the ISC license.
|
|
1135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1136
|
+
*/
|
|
1137
|
+
const Archive = createLucideIcon("archive", [
|
|
1138
|
+
["rect", {
|
|
1139
|
+
width: "20",
|
|
1140
|
+
height: "5",
|
|
1141
|
+
x: "2",
|
|
1142
|
+
y: "3",
|
|
1143
|
+
rx: "1",
|
|
1144
|
+
key: "1wp1u1"
|
|
1145
|
+
}],
|
|
1146
|
+
["path", {
|
|
1147
|
+
d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",
|
|
1148
|
+
key: "1s80jp"
|
|
1149
|
+
}],
|
|
1150
|
+
["path", {
|
|
1151
|
+
d: "M10 12h4",
|
|
1152
|
+
key: "a56b0p"
|
|
1153
|
+
}]
|
|
1154
|
+
]);
|
|
1155
|
+
/**
|
|
1156
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1157
|
+
*
|
|
1158
|
+
* This source code is licensed under the ISC license.
|
|
1159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1160
|
+
*/
|
|
1161
|
+
const ArrowLeft = createLucideIcon("arrow-left", [["path", {
|
|
1162
|
+
d: "m12 19-7-7 7-7",
|
|
1163
|
+
key: "1l729n"
|
|
1164
|
+
}], ["path", {
|
|
1165
|
+
d: "M19 12H5",
|
|
1166
|
+
key: "x3x0zl"
|
|
1167
|
+
}]]);
|
|
1168
|
+
/**
|
|
1169
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1170
|
+
*
|
|
1171
|
+
* This source code is licensed under the ISC license.
|
|
1172
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1173
|
+
*/
|
|
1174
|
+
const Box = createLucideIcon("box", [
|
|
1175
|
+
["path", {
|
|
1176
|
+
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
|
|
1177
|
+
key: "hh9hay"
|
|
1178
|
+
}],
|
|
1179
|
+
["path", {
|
|
1180
|
+
d: "m3.3 7 8.7 5 8.7-5",
|
|
1181
|
+
key: "g66t2b"
|
|
1182
|
+
}],
|
|
1183
|
+
["path", {
|
|
1184
|
+
d: "M12 22V12",
|
|
1185
|
+
key: "d0xqtd"
|
|
1186
|
+
}]
|
|
1187
|
+
]);
|
|
1188
|
+
/**
|
|
1189
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1190
|
+
*
|
|
1191
|
+
* This source code is licensed under the ISC license.
|
|
1192
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1193
|
+
*/
|
|
1194
|
+
const Bug = createLucideIcon("bug", [
|
|
1195
|
+
["path", {
|
|
1196
|
+
d: "M12 20v-9",
|
|
1197
|
+
key: "1qisl0"
|
|
1198
|
+
}],
|
|
1199
|
+
["path", {
|
|
1200
|
+
d: "M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",
|
|
1201
|
+
key: "uouzyp"
|
|
1202
|
+
}],
|
|
1203
|
+
["path", {
|
|
1204
|
+
d: "M14.12 3.88 16 2",
|
|
1205
|
+
key: "qol33r"
|
|
1206
|
+
}],
|
|
1207
|
+
["path", {
|
|
1208
|
+
d: "M21 21a4 4 0 0 0-3.81-4",
|
|
1209
|
+
key: "1b0z45"
|
|
1210
|
+
}],
|
|
1211
|
+
["path", {
|
|
1212
|
+
d: "M21 5a4 4 0 0 1-3.55 3.97",
|
|
1213
|
+
key: "5cxbf6"
|
|
1214
|
+
}],
|
|
1215
|
+
["path", {
|
|
1216
|
+
d: "M22 13h-4",
|
|
1217
|
+
key: "1jl80f"
|
|
1218
|
+
}],
|
|
1219
|
+
["path", {
|
|
1220
|
+
d: "M3 21a4 4 0 0 1 3.81-4",
|
|
1221
|
+
key: "1fjd4g"
|
|
1222
|
+
}],
|
|
1223
|
+
["path", {
|
|
1224
|
+
d: "M3 5a4 4 0 0 0 3.55 3.97",
|
|
1225
|
+
key: "1d7oge"
|
|
1226
|
+
}],
|
|
1227
|
+
["path", {
|
|
1228
|
+
d: "M6 13H2",
|
|
1229
|
+
key: "82j7cp"
|
|
1230
|
+
}],
|
|
1231
|
+
["path", {
|
|
1232
|
+
d: "m8 2 1.88 1.88",
|
|
1233
|
+
key: "fmnt4t"
|
|
1234
|
+
}],
|
|
1235
|
+
["path", {
|
|
1236
|
+
d: "M9 7.13V6a3 3 0 1 1 6 0v1.13",
|
|
1237
|
+
key: "1vgav8"
|
|
1238
|
+
}]
|
|
1239
|
+
]);
|
|
1240
|
+
/**
|
|
1241
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1242
|
+
*
|
|
1243
|
+
* This source code is licensed under the ISC license.
|
|
1244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1245
|
+
*/
|
|
1246
|
+
const CircleQuestionMark = createLucideIcon("circle-question-mark", [
|
|
1247
|
+
["circle", {
|
|
1248
|
+
cx: "12",
|
|
1249
|
+
cy: "12",
|
|
1250
|
+
r: "10",
|
|
1251
|
+
key: "1mglay"
|
|
1252
|
+
}],
|
|
1253
|
+
["path", {
|
|
1254
|
+
d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",
|
|
1255
|
+
key: "1u773s"
|
|
1256
|
+
}],
|
|
1257
|
+
["path", {
|
|
1258
|
+
d: "M12 17h.01",
|
|
1259
|
+
key: "p32p05"
|
|
1260
|
+
}]
|
|
1261
|
+
]);
|
|
1262
|
+
/**
|
|
1263
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1264
|
+
*
|
|
1265
|
+
* This source code is licensed under the ISC license.
|
|
1266
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1267
|
+
*/
|
|
1268
|
+
const Clock = createLucideIcon("clock", [["circle", {
|
|
1269
|
+
cx: "12",
|
|
1270
|
+
cy: "12",
|
|
1271
|
+
r: "10",
|
|
1272
|
+
key: "1mglay"
|
|
1273
|
+
}], ["path", {
|
|
1274
|
+
d: "M12 6v6l4 2",
|
|
1275
|
+
key: "mmk7yg"
|
|
1276
|
+
}]]);
|
|
1277
|
+
/**
|
|
1278
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1279
|
+
*
|
|
1280
|
+
* This source code is licensed under the ISC license.
|
|
1281
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1282
|
+
*/
|
|
1283
|
+
const Cpu = createLucideIcon("cpu", [
|
|
1284
|
+
["path", {
|
|
1285
|
+
d: "M12 20v2",
|
|
1286
|
+
key: "1lh1kg"
|
|
1287
|
+
}],
|
|
1288
|
+
["path", {
|
|
1289
|
+
d: "M12 2v2",
|
|
1290
|
+
key: "tus03m"
|
|
1291
|
+
}],
|
|
1292
|
+
["path", {
|
|
1293
|
+
d: "M17 20v2",
|
|
1294
|
+
key: "1rnc9c"
|
|
1295
|
+
}],
|
|
1296
|
+
["path", {
|
|
1297
|
+
d: "M17 2v2",
|
|
1298
|
+
key: "11trls"
|
|
1299
|
+
}],
|
|
1300
|
+
["path", {
|
|
1301
|
+
d: "M2 12h2",
|
|
1302
|
+
key: "1t8f8n"
|
|
1303
|
+
}],
|
|
1304
|
+
["path", {
|
|
1305
|
+
d: "M2 17h2",
|
|
1306
|
+
key: "7oei6x"
|
|
1307
|
+
}],
|
|
1308
|
+
["path", {
|
|
1309
|
+
d: "M2 7h2",
|
|
1310
|
+
key: "asdhe0"
|
|
1311
|
+
}],
|
|
1312
|
+
["path", {
|
|
1313
|
+
d: "M20 12h2",
|
|
1314
|
+
key: "1q8mjw"
|
|
1315
|
+
}],
|
|
1316
|
+
["path", {
|
|
1317
|
+
d: "M20 17h2",
|
|
1318
|
+
key: "1fpfkl"
|
|
1319
|
+
}],
|
|
1320
|
+
["path", {
|
|
1321
|
+
d: "M20 7h2",
|
|
1322
|
+
key: "1o8tra"
|
|
1323
|
+
}],
|
|
1324
|
+
["path", {
|
|
1325
|
+
d: "M7 20v2",
|
|
1326
|
+
key: "4gnj0m"
|
|
1327
|
+
}],
|
|
1328
|
+
["path", {
|
|
1329
|
+
d: "M7 2v2",
|
|
1330
|
+
key: "1i4yhu"
|
|
1331
|
+
}],
|
|
1332
|
+
["rect", {
|
|
1333
|
+
x: "4",
|
|
1334
|
+
y: "4",
|
|
1335
|
+
width: "16",
|
|
1336
|
+
height: "16",
|
|
1337
|
+
rx: "2",
|
|
1338
|
+
key: "1vbyd7"
|
|
1339
|
+
}],
|
|
1340
|
+
["rect", {
|
|
1341
|
+
x: "8",
|
|
1342
|
+
y: "8",
|
|
1343
|
+
width: "8",
|
|
1344
|
+
height: "8",
|
|
1345
|
+
rx: "1",
|
|
1346
|
+
key: "z9xiuo"
|
|
1347
|
+
}]
|
|
1348
|
+
]);
|
|
1349
|
+
/**
|
|
1350
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1351
|
+
*
|
|
1352
|
+
* This source code is licensed under the ISC license.
|
|
1353
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1354
|
+
*/
|
|
1355
|
+
const EyeOff = createLucideIcon("eye-off", [
|
|
1356
|
+
["path", {
|
|
1357
|
+
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
1358
|
+
key: "ct8e1f"
|
|
1359
|
+
}],
|
|
1360
|
+
["path", {
|
|
1361
|
+
d: "M14.084 14.158a3 3 0 0 1-4.242-4.242",
|
|
1362
|
+
key: "151rxh"
|
|
1363
|
+
}],
|
|
1364
|
+
["path", {
|
|
1365
|
+
d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
|
|
1366
|
+
key: "13bj9a"
|
|
1367
|
+
}],
|
|
1368
|
+
["path", {
|
|
1369
|
+
d: "m2 2 20 20",
|
|
1370
|
+
key: "1ooewy"
|
|
1371
|
+
}]
|
|
1372
|
+
]);
|
|
1373
|
+
/**
|
|
1374
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1375
|
+
*
|
|
1376
|
+
* This source code is licensed under the ISC license.
|
|
1377
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1378
|
+
*/
|
|
1379
|
+
const Eye = createLucideIcon("eye", [["path", {
|
|
1380
|
+
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
1381
|
+
key: "1nclc0"
|
|
1382
|
+
}], ["circle", {
|
|
1383
|
+
cx: "12",
|
|
1384
|
+
cy: "12",
|
|
1385
|
+
r: "3",
|
|
1386
|
+
key: "1v7zrd"
|
|
1387
|
+
}]]);
|
|
1388
|
+
/**
|
|
1389
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1390
|
+
*
|
|
1391
|
+
* This source code is licensed under the ISC license.
|
|
1392
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1393
|
+
*/
|
|
1394
|
+
const Hammer = createLucideIcon("hammer", [
|
|
1395
|
+
["path", {
|
|
1396
|
+
d: "m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9",
|
|
1397
|
+
key: "1hayfq"
|
|
1398
|
+
}],
|
|
1399
|
+
["path", {
|
|
1400
|
+
d: "m18 15 4-4",
|
|
1401
|
+
key: "16gjal"
|
|
1402
|
+
}],
|
|
1403
|
+
["path", {
|
|
1404
|
+
d: "m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",
|
|
1405
|
+
key: "15ts47"
|
|
1406
|
+
}]
|
|
1407
|
+
]);
|
|
1408
|
+
/**
|
|
1409
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1410
|
+
*
|
|
1411
|
+
* This source code is licensed under the ISC license.
|
|
1412
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1413
|
+
*/
|
|
1414
|
+
const Link = createLucideIcon("link", [["path", {
|
|
1415
|
+
d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",
|
|
1416
|
+
key: "1cjeqo"
|
|
1417
|
+
}], ["path", {
|
|
1418
|
+
d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",
|
|
1419
|
+
key: "19qd67"
|
|
1420
|
+
}]]);
|
|
1421
|
+
/**
|
|
1422
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1423
|
+
*
|
|
1424
|
+
* This source code is licensed under the ISC license.
|
|
1425
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1426
|
+
*/
|
|
1427
|
+
const MessageCircle = createLucideIcon("message-circle", [["path", {
|
|
1428
|
+
d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
|
|
1429
|
+
key: "1sd12s"
|
|
1430
|
+
}]]);
|
|
1431
|
+
/**
|
|
1432
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1433
|
+
*
|
|
1434
|
+
* This source code is licensed under the ISC license.
|
|
1435
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1436
|
+
*/
|
|
1437
|
+
const MessageSquare = createLucideIcon("message-square", [["path", {
|
|
1438
|
+
d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",
|
|
1439
|
+
key: "18887p"
|
|
1440
|
+
}]]);
|
|
1441
|
+
/**
|
|
1442
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1443
|
+
*
|
|
1444
|
+
* This source code is licensed under the ISC license.
|
|
1445
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1446
|
+
*/
|
|
1447
|
+
const PanelRight = createLucideIcon("panel-right", [["rect", {
|
|
1448
|
+
width: "18",
|
|
1449
|
+
height: "18",
|
|
1450
|
+
x: "3",
|
|
1451
|
+
y: "3",
|
|
1452
|
+
rx: "2",
|
|
1453
|
+
key: "afitv7"
|
|
1454
|
+
}], ["path", {
|
|
1455
|
+
d: "M15 3v18",
|
|
1456
|
+
key: "14nvp0"
|
|
1457
|
+
}]]);
|
|
1458
|
+
/**
|
|
1459
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1460
|
+
*
|
|
1461
|
+
* This source code is licensed under the ISC license.
|
|
1462
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1463
|
+
*/
|
|
1464
|
+
const Pin = createLucideIcon("pin", [["path", {
|
|
1465
|
+
d: "M12 17v5",
|
|
1466
|
+
key: "bb1du9"
|
|
1467
|
+
}], ["path", {
|
|
1468
|
+
d: "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",
|
|
1469
|
+
key: "1nkz8b"
|
|
1470
|
+
}]]);
|
|
1471
|
+
/**
|
|
1472
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1473
|
+
*
|
|
1474
|
+
* This source code is licensed under the ISC license.
|
|
1475
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1476
|
+
*/
|
|
1477
|
+
const ScanLine = createLucideIcon("scan-line", [
|
|
1478
|
+
["path", {
|
|
1479
|
+
d: "M3 7V5a2 2 0 0 1 2-2h2",
|
|
1480
|
+
key: "aa7l1z"
|
|
1481
|
+
}],
|
|
1482
|
+
["path", {
|
|
1483
|
+
d: "M17 3h2a2 2 0 0 1 2 2v2",
|
|
1484
|
+
key: "4qcy5o"
|
|
1485
|
+
}],
|
|
1486
|
+
["path", {
|
|
1487
|
+
d: "M21 17v2a2 2 0 0 1-2 2h-2",
|
|
1488
|
+
key: "6vwrx8"
|
|
1489
|
+
}],
|
|
1490
|
+
["path", {
|
|
1491
|
+
d: "M7 21H5a2 2 0 0 1-2-2v-2",
|
|
1492
|
+
key: "ioqczr"
|
|
1493
|
+
}],
|
|
1494
|
+
["path", {
|
|
1495
|
+
d: "M7 12h10",
|
|
1496
|
+
key: "b7w52i"
|
|
1497
|
+
}]
|
|
1498
|
+
]);
|
|
1499
|
+
/**
|
|
1500
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1501
|
+
*
|
|
1502
|
+
* This source code is licensed under the ISC license.
|
|
1503
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1504
|
+
*/
|
|
1505
|
+
const Search = createLucideIcon("search", [["path", {
|
|
1506
|
+
d: "m21 21-4.34-4.34",
|
|
1507
|
+
key: "14j7rj"
|
|
1508
|
+
}], ["circle", {
|
|
1509
|
+
cx: "11",
|
|
1510
|
+
cy: "11",
|
|
1511
|
+
r: "8",
|
|
1512
|
+
key: "4ej97u"
|
|
1513
|
+
}]]);
|
|
1514
|
+
/**
|
|
1515
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1516
|
+
*
|
|
1517
|
+
* This source code is licensed under the ISC license.
|
|
1518
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1519
|
+
*/
|
|
1520
|
+
const Settings = createLucideIcon("settings", [["path", {
|
|
1521
|
+
d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
|
|
1522
|
+
key: "1i5ecw"
|
|
1523
|
+
}], ["circle", {
|
|
1524
|
+
cx: "12",
|
|
1525
|
+
cy: "12",
|
|
1526
|
+
r: "3",
|
|
1527
|
+
key: "1v7zrd"
|
|
1528
|
+
}]]);
|
|
1529
|
+
/**
|
|
1530
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1531
|
+
*
|
|
1532
|
+
* This source code is licensed under the ISC license.
|
|
1533
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1534
|
+
*/
|
|
1535
|
+
const SlidersHorizontal = createLucideIcon("sliders-horizontal", [
|
|
1536
|
+
["path", {
|
|
1537
|
+
d: "M10 5H3",
|
|
1538
|
+
key: "1qgfaw"
|
|
1539
|
+
}],
|
|
1540
|
+
["path", {
|
|
1541
|
+
d: "M12 19H3",
|
|
1542
|
+
key: "yhmn1j"
|
|
1543
|
+
}],
|
|
1544
|
+
["path", {
|
|
1545
|
+
d: "M14 3v4",
|
|
1546
|
+
key: "1sua03"
|
|
1547
|
+
}],
|
|
1548
|
+
["path", {
|
|
1549
|
+
d: "M16 17v4",
|
|
1550
|
+
key: "1q0r14"
|
|
1551
|
+
}],
|
|
1552
|
+
["path", {
|
|
1553
|
+
d: "M21 12h-9",
|
|
1554
|
+
key: "1o4lsq"
|
|
1555
|
+
}],
|
|
1556
|
+
["path", {
|
|
1557
|
+
d: "M21 19h-5",
|
|
1558
|
+
key: "1rlt1p"
|
|
1559
|
+
}],
|
|
1560
|
+
["path", {
|
|
1561
|
+
d: "M21 5h-7",
|
|
1562
|
+
key: "1oszz2"
|
|
1563
|
+
}],
|
|
1564
|
+
["path", {
|
|
1565
|
+
d: "M8 10v4",
|
|
1566
|
+
key: "tgpxqk"
|
|
1567
|
+
}],
|
|
1568
|
+
["path", {
|
|
1569
|
+
d: "M8 12H3",
|
|
1570
|
+
key: "a7s4jb"
|
|
1571
|
+
}]
|
|
1572
|
+
]);
|
|
1573
|
+
/**
|
|
1574
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1575
|
+
*
|
|
1576
|
+
* This source code is licensed under the ISC license.
|
|
1577
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1578
|
+
*/
|
|
1579
|
+
const Sparkles = createLucideIcon("sparkles", [
|
|
1580
|
+
["path", {
|
|
1581
|
+
d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
|
|
1582
|
+
key: "1s2grr"
|
|
1583
|
+
}],
|
|
1584
|
+
["path", {
|
|
1585
|
+
d: "M20 2v4",
|
|
1586
|
+
key: "1rf3ol"
|
|
1587
|
+
}],
|
|
1588
|
+
["path", {
|
|
1589
|
+
d: "M22 4h-4",
|
|
1590
|
+
key: "gwowj6"
|
|
1591
|
+
}],
|
|
1592
|
+
["circle", {
|
|
1593
|
+
cx: "4",
|
|
1594
|
+
cy: "20",
|
|
1595
|
+
r: "2",
|
|
1596
|
+
key: "6kqj1y"
|
|
1597
|
+
}]
|
|
1598
|
+
]);
|
|
1599
|
+
/**
|
|
1600
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1601
|
+
*
|
|
1602
|
+
* This source code is licensed under the ISC license.
|
|
1603
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1604
|
+
*/
|
|
1605
|
+
const SquarePen = createLucideIcon("square-pen", [["path", {
|
|
1606
|
+
d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",
|
|
1607
|
+
key: "1m0v6g"
|
|
1608
|
+
}], ["path", {
|
|
1609
|
+
d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",
|
|
1610
|
+
key: "ohrbg2"
|
|
1611
|
+
}]]);
|
|
1612
|
+
/**
|
|
1613
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1614
|
+
*
|
|
1615
|
+
* This source code is licensed under the ISC license.
|
|
1616
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1617
|
+
*/
|
|
1618
|
+
const Store = createLucideIcon("store", [
|
|
1619
|
+
["path", {
|
|
1620
|
+
d: "M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",
|
|
1621
|
+
key: "slp6dd"
|
|
1622
|
+
}],
|
|
1623
|
+
["path", {
|
|
1624
|
+
d: "M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",
|
|
1625
|
+
key: "o0xfot"
|
|
1626
|
+
}],
|
|
1627
|
+
["path", {
|
|
1628
|
+
d: "M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",
|
|
1629
|
+
key: "wn3emo"
|
|
1630
|
+
}]
|
|
1631
|
+
]);
|
|
1632
|
+
/**
|
|
1633
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1634
|
+
*
|
|
1635
|
+
* This source code is licensed under the ISC license.
|
|
1636
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1637
|
+
*/
|
|
1638
|
+
const Telescope = createLucideIcon("telescope", [
|
|
1639
|
+
["path", {
|
|
1640
|
+
d: "m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",
|
|
1641
|
+
key: "k4qptu"
|
|
1642
|
+
}],
|
|
1643
|
+
["path", {
|
|
1644
|
+
d: "m13.56 11.747 4.332-.924",
|
|
1645
|
+
key: "19l80z"
|
|
1646
|
+
}],
|
|
1647
|
+
["path", {
|
|
1648
|
+
d: "m16 21-3.105-6.21",
|
|
1649
|
+
key: "7oh9d"
|
|
1650
|
+
}],
|
|
1651
|
+
["path", {
|
|
1652
|
+
d: "M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",
|
|
1653
|
+
key: "m7xp4m"
|
|
1654
|
+
}],
|
|
1655
|
+
["path", {
|
|
1656
|
+
d: "m6.158 8.633 1.114 4.456",
|
|
1657
|
+
key: "74o979"
|
|
1658
|
+
}],
|
|
1659
|
+
["path", {
|
|
1660
|
+
d: "m8 21 3.105-6.21",
|
|
1661
|
+
key: "1fvxut"
|
|
1662
|
+
}],
|
|
1663
|
+
["circle", {
|
|
1664
|
+
cx: "12",
|
|
1665
|
+
cy: "13",
|
|
1666
|
+
r: "2",
|
|
1667
|
+
key: "1c1ljs"
|
|
1668
|
+
}]
|
|
1669
|
+
]);
|
|
1670
|
+
/**
|
|
1671
|
+
* @license lucide-react v1.39.0 - ISC
|
|
1672
|
+
*
|
|
1673
|
+
* This source code is licensed under the ISC license.
|
|
1674
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1675
|
+
*/
|
|
1676
|
+
const User = createLucideIcon("user", [["path", {
|
|
1677
|
+
d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",
|
|
1678
|
+
key: "975kel"
|
|
1679
|
+
}], ["circle", {
|
|
1680
|
+
cx: "12",
|
|
1681
|
+
cy: "7",
|
|
1682
|
+
r: "4",
|
|
1683
|
+
key: "17ys0d"
|
|
1684
|
+
}]]);
|
|
1685
|
+
//#endregion
|
|
1690
1686
|
//#region src/client/session-title-scroll.ts
|
|
1691
1687
|
/** 会话行只展示标题第一行,避免换行把胶囊撑高。 */
|
|
1692
1688
|
function sessionTitleLine(title) {
|
|
@@ -7431,7 +7427,7 @@ html[data-windows-titlebar][data-fullscreen] .dcu-desktop-navigation{display:non
|
|
|
7431
7427
|
const SIDEBAR_EXPANSION_STORAGE_KEY = "dsh-codex-ui.sidebar-expansion.v1";
|
|
7432
7428
|
const EXTENSIONS_EXPANSION_KEY = "extensions";
|
|
7433
7429
|
function readExtensionsOpen() {
|
|
7434
|
-
return readTreeExpansionState(browserStorage(), SIDEBAR_EXPANSION_STORAGE_KEY)[EXTENSIONS_EXPANSION_KEY]
|
|
7430
|
+
return readTreeExpansionState(browserStorage(), SIDEBAR_EXPANSION_STORAGE_KEY)[EXTENSIONS_EXPANSION_KEY] === true;
|
|
7435
7431
|
}
|
|
7436
7432
|
function writeExtensionsOpen(open) {
|
|
7437
7433
|
const storage = browserStorage();
|
|
@@ -7457,7 +7453,7 @@ body[data-we-sidebar-glass] .dcu-expanded-shell,body[data-we-sidebar-glass] .dcu
|
|
|
7457
7453
|
.dcu-icon:hover,.dcu-menu button:hover:not(:disabled),.dcu-footer-link:hover{background:var(--dcu-sidebar-hover);color:var(--dcu-sidebar-primary)}
|
|
7458
7454
|
.dcu-menu{padding:0 6px 8px;display:grid;gap:2px}.dcu-menu button,.dcu-footer-link{display:grid;grid-template-columns:20px minmax(0,1fr);column-gap:8px;align-items:center;width:100%;min-height:36px;padding:0 4px;border-radius:8px;color:var(--dcu-sidebar-navigation);font-size:14px;line-height:20px;text-align:left;font-weight:400}
|
|
7459
7455
|
.dcu-menu-icon{display:grid;place-items:center start;width:20px;height:20px}.dcu-menu-icon svg,.dcu-footer-link svg{display:block;width:16px;height:16px;color:var(--dcu-sidebar-icon)}.dcu-menu button:disabled{color:var(--dcu-sidebar-secondary);cursor:default;opacity:1}.dcu-menu button:disabled svg{color:var(--dcu-sidebar-secondary)}
|
|
7460
|
-
.dcu-extensions-group{display:grid}.dcu-extension-leading{position:relative;display:block;width:16px;height:16px}.dcu-extension-leading svg{position:absolute;inset:0;transition:opacity 140ms ease-out,transform 220ms cubic-bezier(.16,1,.3,1)}.dcu-extension-default-icon{opacity:1}.dcu-extension-state-arrow{opacity:0;transform:rotate(0)}.dcu-extensions-group:hover .dcu-extension-default-icon,.dcu-extensions-toggle:focus-visible .dcu-extension-default-icon{opacity:0}.dcu-extensions-group:hover .dcu-extension-state-arrow,.dcu-extensions-toggle:focus-visible .dcu-extension-state-arrow{opacity:1}.dcu-extensions-toggle[aria-expanded=true] .dcu-extension-state-arrow{transform:rotate(90deg)}.dcu-extension-panel{display:grid;grid-template-rows:1fr;opacity:1;transition:grid-template-rows 220ms cubic-bezier(.16,1,.3,1),opacity 160ms ease-out}.dcu-extension-panel[data-open=false]{grid-template-rows:0fr;opacity:0;pointer-events:none}.dcu-extension-panel-inner{position:relative;min-height:0;overflow:hidden}.dcu-extension-items{position:relative;display:grid;gap:1px;margin:1px 0 4px 28px}.dcu-extension-items::before{content:"";position:absolute;left:-16px;top:0;bottom:4px;width:1px;background:var(--dcu-sidebar-border)}.dcu-extension-items button{grid-template-columns:minmax(0,1fr);min-height:32px;color:var(--dcu-sidebar-secondary);font-size:13px;font-weight:400}
|
|
7456
|
+
.dcu-extensions-group{display:grid}.dcu-extension-leading{position:relative;display:block;width:16px;height:16px}.dcu-extension-leading svg{position:absolute;inset:0;transition:opacity 140ms ease-out,transform 220ms cubic-bezier(.16,1,.3,1)}.dcu-extension-default-icon{opacity:1}.dcu-extension-state-arrow{opacity:0;transform:rotate(0)}.dcu-extensions-group:hover .dcu-extension-default-icon,.dcu-extensions-toggle:focus-visible .dcu-extension-default-icon{opacity:0}.dcu-extensions-group:hover .dcu-extension-state-arrow,.dcu-extensions-toggle:focus-visible .dcu-extension-state-arrow{opacity:1}.dcu-extensions-toggle[aria-expanded=true] .dcu-extension-state-arrow{transform:rotate(90deg)}.dcu-extension-panel{display:grid;grid-template-rows:1fr;opacity:1;transition:grid-template-rows 220ms cubic-bezier(.16,1,.3,1),opacity 160ms ease-out}.dcu-extension-panel[data-open=false]{grid-template-rows:0fr;opacity:0;pointer-events:none}.dcu-extension-panel-inner{position:relative;min-height:0;overflow:hidden}.dcu-extension-items{position:relative;display:grid;gap:1px;margin:1px 0 4px 28px}.dcu-extension-items::before{content:"";position:absolute;left:-16px;top:0;bottom:4px;width:1px;background:var(--dcu-sidebar-border)}.dcu-extension-items button{grid-template-columns:20px minmax(0,1fr);min-height:32px;color:var(--dcu-sidebar-secondary);font-size:13px;font-weight:400}
|
|
7461
7457
|
.dcu-workspaces{display:flex;min-height:0;flex:1;flex-direction:column;margin-top:2px;padding-top:8px;border-top:1px solid var(--dcu-sidebar-border)}.dcu-workspaces.dcu-workspaces-tabs{padding-top:0;border-top:0}.dcu-im-tabs{display:flex;gap:16px;margin:0 8px 12px;padding:0;border-bottom:1px solid var(--dcu-sidebar-border)}.dcu-im-tab{appearance:none;border:0;background:transparent;color:var(--dcu-sidebar-secondary);padding:8px 0 7px;font:14px/22px var(--dsw-font-family);font-weight:500;cursor:pointer}.dcu-im-tab[data-on=true]{color:var(--dcu-sidebar-primary);font-weight:600;box-shadow:inset 0 -2px 0 currentColor}.dcu-native-workspaces{display:flex;min-height:0;flex:1}.dcu-native-workspaces>*{min-width:0;flex:1}.dcu-native-workspaces .ima-tabs,.dcu-native-workspaces [role=tablist]{display:none!important}.dcu-schedule-browser{display:flex;min-height:0;flex:1;flex-direction:column}.dcu-native-workspaces .dcu-schedule-views{display:flex!important;flex:none;min-height:30px;margin:0 8px 8px;padding:2px;border:1px solid var(--dcu-sidebar-border);border-radius:8px;background:rgba(255,255,255,.025)}.dcu-schedule-views button{appearance:none;flex:1;min-width:0;height:24px;border:0;border-radius:6px;background:transparent;color:var(--dcu-sidebar-secondary);font:600 12px/18px var(--dsw-font-family);cursor:pointer}.dcu-schedule-views button[aria-selected=true]{background:var(--dcu-sidebar-hover);color:var(--dcu-sidebar-primary);box-shadow:inset 0 0 0 1px var(--dcu-sidebar-border)}.dcu-schedule-pane{display:flex;min-height:0;flex:1}.dcu-schedule-pane>*{min-width:0;flex:1}.dcu-schedule-pane>[data-slot="sidebar.schedule"]{display:flex!important;width:100%;min-width:0;flex:1}.dcu-schedule-pane>[data-slot="sidebar.schedule"]>.dsh-st-rail{width:100%;min-width:0;padding-right:8px;scrollbar-gutter:auto}.dcu-schedule-pane .dsh-st-overview{padding-right:8px}.dcu-foot{display:grid;width:100%;gap:4px;padding:8px 6px 12px;border-top:1px solid var(--dcu-sidebar-border);transition:opacity 500ms cubic-bezier(.16,1,.3,1),transform 500ms cubic-bezier(.16,1,.3,1)}.dcu-root.dcu-collapsing>.dcu-foot{opacity:0;transform:translateX(-4px);pointer-events:none}.dcu-footer-actions:empty,.dcu-settings-seat:empty{display:none}.dcu-settings-seat>[data-dcu-settings-trigger]{width:100%;min-height:36px;padding-left:4px!important;color:var(--dcu-sidebar-navigation);font:14px/20px var(--dsw-font-family);font-weight:400}.dcu-compact{width:100%;align-items:flex-start;overflow:hidden;padding:calc((var(--dcu-header-height,34px) - 28px)/2) 0 8px}.dcu-compact-nav{display:flex;flex:1;min-height:0;flex-direction:column;align-items:center;gap:2px;overflow:auto;padding:6px 0}.dcu-compact .dcu-icon{width:36px;height:36px;flex:none}.dcu-compact .dcu-foot{width:36px;margin-top:auto;margin-left:10px;padding:8px 0;border-top:0}.dcu-compact .dcu-settings-seat{width:36px;overflow:hidden}.dcu-compact .dcu-settings-seat>[data-dcu-settings-trigger]{display:grid;place-items:center;width:36px;min-height:36px;padding:0!important;font-size:0!important;line-height:0}.dcu-compact .dcu-settings-seat>[data-dcu-settings-trigger] svg{width:16px;height:16px}.dcu-compact .dcu-footer-link{display:flex;justify-content:center;width:36px;padding:0;font-size:0}.dcu-compact .dcu-footer-link svg{width:16px;height:16px}
|
|
7462
7458
|
.dcu-settings-seat [data-slot="settings.trigger"]{color:var(--dcu-sidebar-navigation)}
|
|
7463
7459
|
.dcu-settings-seat [data-slot="settings.trigger"]>svg{color:var(--dcu-sidebar-icon)}
|
|
@@ -7828,14 +7824,15 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
7828
7824
|
/** Codex 风格的 DSH 侧栏,只替换导航外观,项目浏览和设置仍由 DSH 官方组件提供。 */
|
|
7829
7825
|
function CodexSidebar({ workspaceShortcuts, navigationHistory, globalPanels, footerActions, selectPanel, usePanelInfo = useLegacyPanelInfo, collapsed, width, openSession, startSession, toggleSidebar, archiveSession, canDeleteSession, deleteSession, forkSession, moveSession, renameSession, openPath, companionSlots, renderSlot, t, useSessions, useSessionPendingInteraction, useSessionStatus, useWorkspaces, prefillNewConversation, newConversationDraft }) {
|
|
7830
7826
|
const panels = (0, react.useSyncExternalStore)(globalPanels?.subscribe ?? subscribeEmptyCompanionTabs, globalPanels?.getSnapshot ?? getEmptyPanels, globalPanels?.getSnapshot ?? getEmptyPanels);
|
|
7827
|
+
const extensionPanels = panels.filter((panel) => panel.id === "schedules");
|
|
7828
|
+
const topPanels = panels.filter((panel) => panel.id !== "schedules");
|
|
7831
7829
|
const visibleFooterActions = (0, react.useSyncExternalStore)(footerActions?.subscribe ?? subscribeEmptyCompanionTabs, footerActions?.getSnapshot ?? getEmptyFooterActions, footerActions?.getSnapshot ?? getEmptyFooterActions);
|
|
7832
7830
|
const activePanelId = usePanelInfo((info) => info.activePanelId);
|
|
7833
7831
|
const panelActive = activePanelId !== null && activePanelId !== "";
|
|
7834
7832
|
const panelButtons = (wide) => selectPanel === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GlobalPanelButtons, {
|
|
7835
|
-
panels,
|
|
7833
|
+
panels: topPanels,
|
|
7836
7834
|
activeId: activePanelId,
|
|
7837
7835
|
wide,
|
|
7838
|
-
conversationLabel: t("sidebar.tasksTab"),
|
|
7839
7836
|
selectPanel,
|
|
7840
7837
|
renderIcon: (id, active) => renderSlot("sidebar.panellist", {
|
|
7841
7838
|
size: 16,
|
|
@@ -8147,23 +8144,37 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
8147
8144
|
selectSection(t("sidebar.connectors"));
|
|
8148
8145
|
},
|
|
8149
8146
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MenuIcon, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconLinkOutlineMedium, { size: 16 }) }), t("sidebar.connectors")]
|
|
8147
|
+
}),
|
|
8148
|
+
extensionPanels.map((panel) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
8149
|
+
type: "button",
|
|
8150
|
+
tabIndex: extensionsOpen ? 0 : -1,
|
|
8151
|
+
"aria-current": activePanelId === panel.id ? "page" : void 0,
|
|
8152
|
+
onClick: () => {
|
|
8153
|
+
selectPanel?.(panel.id);
|
|
8154
|
+
},
|
|
8155
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MenuIcon, { children: renderSlot("sidebar.panellist", {
|
|
8156
|
+
size: 16,
|
|
8157
|
+
active: activePanelId === panel.id
|
|
8158
|
+
}, { only: panel.id }) }), panel.label]
|
|
8159
|
+
}, panel.id)),
|
|
8160
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
8161
|
+
type: "button",
|
|
8162
|
+
tabIndex: extensionsOpen ? 0 : -1,
|
|
8163
|
+
onClick: () => {
|
|
8164
|
+
selectExternalSection(t("sidebar.schedule"));
|
|
8165
|
+
},
|
|
8166
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MenuIcon, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScheduleIcon, {}) }), t("sidebar.schedule")]
|
|
8167
|
+
}),
|
|
8168
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
8169
|
+
type: "button",
|
|
8170
|
+
tabIndex: extensionsOpen ? 0 : -1,
|
|
8171
|
+
onClick: openImSettings,
|
|
8172
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MenuIcon, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ImAssistantIcon, {}) }), t("sidebar.assistant")]
|
|
8150
8173
|
})
|
|
8151
8174
|
]
|
|
8152
8175
|
})
|
|
8153
8176
|
})
|
|
8154
8177
|
})]
|
|
8155
|
-
}),
|
|
8156
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
8157
|
-
type: "button",
|
|
8158
|
-
onClick: () => {
|
|
8159
|
-
selectExternalSection(t("sidebar.schedule"));
|
|
8160
|
-
},
|
|
8161
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MenuIcon, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScheduleIcon, {}) }), t("sidebar.schedule")]
|
|
8162
|
-
}),
|
|
8163
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
8164
|
-
type: "button",
|
|
8165
|
-
onClick: openImSettings,
|
|
8166
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MenuIcon, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ImAssistantIcon, {}) }), t("sidebar.assistant")]
|
|
8167
8178
|
})
|
|
8168
8179
|
]
|
|
8169
8180
|
}),
|
|
@@ -8315,6 +8326,19 @@ html[data-dcu-official-turn-navigator-supported=true] .dcu-turn-navigator,html:h
|
|
|
8315
8326
|
},
|
|
8316
8327
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconLinkOutlineMedium, { size: 16 })
|
|
8317
8328
|
}),
|
|
8329
|
+
extensionPanels.map((panel) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
8330
|
+
type: "button",
|
|
8331
|
+
className: "dcu-icon",
|
|
8332
|
+
"aria-label": panel.label,
|
|
8333
|
+
title: panel.label,
|
|
8334
|
+
onClick: () => {
|
|
8335
|
+
selectPanel?.(panel.id);
|
|
8336
|
+
},
|
|
8337
|
+
children: renderSlot("sidebar.panellist", {
|
|
8338
|
+
size: 16,
|
|
8339
|
+
active: activePanelId === panel.id
|
|
8340
|
+
}, { only: panel.id })
|
|
8341
|
+
}, panel.id)),
|
|
8318
8342
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
8319
8343
|
type: "button",
|
|
8320
8344
|
className: "dcu-icon",
|