fix(coding-agent): scope custom session dir lookups

This commit is contained in:
Armin Ronacher
2026-05-28 23:24:00 +02:00
parent b64f3f5eae
commit 4b4641c6b0
5 changed files with 146 additions and 17 deletions

View File

@@ -171,7 +171,7 @@ async function resolveSessionPath(sessionArg: string, cwd: string, sessionDir?:
}
// Try global search across all projects
const allSessions = await SessionManager.listAll();
const allSessions = await SessionManager.listAll(sessionDir);
const globalMatch =
allSessions.find((s) => s.id === sessionArg) ?? allSessions.find((s) => s.id.startsWith(sessionArg));
@@ -309,7 +309,7 @@ async function createSessionManager(
try {
const selectedPath = await selectSession(
(onProgress) => SessionManager.list(cwd, sessionDir, onProgress),
SessionManager.listAll,
(onProgress) => SessionManager.listAll(sessionDir, onProgress),
);
if (!selectedPath) {
console.log(chalk.dim("No session selected"));