GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor(pi): flatten the retained-branch timestamp check · pingdotgg/t3code@56c01cc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/provider-pi/src/server
    • adapter.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/provider-pi/src/server/adapter.ts‎

Copy file name to clipboardExpand all lines: packages/provider-pi/src/server/adapter.ts
+4-7Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4489,13 +4489,10 @@ function piLegacyRetainedBranch(listing: PiSessionListing, targetId: string, com
44894489
const entry = listing.entries.get(id);
44904490
if (entry?.timestamp == null) return undefined;
44914491
if (entry.isUserMessage && entry.timestamp >= completedAt) return { history, entryId: id };
4492-
if (entry.timestamp > completedAt) {
4493-
// Pi only forks before user messages. Later settings can stay in the file,
4494-
// but later conversation entries make this branch unsafe to recover.
4495-
if (!entry.isSessionMetadata) return undefined;
4496-
} else {
4497-
history.push(id);
4498-
}
4492+
if (entry.timestamp <= completedAt) history.push(id);
4493+
// Pi only forks before user messages. Later settings can stay in the file,
4494+
// but later conversation entries make this branch unsafe to recover.
4495+
else if (!entry.isSessionMetadata) return undefined;
44994496
}
45004497
return { history, entryId: undefined };
45014498
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.