diff --git a/packages/plugin/src/contracts.ts b/packages/plugin/src/contracts.ts index 11d1ad99a5..32d7a6b31e 100644 --- a/packages/plugin/src/contracts.ts +++ b/packages/plugin/src/contracts.ts @@ -35,8 +35,8 @@ export interface PluginWorkspaceSnapshot { readonly lastPromptAt: string | null; readonly parentAgent: AgentRef | null; /** - * The workspace whose agent created this one, on the same host. Null for root workspaces and - * on older hosts. The parent may be archived, so `useWorkspace(parentWorkspace)` can return null. + * The workspace whose agent created this one, on the same host. Null when the host records no + * parent, as for root workspaces. The parent may be archived, so `useWorkspace` can return null. */ readonly parentWorkspace: WorkspaceRef | null; readonly indicator: WorkspaceIndicator; diff --git a/public-docs/plugins/sidebar-views.md b/public-docs/plugins/sidebar-views.md index 48e8814f09..7039cc2d08 100644 --- a/public-docs/plugins/sidebar-views.md +++ b/public-docs/plugins/sidebar-views.md @@ -117,8 +117,8 @@ Existing workspace panels can continue passing a host-local string ID to `useWor Workspace snapshots include `project`, `pinnedAt`, `labels`, `background`, `branch`, `lastPromptAt`, `parentAgent` and `createdAt` (null on older hosts). `parentWorkspace` is the ref -of the workspace whose agent created this one, on the same host, and requires Paseo 0.18. It is -null for root workspaces and on older hosts. The parent may be archived, so `useWorkspace` can +of the workspace whose agent created this one, on the same host. The app requires Paseo 0.18. +It is null when the host records no parent, as for root workspaces. The parent may be archived, so `useWorkspace` can return null for it. Nest dispatched workspaces with `useWorkspaces({ where: (item) => item.parentWorkspace?.key === reference.key })`. Use `indicator` and the localized `indicatorLabel` to display the status Paseo shows. `status` remains the raw daemon diff --git a/public-docs/plugins/sidebar-views.zh-CN.md b/public-docs/plugins/sidebar-views.zh-CN.md index b7f1b82acf..8f691caca2 100644 --- a/public-docs/plugins/sidebar-views.zh-CN.md +++ b/public-docs/plugins/sidebar-views.zh-CN.md @@ -92,7 +92,7 @@ const selected = useWorkspace(ref, selector, equals); 没有选择器时,自定义相等比较函数接收快照;有选择器时接收选择结果。现有工作区面板仍可向 `useWorkspace` 和 `useAgent` 传入主机本地的字符串 ID。跨主机视图应使用引用。`useHosts()` 保留现有的 `serverId`、`label` 和连接 `status` 字段。 -工作区快照包含 `project`、`pinnedAt`、`labels`、`background`、`branch`、`lastPromptAt`、`parentAgent` 和 `createdAt`(旧主机上为 null)。`parentWorkspace` 是同一主机上创建该工作区的 Agent 所在工作区的引用,需要 Paseo 0.18。根工作区和旧主机上为 null。父工作区可能已归档,因此 `useWorkspace` 对它可能返回 null。用 `useWorkspaces({ where: (item) => item.parentWorkspace?.key === reference.key })` 嵌套派生的工作区。使用 `indicator` 和本地化的 `indicatorLabel` 显示 Paseo 的状态。`status` 保持 daemon 原始状态。Agent 快照包含工作区和父 Agent 引用、`background` 和 `backgroundWork.count`。项目快照提供 `displayName`、`rootPath`、`kind` 和 `iconRevision`。 +工作区快照包含 `project`、`pinnedAt`、`labels`、`background`、`branch`、`lastPromptAt`、`parentAgent` 和 `createdAt`(旧主机上为 null)。`parentWorkspace` 是同一主机上创建该工作区的 Agent 所在工作区的引用。应用需要 Paseo 0.18。主机未记录父工作区时(例如根工作区)为 null。父工作区可能已归档,因此 `useWorkspace` 对它可能返回 null。用 `useWorkspaces({ where: (item) => item.parentWorkspace?.key === reference.key })` 嵌套派生的工作区。使用 `indicator` 和本地化的 `indicatorLabel` 显示 Paseo 的状态。`status` 保持 daemon 原始状态。Agent 快照包含工作区和父 Agent 引用、`background` 和 `backgroundWork.count`。项目快照提供 `displayName`、`rootPath`、`kind` 和 `iconRevision`。 ## 列出终端 {#list-terminals}