@keepgoingdev/mcp-server 0.9.0 → 0.9.1

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/dist/index.js CHANGED
@@ -3518,9 +3518,13 @@ async function handleSaveCheckpoint() {
3518
3518
  const touchedFiles = getTouchedFiles(wsPath);
3519
3519
  const commitHashes = getCommitsSince(wsPath, lastSession?.timestamp);
3520
3520
  const gitBranch = getCurrentBranch(wsPath);
3521
- const sessionId = generateSessionId({ workspaceRoot: wsPath, branch: gitBranch ?? void 0, worktreePath: wsPath });
3522
3521
  const existingTasks = writer.readCurrentTasks();
3523
- const existingSession = existingTasks.find((t) => t.sessionId === sessionId);
3522
+ const existingSession = existingTasks.find(
3523
+ (t) => t.sessionActive && t.worktreePath === wsPath && t.branch === (gitBranch ?? void 0)
3524
+ ) ?? existingTasks.find(
3525
+ (t) => t.sessionActive && t.worktreePath === wsPath
3526
+ );
3527
+ const sessionId = existingSession?.sessionId ?? generateSessionId({ workspaceRoot: wsPath, branch: gitBranch ?? void 0, worktreePath: wsPath });
3524
3528
  const isPlanning = existingSession?.sessionPhase === "planning";
3525
3529
  if (touchedFiles.length === 0 && commitHashes.length === 0 && !isPlanning) {
3526
3530
  process.exit(0);