Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ Shortcuts sit below the title and effort levels have their own section; DSH, Cla

In `/provider`'s model list, focus a model and press `Tab` to edit its context window, max output tokens, reasoning efforts, and image input capability.

The session manager focuses the most recently used session in the current workspace; if there is no history, it focuses the new-session card. Press `←` to move to the workspace rail. It paints the last successful list immediately while it checks the persistence store for changes. This first-paint snapshot survives restarts on DSH, Claude and Codex and is isolated by backend and storage directory. On a cold Codex scan, pages appear as they arrive. Titles that require a deeper DSH log scan appear first with a fallback name and update in place when recovery finishes.
The session manager focuses the most recently used session in the current workspace; if there is no history, it focuses the new-session card. Press `←` to move to the workspace rail. It paints the last successful list immediately while it checks the persistence store for changes. This first-paint snapshot survives restarts on DSH, Claude and Codex and is isolated by backend and storage directory. Without a snapshot, all three backends prioritize the current workspace before filling in other workspaces. Claude and Codex first show up to 32 recent sessions from the current workspace; other Git worktrees appear as separate workspaces. DSH resolves the current workspace's metadata first and publishes it before reading other workspaces' logs, even when it has fewer than 32 sessions. Titles that require a deeper DSH log scan appear first with a fallback name and update in place when recovery finishes.
With DSH's current JSONL backend, startup and `/new` keep initial permission events in memory until further session activity or an explicit durability flush saves the complete log. Restarting an unstored empty session starts fresh.
Removing a workspace registration keeps its sessions accessible under a "History only" directory in the rail.
History-only directories offer edit and new-session actions; rename and remove are available for registered workspaces.
Expand Down
2 changes: 1 addition & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ OpenAI 条款约束。完整操作与当前边界:[Codex 后端](docs/codex-ba

在 `/provider` 模型列表聚焦一项并按 `Tab`,可编辑上下文窗口、最大输出 token、推理档位和图片输入能力。

会话管理界面默认聚焦当前工作区最近使用的会话;没有历史时聚焦“新建会话”卡片,按 `←` 可移到工作区栏。界面会立即显示上次成功读取的列表,同时核对持久化存储的变化。DSH、Claude 和 Codex 的首屏快照都可跨重启复用,并按内核与存储目录隔离。Codex 首次扫描时,分页到达就显示;DSH 中需要深度扫描日志的标题会先显示回退名称,恢复完成后在原行更新。
会话管理界面默认聚焦当前工作区最近使用的会话;没有历史时聚焦“新建会话”卡片,按 `←` 可移到工作区栏。界面会立即显示上次成功读取的列表,同时核对持久化存储的变化。DSH、Claude 和 Codex 的首屏快照都可跨重启复用,并按内核与存储目录隔离。没有快照时,三种后端都优先加载当前工作区,再补齐其他工作区。Claude 和 Codex 先显示当前工作区最近的最多 32 条会话,其他 Git worktree 作为独立工作区加载。DSH 先解析当前工作区的元数据,即使不足 32 条,也会在读取其他工作区日志前显示;需要深度扫描日志的标题会先显示回退名称,恢复完成后在原行更新。
使用 DSH 当前的 JSONL 后端时,启动与 `/new` 的初始权限事件只保留在内存中;后续会话活动或显式持久化 flush 才会保存完整日志。尚未落盘的空会话重启时会重新创建。
移除工作区登记后,其历史会话仍可从侧栏的「仅历史」目录进入。
「仅历史」目录只提供编辑和新建会话操作;重命名与移除仅适用于已登记工作区。
Expand Down
7 changes: 5 additions & 2 deletions docs/claude-backend.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,11 @@ a notice, so a cloned repository cannot silently switch off every check.
one another dsh-TUI terminal is using cannot be deleted. Pins are kept per
backend.
Reopening or restarting first paints the last complete list while the SDK refreshes it.
First-paint snapshots are isolated by Claude configuration directory; failed reads
preserve the last complete snapshot.
First-paint snapshots are isolated by Claude configuration directory. Without a snapshot,
up to 32 recent sessions from the current directory appear first, then the rest of that
workspace and other workspaces. Other Git worktrees in the same repository stay out of
the first batch but remain in the complete project listing, including the fallback when
the all-projects read fails. Failed reads preserve the last complete snapshot.
- From a shell: `dsh-tui --backend claude --resume <id>`; without an id it resumes
the last Claude session this install used. dsh-TUI prints that command on exit.
A session another dsh-TUI terminal has open is refused, and a `--resume` that
Expand Down
4 changes: 3 additions & 1 deletion docs/claude-backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ Claude 设置 > `default`。Claude 设置里的 `defaultMode: bypassPermissions`
`claude --resume <id>` 打开)。`Enter` 恢复(先回放历史再继续),`Ctrl+R` 重命名,
`Ctrl+D` 删除;当前会话和另一个 dsh-TUI 终端正在用的会话不能删。置顶按后端分开保存。
再次打开或重启后先显示上次完整列表,同时仍从 SDK 刷新。首屏快照按 Claude 配置
目录隔离;读取失败时保留上次完整快照。
目录隔离;没有快照时先显示当前工作目录最近的最多 32 条,再补齐该工作区及其他
工作区的列表。同一仓库的其他 Git worktree 不混入首批结果,但仍包含在完整项目目录
中;全部项目读取失败时也保留这些会话。读取失败时保留上次完整快照。
- 从 shell 恢复:`dsh-tui --backend claude --resume <id>`;不带 id 时恢复本机最近一次
用过的 Claude 会话。退出时 dsh-TUI 会打印这条命令。另一个 dsh-TUI 终端已打开的会话会
被拒绝;`--resume` 打不开时直接报错,不会改开新会话。状态栏的短会话 id 就是
Expand Down
7 changes: 5 additions & 2 deletions docs/codex-backend.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,11 @@ past tokens/cost. Fresh usage notifications update the readings.
threads cannot be archived. The catalog lists up to 500 recent ordinary threads, excluding
ephemeral forks and child threads from the main list.
Reopening or restarting first paints the last complete list while the native catalog
refreshes; a cold scan shows pages as they arrive. First-paint snapshots are isolated
by Codex storage directory; failed or incomplete reads never replace a complete snapshot.
refreshes; a cold scan shows pages as they arrive. Without a snapshot, the native state
database supplies up to 32 recent threads from the current workspace first, then the
rollout scan repairs titles and fills in that workspace followed by other workspaces;
an unavailable database falls back to scanning. First-paint snapshots are isolated by
Codex storage directory; failed or incomplete reads never replace a complete snapshot.
- `/rename` changes the official thread title; `/color` stores a session accent, not a global theme.
- `/fork` creates a resumable copy without switching. Double `Esc` or `/rewind` conversation
rewind creates a copy before the selected question, returns the question to the composer
Expand Down
4 changes: 3 additions & 1 deletion docs/codex-backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ used = max(0, T - 12000)
当前使用中、其他终端占用或内部 worker 活动的 thread 不能归档。目录最多列出
最近 500 条普通 thread,临时 fork 与子 thread 不混进主列表。
再次打开或重启后先显示上次完整列表,后台仍从官方目录刷新;首次读取时分页到达
就显示。首屏快照按 Codex 存储目录隔离,失败或未读完的分页不会覆盖完整快照。
就显示。没有快照时先从官方状态数据库显示当前工作区最近的最多 32 条,再由历史
扫描修正标题并补齐当前工作区及其他工作区;数据库不可用时照常扫描。首屏快照
按 Codex 存储目录隔离,失败或未读完的分页不会覆盖完整快照。
- `/rename` 改官方 thread 标题;`/color` 只保存会话强调色,不改全局主题。
- `/fork` 创建可恢复副本,不自动切换;双击 `Esc` 或 `/rewind` 的对话回退在
所选提问之前创建副本并继续,提问回到输入框、原 thread 保留。首条提问回退会
Expand Down
7 changes: 5 additions & 2 deletions guide/dsh-tui-guide/claude-backend.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,11 @@ a notice, so a cloned repository cannot silently switch off every check.
one another dsh-TUI terminal is using cannot be deleted. Pins are kept per
backend.
Reopening or restarting first paints the last complete list while the SDK refreshes it.
First-paint snapshots are isolated by Claude configuration directory; failed reads
preserve the last complete snapshot.
First-paint snapshots are isolated by Claude configuration directory. Without a snapshot,
up to 32 recent sessions from the current directory appear first, then the rest of that
workspace and other workspaces. Other Git worktrees in the same repository stay out of
the first batch but remain in the complete project listing, including the fallback when
the all-projects read fails. Failed reads preserve the last complete snapshot.
- From a shell: `dsh-tui --backend claude --resume <id>`; without an id it resumes
the last Claude session this install used. dsh-TUI prints that command on exit.
A session another dsh-TUI terminal has open is refused, and a `--resume` that
Expand Down
4 changes: 3 additions & 1 deletion guide/dsh-tui-guide/claude-backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ Claude 设置 > `default`。Claude 设置里的 `defaultMode: bypassPermissions`
`claude --resume <id>` 打开)。`Enter` 恢复(先回放历史再继续),`Ctrl+R` 重命名,
`Ctrl+D` 删除;当前会话和另一个 dsh-TUI 终端正在用的会话不能删。置顶按后端分开保存。
再次打开或重启后先显示上次完整列表,同时仍从 SDK 刷新。首屏快照按 Claude 配置
目录隔离;读取失败时保留上次完整快照。
目录隔离;没有快照时先显示当前工作目录最近的最多 32 条,再补齐该工作区及其他
工作区的列表。同一仓库的其他 Git worktree 不混入首批结果,但仍包含在完整项目目录
中;全部项目读取失败时也保留这些会话。读取失败时保留上次完整快照。
- 从 shell 恢复:`dsh-tui --backend claude --resume <id>`;不带 id 时恢复本机最近一次
用过的 Claude 会话。退出时 dsh-TUI 会打印这条命令。另一个 dsh-TUI 终端已打开的会话会
被拒绝;`--resume` 打不开时直接报错,不会改开新会话。状态栏的短会话 id 就是
Expand Down
7 changes: 5 additions & 2 deletions guide/dsh-tui-guide/codex-backend.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,11 @@ past tokens/cost. Fresh usage notifications update the readings.
threads cannot be archived. The catalog lists up to 500 recent ordinary threads, excluding
ephemeral forks and child threads from the main list.
Reopening or restarting first paints the last complete list while the native catalog
refreshes; a cold scan shows pages as they arrive. First-paint snapshots are isolated
by Codex storage directory; failed or incomplete reads never replace a complete snapshot.
refreshes; a cold scan shows pages as they arrive. Without a snapshot, the native state
database supplies up to 32 recent threads from the current workspace first, then the
rollout scan repairs titles and fills in that workspace followed by other workspaces;
an unavailable database falls back to scanning. First-paint snapshots are isolated by
Codex storage directory; failed or incomplete reads never replace a complete snapshot.
- `/rename` changes the official thread title; `/color` stores a session accent, not a global theme.
- `/fork` creates a resumable copy without switching. Double `Esc` or `/rewind` conversation
rewind creates a copy before the selected question, returns the question to the composer
Expand Down
4 changes: 3 additions & 1 deletion guide/dsh-tui-guide/codex-backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ used = max(0, T - 12000)
当前使用中、其他终端占用或内部 worker 活动的 thread 不能归档。目录最多列出
最近 500 条普通 thread,临时 fork 与子 thread 不混进主列表。
再次打开或重启后先显示上次完整列表,后台仍从官方目录刷新;首次读取时分页到达
就显示。首屏快照按 Codex 存储目录隔离,失败或未读完的分页不会覆盖完整快照。
就显示。没有快照时先从官方状态数据库显示当前工作区最近的最多 32 条,再由历史
扫描修正标题并补齐当前工作区及其他工作区;数据库不可用时照常扫描。首屏快照
按 Codex 存储目录隔离,失败或未读完的分页不会覆盖完整快照。
- `/rename` 改官方 thread 标题;`/color` 只保存会话强调色,不改全局主题。
- `/fork` 创建可恢复副本,不自动切换;双击 `Esc` 或 `/rewind` 的对话回退在
所选提问之前创建副本并继续,提问回到输入框、原 thread 保留。首条提问回退会
Expand Down
25 changes: 25 additions & 0 deletions scripts/verify-backend-list-snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,31 @@ try {
check(backendId + ': an empty completed listing is cached distinctly from unknown', restarted.cachedSessions(), [])
}

