mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 07:04:25 +00:00
feat(coding-agent): add threaded sort mode to /resume with tree display
Adds 'Threaded' as a new sort mode (now default) that displays sessions in a tree structure based on parent-child relationships. The tree is sorted by root session's modified date. Other sort modes (Recent, Fuzzy) continue to show flat lists. Sort mode cycles: Threaded -> Recent -> Fuzzy -> Threaded
This commit is contained in:
parent
6f2d066342
commit
42d54e0d1c
3 changed files with 134 additions and 20 deletions
|
|
@ -168,6 +168,8 @@ export interface SessionInfo {
|
|||
cwd: string;
|
||||
/** User-defined display name from session_info entries. */
|
||||
name?: string;
|
||||
/** Path to the parent session (if this session was forked). */
|
||||
parentSessionPath?: string;
|
||||
created: Date;
|
||||
modified: Date;
|
||||
messageCount: number;
|
||||
|
|
@ -587,6 +589,7 @@ async function buildSessionInfo(filePath: string): Promise<SessionInfo | null> {
|
|||
}
|
||||
|
||||
const cwd = typeof (header as SessionHeader).cwd === "string" ? (header as SessionHeader).cwd : "";
|
||||
const parentSessionPath = (header as SessionHeader).parentSession;
|
||||
|
||||
const modified = getSessionModifiedDate(entries, header as SessionHeader, stats.mtime);
|
||||
|
||||
|
|
@ -595,6 +598,7 @@ async function buildSessionInfo(filePath: string): Promise<SessionInfo | null> {
|
|||
id: (header as SessionHeader).id,
|
||||
cwd,
|
||||
name,
|
||||
parentSessionPath,
|
||||
created: new Date((header as SessionHeader).timestamp),
|
||||
modified,
|
||||
messageCount,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue