@prettier-ai/dsh-client-ui-workspace 0.1.2-alpha.1 → 0.1.2-alpha.3
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 +8 -2
- package/README.zh.md +8 -2
- package/lib/client.js +44 -14
- package/lib/types/client/contract/slots.d.ts +8 -3
- package/lib/types/client/locales.d.ts +2 -0
- package/lib/types/client/navigation.d.ts +1 -2
- package/lib/types/client/rows/WorkspaceBrowser.d.ts +1 -1
- package/lib/types/client/tree.d.ts +4 -0
- package/package.json +21 -33
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/client/ui-workspace/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 90684b959eb1b873201497ee9069a7f3504af991
|
|
6
|
+
README.zh.md: 50fb8e507febf8fca8f2b2aca02a768f3b67a02f
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
`dsh-client-ui-workspace` is the shared Workspace browser and picker of the dsh web client: users browse grouped or flat Session rows in the sidebar, pick a Workspace for a new session from the Session Intent hero, and manage Workspaces and Sessions with add, rename, reorder, search, fork, and archive actions; the same Workspace menu and add flow serve both surfaces. Pending user interactions surface as amber warning dots, and the shared sidebar projection hides subagent-origin sessions. Distinct canonical paths remain separate id-keyed Workspaces, and adding a folder goes through a directory-flow child hole that a composed picker package's client half fills.
|
|
12
|
+
`dsh-client-ui-workspace` is the shared Workspace browser and picker of the dsh web client: users browse grouped or flat Session rows in the sidebar, pick a Workspace for a new session from the Session Intent hero, and manage Workspaces and Sessions with add, rename, reorder, search, fork, and archive actions; the same Workspace menu and add flow serve both surfaces. Pending user interactions surface as amber warning dots, active Schedule projections surface as non-interactive alarm markers in ordinary and search rows, and the shared sidebar projection hides subagent-origin sessions. Distinct canonical paths remain separate id-keyed Workspaces, and adding a folder goes through a directory-flow child hole that a composed picker package's client half fills.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -43,6 +43,12 @@ The Session row's Rename action opens a dialog prefilled with the row's display
|
|
|
43
43
|
|
|
44
44
|
Session rows render the runtime's live `pendingInteraction` classification: approvals report **Waiting for approval**, plan reviews report **Plan awaiting review**, and ordinary questions report **Waiting for answer**. Every pending interaction uses an amber warning dot that takes precedence over the running indicator.
|
|
45
45
|
|
|
46
|
+
### Active Schedule markers
|
|
47
|
+
|
|
48
|
+
Grouped and flat Session rows, plus search results, show an outline alarm when `SessionSummary.projectionValues.schedule` is a non-empty array. The marker sits after the title; an ordinary row keeps its update time after the marker, while a search result has no update time. It is not a button, has no independent pointer action or tab stop, and clicking its area still opens the row. The localized tooltip and matching screen-reader label say **Has active scheduled task**.
|
|
49
|
+
|
|
50
|
+
The value is intentionally best effort for cold Sessions. An identity-matching usable projection-cache row can prewarm the alarm without opening the Session; a missing or stale cache may briefly omit or retain it. The marker means only that the current list value contains an undispatched or undeleted Schedule record. It does not report whether a Schedule runtime is live or able to wake the Session.
|
|
51
|
+
|
|
46
52
|
-----
|
|
47
53
|
|
|
48
54
|
<a id="understand-the-implementation"></a>
|
|
@@ -59,7 +65,7 @@ Each registration declares a **directory-flow child hole** (`single` kind: `conv
|
|
|
59
65
|
|
|
60
66
|
### View state
|
|
61
67
|
|
|
62
|
-
Once the Workspace list baseline is ready, browser-persisted expansion and Session-order records retain only current Workspace ids plus Ungrouped and the flat-list account. Real Workspaces initialize from `WorkspaceView.sessionIds`, while Ungrouped and the cross-Workspace flat list initialize from recency. The shared sidebar projection hides rows whose durable Session summary has `origin: 'subagent'`, and each visible ordinary row inherits the blue activity indicator while any descendant reached through uninterrupted subagent-origin lineage is running.
|
|
68
|
+
Once the Workspace list baseline is ready, browser-persisted expansion and Session-order records retain only current Workspace ids plus Ungrouped and the flat-list account. Real Workspaces initialize from `WorkspaceView.sessionIds`, while Ungrouped and the cross-Workspace flat list initialize from recency. The shared sidebar projection hides rows whose durable Session summary has `origin: 'subagent'`, and each visible ordinary row inherits the blue activity indicator while any descendant reached through uninterrupted subagent-origin lineage is running. The same pure derivation reads the Schedule key from list projection values for grouped, flat, and search nodes; the package uses only the type-only `@deepseek-ai/dsh-schedule/client` dependency and does not import the Schedule runtime or `ui-schedule`.
|
|
63
69
|
|
|
64
70
|
### Hover cards
|
|
65
71
|
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
`dsh-client-ui-workspace` 是 dsh Web 客户端的共享 Workspace 浏览器与选择器:用户在侧边栏浏览分组或扁平的 Session 行,在 Session Intent 主视觉区为新会话选择 Workspace,并可用添加、重命名、重排序、搜索、fork 与归档操作管理 Workspace 与 Session;两个界面共用同一套 Workspace
|
|
12
|
+
`dsh-client-ui-workspace` 是 dsh Web 客户端的共享 Workspace 浏览器与选择器:用户在侧边栏浏览分组或扁平的 Session 行,在 Session Intent 主视觉区为新会话选择 Workspace,并可用添加、重命名、重排序、搜索、fork 与归档操作管理 Workspace 与 Session;两个界面共用同一套 Workspace 菜单与添加流程。待处理的用户交互以琥珀色警告点呈现,活动 Schedule projection 会在普通行与搜索结果中显示不可交互的闹钟,共享侧边栏投影还会隐藏 subagent 来源的会话。不同的规范化路径仍作为由 id 区分的独立 Workspace;添加文件夹走目录流子 slot,由组合的选择器包 client half 填充。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -43,6 +43,12 @@ Session 行内的 Rename 操作打开一个以该行显示标题预填的对话
|
|
|
43
43
|
|
|
44
44
|
Session 行渲染运行时的实时 `pendingInteraction` 分类:审批显示**等待审批**,计划审阅显示**计划待审**,普通问题显示**等待回答**。每个待处理交互都使用一枚琥珀色警告点,优先级高于运行指示器。
|
|
45
45
|
|
|
46
|
+
### 活动 Schedule 标识
|
|
47
|
+
|
|
48
|
+
分组与平铺 Session 行以及搜索结果会在 `SessionSummary.projectionValues.schedule` 为非空数组时显示一枚轮廓闹钟。标识位于标题之后;普通行的更新时间仍位于标识之后,搜索结果则没有更新时间。它不是按钮,没有独立 pointer 行为或 Tab stop,点击所在区域仍会打开整行。本地化 tooltip 与同义读屏标签均为**有活动定时任务**。
|
|
49
|
+
|
|
50
|
+
对于 cold Session,该值有意采用尽力而为语义。身份匹配且可用的 projection-cache 行可以在不打开 Session 的情况下预热闹钟;cache 缺失或陈旧可能造成短暂漏显或残留。标识只表示当前列表值包含尚未 dispatch 或 delete 的 Schedule 记录,不表示 Schedule runtime 当前 live 或能够唤醒该 Session。
|
|
51
|
+
|
|
46
52
|
-----
|
|
47
53
|
|
|
48
54
|
<a id="understand-the-implementation"></a>
|
|
@@ -59,7 +65,7 @@ Session 行渲染运行时的实时 `pendingInteraction` 分类:审批显示**
|
|
|
59
65
|
|
|
60
66
|
### 视图状态
|
|
61
67
|
|
|
62
|
-
Workspace 列表基线就绪后,浏览器持久化的展开状态与 Session 顺序记录只保留当前 Workspace id、Ungrouped 与单列表记账。真实 Workspace 从 `WorkspaceView.sessionIds` 初始化,Ungrouped 与跨 Workspace 单列表从最近更新时间顺序初始化。共享侧边栏投影会隐藏持久化 Session 摘要中带有 `origin: 'subagent'` 的行;每个可见普通行都会在经不间断的 subagent
|
|
68
|
+
Workspace 列表基线就绪后,浏览器持久化的展开状态与 Session 顺序记录只保留当前 Workspace id、Ungrouped 与单列表记账。真实 Workspace 从 `WorkspaceView.sessionIds` 初始化,Ungrouped 与跨 Workspace 单列表从最近更新时间顺序初始化。共享侧边栏投影会隐藏持久化 Session 摘要中带有 `origin: 'subagent'` 的行;每个可见普通行都会在经不间断的 subagent 谱系可达的任一后代运行时继承蓝色活动指示器。同一份纯派生还会为分组、平铺与搜索节点读取列表 projection value 中的 Schedule key;本包只使用纯类型依赖 `@deepseek-ai/dsh-schedule/client`,不会导入 Schedule runtime 或 `ui-schedule`。
|
|
63
69
|
|
|
64
70
|
### 悬浮卡片
|
|
65
71
|
|
package/lib/client.js
CHANGED
|
@@ -322,6 +322,10 @@ window.__ModuleLoader__.load({
|
|
|
322
322
|
function sessionTitle(session) {
|
|
323
323
|
return session.blank ? "" : session.displayTitle;
|
|
324
324
|
}
|
|
325
|
+
/** The list projection alone owns the best-effort active-Schedule indicator. */
|
|
326
|
+
function hasActiveSchedule(session) {
|
|
327
|
+
return (session.projectionValues?.schedule?.length ?? 0) > 0;
|
|
328
|
+
}
|
|
325
329
|
/** Build one group without projecting session lineage into presentation. */
|
|
326
330
|
function buildGroup(key, workspaceId, cwd, createdAt, label, members, order) {
|
|
327
331
|
const sessions = [...members];
|
|
@@ -394,6 +398,7 @@ window.__ModuleLoader__.load({
|
|
|
394
398
|
running: s.running,
|
|
395
399
|
runningSubagentCount: descendants.get(s.id)?.runningCount ?? 0,
|
|
396
400
|
completed: s.completed === true,
|
|
401
|
+
hasActiveSchedule: hasActiveSchedule(s),
|
|
397
402
|
updatedAt: s.updatedAt,
|
|
398
403
|
...pendingInteraction === void 0 ? {} : { pendingInteraction }
|
|
399
404
|
};
|
|
@@ -514,6 +519,7 @@ window.__ModuleLoader__.load({
|
|
|
514
519
|
runningSubagentCount: descendants.get(summary.id)?.runningCount ?? 0,
|
|
515
520
|
...pendingInteraction === void 0 ? {} : { pendingInteraction },
|
|
516
521
|
completed: summary.completed === true,
|
|
522
|
+
hasActiveSchedule: hasActiveSchedule(summary),
|
|
517
523
|
...match === void 0 ? {} : { snippet: match.snippet }
|
|
518
524
|
};
|
|
519
525
|
}),
|
|
@@ -522,7 +528,7 @@ window.__ModuleLoader__.load({
|
|
|
522
528
|
}
|
|
523
529
|
//#endregion
|
|
524
530
|
//#region \0dsh-css:/home/runner/work/dsh-publisher/dsh-publisher/upstream/packages/client/ui-workspace/src/client/rows/Rows.module.css.mjs
|
|
525
|
-
const css$2 = ".CQRkna_projectRow,.CQRkna_sessionRow{cursor:pointer;user-select:none;color:var(--dsw-alias-label-primary);border-radius:8px;align-items:center;gap:6px;padding:0 8px;display:flex}.CQRkna_projectRow:hover,.CQRkna_sessionRow:hover,.CQRkna_sessionRow.CQRkna_selected{background:var(--dsw-alias-interactive-bg-hover)}.CQRkna_searchResultRow{box-sizing:border-box;cursor:pointer;text-align:left;width:100%;min-height:48px;color:var(--dsw-alias-label-primary);background:0 0;border:none;border-radius:8px;flex-direction:column;align-items:stretch;padding:4px 8px;display:flex}.CQRkna_searchResultRow:hover,.CQRkna_searchResultRow.CQRkna_selected{background:var(--dsw-alias-interactive-bg-hover)}.CQRkna_searchResultHeading{align-items:center;min-width:0;display:flex}.CQRkna_searchResultTitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;margin-left:4px;font-size:14px;line-height:20px;overflow:hidden}.CQRkna_searchResultMeta{align-items:center;gap:6px;min-width:0;margin-left:20px;display:flex}.CQRkna_searchResultWorkspace,.CQRkna_searchResultSnippet{text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:17px;overflow:hidden}.CQRkna_searchResultWorkspace{max-width:40%;color:var(--dsw-alias-label-tertiary);flex:none}.CQRkna_searchResultSnippet{min-width:0;color:var(--dsw-alias-label-secondary);flex:1}.CQRkna_projectRow{box-sizing:border-box;align-items:center;height:34px}.CQRkna_projectRow .CQRkna_rowActions{height:20px}.CQRkna_sessionRow{height:32px;animation:CQRkna_row-in .15s var(--ds-ease-in-out);gap:0}.CQRkna_sessionRow .CQRkna_title{margin:0 6px 0 4px}.CQRkna_flatSessionRowWithoutStatus .CQRkna_title{margin-left:0}@keyframes CQRkna_row-in{0%{opacity:0}}.CQRkna_slot{width:16px;height:20px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;display:inline-flex}.CQRkna_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.CQRkna_folderActive{color:var(--dsw-alias-state-business-primary)}.CQRkna_projectRow .CQRkna_chevron{display:none}.CQRkna_projectRow:hover .CQRkna_chevron{display:inline-flex}.CQRkna_projectRow:hover .CQRkna_folder{display:none}.CQRkna_arrow{transition:transform .15s var(--ds-ease-in-out)}.CQRkna_arrowOpen{transform:rotate(90deg)}.CQRkna_projectText{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.CQRkna_title{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:14px;line-height:20px;overflow:hidden}.CQRkna_renameInput{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-button-elevated-fill);min-width:0;color:inherit;border-radius:4px;outline:none;padding:0 2px;font-size:14px;line-height:20px}.CQRkna_sessionRow .CQRkna_title{flex:1}.CQRkna_meta{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px;overflow:hidden}.CQRkna_time{color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px;line-height:20px}.CQRkna_dot{flex:none}.CQRkna_rowActions{flex:none;align-items:center;gap:12px;display:none}.CQRkna_projectRow:hover .CQRkna_rowActions,.CQRkna_sessionRow:hover .CQRkna_rowActions,.CQRkna_projectRow.CQRkna_menuOpen .CQRkna_rowActions,.CQRkna_sessionRow.CQRkna_menuOpen .CQRkna_rowActions{display:inline-flex}.CQRkna_sessionRow:hover .CQRkna_time,.CQRkna_sessionRow.CQRkna_menuOpen .CQRkna_time{display:none}.CQRkna_projectRow.CQRkna_menuOpen,.CQRkna_sessionRow.CQRkna_menuOpen{background:var(--dsw-alias-interactive-bg-hover)}.CQRkna_sessionRow.CQRkna_dropBefore,.CQRkna_sessionRow.CQRkna_dropAfter{position:relative}.CQRkna_sessionRow.CQRkna_dropBefore:before,.CQRkna_sessionRow.CQRkna_dropAfter:after{content:\"\";z-index:1;background:linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat, linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat, linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;pointer-events:none;height:12px;position:absolute;left:0;right:4px}.CQRkna_sessionRow.CQRkna_dropBefore:before{top:-7px}.CQRkna_sessionRow.CQRkna_dropAfter:after{bottom:-7px}.CQRkna_hoverContent{flex-direction:column;gap:8px;display:flex}.CQRkna_hoverTitle{color:#fff;overflow-wrap:break-word;font-size:14px;line-height:20px}.CQRkna_hoverPath{color:#cfd3d6;word-break:break-all;font-size:12px;line-height:16px}.CQRkna_hoverTime{color:#cfd3d6;font-size:12px;line-height:16px}.CQRkna_hoverStatus{color:#adb2b8;align-items:center;gap:8px;font-size:12px;line-height:20px;display:flex}.CQRkna_iconButton{cursor:pointer;width:16px;height:16px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.CQRkna_iconButton:hover{color:var(--dsw-alias-label-primary)}.CQRkna_chevron{color:var(--dsw-alias-label-caption)}@media (prefers-reduced-motion:reduce){.CQRkna_sessionRow,.CQRkna_arrow{transition:none;animation:none}}";
|
|
531
|
+
const css$2 = ".CQRkna_projectRow,.CQRkna_sessionRow{cursor:pointer;user-select:none;color:var(--dsw-alias-label-primary);border-radius:8px;align-items:center;gap:6px;padding:0 8px;display:flex}.CQRkna_projectRow:hover,.CQRkna_sessionRow:hover,.CQRkna_sessionRow.CQRkna_selected{background:var(--dsw-alias-interactive-bg-hover)}.CQRkna_searchResultRow{box-sizing:border-box;cursor:pointer;text-align:left;width:100%;min-height:48px;color:var(--dsw-alias-label-primary);background:0 0;border:none;border-radius:8px;flex-direction:column;align-items:stretch;padding:4px 8px;display:flex}.CQRkna_searchResultRow:hover,.CQRkna_searchResultRow.CQRkna_selected{background:var(--dsw-alias-interactive-bg-hover)}.CQRkna_searchResultHeading{align-items:center;min-width:0;display:flex}.CQRkna_searchResultTitle{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;margin-left:4px;font-size:14px;line-height:20px;overflow:hidden}.CQRkna_searchResultMeta{align-items:center;gap:6px;min-width:0;margin-left:20px;display:flex}.CQRkna_searchResultWorkspace,.CQRkna_searchResultSnippet{text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:17px;overflow:hidden}.CQRkna_searchResultWorkspace{max-width:40%;color:var(--dsw-alias-label-tertiary);flex:none}.CQRkna_searchResultSnippet{min-width:0;color:var(--dsw-alias-label-secondary);flex:1}.CQRkna_projectRow{box-sizing:border-box;align-items:center;height:34px}.CQRkna_projectRow .CQRkna_rowActions{height:20px}.CQRkna_sessionRow{height:32px;animation:CQRkna_row-in .15s var(--ds-ease-in-out);gap:0}.CQRkna_sessionRow .CQRkna_title{margin:0 6px 0 4px}.CQRkna_flatSessionRowWithoutStatus .CQRkna_title{margin-left:0}@keyframes CQRkna_row-in{0%{opacity:0}}.CQRkna_slot{width:16px;height:20px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;display:inline-flex}.CQRkna_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.CQRkna_folderActive{color:var(--dsw-alias-state-business-primary)}.CQRkna_projectRow .CQRkna_chevron{display:none}.CQRkna_projectRow:hover .CQRkna_chevron{display:inline-flex}.CQRkna_projectRow:hover .CQRkna_folder{display:none}.CQRkna_arrow{transition:transform .15s var(--ds-ease-in-out)}.CQRkna_arrowOpen{transform:rotate(90deg)}.CQRkna_projectText{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.CQRkna_title{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:14px;line-height:20px;overflow:hidden}.CQRkna_renameInput{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-button-elevated-fill);min-width:0;color:inherit;border-radius:4px;outline:none;padding:0 2px;font-size:14px;line-height:20px}.CQRkna_sessionRow .CQRkna_title{flex:1}.CQRkna_meta{text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px;overflow:hidden}.CQRkna_time{color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px;line-height:20px}.CQRkna_scheduleIndicator{width:16px;height:20px;color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;margin-right:6px;display:inline-flex}.CQRkna_searchScheduleIndicator{margin-left:4px;margin-right:0}.CQRkna_dot{flex:none}.CQRkna_rowActions{flex:none;align-items:center;gap:12px;display:none}.CQRkna_projectRow:hover .CQRkna_rowActions,.CQRkna_sessionRow:hover .CQRkna_rowActions,.CQRkna_projectRow.CQRkna_menuOpen .CQRkna_rowActions,.CQRkna_sessionRow.CQRkna_menuOpen .CQRkna_rowActions{display:inline-flex}.CQRkna_sessionRow:hover .CQRkna_time,.CQRkna_sessionRow.CQRkna_menuOpen .CQRkna_time{display:none}.CQRkna_projectRow.CQRkna_menuOpen,.CQRkna_sessionRow.CQRkna_menuOpen{background:var(--dsw-alias-interactive-bg-hover)}.CQRkna_sessionRow.CQRkna_dropBefore,.CQRkna_sessionRow.CQRkna_dropAfter{position:relative}.CQRkna_sessionRow.CQRkna_dropBefore:before,.CQRkna_sessionRow.CQRkna_dropAfter:after{content:\"\";z-index:1;background:linear-gradient(55deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 0 / 5px 7px no-repeat, linear-gradient(125deg, transparent calc(50% - 1px), var(--dsw-alias-state-business-primary) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) 0 5px / 5px 7px no-repeat, linear-gradient(var(--dsw-alias-state-business-primary) 0 0) 4px 5px / calc(100% - 4px) 2px no-repeat;pointer-events:none;height:12px;position:absolute;left:0;right:4px}.CQRkna_sessionRow.CQRkna_dropBefore:before{top:-7px}.CQRkna_sessionRow.CQRkna_dropAfter:after{bottom:-7px}.CQRkna_hoverContent{flex-direction:column;gap:8px;display:flex}.CQRkna_hoverTitle{color:#fff;overflow-wrap:break-word;font-size:14px;line-height:20px}.CQRkna_hoverPath{color:#cfd3d6;word-break:break-all;font-size:12px;line-height:16px}.CQRkna_hoverTime{color:#cfd3d6;font-size:12px;line-height:16px}.CQRkna_hoverStatus{color:#adb2b8;align-items:center;gap:8px;font-size:12px;line-height:20px;display:flex}.CQRkna_iconButton{cursor:pointer;width:16px;height:16px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.CQRkna_iconButton:hover{color:var(--dsw-alias-label-primary)}.CQRkna_chevron{color:var(--dsw-alias-label-caption)}@media (prefers-reduced-motion:reduce){.CQRkna_sessionRow,.CQRkna_arrow{transition:none;animation:none}}";
|
|
526
532
|
const tagId$2 = "@prettier-ai/dsh-client-ui-workspace/Rows.module.css";
|
|
527
533
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
528
534
|
const tag = document.createElement("style");
|
|
@@ -554,12 +560,14 @@ window.__ModuleLoader__.load({
|
|
|
554
560
|
"renameInput": "CQRkna_renameInput",
|
|
555
561
|
"row-in": "CQRkna_row-in",
|
|
556
562
|
"rowActions": "CQRkna_rowActions",
|
|
563
|
+
"scheduleIndicator": "CQRkna_scheduleIndicator",
|
|
557
564
|
"searchResultHeading": "CQRkna_searchResultHeading",
|
|
558
565
|
"searchResultMeta": "CQRkna_searchResultMeta",
|
|
559
566
|
"searchResultRow": "CQRkna_searchResultRow",
|
|
560
567
|
"searchResultSnippet": "CQRkna_searchResultSnippet",
|
|
561
568
|
"searchResultTitle": "CQRkna_searchResultTitle",
|
|
562
569
|
"searchResultWorkspace": "CQRkna_searchResultWorkspace",
|
|
570
|
+
"searchScheduleIndicator": "CQRkna_searchScheduleIndicator",
|
|
563
571
|
"selected": "CQRkna_selected",
|
|
564
572
|
"sessionRow": "CQRkna_sessionRow",
|
|
565
573
|
"slot": "CQRkna_slot",
|
|
@@ -802,6 +810,17 @@ window.__ModuleLoader__.load({
|
|
|
802
810
|
children: status.label
|
|
803
811
|
}, status.label))] });
|
|
804
812
|
}
|
|
813
|
+
/** Non-interactive active-Schedule marker; the enclosing row remains the only action. */
|
|
814
|
+
function ActiveScheduleIndicator({ t, search = false }) {
|
|
815
|
+
const label = t("schedule.active");
|
|
816
|
+
return (0, react_jsx_runtime.jsx)("span", {
|
|
817
|
+
className: clsx(Rows_module_css_default.scheduleIndicator, search && Rows_module_css_default.searchScheduleIndicator),
|
|
818
|
+
role: "img",
|
|
819
|
+
"aria-label": label,
|
|
820
|
+
title: label,
|
|
821
|
+
children: (0, react_jsx_runtime.jsx)(_prettier_ai_dsh_client_ui_primitives.IconAlarmClockOutline16, {})
|
|
822
|
+
});
|
|
823
|
+
}
|
|
805
824
|
/** Hover-card body: full title, relative time, and every relevant live status. */
|
|
806
825
|
function SessionHoverContent({ node, now, t }) {
|
|
807
826
|
const statuses = sessionStatuses(node, t);
|
|
@@ -847,13 +866,20 @@ window.__ModuleLoader__.load({
|
|
|
847
866
|
},
|
|
848
867
|
children: [(0, react_jsx_runtime.jsxs)("span", {
|
|
849
868
|
className: Rows_module_css_default.searchResultHeading,
|
|
850
|
-
children: [
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
869
|
+
children: [
|
|
870
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
871
|
+
className: Rows_module_css_default.slot,
|
|
872
|
+
children: (primaryStatus.state !== "done" || result.completed) && (0, react_jsx_runtime.jsx)(SessionStatusDots, { statuses })
|
|
873
|
+
}),
|
|
874
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
875
|
+
className: Rows_module_css_default.searchResultTitle,
|
|
876
|
+
children: result.title
|
|
877
|
+
}),
|
|
878
|
+
result.hasActiveSchedule && (0, react_jsx_runtime.jsx)(ActiveScheduleIndicator, {
|
|
879
|
+
t,
|
|
880
|
+
search: true
|
|
881
|
+
})
|
|
882
|
+
]
|
|
857
883
|
}), (0, react_jsx_runtime.jsxs)("span", {
|
|
858
884
|
className: Rows_module_css_default.searchResultMeta,
|
|
859
885
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
@@ -940,6 +966,7 @@ window.__ModuleLoader__.load({
|
|
|
940
966
|
className: Rows_module_css_default.title,
|
|
941
967
|
children: title
|
|
942
968
|
}),
|
|
969
|
+
row.hasActiveSchedule && (0, react_jsx_runtime.jsx)(ActiveScheduleIndicator, { t }),
|
|
943
970
|
!row.blank && (0, react_jsx_runtime.jsx)("span", {
|
|
944
971
|
className: Rows_module_css_default.time,
|
|
945
972
|
children: timeLabel(row.updatedAt, now, t)
|
|
@@ -1884,8 +1911,8 @@ window.__ModuleLoader__.load({
|
|
|
1884
1911
|
* @param props - composed slot props (shell owner share + store + injected actions).
|
|
1885
1912
|
* @returns the region element tree.
|
|
1886
1913
|
*/
|
|
1887
|
-
function WorkspaceBrowser({ wide, expandSidebar, useSessions, useSessionPendingInteraction, useWorkspaces, useStore, actions, startSession, open, renameSession, forkSession, renameWorkspace, deleteWorkspace, insertWorkspaceBefore, archiveSession, insertSessionBefore, createWorkspace, searchSessions, searchResultLimit, useDirectoryFlow,
|
|
1888
|
-
const home =
|
|
1914
|
+
function WorkspaceBrowser({ wide, expandSidebar, useSessions, useSessionPendingInteraction, useWorkspaces, useStore, actions, startSession, open, renameSession, forkSession, renameWorkspace, deleteWorkspace, insertWorkspaceBefore, archiveSession, insertSessionBefore, createWorkspace, searchSessions, searchResultLimit, useDirectoryFlow, useHostInfo, renderSlot, t }) {
|
|
1915
|
+
const home = useHostInfo((info) => info.home);
|
|
1889
1916
|
const workspaces = useWorkspaces((state) => state.items);
|
|
1890
1917
|
const workspacePhase = useWorkspaces((state) => state.phase);
|
|
1891
1918
|
const archivedSessionIds = useWorkspaces((state) => state.archivedSessionIds);
|
|
@@ -2507,6 +2534,7 @@ window.__ModuleLoader__.load({
|
|
|
2507
2534
|
"status.planReview": "计划待审",
|
|
2508
2535
|
"status.waitingAnswer": "等待回答",
|
|
2509
2536
|
"status.completed": "已完成",
|
|
2537
|
+
"schedule.active": "有活动定时任务",
|
|
2510
2538
|
"hover.created": "创建于 {time}",
|
|
2511
2539
|
"hover.copied": "已复制",
|
|
2512
2540
|
"date.ymd": "{y}年{m}月{d}日",
|
|
@@ -2572,6 +2600,7 @@ window.__ModuleLoader__.load({
|
|
|
2572
2600
|
"status.planReview": "Plan awaiting review",
|
|
2573
2601
|
"status.waitingAnswer": "Waiting for answer",
|
|
2574
2602
|
"status.completed": "Completed",
|
|
2603
|
+
"schedule.active": "Has active scheduled task",
|
|
2575
2604
|
"hover.created": "Created {time}",
|
|
2576
2605
|
"hover.copied": "Copied",
|
|
2577
2606
|
"date.ymd": "{y}-{m}-{d}",
|
|
@@ -2600,7 +2629,6 @@ window.__ModuleLoader__.load({
|
|
|
2600
2629
|
"sessions",
|
|
2601
2630
|
"workspaces",
|
|
2602
2631
|
"locale",
|
|
2603
|
-
"connection",
|
|
2604
2632
|
"remote",
|
|
2605
2633
|
"remote.directoryPicker"
|
|
2606
2634
|
];
|
|
@@ -2611,10 +2639,8 @@ window.__ModuleLoader__.load({
|
|
|
2611
2639
|
* @param ctx - client root context.
|
|
2612
2640
|
*/
|
|
2613
2641
|
function apply(ctx) {
|
|
2614
|
-
const connection = ctx.get("connection");
|
|
2615
2642
|
const sessions = ctx.get("sessions");
|
|
2616
2643
|
const workspaces = ctx.get("workspaces");
|
|
2617
|
-
const connectionGeneration = connection.generation;
|
|
2618
2644
|
const uiWorkspace = new UiWorkspaceService(ctx, ctx.remote.directoryPicker, workspaces, sessions);
|
|
2619
2645
|
ctx.slots.provideRoot({ hooks: { workspaces: workspaces.list } });
|
|
2620
2646
|
ctx.effect(() => ctx.locale.register(NS, {
|
|
@@ -2631,6 +2657,10 @@ window.__ModuleLoader__.load({
|
|
|
2631
2657
|
subscribe: (listener) => ctx.slots.subscribe(hole, listener)
|
|
2632
2658
|
});
|
|
2633
2659
|
const browserFlowSource = flowSource("sidebar.workspaces.directoryFlow");
|
|
2660
|
+
const hostInfo = {
|
|
2661
|
+
getSnapshot: () => ctx.remote.$host,
|
|
2662
|
+
subscribe: (listener) => ctx.on("connection/reset", listener)
|
|
2663
|
+
};
|
|
2634
2664
|
const pickerFlowSource = flowSource("conversation.hero.workspace.directoryFlow");
|
|
2635
2665
|
const browserInjected = () => ({
|
|
2636
2666
|
startSession: (workspaceId) => {
|
|
@@ -2673,7 +2703,7 @@ window.__ModuleLoader__.load({
|
|
|
2673
2703
|
createWorkspace: (input) => workspaces.create(input),
|
|
2674
2704
|
hooks: {
|
|
2675
2705
|
directoryFlow: browserFlowSource,
|
|
2676
|
-
|
|
2706
|
+
hostInfo
|
|
2677
2707
|
}
|
|
2678
2708
|
});
|
|
2679
2709
|
const pickerInjected = () => ({
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
* and a hole has exactly one declaring entry — they carry the same owner
|
|
23
23
|
* contract and the same occupant.
|
|
24
24
|
*/
|
|
25
|
-
import type { ConnectionGenerationState } from '@prettier-ai/dsh-client-connection/client';
|
|
26
25
|
import type { HostObservable, PropsHooks, PropsLocale, PropsRenderSlots, PropsRuntime, PropsStore } from '@prettier-ai/dsh-client-ui-slots';
|
|
27
26
|
import type { SessionSearchResultItem } from '@prettier-ai/dsh-api-session-controller/client';
|
|
27
|
+
import type { RemoteHostFacts } from '@prettier-ai/dsh-api-remotes/client';
|
|
28
28
|
import type { WorkspaceId, WorkspaceView } from '@prettier-ai/dsh-api-workspace-controller/client';
|
|
29
29
|
import type { SessionId } from '@prettier-ai/dsh-session/types';
|
|
30
30
|
import type { createWorkspaceViewStore } from '../stores.ts';
|
|
@@ -85,8 +85,13 @@ export type DirectoryPickingHooks = PropsHooks<DirectoryPickingInjected['hooks']
|
|
|
85
85
|
*/
|
|
86
86
|
export type WorkspaceBrowserInjected = {
|
|
87
87
|
hooks: DirectoryPickingInjected['hooks'] & {
|
|
88
|
-
/**
|
|
89
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Fixed Host facts, reached through a hook rather than injected as values:
|
|
90
|
+
* the renderer memoizes an entry's inject result for the registration's
|
|
91
|
+
* lifetime, so facts read there would freeze at whatever the first render
|
|
92
|
+
* saw. Select the field the surface needs (`info => info.home`).
|
|
93
|
+
*/
|
|
94
|
+
hostInfo: HostObservable<RemoteHostFacts>;
|
|
90
95
|
};
|
|
91
96
|
/**
|
|
92
97
|
* Start a New Session in a Workspace: reuse-or-create its blank session and
|
|
@@ -57,6 +57,7 @@ export declare const zh: {
|
|
|
57
57
|
'status.planReview': string;
|
|
58
58
|
'status.waitingAnswer': string;
|
|
59
59
|
'status.completed': string;
|
|
60
|
+
'schedule.active': string;
|
|
60
61
|
'hover.created': string;
|
|
61
62
|
'hover.copied': string;
|
|
62
63
|
'date.ymd': string;
|
|
@@ -124,6 +125,7 @@ export declare const en: {
|
|
|
124
125
|
'status.planReview': string;
|
|
125
126
|
'status.waitingAnswer': string;
|
|
126
127
|
'status.completed': string;
|
|
128
|
+
'schedule.active': string;
|
|
127
129
|
'hover.created': string;
|
|
128
130
|
'hover.copied': string;
|
|
129
131
|
'date.ymd': string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** Workspace archive and directory UI capability. */
|
|
2
2
|
import { Service, type Context } from '@prettier-ai/cordis';
|
|
3
|
-
import type { ClientRemote, DirectoryListing } from '@prettier-ai/dsh-api-remotes/client';
|
|
4
|
-
import type { RemoteFailure } from '@prettier-ai/dsh-typert-protocol';
|
|
3
|
+
import type { ClientRemote, DirectoryListing, RemoteFailure } from '@prettier-ai/dsh-api-remotes/client';
|
|
5
4
|
import type { ISessions } from '@prettier-ai/dsh-api-session-controller/client';
|
|
6
5
|
import type { IWorkspaces, WorkspaceId } from '@prettier-ai/dsh-api-workspace-controller/client';
|
|
7
6
|
import type { SessionId } from '@prettier-ai/dsh-session/types';
|
|
@@ -4,5 +4,5 @@ import type { WorkspaceBrowserProps } from '../contract/slots.ts';
|
|
|
4
4
|
* @param props - composed slot props (shell owner share + store + injected actions).
|
|
5
5
|
* @returns the region element tree.
|
|
6
6
|
*/
|
|
7
|
-
export declare function WorkspaceBrowser({ wide, expandSidebar, useSessions, useSessionPendingInteraction, useWorkspaces, useStore, actions, startSession, open, renameSession, forkSession, renameWorkspace, deleteWorkspace, insertWorkspaceBefore, archiveSession, insertSessionBefore, createWorkspace, searchSessions, searchResultLimit, useDirectoryFlow,
|
|
7
|
+
export declare function WorkspaceBrowser({ wide, expandSidebar, useSessions, useSessionPendingInteraction, useWorkspaces, useStore, actions, startSession, open, renameSession, forkSession, renameWorkspace, deleteWorkspace, insertWorkspaceBefore, archiveSession, insertSessionBefore, createWorkspace, searchSessions, searchResultLimit, useDirectoryFlow, useHostInfo, renderSlot, t, }: WorkspaceBrowserProps): import("react").JSX.Element;
|
|
8
8
|
//# sourceMappingURL=WorkspaceBrowser.d.ts.map
|
|
@@ -26,6 +26,8 @@ export interface SessionNode {
|
|
|
26
26
|
runningSubagentCount: number;
|
|
27
27
|
/** Finished running while not selected and not yet opened (the green "done" reminder dot). */
|
|
28
28
|
completed: boolean;
|
|
29
|
+
/** The current list projection contains at least one active Schedule record. */
|
|
30
|
+
hasActiveSchedule: boolean;
|
|
29
31
|
updatedAt: number;
|
|
30
32
|
}
|
|
31
33
|
/** Session order selected by the Workspace browser. */
|
|
@@ -60,6 +62,8 @@ export interface SearchResultNode {
|
|
|
60
62
|
runningSubagentCount: number;
|
|
61
63
|
/** Finished running while not selected and not yet opened (the green "done" reminder dot). */
|
|
62
64
|
completed: boolean;
|
|
65
|
+
/** The current list projection contains at least one active Schedule record. */
|
|
66
|
+
hasActiveSchedule: boolean;
|
|
63
67
|
snippet?: string;
|
|
64
68
|
}
|
|
65
69
|
/** Bounded merged search projection plus the refine-query hint bit. */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prettier-ai/dsh-client-ui-workspace",
|
|
3
3
|
"description": "Workspace picker plugin: one WorkspacePicker registered into the sidebar and empty-state workspace slots",
|
|
4
|
-
"version": "0.1.2-alpha.
|
|
4
|
+
"version": "0.1.2-alpha.3",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -50,42 +50,30 @@
|
|
|
50
50
|
"clsx": "^2.0.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@prettier-ai/
|
|
54
|
-
"@prettier-ai/dsh-client-connection": "^0.1.2-alpha.1",
|
|
55
|
-
"@prettier-ai/dsh-client-locale": "^0.1.2-alpha.1",
|
|
56
|
-
"@prettier-ai/dsh-api-workspace-controller": "^0.1.2-alpha.1",
|
|
57
|
-
"@prettier-ai/dsh-api-session-controller": "^0.1.2-alpha.1",
|
|
58
|
-
"@prettier-ai/dsh-client-ui-conversation": "^0.1.2-alpha.1",
|
|
59
|
-
"@prettier-ai/dsh-client-ui-renderer": "^0.1.2-alpha.1",
|
|
60
|
-
"@prettier-ai/dsh-client-ui-session": "^0.1.2-alpha.1",
|
|
61
|
-
"@prettier-ai/dsh-client-ui-sidebar": "^0.1.2-alpha.1",
|
|
62
|
-
"@prettier-ai/cordis": "^4.0.1",
|
|
63
|
-
"@prettier-ai/dsh-session": "^0.1.2-alpha.1",
|
|
64
|
-
"@prettier-ai/dsh-typert-protocol": "^0.1.2-alpha.1",
|
|
65
|
-
"@prettier-ai/dsh-invariants": "^0.1.2-alpha.1",
|
|
66
|
-
"@prettier-ai/dsh-util-workspace-path": "^0.1.2-alpha.1"
|
|
53
|
+
"@prettier-ai/cordis": "^4.0.2"
|
|
67
54
|
},
|
|
68
55
|
"devDependencies": {
|
|
69
56
|
"@types/react": "~18.3.1",
|
|
70
57
|
"react": "^18.2.0",
|
|
71
|
-
"@prettier-ai/dsh-api-
|
|
72
|
-
"@prettier-ai/dsh-api-
|
|
73
|
-
"@prettier-ai/dsh-api-
|
|
74
|
-
"@prettier-ai/dsh-client-
|
|
75
|
-
"@prettier-ai/dsh-client-store": "^0.1.2-alpha.
|
|
76
|
-
"@prettier-ai/dsh-client-
|
|
77
|
-
"@prettier-ai/dsh-client-
|
|
78
|
-
"@prettier-ai/dsh-client-ui-
|
|
79
|
-
"@prettier-ai/dsh-client-
|
|
80
|
-
"@prettier-ai/dsh-client-ui-
|
|
81
|
-
"@prettier-ai/dsh-
|
|
82
|
-
"@prettier-ai/dsh-
|
|
83
|
-
"@prettier-ai/dsh-
|
|
84
|
-
"@prettier-ai/dsh-client-ui-
|
|
85
|
-
"@prettier-ai/dsh-
|
|
86
|
-
"@prettier-ai/dsh-
|
|
87
|
-
"@prettier-ai/
|
|
88
|
-
"@prettier-ai/
|
|
58
|
+
"@prettier-ai/dsh-api-remotes": "^0.1.2-alpha.3",
|
|
59
|
+
"@prettier-ai/dsh-api-session-controller": "^0.1.2-alpha.3",
|
|
60
|
+
"@prettier-ai/dsh-api-workspace-controller": "^0.1.2-alpha.3",
|
|
61
|
+
"@prettier-ai/dsh-client-connection": "^0.1.2-alpha.3",
|
|
62
|
+
"@prettier-ai/dsh-client-store": "^0.1.2-alpha.3",
|
|
63
|
+
"@prettier-ai/dsh-client-locale": "^0.1.2-alpha.3",
|
|
64
|
+
"@prettier-ai/dsh-client-test-runtime": "^0.1.2-alpha.3",
|
|
65
|
+
"@prettier-ai/dsh-client-ui-conversation": "^0.1.2-alpha.3",
|
|
66
|
+
"@prettier-ai/dsh-client-ui-renderer": "^0.1.2-alpha.3",
|
|
67
|
+
"@prettier-ai/dsh-client-ui-session": "^0.1.2-alpha.3",
|
|
68
|
+
"@prettier-ai/dsh-client-ui-sidebar": "^0.1.2-alpha.3",
|
|
69
|
+
"@prettier-ai/dsh-client-ui-primitives": "^0.1.2-alpha.3",
|
|
70
|
+
"@prettier-ai/dsh-invariants": "^0.1.2-alpha.3",
|
|
71
|
+
"@prettier-ai/dsh-client-ui-slots": "^0.1.2-alpha.3",
|
|
72
|
+
"@prettier-ai/dsh-schedule": "^0.1.2-alpha.3",
|
|
73
|
+
"@prettier-ai/dsh-typert-protocol": "^0.1.2-alpha.3",
|
|
74
|
+
"@prettier-ai/cordis": "^4.0.2",
|
|
75
|
+
"@prettier-ai/dsh-session": "^0.1.2-alpha.3",
|
|
76
|
+
"@prettier-ai/dsh-util-workspace-path": "^0.1.2-alpha.3"
|
|
89
77
|
},
|
|
90
78
|
"files": [
|
|
91
79
|
"lib/index.js",
|