@qilin-agent/client-ui-sidebar 3.1.4 → 3.1.6
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/README.i18n.yaml +2 -2
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/lib/client.js +16 -12
- package/lib/types/client/locales.d.ts +4 -0
- package/package.json +15 -15
package/README.i18n.yaml
CHANGED
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
en: 5d3300d3506254c5
|
|
25
25
|
zh: bb2220103e91d9de
|
|
26
26
|
/qilin-agent-client-ui-sidebar/use-this-package/collapse-behavior:
|
|
27
|
-
en:
|
|
28
|
-
zh:
|
|
27
|
+
en: d844a11db7e53871
|
|
28
|
+
zh: 5b6b7d177a72de86
|
|
29
29
|
/qilin-agent-client-ui-sidebar/use-this-package/macos-desktop:
|
|
30
30
|
en: 2394638d0a211e25
|
|
31
31
|
zh: c28fffe34fbc47cd
|
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ The top expand button hosts the optional, non-interactive `sidebar.toggle.badge`
|
|
|
43
43
|
|
|
44
44
|
During a live collapse, the expanded content fades out at its current width, the upper controls share one fade and leftward translation into the 56px rail, and the layout's column slide ends the motion. A page that starts collapsed renders the rail statically, and reduced-motion mode disables both transitions. The bottom-pinned `sidebar.settings` control shares the fade timing but has no horizontal translation.
|
|
45
45
|
|
|
46
|
-
On Windows Electron, `html[data-windows-titlebar]` fixes the sidebar toggle in the caption's top-left corner in both states, aligned with New Session's left edge only when expanded. The expanded brand sits below the caption and above New Session, with 8px of extra space above that button. Collapsing hides the brand and sidebar content and places New Session between the sidebar toggle and the Desktop-owned menus. The sidebar sets the root `--qilin-windows-menu-start` to 84px when collapsed; the Desktop preload uses it to position its menu after New Session and defaults to 48px when expanded. Caption icon buttons use centered 16px glyphs in 28px
|
|
46
|
+
On Windows Electron, `html[data-windows-titlebar]` fixes the sidebar toggle in the caption's top-left corner in both states, aligned with New Session's left edge only when expanded. The expanded brand sits below the caption and above New Session, with 8px of extra space above that button. Collapsing hides the brand and sidebar content and places New Session between the sidebar toggle and the Desktop-owned menus. The sidebar sets the root `--qilin-windows-menu-start` to 84px when collapsed; the Desktop preload uses it to position its menu after New Session and defaults to 48px when expanded. Caption icon buttons use centered 16px glyphs in 28px controls with the compact control radius and exclude themselves from the window drag region.
|
|
47
47
|
|
|
48
48
|
### macOS desktop
|
|
49
49
|
|
package/README.zh.md
CHANGED
|
@@ -43,7 +43,7 @@ qilin Web 客户端的侧边栏让用户识别当前构建、启动新会话、
|
|
|
43
43
|
|
|
44
44
|
实时收起时,展开内容在当前宽度淡出,上方控件共用同一段透明度渐变,并向左平移进入 56px 轨道,由布局的栏滑动结束整段动画。页面初始即为收起状态时会静态渲染轨道;减少动态效果模式会禁用两段过渡。固定在底部的 `sidebar.settings` 控件共用相同的透明度渐变时序,但不发生横向位移。
|
|
45
45
|
|
|
46
|
-
在 Windows Electron 中,`html[data-windows-titlebar]` 将两种状态下的侧栏开关固定在顶栏左上角,仅在展开态与新建会话按钮左边缘对齐。展开态品牌位于顶栏下方、新建会话按钮上方,按钮上方额外留出 8px。收起后,品牌和侧栏内容隐藏,新建会话按钮排在侧栏开关与 Desktop 菜单之间。侧栏在收起态将根元素的 `--qilin-windows-menu-start` 设为 84px;Desktop preload 使用它将菜单放在新建会话之后,展开态默认为 48px
|
|
46
|
+
在 Windows Electron 中,`html[data-windows-titlebar]` 将两种状态下的侧栏开关固定在顶栏左上角,仅在展开态与新建会话按钮左边缘对齐。展开态品牌位于顶栏下方、新建会话按钮上方,按钮上方额外留出 8px。收起后,品牌和侧栏内容隐藏,新建会话按钮排在侧栏开关与 Desktop 菜单之间。侧栏在收起态将根元素的 `--qilin-windows-menu-start` 设为 84px;Desktop preload 使用它将菜单放在新建会话之后,展开态默认为 48px。顶栏图标按钮采用紧凑控件圆角的 28px 控件,图标为居中 16px,并从窗口拖拽区域中排除。
|
|
47
47
|
|
|
48
48
|
### macOS 桌面
|
|
49
49
|
|
package/lib/client.js
CHANGED
|
@@ -10,7 +10,7 @@ window.__ModuleLoader__.load({
|
|
|
10
10
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
11
|
let react = require("react");
|
|
12
12
|
//#region \0qilin-css:/home/runner/work/QiLin/QiLin/packages/client/ui-sidebar/src/client/HeaderLeadingControls.module.css.mjs
|
|
13
|
-
const css$1 = ".bVkeZq_controls{display:none}[data-sidebar-collapsed] .bVkeZq_controls{align-items:center;gap:8px;margin-right:8px;padding-left:68px;display:flex}html[data-platform=darwin] [data-sidebar-collapsed] .bVkeZq_controls{margin-top:4px}.bVkeZq_iconButton{corner-shape:round;width:28px;height:28px;color:var(--qilin-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.bVkeZq_iconButton:hover{background:var(--qilin-alias-interactive-bg-hover)}.bVkeZq_iconButton svg{width:15px;height:15px}";
|
|
13
|
+
const css$1 = ".bVkeZq_controls{display:none}[data-sidebar-collapsed] .bVkeZq_controls{-webkit-app-region:no-drag;align-items:center;gap:8px;margin-right:8px;padding-left:68px;display:flex}[data-sidebar-collapsed] .bVkeZq_controls button{-webkit-app-region:no-drag}html[data-platform=darwin] [data-sidebar-collapsed] .bVkeZq_controls{margin-top:4px}.bVkeZq_iconButton{corner-shape:round;width:28px;height:28px;color:var(--qilin-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.bVkeZq_iconButton:hover{background:var(--qilin-alias-interactive-bg-hover)}.bVkeZq_iconButton svg{width:15px;height:15px}";
|
|
14
14
|
const tagId$1 = "@qilin-agent/client-ui-sidebar/HeaderLeadingControls.module.css";
|
|
15
15
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
16
16
|
const tag = document.createElement("style");
|
|
@@ -96,7 +96,7 @@ window.__ModuleLoader__.load({
|
|
|
96
96
|
}
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region \0qilin-css:/home/runner/work/QiLin/QiLin/packages/client/ui-sidebar/src/client/SidebarRoot.module.css.mjs
|
|
99
|
-
const css = "._1HRR8W_root{--qilin-sidebar-inline-padding:12px;height:100%;padding:6px var(--qilin-sidebar-inline-padding);box-sizing:border-box;background:var(--qilin-specific-sidebar-fill);color:var(--qilin-alias-label-primary);--qilin-scrollbar-thumb:var(--qilin-alias-scrollbar-bg-l2);--qilin-scrollbar-thumb-hover:var(--qilin-alias-scrollbar-hover-l2);flex-direction:column;font-size:14px;display:flex}[data-platform=darwin] ._1HRR8W_root{background:0 0}._1HRR8W_root._1HRR8W_collapsed{padding:18px 10px 6px}[data-windows-titlebar] ._1HRR8W_root ._1HRR8W_logoRow{height:40px;margin:0;padding:0}[data-windows-titlebar] ._1HRR8W_toggle{top:calc((var(--qilin-windows-titlebar-height) - 28px) / 2);z-index:30;-webkit-app-region:no-drag;position:fixed;left:12px}[data-windows-titlebar] ._1HRR8W_root._1HRR8W_collapsed ._1HRR8W_logoRow{height:0}[data-windows-titlebar] ._1HRR8W_root:not(._1HRR8W_collapsed) ._1HRR8W_brand{padding-left:4px}[data-windows-titlebar] ._1HRR8W_brandIdentity{transform:translateY(1px)}[data-windows-titlebar] ._1HRR8W_brandMark{transform:translate(1px)}[data-windows-titlebar] ._1HRR8W_brandName{font-weight:400}[data-windows-titlebar] ._1HRR8W_root._1HRR8W_collapsed{padding:0}[data-windows-titlebar] ._1HRR8W_root:not(._1HRR8W_collapsed) ._1HRR8W_newSession{margin-top:8px;margin-left:0}[data-windows-titlebar] ._1HRR8W_collapsed ._1HRR8W_panelList,[data-windows-titlebar] ._1HRR8W_collapsed ._1HRR8W_regionArea,[data-windows-titlebar] ._1HRR8W_collapsed ._1HRR8W_footArea{display:none}html[data-windows-titlebar]:has([data-sidebar-collapsed=true]){--qilin-windows-menu-start:84px}[data-windows-titlebar] ._1HRR8W_collapsed ._1HRR8W_newSession{top:calc((var(--qilin-windows-titlebar-height) - 28px) / 2);z-index:30;-webkit-app-region:no-drag;border:none;margin:0;padding:0;position:fixed;left:48px}[data-windows-titlebar] ._1HRR8W_railIn ._1HRR8W_iconButton,[data-windows-titlebar] ._1HRR8W_railIn ._1HRR8W_newSession{animation:none}[data-windows-titlebar] ._1HRR8W_collapsed ._1HRR8W_toggle,[data-windows-titlebar] ._1HRR8W_collapsed ._1HRR8W_newSession{
|
|
99
|
+
const css = "._1HRR8W_root{--qilin-sidebar-inline-padding:12px;height:100%;padding:6px var(--qilin-sidebar-inline-padding);box-sizing:border-box;background:var(--qilin-specific-sidebar-fill);color:var(--qilin-alias-label-primary);--qilin-scrollbar-thumb:var(--qilin-alias-scrollbar-bg-l2);--qilin-scrollbar-thumb-hover:var(--qilin-alias-scrollbar-hover-l2);flex-direction:column;font-size:14px;display:flex}[data-platform=darwin] ._1HRR8W_root{background:0 0}._1HRR8W_root._1HRR8W_collapsed{padding:18px 10px 6px}[data-windows-titlebar] ._1HRR8W_root ._1HRR8W_logoRow{height:40px;margin:0;padding:0}[data-windows-titlebar] ._1HRR8W_toggle{top:calc((var(--qilin-windows-titlebar-height) - 28px) / 2);z-index:30;-webkit-app-region:no-drag;position:fixed;left:12px}[data-windows-titlebar] ._1HRR8W_root._1HRR8W_collapsed ._1HRR8W_logoRow{height:0}[data-windows-titlebar] ._1HRR8W_root:not(._1HRR8W_collapsed) ._1HRR8W_brand{padding-left:4px}[data-windows-titlebar] ._1HRR8W_brandIdentity{transform:translateY(1px)}[data-windows-titlebar] ._1HRR8W_brandMark{transform:translate(1px)}[data-windows-titlebar] ._1HRR8W_brandName{font-weight:400}[data-windows-titlebar] ._1HRR8W_root._1HRR8W_collapsed{padding:0}[data-windows-titlebar] ._1HRR8W_root:not(._1HRR8W_collapsed) ._1HRR8W_newSession{margin-top:8px;margin-left:0}[data-windows-titlebar] ._1HRR8W_collapsed ._1HRR8W_panelList,[data-windows-titlebar] ._1HRR8W_collapsed ._1HRR8W_regionArea,[data-windows-titlebar] ._1HRR8W_collapsed ._1HRR8W_footArea{display:none}html[data-windows-titlebar]:has([data-sidebar-collapsed=true]){--qilin-windows-menu-start:84px}[data-windows-titlebar] ._1HRR8W_collapsed ._1HRR8W_newSession{top:calc((var(--qilin-windows-titlebar-height) - 28px) / 2);z-index:30;-webkit-app-region:no-drag;border:none;margin:0;padding:0;position:fixed;left:48px}[data-windows-titlebar] ._1HRR8W_railIn ._1HRR8W_iconButton,[data-windows-titlebar] ._1HRR8W_railIn ._1HRR8W_newSession{animation:none}[data-windows-titlebar] ._1HRR8W_collapsed ._1HRR8W_toggle,[data-windows-titlebar] ._1HRR8W_collapsed ._1HRR8W_newSession{border-radius:var(--qilin-radius-sm);width:28px;height:28px;color:var(--qilin-alias-label-secondary)}[data-windows-titlebar] ._1HRR8W_collapsed ._1HRR8W_toggle ._1HRR8W_panelIcon{display:inline}._1HRR8W_root._1HRR8W_quietBars{--qilin-scrollbar-thumb:transparent;--qilin-scrollbar-thumb-hover:transparent}._1HRR8W_fading>*{opacity:0;transition:opacity .15s var(--ds-ease-in-out)}._1HRR8W_wide{animation:_1HRR8W_wide-in .2s var(--ds-ease-in-out)}@keyframes _1HRR8W_wide-in{0%{opacity:0}}._1HRR8W_railIn ._1HRR8W_iconButton,._1HRR8W_railIn ._1HRR8W_newSession,._1HRR8W_railIn ._1HRR8W_panelList,._1HRR8W_railIn ._1HRR8W_regionArea{animation:_1HRR8W_rail-in .15s var(--ds-ease-in-out) backwards}._1HRR8W_railIn ._1HRR8W_footArea{animation:_1HRR8W_rail-fade-in .15s var(--ds-ease-in-out) backwards}@keyframes _1HRR8W_rail-in{0%{opacity:0;transform:translate(49px)}}@keyframes _1HRR8W_rail-fade-in{0%{opacity:0}}._1HRR8W_topStrip{box-sizing:border-box;height:52px;margin:-6px calc(-1 * var(--qilin-sidebar-inline-padding)) 0;flex:none;justify-content:flex-end;align-items:center;padding:0 12px;display:flex}._1HRR8W_topStrip+._1HRR8W_logoRow{margin-top:-12px}._1HRR8W_logoRow{box-sizing:border-box;flex:none;justify-content:flex-end;align-items:center;gap:8px;height:60px;margin-bottom:8px;padding:8px 0 8px 4px;display:flex;overflow:hidden}._1HRR8W_collapsed ._1HRR8W_logoRow{justify-content:flex-start;height:36px;margin-bottom:12px;padding:0}._1HRR8W_brand{min-width:0;color:inherit;cursor:pointer;background:0 0;border:none;flex:1;align-items:center;padding:0;display:inline-flex;overflow:hidden}._1HRR8W_brandIdentity{align-items:center;gap:8px;min-width:0;height:24px;display:inline-flex}._1HRR8W_brandMark{flex:none;justify-content:center;align-items:center;display:inline-flex;overflow:visible}._1HRR8W_brandName{letter-spacing:.04em;align-items:center;gap:6px;min-width:0;height:24px;font-size:18px;font-weight:600;line-height:24px;display:inline-flex}._1HRR8W_fallbackBrandName{letter-spacing:0;white-space:nowrap;font-size:17px}._1HRR8W_iconButton{corner-shape:round;cursor:pointer;width:28px;height:28px;color:var(--qilin-alias-label-secondary);background:0 0;border:none;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex;position:relative}._1HRR8W_iconButton:hover{background:var(--qilin-alias-interactive-bg-hover)}._1HRR8W_collapsed ._1HRR8W_iconButton{border-radius:12px;width:36px;height:36px}._1HRR8W_collapsed ._1HRR8W_toggle ._1HRR8W_panelIcon{display:none}._1HRR8W_collapsed ._1HRR8W_toggle:hover ._1HRR8W_panelIcon{display:inline}._1HRR8W_collapsed ._1HRR8W_toggle:hover ._1HRR8W_railMark{display:none}._1HRR8W_railMark{justify-content:center;align-items:center;display:inline-flex}._1HRR8W_collapsed ._1HRR8W_iconButton{color:var(--qilin-alias-label-primary)}._1HRR8W_buildBadge{border:.5px solid var(--qilin-alias-border-l2);height:16px;color:var(--qilin-alias-label-tertiary);background:var(--qilin-alias-bg-layer-2);font-family:var(--ds-font-family-code);white-space:nowrap;pointer-events:none;border-radius:5px;flex:none;align-self:flex-start;align-items:center;margin-top:1px;padding:0 5px;font-size:10px;font-weight:500;line-height:16px;display:inline-flex}._1HRR8W_newSession{box-sizing:border-box;border:.5px solid var(--qilin-alias-border-l3);background:var(--qilin-alias-button-elevated-fill);height:38px;color:var(--qilin-alias-label-primary);cursor:pointer;border-radius:12px;flex:none;justify-content:center;align-items:center;gap:6px;margin:0 2px 12px;padding:8px 16px;font-size:14px;font-weight:500;line-height:22px;display:flex;position:relative;overflow:hidden}._1HRR8W_newSession:hover{background:var(--qilin-alias-button-floating-hover)}[data-platform=darwin] ._1HRR8W_newSession{background:color-mix(in srgb, var(--qilin-alias-button-elevated-fill) 75%, transparent)}[data-platform=darwin] ._1HRR8W_newSession:hover{background:color-mix(in srgb, var(--qilin-alias-button-elevated-fill) 75%, transparent)}._1HRR8W_collapsed ._1HRR8W_newSession{background:0 0;border-color:#0000;justify-content:center;align-self:flex-start;gap:0;width:36px;height:36px;margin:0 0 12px;padding:0}._1HRR8W_collapsed ._1HRR8W_newSession:hover{background:var(--qilin-alias-interactive-bg-hover)}._1HRR8W_newSessionLabel{white-space:nowrap;max-width:min(200px,100% - 88px);overflow:hidden}._1HRR8W_collapsed ._1HRR8W_newSessionLabel{max-width:0}._1HRR8W_newSessionShortcut{pointer-events:none;opacity:0;flex:none;font-weight:400;display:inline-flex;position:absolute;right:12px}._1HRR8W_newSession:is(:hover,:focus-visible) ._1HRR8W_newSessionShortcut{opacity:1}._1HRR8W_panelList{flex-direction:column;flex:none;gap:4px;margin-bottom:8px;display:flex}._1HRR8W_panelSection{letter-spacing:.08em;min-height:0;color:var(--qilin-alias-label-tertiary,#7a8b9f);user-select:none;align-items:center;padding:12px 10px 2px;font-size:11px;display:flex}._1HRR8W_sectionCaret{opacity:.55;margin-left:auto;transition:transform .15s;display:inline-flex}._1HRR8W_panelSection[role=button]{cursor:pointer}._1HRR8W_sectionCaretFolded{transform:rotate(-90deg)}._1HRR8W_panelSectionRail{background:var(--qilin-alias-border-l1,#e8eff712);width:100%;height:.5px;display:block}._1HRR8W_panelList>._1HRR8W_panelSection:first-child{padding-top:4px}._1HRR8W_collapsed ._1HRR8W_panelList ._1HRR8W_panelSection{margin:-3px 0;padding:0}._1HRR8W_panelRow{box-sizing:border-box;min-height:36px;color:var(--qilin-alias-label-primary);font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;border-radius:12px;align-items:center;gap:8px;margin:0 2px;padding:7px 8px;line-height:22px;display:flex}._1HRR8W_panelRow:hover{background:var(--qilin-alias-interactive-bg-hover)}._1HRR8W_panelRow._1HRR8W_panelActive{background:var(--qilin-alias-interactive-bg-hover);color:var(--qilin-alias-label-primary)}._1HRR8W_panelRow:focus-visible{outline:var(--qilin-focus-ring-width) solid var(--qilin-focus-ring-color,var(--qilin-alias-state-business-primary));outline-offset:-2px}._1HRR8W_panelGlyph{flex:none;justify-content:center;align-items:center;display:inline-flex}._1HRR8W_panelTitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}._1HRR8W_collapsed ._1HRR8W_panelList{gap:12px;margin-bottom:12px}._1HRR8W_collapsed ._1HRR8W_panelRow{width:36px;height:36px;color:var(--qilin-alias-label-primary);justify-content:center;margin:0;padding:0}._1HRR8W_regionArea{min-height:0;margin-left:-4px;margin-right:calc(-1 * var(--qilin-sidebar-inline-padding));flex-direction:column;flex:1;padding-left:4px;display:flex;overflow:hidden}._1HRR8W_collapsed ._1HRR8W_regionArea{margin-left:0;margin-right:0;padding-left:0}._1HRR8W_footArea{flex-direction:column;flex:none;display:flex}._1HRR8W_settingsArea,._1HRR8W_accountArea,._1HRR8W_footerActions{flex:none;width:100%;min-width:0}._1HRR8W_footerActions{display:flex}._1HRR8W_collapsed ._1HRR8W_footArea{align-items:center}._1HRR8W_collapsed ._1HRR8W_settingsArea,._1HRR8W_collapsed ._1HRR8W_accountArea,._1HRR8W_collapsed ._1HRR8W_footerActions{justify-content:center;width:auto;display:flex}@media (prefers-reduced-motion:reduce){._1HRR8W_wide,._1HRR8W_fading>*,._1HRR8W_railIn ._1HRR8W_iconButton,._1HRR8W_railIn ._1HRR8W_newSession,._1HRR8W_railIn ._1HRR8W_panelList,._1HRR8W_railIn ._1HRR8W_footArea,._1HRR8W_railIn ._1HRR8W_regionArea{transition:none;animation:none}}._1HRR8W_topStripFixed{z-index:40;align-items:center;gap:8px;height:52px;padding:0 8px 0 88px;display:none;position:fixed;top:0;left:0}[data-sidebar-collapsed] ._1HRR8W_topStripFixed{display:flex}[data-sidebar-collapsed]:has([class*=_headerLeading]) ._1HRR8W_topStripFixed{display:none}";
|
|
100
100
|
const tagId = "@qilin-agent/client-ui-sidebar/SidebarRoot.module.css";
|
|
101
101
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
102
102
|
const tag = document.createElement("style");
|
|
@@ -183,12 +183,12 @@ window.__ModuleLoader__.load({
|
|
|
183
183
|
* @returns the badge facts, or undefined when the artifact carries no version.
|
|
184
184
|
*/
|
|
185
185
|
function localBuild() {
|
|
186
|
-
const engine = "3.1.
|
|
186
|
+
const engine = "3.1.6";
|
|
187
187
|
const version = {}.QILIN_CLIENT_PRODUCT_VERSION ?? engine;
|
|
188
188
|
if (version === void 0) return void 0;
|
|
189
189
|
return {
|
|
190
190
|
version,
|
|
191
|
-
detail: version + `-
|
|
191
|
+
detail: version + `-72bf1c7` + ({}.QILIN_CLIENT_GIT_DIRTY === "true" ? "-dirty" : "") + (engine === version ? "" : `(引擎 ${engine})`)
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
/** Each panel row subscribes only to its own selection state. */
|
|
@@ -515,7 +515,9 @@ window.__ModuleLoader__.load({
|
|
|
515
515
|
"session.new.label": "新建会话",
|
|
516
516
|
"toggle.open": "打开侧边栏",
|
|
517
517
|
"toggle.collapse": "收起侧边栏",
|
|
518
|
-
"panels.label": "全局面板"
|
|
518
|
+
"panels.label": "全局面板",
|
|
519
|
+
"section.general": "通用",
|
|
520
|
+
"section.extensions": "扩展"
|
|
519
521
|
};
|
|
520
522
|
/** English dictionary, checked complete against the zh key set. */
|
|
521
523
|
const en = {
|
|
@@ -524,7 +526,9 @@ window.__ModuleLoader__.load({
|
|
|
524
526
|
"session.new.label": "New session",
|
|
525
527
|
"toggle.open": "Open sidebar",
|
|
526
528
|
"toggle.collapse": "Collapse sidebar",
|
|
527
|
-
"panels.label": "Global panels"
|
|
529
|
+
"panels.label": "Global panels",
|
|
530
|
+
"section.general": "General",
|
|
531
|
+
"section.extensions": "Extensions"
|
|
528
532
|
};
|
|
529
533
|
//#endregion
|
|
530
534
|
//#region lib/types/client/index.js
|
|
@@ -547,9 +551,9 @@ window.__ModuleLoader__.load({
|
|
|
547
551
|
zh,
|
|
548
552
|
en
|
|
549
553
|
}), "ui-sidebar: dictionaries");
|
|
554
|
+
const t = ctx.locale.bind(NS);
|
|
550
555
|
const panels = (0, _qilin_agent_client_store.createSnapshotStore)([]);
|
|
551
556
|
const syncPanels = () => {
|
|
552
|
-
const desktop = (0, _qilin_agent_client_ui_primitives.isDarwinDesktop)();
|
|
553
557
|
const assigned = {};
|
|
554
558
|
for (const entry of ctx.slots.entriesOfSlot("sidebar.section.assignments")) {
|
|
555
559
|
const face = entry.inject?.(void 0);
|
|
@@ -557,7 +561,7 @@ window.__ModuleLoader__.load({
|
|
|
557
561
|
}
|
|
558
562
|
const next = ctx.slots.entriesOfSlot("sidebar.panellist").map(({ options }) => {
|
|
559
563
|
const id = options.id;
|
|
560
|
-
const trailing =
|
|
564
|
+
const trailing = assigned[id] === void 0 && (0, _qilin_agent_client_ui_slots.resolveSlotLabel)(options.section) === void 0 ? t("section.extensions") : void 0;
|
|
561
565
|
const section = assigned[id] ?? (0, _qilin_agent_client_ui_slots.resolveSlotLabel)(options.section) ?? trailing;
|
|
562
566
|
return {
|
|
563
567
|
id,
|
|
@@ -643,10 +647,10 @@ window.__ModuleLoader__.load({
|
|
|
643
647
|
ctx.slots.inject("sidebar.section.assignments", () => ctx.slots.register({
|
|
644
648
|
name: "sidebar.section.assignments",
|
|
645
649
|
id: "ok-desktop-sections",
|
|
646
|
-
inject: () => (
|
|
647
|
-
plugins: "
|
|
648
|
-
schedules: "
|
|
649
|
-
} }
|
|
650
|
+
inject: () => ({ assignments: {
|
|
651
|
+
plugins: t("section.general"),
|
|
652
|
+
schedules: t("section.general")
|
|
653
|
+
} })
|
|
650
654
|
}, () => null));
|
|
651
655
|
syncPanels();
|
|
652
656
|
}
|
|
@@ -7,6 +7,8 @@ export declare const zh: {
|
|
|
7
7
|
'toggle.open': string;
|
|
8
8
|
'toggle.collapse': string;
|
|
9
9
|
'panels.label': string;
|
|
10
|
+
'section.general': string;
|
|
11
|
+
'section.extensions': string;
|
|
10
12
|
};
|
|
11
13
|
/** The sidebar namespace key union. */
|
|
12
14
|
export type SidebarKey = keyof typeof zh;
|
|
@@ -18,5 +20,7 @@ export declare const en: {
|
|
|
18
20
|
'toggle.open': string;
|
|
19
21
|
'toggle.collapse': string;
|
|
20
22
|
'panels.label': string;
|
|
23
|
+
'section.general': string;
|
|
24
|
+
'section.extensions': string;
|
|
21
25
|
};
|
|
22
26
|
//# sourceMappingURL=locales.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qilin-agent/client-ui-sidebar",
|
|
3
3
|
"description": "Sidebar plugin: session multi-level tree, search, grouping, state dots",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.6",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -45,25 +45,25 @@
|
|
|
45
45
|
},
|
|
46
46
|
"license": "MIT",
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@qilin-agent/kylin": "~4.0.
|
|
48
|
+
"@qilin-agent/kylin": "~4.0.5"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/react": "~18.3.1",
|
|
52
52
|
"clsx": "^2.0.0",
|
|
53
53
|
"react": "^18.2.0",
|
|
54
|
-
"@qilin-agent/api-workspace-controller": "3.1.
|
|
55
|
-
"@qilin-agent/client-locale": "3.1.
|
|
56
|
-
"@qilin-agent/client-shortcuts": "3.1.
|
|
57
|
-
"@qilin-agent/client-ui-conversation": "3.1.
|
|
58
|
-
"@qilin-agent/client-
|
|
59
|
-
"@qilin-agent/client-
|
|
60
|
-
"@qilin-agent/client-ui-layout": "3.1.
|
|
61
|
-
"@qilin-agent/client-ui-
|
|
62
|
-
"@qilin-agent/client-ui-
|
|
63
|
-
"@qilin-agent/client-ui-session": "3.1.
|
|
64
|
-
"@qilin-agent/
|
|
65
|
-
"@qilin-agent/client-ui-
|
|
66
|
-
"@qilin-agent/
|
|
54
|
+
"@qilin-agent/api-workspace-controller": "3.1.6",
|
|
55
|
+
"@qilin-agent/client-locale": "3.1.6",
|
|
56
|
+
"@qilin-agent/client-shortcuts": "3.1.6",
|
|
57
|
+
"@qilin-agent/client-ui-conversation": "3.1.6",
|
|
58
|
+
"@qilin-agent/client-store": "3.1.6",
|
|
59
|
+
"@qilin-agent/client-test-runtime": "3.1.6",
|
|
60
|
+
"@qilin-agent/client-ui-layout": "3.1.6",
|
|
61
|
+
"@qilin-agent/client-ui-renderer": "3.1.6",
|
|
62
|
+
"@qilin-agent/client-ui-workspace": "3.1.6",
|
|
63
|
+
"@qilin-agent/client-ui-session": "3.1.6",
|
|
64
|
+
"@qilin-agent/kylin": "~4.0.5",
|
|
65
|
+
"@qilin-agent/client-ui-primitives": "3.1.6",
|
|
66
|
+
"@qilin-agent/client-ui-slots": "3.1.6"
|
|
67
67
|
},
|
|
68
68
|
"files": [
|
|
69
69
|
"lib/index.js",
|