for (const backendId of ['claude', 'codex']) {
const local = row('current-workspace', backendId)
const foreign = { ...row('newer-elsewhere', backendId), cwd: join(home, 'elsewhere'), updatedAt: 999 }
const global = gate<readonly SessionSummary[]>()
const began = gate<void>()
const scopes: string[] = []
const scoped = channel(backendId, {
list: async (scope, onPartial) => {
scopes.push(scope?.allProjects ? 'all' : scope?.cwd ?? '')
if (scope?.allProjects) { onPartial?.([foreign]); began.resolve(); return global.promise }
onPartial?.([local])
return [local]
},
})
const partials: string[][] = []
const listing = scoped.listSessions(undefined, rows => { partials.push(ids(rows)!) })
await began.promise
check(backendId + ': the current workspace is queried before all projects', scopes, [home, 'all'])
check(backendId + ': the first rows are local even when another workspace is newer', partials[0], ['current-workspace'])
check(backendId + ': global partial pages keep the already-loaded workspace', partials.at(-1), ['newer-elsewhere', 'current-workspace'])
check(backendId + ': workspace progress is not a complete snapshot', scoped.cachedSessions(), undefined)
global.resolve([foreign, local])
check(backendId + ': completion includes both workspaces', ids(await listing), ['newer-elsewhere', 'current-workspace'])
}

// A slow page is useful immediately, but cannot masquerade as a complete
// listing or overwrite the last successful snapshot.
const key = JSON.stringify(['codex', home, 'paging'])
Expand Down
Loading
Loading