perf(sessions): cache first-prompt titles, skip local-command noise in -l

Cursor/Claude session listing now scans only the head of each jsonl for a
title (aiTitle/customTitle/first user prompt), caches by (path, mtime, size),
and filters local-command protocol rows. COLUMNS=120 pinned in the table test.
This commit is contained in:
Zhengshou Lai
2026-08-02 16:09:01 +08:00
parent ffac0ba37d
commit 1bce85cc19
2 changed files with 109 additions and 24 deletions
+2 -1
View File
@@ -788,7 +788,8 @@ class TestCursorListSessions:
},
):
result = runner.invoke(
cli, ["cursor", "--cwd", str(cwd), "--list"]
cli, ["cursor", "--cwd", str(cwd), "--list"],
env={"COLUMNS": "120"},
)
assert result.exit_code == 0, result.output
assert "chat-abc123" in result.output