mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-28 19:11:03 +08:00
90a93a7aa2
* feat(opencode): add PR link detect and parse helpers detectPrLink runs gh pr view, parsePrUrl accepts GitHub and GitLab PR URLs, and a Storage helper holds the manual override. * feat(opencode): add kilo pr link, unlink, and status commands kilo pr becomes a parent command with checkout preserved. link and unlink write the Storage override; the next heartbeat persists it. * feat(opencode): advertise prLink on the heartbeat and ingest it getSessions resolves the Storage override, cleared, or detected link, puts prLink on the heartbeat, and syncs the session_pr_link item. * fix(opencode): encode worktree in pr link override storage key The manual override key used the raw absolute worktree path. Storage builds the file with path.join, so a Windows drive colon made an invalid filename and kilo pr link failed. Encode the worktree so the key is one valid path segment on both platforms. * test(opencode): cover kilo pr status outputs Extract the status handler body so it is testable, then assert the four outputs: stored link, cleared, detected, and no link. Split captured output on os.EOL so the test passes on Windows. * refactor(opencode): remove dead pr-link code found in simplify pass detectPrLink now reuses parsePrUrl instead of hand-parsing the URL and number, drop the dead github.com special case, and inline the prLinkTripleKey helper. * fix(opencode): clear pr-link dedupe map on session delete * docs(kilo-docs): regenerate CLI reference for kilo pr subcommands * chore: add session-pr-link changeset and bump facade allowlist