@qilin-agent/client-ui-sidebar 0.0.0-stage → 3.1.4
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/LICENSE +21 -0
- package/README.i18n.yaml +55 -0
- package/README.md +115 -2
- package/README.zh.md +116 -0
- package/lib/client.js +660 -0
- package/lib/index.js +6 -0
- package/lib/types/client/HeaderLeadingControls.d.ts +17 -0
- package/lib/types/client/SidebarRoot.d.ts +8 -0
- package/lib/types/client/contract/slots.d.ts +200 -0
- package/lib/types/client/index.d.ts +18 -0
- package/lib/types/client/locales.d.ts +22 -0
- package/lib/types/index.d.ts +4 -0
- package/package.json +74 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 kkutysllb
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.i18n.yaml
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading
|
|
2
|
+
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
3
|
+
# After editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write packages/client/ui-sidebar/README.md
|
|
5
|
+
/:
|
|
6
|
+
en: c2607c6d03c52187
|
|
7
|
+
zh: bf0140a9f62c5139
|
|
8
|
+
/qilin-agent-client-ui-sidebar:
|
|
9
|
+
en: 8b6ea56979501a0b
|
|
10
|
+
zh: f3383b46b3cab405
|
|
11
|
+
/qilin-agent-client-ui-sidebar/summary:
|
|
12
|
+
en: b31ae78ccf8acf60
|
|
13
|
+
zh: 095026d07097f088
|
|
14
|
+
/qilin-agent-client-ui-sidebar/table-of-contents:
|
|
15
|
+
en: d152484eb41ac6b4
|
|
16
|
+
zh: 09388d293f9be9cb
|
|
17
|
+
/qilin-agent-client-ui-sidebar/use-this-package:
|
|
18
|
+
en: d584db3f7c857591
|
|
19
|
+
zh: 61d54a060f63d96f
|
|
20
|
+
/qilin-agent-client-ui-sidebar/use-this-package/brand-and-new-session:
|
|
21
|
+
en: b375e1edb5171239
|
|
22
|
+
zh: 7f8659395ab519cd
|
|
23
|
+
/qilin-agent-client-ui-sidebar/use-this-package/global-panel-entries:
|
|
24
|
+
en: 5d3300d3506254c5
|
|
25
|
+
zh: bb2220103e91d9de
|
|
26
|
+
/qilin-agent-client-ui-sidebar/use-this-package/collapse-behavior:
|
|
27
|
+
en: c847d47379a58e5d
|
|
28
|
+
zh: 6af5e11c2bf5d86c
|
|
29
|
+
/qilin-agent-client-ui-sidebar/use-this-package/macos-desktop:
|
|
30
|
+
en: 2394638d0a211e25
|
|
31
|
+
zh: c28fffe34fbc47cd
|
|
32
|
+
/qilin-agent-client-ui-sidebar/use-this-package/scrollbars:
|
|
33
|
+
en: d053b1ed0f4fd293
|
|
34
|
+
zh: ff25a56541f57530
|
|
35
|
+
/qilin-agent-client-ui-sidebar/understand-the-implementation:
|
|
36
|
+
en: 676cd4c309b4110d
|
|
37
|
+
zh: 13be655486791b8e
|
|
38
|
+
/qilin-agent-client-ui-sidebar/understand-the-implementation/slot-discipline:
|
|
39
|
+
en: cc1d53236154e97e
|
|
40
|
+
zh: 77a601b7c9cf7dec
|
|
41
|
+
/qilin-agent-client-ui-sidebar/further-exploration:
|
|
42
|
+
en: 9605d06cd352d035
|
|
43
|
+
zh: 05e02f3bd35bf929
|
|
44
|
+
/qilin-agent-client-ui-sidebar/model-experience:
|
|
45
|
+
en: 3120df665299c634
|
|
46
|
+
zh: 1d9f365d091d0d2a
|
|
47
|
+
/qilin-agent-client-ui-sidebar/model-experience/kv-cache-effect:
|
|
48
|
+
en: ca75c51c89c2c9b0
|
|
49
|
+
zh: de54f3467ef3b9be
|
|
50
|
+
/qilin-agent-client-ui-sidebar/known-limitations-and-deferred-work:
|
|
51
|
+
en: 262db5b10dfb7d98
|
|
52
|
+
zh: c1b5cf6aa58b054e
|
|
53
|
+
/qilin-agent-client-ui-sidebar/known-limitations-and-deferred-work/dev-note:
|
|
54
|
+
en: e67f633dc6fe7773
|
|
55
|
+
zh: 3bb0c20c93f16f98
|
package/README.md
CHANGED
|
@@ -1,3 +1,116 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: "Sidebar shell plugin for the qilin web client: brand row, New Session action, collapse control, scroll-aware region seat, and bottom-pinned footer seats."
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# @qilin-agent/client-ui-sidebar
|
|
7
|
+
|
|
8
|
+
English | [中文](README.zh.md)
|
|
9
|
+
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
The qilin web client sidebar lets users recognize the active build, start a new session, collapse navigation to a 56px rail, browse Workspaces and Sessions, and reach Settings. It preserves a bottom-pinned footer and hides idle scrollbars without moving browser rows. New Session uses an explicitly selected Workspace, then the current Session's Workspace, then the most recently active Workspace; if none exists, it opens a blank New Session page. Deployments can replace the brand mark or name while retaining the navigation controls and rail geometry.
|
|
13
|
+
|
|
14
|
+
## Table of Contents
|
|
15
|
+
|
|
16
|
+
- [Use this package](#use-this-package)
|
|
17
|
+
- [Understand the implementation](#understand-the-implementation)
|
|
18
|
+
- [Further Exploration](#further-exploration)
|
|
19
|
+
- [Model Experience](#model-experience)
|
|
20
|
+
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
|
21
|
+
- [Dev Note](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## Use this package
|
|
27
|
+
|
|
28
|
+
The sidebar is the navigation shell: users see the brand, start new sessions, collapse the rail, and reach Settings. Feature plugins fill its seats — ui-workspace fills `sidebar.workspaces`, ui-account fills `sidebar.footer.action`, and ui-settings fills `sidebar.settings` with the settings panel.
|
|
29
|
+
|
|
30
|
+
### Brand and New Session
|
|
31
|
+
|
|
32
|
+
The expanded brand row renders `sidebar.brand.mark` and `sidebar.brand.name` as independent single slots; the collapsed rail renders the same mark slot. Without occupants, the shell uses the QiLin seal and a localized local-build label. A complete build renders a version chip anchored to the wordmark's top-right corner as `version`, tooltipped with `version[-commit][-dirty]` and built from `QILIN_CLIENT_VERSION`, the optional 7-character `QILIN_CLIENT_COMMIT_HASH`, and `QILIN_CLIENT_GIT_DIRTY=true`; missing version metadata omits the chip. New Session targets the explicit Workspace used by a scoped action, otherwise the current Session's Workspace, otherwise the most recently active Workspace; when none exists it clears into the blank New Session page.
|
|
33
|
+
|
|
34
|
+
### Global panel entries
|
|
35
|
+
|
|
36
|
+
Plugins add an icon component to the root-scoped `sidebar.panellist` list with an `id`, optional `order`, and a string or locale-aware `label`. The same id addresses the component registered in the layout's root-scoped `main` keyed slot; selecting a missing main entry throws without changing the current selection. The label supplies plain visible text, the accessible name, and the collapsed tooltip. Each row reads its own selected state through `usePanelInfo`; moving DOM focus to search or a directory picker does not change the displayed panel or its selected row. With no registrations, neither the list nor spacing for it is rendered. The shipped composition registers no example panel.
|
|
37
|
+
|
|
38
|
+
### Collapse behavior
|
|
39
|
+
|
|
40
|
+
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 footer seats share the fade timing but have no horizontal translation.
|
|
41
|
+
|
|
42
|
+
The top expand button hosts the optional, non-interactive `sidebar.toggle.badge` slot while collapsed. Its occupant supplies status and tooltip content without adding another action or changing the button's navigation behavior.
|
|
43
|
+
|
|
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
|
+
|
|
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 circular controls and exclude themselves from the window drag region.
|
|
47
|
+
|
|
48
|
+
### macOS desktop
|
|
49
|
+
|
|
50
|
+
Under `html[data-platform='darwin']` (set only by a desktop carrier's preload) the expanded column opens with a 52px top strip that clears the hiddenInset traffic lights and carries the collapse toggle; the strip marks itself `data-window-drag`, so its own box is the window drag region (ui-web base.css declares the one darwin drag rule, and the toggle subtracts through its interactive rule) while the brand button below keeps its New Session shortcut; collapsing hides the column entirely instead of leaving the rail. The package registers `HeaderLeadingControls` into the conversation header's `conversation.session.header.leading` seat — the open-sidebar and New Session controls shown, purely via CSS against the AppFrame-published `data-sidebar-collapsed` attribute, only while the column is hidden. Historical rationale: the [macOS hidden-titlebar Agent Note](../../../.agents/notes/archived/feature/2026-09-13-macos-hidden-titlebar-vibrancy.md).
|
|
51
|
+
|
|
52
|
+
### Scrollbars
|
|
53
|
+
|
|
54
|
+
Scrollbars in the column are a pointer affordance: the shell rebinds the scrollbar indirection to `transparent` whenever the pointer is outside the column and keeps the thumb drawn for 2s after the pointer leaves, so a list nobody is pointing at carries no bar. The reservation that keeps rows from moving belongs to the scrolling region (ui-workspace), so revealing a thumb never reflows.
|
|
55
|
+
|
|
56
|
+
-----
|
|
57
|
+
|
|
58
|
+
<a id="understand-the-implementation"></a>
|
|
59
|
+
## Understand the implementation
|
|
60
|
+
|
|
61
|
+
<details>
|
|
62
|
+
<summary>Implementation internals — click to expand</summary>
|
|
63
|
+
|
|
64
|
+
The shell is pure composition: `SidebarRootComponentProps` composes the layout owner share, the global `useSessions` and `useWorkspaces` hooks, the declared brand, the `sidebar.workspaces` and `sidebar.settings` child slots, and injected navigation callbacks. Panel entries and their optional titles use the same composition path. Panel metadata is derived from list registrations and locale changes; selection belongs to the layout store.
|
|
65
|
+
|
|
66
|
+
### Slot discipline
|
|
67
|
+
|
|
68
|
+
Declaration-aware `slots.inject()` lets a replacing package activate before or after the sidebar. The foot stacks the `sidebar.footer.action` list above the `sidebar.settings` occupant, and the sidebar shares its column state (`wide`) with both. The `/client` exports are the plugin body (`apply`/`inject`) plus the contract types only; SidebarRoot, the row components, and the tree derivation remain package-internal behind the slot registration.
|
|
69
|
+
|
|
70
|
+
</details>
|
|
71
|
+
|
|
72
|
+
-----
|
|
73
|
+
|
|
74
|
+
<a id="further-exploration"></a>
|
|
75
|
+
## Further Exploration
|
|
76
|
+
|
|
77
|
+
These pages cover the surfaces that fill the shell's seats and the composition model.
|
|
78
|
+
|
|
79
|
+
- [ui-workspace](../ui-workspace/README.md) — the Workspace and Session browser rendered into `sidebar.workspaces`.
|
|
80
|
+
- [ui-account](../ui-account/README.md) — the avatar menu rendered into `sidebar.footer.action`, including the Settings entry.
|
|
81
|
+
- [ui-settings](../ui-settings/README.md) — the settings domain base behind the `sidebar.settings` panel occupant.
|
|
82
|
+
- [ui-layout](../ui-layout/README.md) — the layout owner whose rail and column state the collapse uses.
|
|
83
|
+
- [ui-theme](../ui-theme/README.md) — the scrollbar token indirection the shell rebinds.
|
|
84
|
+
- [Slot system standard](../../../.agents/notes/implemented/architecture/2026-07-22-slot-type-chain-implementation.md) — the composition model behind the seats.
|
|
85
|
+
|
|
86
|
+
-----
|
|
87
|
+
|
|
88
|
+
<a id="model-experience"></a>
|
|
89
|
+
## Model Experience
|
|
90
|
+
|
|
91
|
+
None, as the package is a browser-side UI plugin layer that registers nothing model-facing.
|
|
92
|
+
|
|
93
|
+
#### KV Cache effect
|
|
94
|
+
|
|
95
|
+
None; this package neither assembles nor sends a provider request.
|
|
96
|
+
|
|
97
|
+
## Known Limitations and Deferred Work
|
|
98
|
+
|
|
99
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
These limits define what the shell owns versus what its occupants own; they are current package constraints.
|
|
103
|
+
|
|
104
|
+
- **Session state-dot rendering is owned by ui-workspace** — no done/error notification sources are available to this shell.
|
|
105
|
+
- **Workspace browser behavior is composition-owned** — grouping, ordering, search, and row state belong to ui-workspace, not this shell.
|
|
106
|
+
- **"New task completed" unread marking is local viewing state** — completion-time > last-seen never reaches the host.
|
|
107
|
+
|
|
108
|
+
<a id="dev-note"></a>
|
|
109
|
+
### Dev Note
|
|
110
|
+
|
|
111
|
+
<details>
|
|
112
|
+
<summary>Working context for maintainers — click to expand</summary>
|
|
113
|
+
|
|
114
|
+
None.
|
|
115
|
+
|
|
116
|
+
</details>
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "qilin Web 客户端的侧边栏外壳插件:品牌行、New Session 操作、折叠控件、可感知滚动的区域席位与底部固定的页脚席位。"
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @qilin-agent/client-ui-sidebar
|
|
7
|
+
|
|
8
|
+
[English](README.md) | 中文
|
|
9
|
+
|
|
10
|
+
## 概述
|
|
11
|
+
|
|
12
|
+
qilin Web 客户端的侧边栏让用户识别当前构建、启动新会话、将导航折叠为 56px 轨道、浏览 Workspace 与 Session,以及打开 Settings。它把页脚固定在底部,并在隐藏空闲滚动条时避免浏览器行发生位移。New Session 优先使用显式选择的 Workspace,其次使用当前 Session 所属的 Workspace,再其次使用最近活跃的 Workspace;如果都不存在,则打开空白的 New Session 页面。部署可以替换品牌标记或名称,同时保留导航控件和轨道几何。
|
|
13
|
+
|
|
14
|
+
## 目录
|
|
15
|
+
|
|
16
|
+
- [使用本包](#use-this-package)
|
|
17
|
+
- [理解实现](#understand-the-implementation)
|
|
18
|
+
- [进一步探索](#further-exploration)
|
|
19
|
+
- [模型体验](#model-experience)
|
|
20
|
+
- [已知限制与延期工作](#known-limitations-and-deferred-work)
|
|
21
|
+
- [开发备注](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## 使用本包
|
|
27
|
+
|
|
28
|
+
侧边栏是导航外壳:用户看到品牌、启动新会话、折叠轨道并到达 Settings。功能插件填充它的席位——ui-workspace 填充 `sidebar.workspaces`,ui-account 填充 `sidebar.footer.action`,ui-settings 以设置面板填充 `sidebar.settings`。
|
|
29
|
+
|
|
30
|
+
### 品牌与 New Session
|
|
31
|
+
|
|
32
|
+
展开的品牌行把 `sidebar.brand.mark` 与 `sidebar.brand.name` 渲染为两个独立的 single slot;收起轨道则渲染同一个 mark slot。没有占位者时,外壳使用麒麟印章和本地化的本地构建标签。完整构建把版本胶囊锚定在文字标的右上角;胶囊显示 `version`,并以 `version[-commit][-dirty]` 作为提示文字,该串由 `QILIN_CLIENT_VERSION`、可选的 7 位 `QILIN_CLIENT_COMMIT_HASH` 与 `QILIN_CLIENT_GIT_DIRTY=true` 组装;缺少版本元数据时不显示胶囊。New Session 优先使用作用域操作明确指定的 Workspace,否则使用当前 Session 所属 Workspace,再否则使用最近活跃 Workspace;一个 Workspace 都没有时则清空选择,进入空白 New Session 页面。
|
|
33
|
+
|
|
34
|
+
### 全局面板入口
|
|
35
|
+
|
|
36
|
+
插件在 root 作用域的 `sidebar.panellist` list 中注册图标组件,提供 `id`、可选 `order`,以及字符串或随语言变化的 `label`。同一个 id 寻址布局中 root 作用域 `main` keyed slot 的组件;选择不存在的主面板条目会抛错,并保留当前选中态。标签提供普通可见文字、无障碍名称和折叠提示。每一行通过 `usePanelInfo` 读取自己的选中态;DOM 焦点移到搜索框或目录选择器时,显示的面板及其列表项选中态不变。没有注册项时,列表及其间距均不渲染。默认组合不注册示例面板。
|
|
37
|
+
|
|
38
|
+
### 折叠行为
|
|
39
|
+
|
|
40
|
+
实时收起时,展开内容在当前宽度淡出,上方控件共用一次淡入并左移进入 56px 轨道,由布局的栏滑动结束整段动画。页面初始即为收起状态时会静态渲染轨道;减少动态效果模式会禁用两段过渡。固定在底部的页脚席位只共用淡入时序,不发生横向位移。
|
|
41
|
+
|
|
42
|
+
侧栏收起时,顶部展开按钮承载可选、不可交互的 `sidebar.toggle.badge` slot。占用方提供状态和提示内容,不增加操作,也不改变按钮的导航行为。
|
|
43
|
+
|
|
44
|
+
实时收起时,展开内容在当前宽度淡出,上方控件共用同一段透明度渐变,并向左平移进入 56px 轨道,由布局的栏滑动结束整段动画。页面初始即为收起状态时会静态渲染轨道;减少动态效果模式会禁用两段过渡。固定在底部的 `sidebar.settings` 控件共用相同的透明度渐变时序,但不发生横向位移。
|
|
45
|
+
|
|
46
|
+
在 Windows Electron 中,`html[data-windows-titlebar]` 将两种状态下的侧栏开关固定在顶栏左上角,仅在展开态与新建会话按钮左边缘对齐。展开态品牌位于顶栏下方、新建会话按钮上方,按钮上方额外留出 8px。收起后,品牌和侧栏内容隐藏,新建会话按钮排在侧栏开关与 Desktop 菜单之间。侧栏在收起态将根元素的 `--qilin-windows-menu-start` 设为 84px;Desktop preload 使用它将菜单放在新建会话之后,展开态默认为 48px。顶栏图标按钮采用 28px 圆形控件中的居中 16px 图标,并从窗口拖拽区域中排除。
|
|
47
|
+
|
|
48
|
+
### macOS 桌面
|
|
49
|
+
|
|
50
|
+
在 `html[data-platform='darwin']`(仅由桌面载体的 preload 设置)下,展开的侧边栏列顶部有一条 52px 的顶部条:避开 hiddenInset 红绿灯并承载收起按钮;顶部条给自身打上 `data-window-drag`,于是它自己的盒子就是窗口拖拽区(唯一的 darwin drag 规则由 ui-web base.css 声明,收起按钮经其交互规则排除在外),其下方的品牌按钮保留 New Session 快捷入口;收起时整列隐藏而非保留轨道。本包向会话头部的 `conversation.session.header.leading` 座注册 `HeaderLeadingControls`——打开侧边栏与 New Session 两个控件,纯由 CSS 依据 AppFrame 发布的 `data-sidebar-collapsed` 属性仅在列隐藏时显示。设计依据(历史记录)见 [macOS 隐藏标题栏 Agent Note](../../../.agents/notes/archived/feature/2026-09-13-macos-hidden-titlebar-vibrancy.md)。
|
|
51
|
+
|
|
52
|
+
### 滚动条
|
|
53
|
+
|
|
54
|
+
栏内的滚动条是一种指针可供性:只要指针不在栏内,外壳就把滚动条间接层重新绑定为 `transparent`;指针离开后滑块再保留 2 秒,因此没人指向的列表不会带着滚动条。避免行位移的空间预留属于滚动区域本身(ui-workspace),所以显示滑块不会引起重排。
|
|
55
|
+
|
|
56
|
+
-----
|
|
57
|
+
|
|
58
|
+
<a id="understand-the-implementation"></a>
|
|
59
|
+
## 理解实现
|
|
60
|
+
|
|
61
|
+
<details>
|
|
62
|
+
<summary>实现细节——点击展开</summary>
|
|
63
|
+
|
|
64
|
+
外壳是纯组合:`SidebarRootComponentProps` 组合布局 owner share、全局 `useSessions` 与 `useWorkspaces` 钩子、已声明的品牌、`sidebar.workspaces` 与 `sidebar.settings` 子 slot,以及注入的导航回调。面板入口及其可选标题使用相同的组合方式。面板元数据由列表注册和语言变化派生;选中态属于布局存储。
|
|
65
|
+
|
|
66
|
+
### Slot 纪律
|
|
67
|
+
|
|
68
|
+
声明感知的 `slots.inject()` 让替换包无论先于还是后于侧边栏激活都能生效。页脚把 `sidebar.footer.action` 列表堆叠在 `sidebar.settings` 占位者之上,侧边栏向两者共享其栏状态(`wide`)。`/client` 导出接口只包含插件主体(`apply`/`inject`)及约定类型;SidebarRoot、行组件与树派生仍由 slot 注册封装在包内。
|
|
69
|
+
|
|
70
|
+
</details>
|
|
71
|
+
|
|
72
|
+
-----
|
|
73
|
+
|
|
74
|
+
<a id="further-exploration"></a>
|
|
75
|
+
## 进一步探索
|
|
76
|
+
|
|
77
|
+
以下页面覆盖填充外壳席位的各个界面与组合模型。
|
|
78
|
+
|
|
79
|
+
- [ui-workspace](../ui-workspace/README.zh.md)——渲染到 `sidebar.workspaces` 的 Workspace 与 Session 浏览器。
|
|
80
|
+
- [ui-account](../ui-account/README.zh.md)——渲染到 `sidebar.footer.action` 的头像菜单,其中包含 Settings 入口。
|
|
81
|
+
- [ui-settings](../ui-settings/README.zh.md)——`sidebar.settings` 面板占位者背后的设置领域底座。
|
|
82
|
+
- [ui-layout](../ui-layout/README.zh.md)——折叠所使用轨道与栏状态的布局 owner。
|
|
83
|
+
- [ui-theme](../ui-theme/README.zh.md)——外壳所重新绑定的滚动条 token 间接层。
|
|
84
|
+
- [slot 系统标准](../../../.agents/notes/implemented/architecture/2026-07-22-slot-type-chain-implementation.zh.md)——席位背后的组合模型。
|
|
85
|
+
|
|
86
|
+
-----
|
|
87
|
+
|
|
88
|
+
<a id="model-experience"></a>
|
|
89
|
+
## 模型体验
|
|
90
|
+
|
|
91
|
+
无。该包是浏览器端 UI 插件层,不注册任何面向模型的内容。
|
|
92
|
+
|
|
93
|
+
#### KV Cache 影响
|
|
94
|
+
|
|
95
|
+
无;该包既不组装也不发送提供方请求。
|
|
96
|
+
|
|
97
|
+
## 已知限制与延期工作
|
|
98
|
+
|
|
99
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
这些限制定义外壳拥有什么、其占位方拥有什么;它们是当前包约束。
|
|
103
|
+
|
|
104
|
+
- **Session 状态点渲染由 ui-workspace 持有**:本外壳没有可用的 done/error 通知数据源。
|
|
105
|
+
- **Workspace 浏览行为由组合持有**:分组、排序、搜索与行状态都属于 ui-workspace,不属于此外壳。
|
|
106
|
+
- **「New task completed」未读标记是本地查看状态**:完成时间 > 上次查看时间这一事实永远不会到达宿主。
|
|
107
|
+
|
|
108
|
+
<a id="dev-note"></a>
|
|
109
|
+
### 开发备注
|
|
110
|
+
|
|
111
|
+
<details>
|
|
112
|
+
<summary>维护者的工作上下文——点击展开</summary>
|
|
113
|
+
|
|
114
|
+
无。
|
|
115
|
+
|
|
116
|
+
</details>
|