@xrn1997/dsh-session-delete 0.13.0 → 0.14.0
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 +201 -201
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/cordis.patch.yml +7 -7
- package/docs/DETAIL.md +1 -1
- package/docs/DETAIL.zh.md +1 -1
- package/lib/client.js +7430 -7370
- package/lib/types/client/{batch-bar.d.ts → batch/batch-bar.d.ts} +2 -2
- package/lib/types/client/{batch-menu-item.d.ts → batch/batch-menu-item.d.ts} +1 -1
- package/lib/types/client/{batch-pick.d.ts → batch/batch-pick.d.ts} +1 -1
- package/lib/types/client/{batch-select.d.ts → batch/batch-select.d.ts} +2 -2
- package/lib/types/client/{delete-menu-item.d.ts → batch/delete-menu-item.d.ts} +1 -1
- package/lib/types/client/batch/index.d.ts +10 -0
- package/lib/types/client/{copy.d.ts → core/copy.d.ts} +2 -2
- package/lib/types/client/{receipt.d.ts → core/receipt.d.ts} +1 -1
- package/lib/types/client/{remote.d.ts → core/remote.d.ts} +1 -1
- package/lib/types/client/detail/block-render.d.ts +22 -0
- package/lib/types/client/{detail-blocks.d.ts → detail/detail-blocks.d.ts} +1 -1
- package/lib/types/client/detail/detail-style.d.ts +62 -0
- package/lib/types/client/detail/detail-text.d.ts +18 -0
- package/lib/types/client/detail/index.d.ts +17 -0
- package/lib/types/client/{markdown.d.ts → detail/markdown.d.ts} +2 -2
- package/lib/types/client/{prompt-rail.d.ts → detail/prompt-rail.d.ts} +2 -2
- package/lib/types/client/{session-detail.d.ts → detail/session-detail.d.ts} +3 -12
- package/lib/types/client/{subagent-section.d.ts → detail/subagent-section.d.ts} +2 -2
- package/lib/types/client/{use-archive-detail-reader.d.ts → detail/use-archive-detail-reader.d.ts} +2 -2
- package/lib/types/client/{use-detail-pager.d.ts → detail/use-detail-pager.d.ts} +1 -1
- package/lib/types/client/{use-detail-rail.d.ts → detail/use-detail-rail.d.ts} +1 -1
- package/lib/types/client/{use-detail-reader.d.ts → detail/use-detail-reader.d.ts} +3 -3
- package/lib/types/client/{use-prompt-rail.d.ts → detail/use-prompt-rail.d.ts} +1 -1
- package/lib/types/client/{use-trash-detail-reader.d.ts → detail/use-trash-detail-reader.d.ts} +2 -2
- package/lib/types/client/{context-menu-actions.d.ts → host/context-menu-actions.d.ts} +2 -2
- package/lib/types/client/host/guard.d.ts +16 -0
- package/lib/types/client/{host-archive-watch.d.ts → host/host-archive-watch.d.ts} +1 -1
- package/lib/types/client/host/index.d.ts +11 -0
- package/lib/types/client/{archive-detail.d.ts → panel/archive-detail.d.ts} +3 -5
- package/lib/types/client/{archive-pane.d.ts → panel/archive-pane.d.ts} +10 -10
- package/lib/types/client/{detail-pane.d.ts → panel/detail-pane.d.ts} +3 -3
- package/lib/types/client/panel/index.d.ts +9 -0
- package/lib/types/client/{panel-tab.d.ts → panel/panel-tab.d.ts} +3 -3
- package/lib/types/client/{session-list.d.ts → panel/session-list.d.ts} +4 -4
- package/lib/types/client/{trash-confirm.d.ts → panel/trash-confirm.d.ts} +2 -12
- package/lib/types/client/{trash-detail.d.ts → panel/trash-detail.d.ts} +4 -6
- package/lib/types/client/{trash-drop.d.ts → panel/trash-drop.d.ts} +1 -1
- package/lib/types/client/{trash-entry.d.ts → panel/trash-entry.d.ts} +2 -2
- package/lib/types/client/{trash-panel.d.ts → panel/trash-panel.d.ts} +1 -1
- package/lib/types/client/{trash-tab.d.ts → panel/trash-tab.d.ts} +7 -7
- package/lib/types/client/{use-archive-panel-controller.d.ts → panel/use-archive-panel-controller.d.ts} +5 -5
- package/lib/types/client/{use-archive-query.d.ts → panel/use-archive-query.d.ts} +2 -2
- package/lib/types/client/{use-list-selection.d.ts → panel/use-list-selection.d.ts} +1 -1
- package/lib/types/client/{use-panel-child-view.d.ts → panel/use-panel-child-view.d.ts} +1 -1
- package/lib/types/client/{use-panel-tab.d.ts → panel/use-panel-tab.d.ts} +8 -11
- package/lib/types/client/{use-trash-panel-controller.d.ts → panel/use-trash-panel-controller.d.ts} +4 -4
- package/lib/types/client/{use-trash-query.d.ts → panel/use-trash-query.d.ts} +4 -4
- package/lib/types/client/{view-switches.d.ts → panel/view-switches.d.ts} +1 -1
- package/lib/types/client/scene.d.ts +8 -8
- package/lib/types/client/search/index.d.ts +12 -0
- package/lib/types/client/{search-box.d.ts → search/search-box.d.ts} +1 -1
- package/lib/types/client/{search-preview.d.ts → search/search-preview.d.ts} +2 -2
- package/lib/types/client/{search-results.d.ts → search/search-results.d.ts} +2 -2
- package/lib/types/client/{use-search-view.d.ts → search/use-search-view.d.ts} +2 -2
- package/lib/types/client/{use-search.d.ts → search/use-search.d.ts} +2 -2
- package/lib/types/client/{config-settings.d.ts → settings/config-settings.d.ts} +2 -2
- package/lib/types/client/settings/index.d.ts +8 -0
- package/lib/types/client/{maintenance-parts.d.ts → settings/maintenance-parts.d.ts} +1 -1
- package/lib/types/client/{maintenance-settings.d.ts → settings/maintenance-settings.d.ts} +1 -1
- package/lib/types/client/settings/orphan-confirm.d.ts +12 -0
- package/lib/types/client/{orphan-maintenance.d.ts → settings/orphan-maintenance.d.ts} +3 -3
- package/lib/types/client/{settings-cards.d.ts → settings/settings-cards.d.ts} +2 -2
- package/lib/types/client/{use-maintenance-section.d.ts → settings/use-maintenance-section.d.ts} +1 -1
- package/lib/types/client/{use-maintenance.d.ts → settings/use-maintenance.d.ts} +4 -4
- package/lib/types/client/{batch-selection-store.d.ts → state/batch-selection-store.d.ts} +11 -4
- package/lib/types/client/state/delete-action.d.ts +16 -0
- package/lib/types/client/{main-view.d.ts → state/main-view.d.ts} +1 -1
- package/lib/types/client/{trash-snapshot.d.ts → state/trash-snapshot.d.ts} +1 -1
- package/lib/types/client/ui/Button.d.ts +2 -1
- package/lib/types/client/ui/ErrorBoundary.d.ts +4 -8
- package/lib/types/client/ui/Tooltip.d.ts +3 -2
- package/lib/types/client/ui/inert.d.ts +15 -0
- package/lib/types/client/{attachment-view.d.ts → widgets/attachment-view.d.ts} +2 -2
- package/lib/types/client/{trash-view.d.ts → widgets/trash-view.d.ts} +3 -1
- package/lib/types/client/write/delete-action-host.d.ts +4 -0
- package/lib/types/client/write/index.d.ts +13 -0
- package/lib/types/client/{undo-toast.d.ts → write/undo-toast.d.ts} +2 -2
- package/lib/types/client/{use-write-progress.d.ts → write/use-write-progress.d.ts} +2 -2
- package/lib/types/client/{write-progress.d.ts → write/write-progress.d.ts} +1 -1
- package/lib/types/client/{write-seats.d.ts → write/write-seats.d.ts} +7 -15
- package/lib/types/shared/wire.d.ts +2 -2
- package/package.json +7 -7
- package/lib/types/client/delete-action.d.ts +0 -23
- package/lib/types/client/ui/Tag.d.ts +0 -16
- /package/lib/types/client/{api-base.d.ts → core/api-base.d.ts} +0 -0
- /package/lib/types/client/{context.d.ts → core/context.d.ts} +0 -0
- /package/lib/types/client/{detail-ledger.d.ts → core/detail-ledger.d.ts} +0 -0
- /package/lib/types/client/{plugin.d.ts → core/plugin.d.ts} +0 -0
- /package/lib/types/client/{use-gated-refresh.d.ts → core/use-gated-refresh.d.ts} +0 -0
- /package/lib/types/client/{use-prefetch.d.ts → core/use-prefetch.d.ts} +0 -0
- /package/lib/types/client/{store.d.ts → core/value-store.d.ts} +0 -0
- /package/lib/types/client/{use-detail-frame.d.ts → detail/use-detail-frame.d.ts} +0 -0
- /package/lib/types/client/{session-live.d.ts → host/session-live.d.ts} +0 -0
- /package/lib/types/client/{drop-machine.d.ts → panel/drop-machine.d.ts} +0 -0
- /package/lib/types/client/{trash-nav.d.ts → panel/trash-nav.d.ts} +0 -0
- /package/lib/types/client/{use-column-resize.d.ts → panel/use-column-resize.d.ts} +0 -0
- /package/lib/types/client/{use-panel-list-read.d.ts → panel/use-panel-list-read.d.ts} +0 -0
- /package/lib/types/client/{use-panel-selection.d.ts → panel/use-panel-selection.d.ts} +0 -0
- /package/lib/types/client/{use-panel-width.d.ts → panel/use-panel-width.d.ts} +0 -0
- /package/lib/types/client/{search-text.d.ts → search/search-text.d.ts} +0 -0
- /package/lib/types/client/{settings-view.d.ts → settings/settings-view.d.ts} +0 -0
- /package/lib/types/client/{archive-store.d.ts → state/archive-store.d.ts} +0 -0
- /package/lib/types/client/{host-rows.d.ts → state/host-rows.d.ts} +0 -0
- /package/lib/types/client/{pending-open.d.ts → state/pending-open.d.ts} +0 -0
- /package/lib/types/client/{trash-store.d.ts → state/trash-store.d.ts} +0 -0
- /package/lib/types/client/{undo-notices.d.ts → state/undo-notices.d.ts} +0 -0
- /package/lib/types/client/{confirm-dialog.d.ts → widgets/confirm-dialog.d.ts} +0 -0
- /package/lib/types/client/{notice.d.ts → widgets/notice.d.ts} +0 -0
- /package/lib/types/client/{busy-gate.d.ts → write/busy-gate.d.ts} +0 -0
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* 整行点击守卫也挂在这棵常驻宿主上;浮条住 `shell.overlay`。
|
|
6
6
|
*/
|
|
7
7
|
import { type ReactElement } from 'react';
|
|
8
|
-
import { type Translate } from '
|
|
9
|
-
import type { OneShotDeps } from '
|
|
8
|
+
import { type Translate } from '../core/copy.js';
|
|
9
|
+
import type { OneShotDeps } from '../core/remote.js';
|
|
10
10
|
export declare function BatchBar({ deps, t, }: {
|
|
11
11
|
deps: OneShotDeps;
|
|
12
12
|
t?: Translate;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PickItem } from '
|
|
1
|
+
import { type PickItem } from '../state/batch-selection-store.js';
|
|
2
2
|
/** 全选:按登记序追加当前可见行;已在名单里的由 `addPicks` 跳过,原有选中保持在前。 */
|
|
3
3
|
export declare function selectAllVisible(): void;
|
|
4
4
|
/** Shift+点的范围勾选:以最近一次翻转的那条为锚,按屏幕可见行序勾上整段(锚点语义住选中集现场)。 */
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* 有状态点与归档行不渲染行首格,走行尾兜底(两条不会同时出现,靠 `ui.css` 的 `:has` 隐藏规则)。
|
|
7
7
|
*/
|
|
8
8
|
import { type ReactElement } from 'react';
|
|
9
|
-
import { type Translate } from '
|
|
10
|
-
import { type SessionDeleteRemote } from '
|
|
9
|
+
import { type Translate } from '../core/copy.js';
|
|
10
|
+
import { type SessionDeleteRemote } from '../core/remote.js';
|
|
11
11
|
/**
|
|
12
12
|
* 一组会话的子会话计数(`/apply` 的 `action:'count'`,纯读、不进串行链)。
|
|
13
13
|
* **一条读不到就整份返回 null**:界面上的合计缺一条就是假数(不许拿 0 冒充没有)。
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 批量模块的入口:多选态的呈现件(浮条 / 勾选控件 / 菜单行)与删除菜单行。选中集本身是场景现场
|
|
3
|
+
* (`state/batch-selection-store.ts`),这一层只管呈现与触发。
|
|
4
|
+
*
|
|
5
|
+
* 外部只 import 本文件;边界由 `tests/dependency-direction.test.ts` 钉住。
|
|
6
|
+
*/
|
|
7
|
+
export { BatchBar } from './batch-bar.js';
|
|
8
|
+
export { BatchSelectMenuItem } from './batch-menu-item.js';
|
|
9
|
+
export { BatchPickButton, BatchPickCheckbox } from './batch-select.js';
|
|
10
|
+
export { DeleteMenuItem } from './delete-menu-item.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* 缺席退回内置 zh(为什么不用 inject 见 `docs/architecture.md` §3)。面板行名传 thunk,语言切换时宿主重读。
|
|
4
4
|
* 渠道错误原文(`receipt.ts` 的 missing-id / 幂等空值、`remote.ts` 的取数通道错误)是协议诊断,固定中文,不入本字典。
|
|
5
5
|
*/
|
|
6
|
-
import { type RelativeTimeUnit } from '
|
|
6
|
+
import { type RelativeTimeUnit } from '../ui/format.js';
|
|
7
7
|
import type { ClientContextLike } from './context.js';
|
|
8
8
|
/** zh 是真源;`en` 必须逐键齐全(宿主的对象形式注册会整体校验)。 */
|
|
9
9
|
declare const ZH: {
|
|
@@ -339,7 +339,7 @@ export declare function createTranslate(ctx: ClientContextLike): Translate;
|
|
|
339
339
|
* 换语言就漏了。也必须是词的读数而不是 `t` 的身份:宿主 `t` 身份稳定,换语言后同一个 `t` 吐另一套词。
|
|
340
340
|
*
|
|
341
341
|
* **失效模式**:借的那句若两种语言译成同一字面,探针分不出换语言(memo 恒等、旧语言滞留);由
|
|
342
|
-
* `tests/client/markdown.test.tsx` 的换语言用例兜住,换借句或改那句译文时先看它红不红。
|
|
342
|
+
* `tests/client/detail/markdown.test.tsx` 的换语言用例兜住,换借句或改那句译文时先看它红不红。
|
|
343
343
|
*/
|
|
344
344
|
export declare function localeProbe(t: Translate): string;
|
|
345
345
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Translate } from './copy.js';
|
|
2
|
-
import { type ApplyAction, type ApplyOutcome, type ApplyValueByAction, type AttachmentCleanupWire, type RemoteFailure } from '
|
|
2
|
+
import { type ApplyAction, type ApplyOutcome, type ApplyValueByAction, type AttachmentCleanupWire, type RemoteFailure } from '../../shared/wire.js';
|
|
3
3
|
/**
|
|
4
4
|
* 一条 `/apply` 结果对一个请求 id 的含义(各写入面不许再各自推导):缺 id 是通道错误,`null` 是幂等成功,
|
|
5
5
|
* orphan-clean 的 `not-found` 是中性提示,**N=1 的 `null` 是协议错**;`applyOne` 与 `runWrite` 只消费同一份 verdict。
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ApplyAction, type ApplyOutcome, type ApplyValueByAction, type ArchiveDetailWire, type ArchiveListWire, type AttachmentCleanupWire, type AttachmentOrphanReportWire, type OrphanReportWire, type ProjectionCacheCleanupWire, type ProjectionCacheOrphanReportWire, type PurgeStatsWire, type RemoteFailure, type SearchPageWire, type SearchPreviewWire, type SearchScopeWire, type SessionDeleteConfigWire, type TrashDetailWire, type TrashRowWire, type WriteProgressWire } from '
|
|
1
|
+
import { type ApplyAction, type ApplyOutcome, type ApplyValueByAction, type ArchiveDetailWire, type ArchiveListWire, type AttachmentCleanupWire, type AttachmentOrphanReportWire, type OrphanReportWire, type ProjectionCacheCleanupWire, type ProjectionCacheOrphanReportWire, type PurgeStatsWire, type RemoteFailure, type SearchPageWire, type SearchPreviewWire, type SearchScopeWire, type SessionDeleteConfigWire, type TrashDetailWire, type TrashRowWire, type WriteProgressWire } from '../../shared/wire.js';
|
|
2
2
|
/** 下面这些只读面都是 `shared/wire.ts` 的别名:形状的家只在那边(ADR-0003)。 */
|
|
3
3
|
export type TrashEntryLike = TrashRowWire;
|
|
4
4
|
export type PurgeResultLike = PurgeStatsWire;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 详情正文的**块渲染**:用户 / 助手 / 折叠块(思考、工具、注入、系统、压缩摘要)怎么画,
|
|
3
|
+
* 以及「工作步骤」四档展开语义(`docs/ui-spec.md` §2 ⑥)。块视图词汇(哪些块算过程内容、
|
|
4
|
+
* 连续过程块怎么收组)住 `detail-blocks.ts`,这里只消费。
|
|
5
|
+
*/
|
|
6
|
+
import type { ReactNode } from 'react';
|
|
7
|
+
import { type CopyKey, type Translate } from '../core/copy.js';
|
|
8
|
+
import { type TrashDetailBlockWire } from '../../shared/wire.js';
|
|
9
|
+
/** 工作步骤展示档位(学宿主那四档;回收站轮次都已结束,所以只落成「过程块显示多少」);判据住 `docs/ui-spec.md` §2 ⑥。 */
|
|
10
|
+
export type ViewMode = 'compact' | 'standard' | 'detailed' | 'verbose';
|
|
11
|
+
export declare const VIEW_MODES: readonly {
|
|
12
|
+
readonly key: ViewMode;
|
|
13
|
+
readonly label: CopyKey;
|
|
14
|
+
}[];
|
|
15
|
+
interface BlockRenderContext {
|
|
16
|
+
open: ReadonlySet<string>;
|
|
17
|
+
toggle: (id: string) => void;
|
|
18
|
+
probe: string;
|
|
19
|
+
t: Translate;
|
|
20
|
+
}
|
|
21
|
+
export declare function renderBlock(block: TrashDetailBlockWire, context: BlockRenderContext): ReactNode;
|
|
22
|
+
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* 详情正文的**块视图词汇**:哪些块算过程内容、标准档怎么把连续过程块收成一组。
|
|
3
3
|
* 折叠状态与分页不在这里。
|
|
4
4
|
*/
|
|
5
|
-
import type { TrashDetailBlockWire, TrashDetailInjectionBlockWire, TrashDetailTextBlockWire, TrashDetailToolBlockWire } from '
|
|
5
|
+
import type { TrashDetailBlockWire, TrashDetailInjectionBlockWire, TrashDetailTextBlockWire, TrashDetailToolBlockWire } from '../../shared/wire.js';
|
|
6
6
|
/** 除用户与助手之外的块(思考、工具、注入、系统消息、压缩摘要)。`Exclude` 摘不掉文本块 `kind` 联合里的两个成员,
|
|
7
7
|
* 所以按 `kind` 收窄后并上另两种块。 */
|
|
8
8
|
export type DisclosureBlockWire = (TrashDetailTextBlockWire & {
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 详情壳的**版面常量**:外壳、标题行、信息表、计量行、正文块与折叠头、工具行与错误字色。
|
|
3
|
+
*
|
|
4
|
+
* 为什么单拎一个文件:这些是纯数据(`CSSProperties` 字面量),改版式要一次改一片、而改逻辑的人不该在
|
|
5
|
+
* 250 行样式里翻正文代码。消费方只有详情壳、块渲染与子会话段三处。
|
|
6
|
+
*/
|
|
7
|
+
import type { CSSProperties } from 'react';
|
|
8
|
+
export declare const JUMP_MISSING: CSSProperties;
|
|
9
|
+
export declare const SHELL: CSSProperties;
|
|
10
|
+
/** 返回键排在标题之后;标题排按紧凑按钮预留高度(父子切换不跳 6px)。`position: sticky`:长会话中段返回键仍在(触屏没有 Esc)。 */
|
|
11
|
+
export declare const HEAD_MIN_HEIGHT = 28;
|
|
12
|
+
export declare const HEAD_PAD_BOTTOM = 6;
|
|
13
|
+
export declare const HEAD: CSSProperties;
|
|
14
|
+
export declare const TITLE_LINE: CSSProperties;
|
|
15
|
+
export declare const BACK: CSSProperties;
|
|
16
|
+
/** 保持超过 300ms 才出「正在读…」:本地读数通常在这之前落地;与宿主慢扫描提示同档。 */
|
|
17
|
+
export declare const HOLD_NOTICE_DELAY_MS = 300;
|
|
18
|
+
export declare const HOLD_NOTICE: CSSProperties;
|
|
19
|
+
/** 会话信息表:行序按「认出 → 时间定位 → 精确核对 → 调试属性」排(`docs/ui-spec.md` §2 ⑥);长串省略、全称走 `title`。 */
|
|
20
|
+
export declare const META: CSSProperties;
|
|
21
|
+
export declare const META_LABEL: CSSProperties;
|
|
22
|
+
export declare const META_VALUE: CSSProperties;
|
|
23
|
+
export declare const META_CODE: CSSProperties;
|
|
24
|
+
/** 计量行:可横着扫的数字,与表分开;不插中点分隔符——那是各语言自己的标点。 */
|
|
25
|
+
export declare const METRICS: CSSProperties;
|
|
26
|
+
export declare const METRIC: CSSProperties;
|
|
27
|
+
export declare const METRIC_LABEL: CSSProperties;
|
|
28
|
+
export declare const METRIC_VALUE: CSSProperties;
|
|
29
|
+
/** 行距取宿主 `--dsh-chat-flow-gap` 的换轮档 12px(我们相邻两条必然换轮)。 */
|
|
30
|
+
export declare const THREAD: CSSProperties;
|
|
31
|
+
/**
|
|
32
|
+
* 消息行照宿主 `MessageItem` / `AssistantMarkdown` 抄(来源 `app.asar` 里 `@deepseek-ai/dsh-client-ui-chat/lib/client.js`
|
|
33
|
+
* 内联的 `MessageItem.module.css` 与 `AssistantMarkdown.module.css`,逐字声明):只有用户有气泡,助手正文铺满栏(给助手画卡片会走形);
|
|
34
|
+
* 字号走 `--dsh-content-font-size`,宿主调内容字号时这里一起动。
|
|
35
|
+
*/
|
|
36
|
+
/** 提问轨跳过来的落位让位(`JUMP_SCROLL_MARGIN_PX`):目标行停在 sticky 标题排之下而不是被它盖住。 */
|
|
37
|
+
export declare const USER_ROW: CSSProperties;
|
|
38
|
+
export declare const ASSISTANT_ROW: CSSProperties;
|
|
39
|
+
/** 宿主是 `.userRow > .userStack > .bubble` 三层,宽度上限在中间层;这里一行一气泡,直接挂在气泡上(少一层)。 */
|
|
40
|
+
export declare const BUBBLE: CSSProperties;
|
|
41
|
+
/** 宿主的次级行字阶(`.referenceSummary` / `.retryRow` 那一族):角色与时间就归它,不再自造 11px。 */
|
|
42
|
+
export declare const META_LINE: CSSProperties;
|
|
43
|
+
/** 读失败与写失败共用的那块(`role="status"`;播报口径与其未验证的边界见 docs/ui-spec.md)。 */
|
|
44
|
+
export declare const STATUS_BLOCK: CSSProperties;
|
|
45
|
+
export declare const BLOCK: CSSProperties;
|
|
46
|
+
/** 折叠头:与清单组头共用 `sd-disclosure-row` 的布局/悬停/无障碍;这里把 button 的 UA 样式压掉。 */
|
|
47
|
+
export declare const BLOCK_ROW: CSSProperties;
|
|
48
|
+
/** 标签不参与收缩:摘要是 `1 1 auto`,标签若也可缩,长结果会把「工具调用 / 来源」挤成几个字。
|
|
49
|
+
* 颜色不跟 `.sd-disclosure-row` 继承:标签提 secondary、摘要留 tertiary,否则同色糊成一句。 */
|
|
50
|
+
export declare const BLOCK_TITLE: CSSProperties;
|
|
51
|
+
export declare const BLOCK_SUMMARY: CSSProperties;
|
|
52
|
+
export declare const BLOCK_META: CSSProperties;
|
|
53
|
+
export declare const BLOCK_BODY: CSSProperties;
|
|
54
|
+
export declare const PLAIN_BODY: CSSProperties;
|
|
55
|
+
/** 工具参数/结果:等宽、保留换行、限高自滚——一段工具输出可能比整页还长。 */
|
|
56
|
+
export declare const CODE_BLOCK: CSSProperties;
|
|
57
|
+
export declare const SECTION_LABEL: CSSProperties;
|
|
58
|
+
/** 标准档「工作步骤」展开后的过程块容器:再缩进一档,与折叠头的前导对齐。 */
|
|
59
|
+
export declare const PROCESS_BODY: CSSProperties;
|
|
60
|
+
export declare const TOOLBAR: CSSProperties;
|
|
61
|
+
export declare const TRUNCATED: CSSProperties;
|
|
62
|
+
export declare const ERROR_TEXT: CSSProperties;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 详情正文的**文字与时间读法**(纯函数,无 React):时间戳降级、活跃跨度、块摘要、注入来源标签、
|
|
3
|
+
* 工具状态词。判据住在这一层:给同样的日志形状,正文到处是同一句人话。
|
|
4
|
+
*/
|
|
5
|
+
import { type Translate } from '../core/copy.js';
|
|
6
|
+
/** 日志里那两个时间戳缺省时的降级(`src/trash/detail.ts` 把初值写成 0,读不到就是 0)。 */
|
|
7
|
+
export declare function timeText(ms: number): string;
|
|
8
|
+
/** 活跃跨度:不足一天给小时、超过给天;两端任一缺省就不答(不把「不知道」报成任何量级)。 */
|
|
9
|
+
export declare function spanText(from: number, to: number, t: Translate): string | undefined;
|
|
10
|
+
export declare function firstLine(text: string): string;
|
|
11
|
+
/** Markdown 块的摘要去掉粗体星号(与宿主 ReasoningRow 同一手法);纯文本块照原样。 */
|
|
12
|
+
export declare function markdownSummary(text: string): string;
|
|
13
|
+
/** 来源标签 + 悬停原串:认不出的 kind 收进「其他上下文」,原串留在 title。 */
|
|
14
|
+
export declare function injectionLabel(kind: string, t: Translate): {
|
|
15
|
+
text: string;
|
|
16
|
+
title: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function toolStatus(status: 'ok' | 'error' | 'unfinished', t: Translate): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 详情模块的入口:会话详情壳(块投影 / 工具配对 / 跳转)、右缘提问轨、读路与分页、子会话段,
|
|
3
|
+
* 以及两档各自的详情读 hook(`useTrashDetailReader` / `useArchiveDetailReader`)。
|
|
4
|
+
*
|
|
5
|
+
* 外部只 import 本文件;`detail-blocks` 的切块、`markdown` 的渲染、分页这些是这一层的实现细节
|
|
6
|
+
* (ADR-0047 / ADR-0054 / ADR-0061)。**详情账本不在这一层**:`src/client/core/detail-ledger.ts` 与首帧快照
|
|
7
|
+
* 同属跨槽位协议,两档读路都经它记账。边界由 `tests/dependency-direction.test.ts` 钉住。
|
|
8
|
+
*/
|
|
9
|
+
export { PromptRail, RAIL_WIDTH } from './prompt-rail.js';
|
|
10
|
+
export { SessionDetail, type DetailInfoRow, type DetailJump, type DetailNav } from './session-detail.js';
|
|
11
|
+
export { timeText } from './detail-text.js';
|
|
12
|
+
export { rowName, useSubagentSection } from './subagent-section.js';
|
|
13
|
+
export { childSubjectOf, useArchiveDetailReader, type ArchiveDetailSubject, } from './use-archive-detail-reader.js';
|
|
14
|
+
export { useDetailFrame, type DetailFrame } from './use-detail-frame.js';
|
|
15
|
+
export { NO_DETAIL_RAIL, type DetailRail, type RailDetailLike } from './use-detail-rail.js';
|
|
16
|
+
export { type DetailState } from './use-detail-reader.js';
|
|
17
|
+
export { useTrashDetailReader } from './use-trash-detail-reader.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Translate } from '
|
|
2
|
-
import '
|
|
1
|
+
import type { Translate } from '../core/copy.js';
|
|
2
|
+
import '../ui/styles.js';
|
|
3
3
|
/**
|
|
4
4
|
* `memo` 是必需的而不是优化:`react-markdown@10.1.0` 里**一处 memoization 都没有**,面板任何一次重渲
|
|
5
5
|
* (悬停、↑↓、「刚刚移入回收站」那句要读 `Date.now()`)都会走到这里 ⇒ 不按住就是每条助手回复每拍重解析一遍。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type Translate } from '
|
|
1
|
+
import { type Translate } from '../core/copy.js';
|
|
2
2
|
import type { PromptRailNotice } from './use-prompt-rail.js';
|
|
3
|
-
import type { TrashDetailPromptWire } from '
|
|
3
|
+
import type { TrashDetailPromptWire } from '../../shared/wire.js';
|
|
4
4
|
/** 轨宽(px):刻度与焦点环都按它排;面板的右槽宽度从它派生(`RAIL_GUTTER`)。 */
|
|
5
5
|
export declare const RAIL_WIDTH = 30;
|
|
6
6
|
export interface PromptRailProps {
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*
|
|
7
7
|
* 两档同守:动作留在清单行;正文是块(用户/助手常显,其余默认折叠;注入也铺进正文——对宿主 Chat 的有意偏离,删之前看全);助手/思考走 Markdown,提问保持原话。
|
|
8
8
|
*/
|
|
9
|
-
import { type
|
|
10
|
-
import { type Translate } from '
|
|
11
|
-
import type { SessionDetailWire } from '../shared/wire.js';
|
|
9
|
+
import { type ReactNode } from 'react';
|
|
10
|
+
import { type Translate } from '../core/copy.js';
|
|
12
11
|
import { type DetailFrameView } from './use-detail-frame.js';
|
|
12
|
+
import { type SessionDetailWire } from '../../shared/wire.js';
|
|
13
13
|
/** 详情的导航面(孩子视图的开与回):类型定义在这里(控制器 `import type` 避免环);孩子一律按 id 交接(ADR-0055)。 */
|
|
14
14
|
export interface DetailNav {
|
|
15
15
|
/** 只在主体是清单选中那条时交出(ADR-0055 沿用的单级判据,唯一实现)。 */
|
|
@@ -68,13 +68,4 @@ export interface SessionDetailProps<S, D extends SessionDetailWire> {
|
|
|
68
68
|
notice?: string | null;
|
|
69
69
|
t: Translate;
|
|
70
70
|
}
|
|
71
|
-
/** 返回键排在标题之后;标题排按紧凑按钮预留高度(父子切换不跳 6px)。`position: sticky`:长会话中段返回键仍在(触屏没有 Esc)。 */
|
|
72
|
-
export declare const HEAD_MIN_HEIGHT = 28;
|
|
73
|
-
export declare const HEAD_PAD_BOTTOM = 6;
|
|
74
|
-
export declare const BLOCK_META: CSSProperties;
|
|
75
|
-
export declare const SECTION_LABEL: CSSProperties;
|
|
76
|
-
/** 日志里那两个时间戳缺省时的降级(`src/trash/detail.ts` 把初值写成 0,读不到就是 0)。 */
|
|
77
|
-
export declare function timeText(ms: number): string;
|
|
78
|
-
/** 空串不是名字:wire 用缺席表示没读到,清册字段仍可能是空串;行名与标题排共用这一条。 */
|
|
79
|
-
export declare function present(value: string | undefined): value is string;
|
|
80
71
|
export declare function SessionDetail<S, D extends SessionDetailWire>({ frame, subjectId, head, infoRows, subagents, busy, wide, onRetry, onBack, detailNav, jump, onJumpDone, notice, t, }: SessionDetailProps<S, D>): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Translate } from '
|
|
2
|
-
import {
|
|
1
|
+
import { type Translate } from '../core/copy.js';
|
|
2
|
+
import type { SubagentSectionProps } from './session-detail.js';
|
|
3
3
|
/** 子会话行与摘要条共用的显示名:次序走 `preferredNameOf`(ADR-0058),空串走未命名兜底。 */
|
|
4
4
|
export declare function rowName(row: {
|
|
5
5
|
readonly label?: string;
|
package/lib/types/client/{use-archive-detail-reader.d.ts → detail/use-archive-detail-reader.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ArchiveSubagentWire } from '
|
|
2
|
-
import type { ArchiveDetailLike, SessionDeleteRemote } from '
|
|
1
|
+
import type { ArchiveSubagentWire } from '../../shared/wire.js';
|
|
2
|
+
import type { ArchiveDetailLike, SessionDeleteRemote } from '../core/remote.js';
|
|
3
3
|
import { type DetailReader } from './use-detail-reader.js';
|
|
4
4
|
/** 归档详情主体:清单里的已归档行,或父详情子会话段里那条孩子(后者可缺时间读数)。 */
|
|
5
5
|
export interface ArchiveDetailSubject {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 「滚到顶就补一页」会让新页一页页顶在读者头上(ADR-0057)。
|
|
5
5
|
*/
|
|
6
6
|
import { type RefObject } from 'react';
|
|
7
|
-
import type { TrashDetailBlockWire } from '
|
|
7
|
+
import type { TrashDetailBlockWire } from '../../shared/wire.js';
|
|
8
8
|
/** 简洁档一次补页最多自动连翻多少页:服务端按块翻页,一页可能全是藏起来的过程块 ⇒ 点一下什么都不
|
|
9
9
|
* 出现。自动往前翻直到出现对话块、翻完或到上限——上限防"几乎全是工具调用的巨型会话"把一次点击
|
|
10
10
|
* 变成几十个串行请求。 */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* (窄档下钻后 ref 才补上,只靠 ref 会漏挂滚动监听,ADR-0057)。
|
|
6
6
|
*/
|
|
7
7
|
import { type RefObject } from 'react';
|
|
8
|
-
import type { TrashDetailBlockWire, TrashDetailPromptWire } from '
|
|
8
|
+
import type { TrashDetailBlockWire, TrashDetailPromptWire } from '../../shared/wire.js';
|
|
9
9
|
import type { DetailState } from './use-detail-reader.js';
|
|
10
10
|
import { type PromptRailHandle } from './use-prompt-rail.js';
|
|
11
11
|
/** 轨要的三格:`SessionDetailWire` 与它的两档投影都够(两半的详情线上都带这三样)。 */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TrashDetailBlockWire } from '
|
|
2
|
-
import type { DetailLedger } from '
|
|
3
|
-
import type { RemoteOutcome } from '
|
|
1
|
+
import type { TrashDetailBlockWire } from '../../shared/wire.js';
|
|
2
|
+
import type { DetailLedger } from '../core/detail-ledger.js';
|
|
3
|
+
import type { RemoteOutcome } from '../core/remote.js';
|
|
4
4
|
/** 详情值的最小面:分页合并只认这两格。 */
|
|
5
5
|
export interface DetailBody {
|
|
6
6
|
readonly blocks: readonly TrashDetailBlockWire[];
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* **当前那句只在已加载的块里找**;**换主体就收手**(跳转账的基线属于起跳那条,`prompts` 身份一变作废)。
|
|
6
6
|
*/
|
|
7
7
|
import { type RefObject } from 'react';
|
|
8
|
-
import type { TrashDetailBlockWire, TrashDetailPromptWire } from '
|
|
8
|
+
import type { TrashDetailBlockWire, TrashDetailPromptWire } from '../../shared/wire.js';
|
|
9
9
|
/** 一次跳转最多连续补多少页(每页 30 块):防「点最老那句」把一次点击变成几十个串行请求。 */
|
|
10
10
|
export declare const JUMP_PAGE_LIMIT = 20;
|
|
11
11
|
/** 跳转落位时目标行离视口顶的距离(px):给 sticky 标题排让位;详情用户行以行内 `scrollMarginTop` 消费它。 */
|
package/lib/types/client/{use-trash-detail-reader.d.ts → detail/use-trash-detail-reader.d.ts}
RENAMED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* 回收站的详情读路:通用机制(`use-detail-reader.ts`)的薄实例——账本 = `trash-snapshot.ts` 的跨挂载账本
|
|
3
3
|
* (键 = 条目 id),fetch = `deps.detail`;机制只住通用层一份。
|
|
4
4
|
*/
|
|
5
|
-
import type { TrashEntryWire } from '
|
|
6
|
-
import type { SessionDeleteRemote, TrashDetailLike } from '
|
|
5
|
+
import type { TrashEntryWire } from '../../shared/wire.js';
|
|
6
|
+
import type { SessionDeleteRemote, TrashDetailLike } from '../core/remote.js';
|
|
7
7
|
import { type DetailReader } from './use-detail-reader.js';
|
|
8
8
|
type DetailDeps = Pick<SessionDeleteRemote, 'detail'>;
|
|
9
9
|
export interface TrashDetailReaderInput {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ClientContextLike } from '
|
|
2
|
-
import type { Translate } from '
|
|
1
|
+
import type { ClientContextLike } from '../core/context.js';
|
|
2
|
+
import type { Translate } from '../core/copy.js';
|
|
3
3
|
import { type SessionsStateLike } from './session-live.js';
|
|
4
4
|
/** legacy 菜单槽:只在 contextMenus 不可用时注册(0.2.2+ 的内置动作已迁到数据动作)。 */
|
|
5
5
|
export declare const SESSION_MENU_SLOT = "sidebar.workspaces.session.menu.item";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 槽位贡献的**包装件**:把通用错误边界(`ui/ErrorBoundary.tsx`)与场景实例(`scene.ts`)装进同一个
|
|
3
|
+
* 组件——注册表里登记的组件就是这一层。
|
|
4
|
+
*
|
|
5
|
+
* **为什么这一层不在 `ui/`**:边界是能独立用的通用控件,场景是应用知识。`ui/` 作为库不碰应用知识
|
|
6
|
+
* (层序门对「指向 `scene.ts` 的边」豁免,所以这是形态选择、不是机器判据);把「场景随贡献进子树」
|
|
7
|
+
* 放在这里,两边都不越界。
|
|
8
|
+
* 宿主各槽位是互不相邻的 React 树,跨槽位共享靠同一实例(不是树),所以 Provider 只能挂在条目边界上。
|
|
9
|
+
*/
|
|
10
|
+
import type { ComponentType } from 'react';
|
|
11
|
+
import { type ClientScene } from '../scene.js';
|
|
12
|
+
/**
|
|
13
|
+
* 把一条槽位贡献包进边界:`displayName` 带上来源,测试与宿主调试面板都能一眼看出这是被隔离过的那颗。
|
|
14
|
+
* 生产传场景实例;测试/旧调用点省略 ⇒ 组件里的 `useClientScene()` 回退默认场景。
|
|
15
|
+
*/
|
|
16
|
+
export declare function withErrorBoundary<P extends object>(Wrapped: ComponentType<P>, fallback: string, scene?: ClientScene): ComponentType<P>;
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* 可选服务走 `ctx.get`、不进条目 `inject`;服务可能迟到 ⇒ `ctx.inject(['workspaces'], child => …)`
|
|
5
5
|
* 的 scoped 等待;缺席 / 形状不符 / 读面抛错一律安静降级。只在归档集数组内容变化时戳,无关变更不重读。
|
|
6
6
|
*/
|
|
7
|
-
import type { ClientContextLike } from '
|
|
7
|
+
import type { ClientContextLike } from '../core/context.js';
|
|
8
8
|
/** 安装观察,返回 disposer;服务缺席/形状不符安静降级,迟到那支走 scoped 等待(见文件头注)。 */
|
|
9
9
|
export declare function installArchiveHostWatch(client: ClientContextLike): () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 宿主接线模块的入口:槽位条目的包装件(错误边界 + 场景实例,`guard.tsx`)、会话菜单两行的注册
|
|
3
|
+
* (ADR-0059)、宿主归档旁路观察、会话活体窄面。
|
|
4
|
+
*
|
|
5
|
+
* 外部只 import 本文件(注册处只在 `src/client/index.tsx` 调一次);宿主服务的取法与命名空间
|
|
6
|
+
* 是这一层的实现细节。边界由 `tests/dependency-direction.test.ts` 钉住。
|
|
7
|
+
*/
|
|
8
|
+
export { withErrorBoundary } from './guard.js';
|
|
9
|
+
export { installSessionMenus } from './context-menu-actions.js';
|
|
10
|
+
export { installArchiveHostWatch } from './host-archive-watch.js';
|
|
11
|
+
export { NEVER_SESSIONS, useSessionLive, type UseSessions } from './session-live.js';
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
* 归档详情投影:信息表恰五行(项目 / 日志末条 / 会话 id / 大小 / 状态),无「回收站目录」「原本归档」;
|
|
3
3
|
* 状态行认主体自己的归档态(wire 的 `archived`),不认导航道或旧快照。
|
|
4
4
|
*/
|
|
5
|
-
import type { Translate } from '
|
|
6
|
-
import type { ArchiveDetailLike } from '
|
|
7
|
-
import type
|
|
8
|
-
import { type DetailJump, type DetailNav } from './session-detail.js';
|
|
9
|
-
import type { DetailFrame } from './use-detail-frame.js';
|
|
5
|
+
import type { Translate } from '../core/copy.js';
|
|
6
|
+
import type { ArchiveDetailLike } from '../core/remote.js';
|
|
7
|
+
import { type ArchiveDetailSubject, type DetailJump, type DetailNav, type DetailFrame } from '../detail/index.js';
|
|
10
8
|
export interface ArchiveDetailProps {
|
|
11
9
|
frame: DetailFrame<ArchiveDetailSubject, ArchiveDetailLike>;
|
|
12
10
|
busy: boolean;
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
* 归档档的三个纯视图件(清单列 / 工具行 / 页脚)与 adapter:状态面来自 `useArchiveQuery`,
|
|
3
3
|
* 装配线住 `use-panel-tab.ts`、四格版面住 `panel-tab.tsx`;这里只回答归档档与回收站不同的那几格。
|
|
4
4
|
*/
|
|
5
|
-
import { type
|
|
6
|
-
import { type Translate } from '
|
|
7
|
-
import type { ArchiveRowWire } from '
|
|
8
|
-
import { type ProjectGroup } from '
|
|
5
|
+
import { type RefObject } from 'react';
|
|
6
|
+
import { type Translate } from '../core/copy.js';
|
|
7
|
+
import type { ArchiveRowWire } from '../../shared/wire.js';
|
|
8
|
+
import { type ProjectGroup } from '../widgets/trash-view.js';
|
|
9
9
|
import { type ListDom } from './session-list.js';
|
|
10
|
-
import type { ArchiveDetailLike } from '
|
|
11
|
-
import type
|
|
10
|
+
import type { ArchiveDetailLike } from '../core/remote.js';
|
|
11
|
+
import { type ArchiveDetailSubject } from '../detail/index.js';
|
|
12
12
|
import type { ArchiveQuery } from './use-archive-query.js';
|
|
13
13
|
import type { ListSelection } from './use-list-selection.js';
|
|
14
14
|
import { type ArchivePanelController } from './use-archive-panel-controller.js';
|
|
15
15
|
import type { TrashNav } from './trash-nav.js';
|
|
16
|
-
import type { DelayedPrefetch } from '
|
|
16
|
+
import type { DelayedPrefetch } from '../core/use-prefetch.js';
|
|
17
17
|
import { type PanelTabFrameLayout } from './panel-tab.js';
|
|
18
18
|
import { type PanelTab, type PanelTabAdapter, type PanelTabContext } from './use-panel-tab.js';
|
|
19
|
-
import { type SearchInputRef } from '
|
|
19
|
+
import { type SearchInputRef } from '../search/index.js';
|
|
20
20
|
import type { PanelTabDeps } from './use-panel-tab.js';
|
|
21
21
|
/** 这一档进 DOM 的身份:行身份是会话 id(回收站那边是条目 id)。 */
|
|
22
22
|
export declare const ARCHIVE_LIST_DOM: ListDom;
|
|
@@ -28,7 +28,7 @@ export interface ArchiveListProps {
|
|
|
28
28
|
groups: readonly ProjectGroup<ArchiveRowWire>[];
|
|
29
29
|
controller: Pick<ArchivePanelController, 'selectRow' | 'unarchive' | 'deleteOne' | 'actionFailure' | 'busy'>;
|
|
30
30
|
prefetch: DelayedPrefetch<ArchiveRowWire>;
|
|
31
|
-
listRef: RefObject<HTMLDivElement>;
|
|
31
|
+
listRef: RefObject<HTMLDivElement | null>;
|
|
32
32
|
/** 键盘契约(导航状态住档的装配线,窄档下钻时清单卸载也不丢 Esc 与焦点交还)。 */
|
|
33
33
|
nav: TrashNav;
|
|
34
34
|
/** 当前活动行(选中优先,回落光标):只在非多选态参与 `aria-selected`。 */
|
|
@@ -73,7 +73,7 @@ export interface ArchiveTabViewProps {
|
|
|
73
73
|
readonly onSearchQuery: (next: string) => void;
|
|
74
74
|
readonly searchInputRef: SearchInputRef;
|
|
75
75
|
/** 面板壳持有的还原点:切档往返时视图会卸载,本地 ref 活不过去。 */
|
|
76
|
-
readonly searchRestoreRef:
|
|
76
|
+
readonly searchRestoreRef: RefObject<ArchiveSearchView | null>;
|
|
77
77
|
readonly t: Translate;
|
|
78
78
|
}
|
|
79
79
|
/** 归档档的四格视图:清单列 / 工具行 / 页脚三件住本文件,详情 `ArchiveDetail` 原样转交;
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
* 就是第二份事实,迟早漂开(`tests/layout-css.test.ts` 钉住这条)。
|
|
5
5
|
*/
|
|
6
6
|
import type { CSSProperties, ReactNode, RefObject } from 'react';
|
|
7
|
-
import type { Translate } from '
|
|
7
|
+
import type { Translate } from '../core/copy.js';
|
|
8
|
+
import { type DetailRail } from '../detail/index.js';
|
|
8
9
|
import type { ListDom } from './session-list.js';
|
|
9
|
-
import type { DetailRail } from './use-detail-rail.js';
|
|
10
10
|
/** 详情正文的收口宽度:中央列再宽也不把文字拉成长线。 */
|
|
11
11
|
export declare const DETAIL_TEXT_MAX_WIDTH = 860;
|
|
12
12
|
export interface DetailPaneProps {
|
|
13
13
|
/** 这一档的 DOM 身份:详情容器标成 `<kind>-detail`。 */
|
|
14
14
|
kind: ListDom['kind'];
|
|
15
15
|
/** 详情栏的滚动容器:分页 prepend 后按高度差补偿滚动位置,提问轨也按它算当前那句。 */
|
|
16
|
-
scrollRef: RefObject<HTMLDivElement>;
|
|
16
|
+
scrollRef: RefObject<HTMLDivElement | null>;
|
|
17
17
|
/** 这一档的提问轨接线(`useDetailRail`):没有轨那一拍只画正文。 */
|
|
18
18
|
rail: DetailRail;
|
|
19
19
|
children: ReactNode;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 面板模块的入口:左侧栏那一格(`sidebar.panellist`)的行与面板本体。面板骨架、两档装配线、
|
|
3
|
+
* 清单 DOM 与键盘契约、选择面、两组控制器、详情适配器、拖放与拖入回收站都在这一层的内部实现里
|
|
4
|
+
* (ADR-0060 / ADR-0065 / ADR-0071)。
|
|
5
|
+
*
|
|
6
|
+
* 外部只 import 本文件——注册处只取行组件与面板组件两颗。边界由 `tests/dependency-direction.test.ts` 钉住。
|
|
7
|
+
*/
|
|
8
|
+
export { TrashPanelIcon } from './trash-entry.js';
|
|
9
|
+
export { TrashPanel } from './trash-panel.js';
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* ({@link toolbarVisible}),视图交 `null`,本组件连容器一起不渲染。返回 **fragment**(不新增 DOM 容器)。
|
|
6
6
|
*/
|
|
7
7
|
import type { ReactNode, RefObject } from 'react';
|
|
8
|
-
import type { Translate } from '
|
|
8
|
+
import type { Translate } from '../core/copy.js';
|
|
9
9
|
import type { ListDom } from './session-list.js';
|
|
10
10
|
import type { ColumnResizeHandleProps } from './use-column-resize.js';
|
|
11
|
-
import type { DetailRail } from '
|
|
11
|
+
import type { DetailRail } from '../detail/index.js';
|
|
12
12
|
/** 工具行出场判据的三个事实:清单这一帧有没有行、是否在多选态、有没有检索词。 */
|
|
13
13
|
export interface ToolbarVisibility {
|
|
14
14
|
/** 清单这一帧有行(`ready` 且非空)——空表 / 读失败 / 语料不可见 / 首读在飞都没有可操作的东西。 */
|
|
@@ -30,7 +30,7 @@ export declare function toolbarVisible({ hasRows, selectMode, searchQuery }: Too
|
|
|
30
30
|
/** 详情格的槽位:外壳由帧统一画,调用方只交外壳要的四格(档位、滚动容器、轨接线、正文)。 */
|
|
31
31
|
export interface PanelTabDetail {
|
|
32
32
|
readonly kind: ListDom['kind'];
|
|
33
|
-
readonly scrollRef: RefObject<HTMLDivElement>;
|
|
33
|
+
readonly scrollRef: RefObject<HTMLDivElement | null>;
|
|
34
34
|
readonly rail: DetailRail;
|
|
35
35
|
readonly children: ReactNode;
|
|
36
36
|
}
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* 底色(详情正画这一条)与 `aria-selected`(勾选集)是两套判据,互不冒充;行 id 在这侧编码,原始身份留 `dom.idAttr`。
|
|
6
6
|
*/
|
|
7
7
|
import { type ReactNode, type RefObject } from 'react';
|
|
8
|
-
import { type ProjectGroup } from '
|
|
8
|
+
import { type ProjectGroup } from '../widgets/trash-view.js';
|
|
9
9
|
import type { ListSelection } from './use-list-selection.js';
|
|
10
10
|
import type { TrashNav } from './trash-nav.js';
|
|
11
|
-
import type { DelayedPrefetch } from '
|
|
12
|
-
import type { Translate } from '
|
|
11
|
+
import type { DelayedPrefetch } from '../core/use-prefetch.js';
|
|
12
|
+
import type { Translate } from '../core/copy.js';
|
|
13
13
|
/** 一档清单进 DOM 的身份:档位名与行身份属性成对出现(`useRowFocus` 也读它)。 */
|
|
14
14
|
export interface ListDom {
|
|
15
15
|
/** 档位名前缀:拼容器/行/组头的 `data-dsh-session-delete` 与 DOM id(`sd-trash-` / `sd-archive-`)。 */
|
|
@@ -35,7 +35,7 @@ export interface SessionRowView {
|
|
|
35
35
|
readonly onSelect: () => void;
|
|
36
36
|
}
|
|
37
37
|
export interface SessionListProps<R> {
|
|
38
|
-
listRef: RefObject<HTMLDivElement>;
|
|
38
|
+
listRef: RefObject<HTMLDivElement | null>;
|
|
39
39
|
dom: ListDom;
|
|
40
40
|
gridLabel: string;
|
|
41
41
|
/** 重读在飞 ⇒ 容器 `aria-busy`(不是第四态,ADR-0048)。 */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { type Translate } from '
|
|
2
|
-
import type {
|
|
3
|
-
import type { OneShotDeps, TrashEntryLike } from './remote.js';
|
|
1
|
+
import { type Translate } from '../core/copy.js';
|
|
2
|
+
import type { OneShotDeps, TrashEntryLike } from '../core/remote.js';
|
|
4
3
|
import type { PendingAction } from './use-trash-panel-controller.js';
|
|
5
4
|
/** 两种批量动作共用确认框壳:批量恢复把条目列成卡片(去向是每条各自的旧项目目录);批量彻底删除
|
|
6
5
|
* 只给条数——"不可恢复"那句警告才是要读的。 */
|
|
@@ -14,12 +13,3 @@ export declare function TrashConfirm({ deps, pending, restoreEntries, busy, t, o
|
|
|
14
13
|
onConfirmPurge: () => void;
|
|
15
14
|
onConfirmRestore: (ids: readonly string[]) => void;
|
|
16
15
|
}): import("react").JSX.Element;
|
|
17
|
-
/** 无主子会话的清理确认框。载荷是刚扫出来的那份报告,界面不重算。 */
|
|
18
|
-
export declare function OrphanConfirm({ deps, report, busy, t, onCancel, onConfirm, }: {
|
|
19
|
-
deps: OneShotDeps;
|
|
20
|
-
report: OrphanReportWire;
|
|
21
|
-
busy: boolean;
|
|
22
|
-
t: Translate;
|
|
23
|
-
onCancel: () => void;
|
|
24
|
-
onConfirm: () => void;
|
|
25
|
-
}): import("react").JSX.Element;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 回收站详情块:`session-detail.tsx` 的回收站投影。取数与账本住 `use-trash-detail-reader.ts`。
|
|
3
3
|
*/
|
|
4
|
-
import type { Translate } from '
|
|
5
|
-
import type { TrashEntryWire } from '
|
|
6
|
-
import type { TrashDetailLike } from '
|
|
7
|
-
import { type DetailJump, type DetailNav } from '
|
|
8
|
-
import type { DetailFrame } from './use-detail-frame.js';
|
|
9
|
-
import type { DetailState } from './use-detail-reader.js';
|
|
4
|
+
import type { Translate } from '../core/copy.js';
|
|
5
|
+
import type { TrashEntryWire } from '../../shared/wire.js';
|
|
6
|
+
import type { TrashDetailLike } from '../core/remote.js';
|
|
7
|
+
import { type DetailJump, type DetailNav, type DetailFrame, type DetailState } from '../detail/index.js';
|
|
10
8
|
/** 详情主体只承诺清册那一行:孩子视图看的那条不在客户端清单里,没有只读数可配对(判据住 `TrashDetailLike`);
|
|
11
9
|
* 形状与通用详情读路同为 `DetailState`。 */
|
|
12
10
|
export type TrashDetailState = DetailState<TrashEntryWire, TrashDetailLike>;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* 3. 多选态且拖的行在勾选集里 ⇒ `batch`(一拖删整集,items = 当前勾选集);
|
|
11
11
|
* 4. 其余 ⇒ `single`。
|
|
12
12
|
*/
|
|
13
|
-
import { type PickItem } from '
|
|
13
|
+
import { type PickItem } from '../state/batch-selection-store.js';
|
|
14
14
|
export type DropPlan =
|
|
15
15
|
/** 未登记 id / 空 payload:什么都不做。 */
|
|
16
16
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Translate } from '
|
|
2
|
-
import type { OneShotDeps } from '
|
|
1
|
+
import { type Translate } from '../core/copy.js';
|
|
2
|
+
import type { OneShotDeps } from '../core/remote.js';
|
|
3
3
|
/** 宿主 `SidebarPanelIconOwnerProps`:请求的方形边长;`deps`/`t` 由 `deps+t` 注入面给。 */
|
|
4
4
|
export interface TrashPanelIconProps {
|
|
5
5
|
size?: number | undefined;
|