Skip to content

refactor(adapters): extract shared session_state_is_current helper#105

Merged
samzong merged 1 commit into
mainfrom
refactor/shared-session-state-current
Jul 8, 2026
Merged

refactor(adapters): extract shared session_state_is_current helper#105
samzong merged 1 commit into
mainfrom
refactor/shared-session-state-current

Conversation

@samzong

@samzong samzong commented Jul 8, 2026

Copy link
Copy Markdown
Owner

What's changed?

  • Extract session_state_is_current into src/adapters/sync_state.rs as a shared helper combining usage and event state checks
  • Update Cursor adapter to call the shared helper instead of a local duplicate
  • Update OpenCode adapter to use the same helper, replacing inline usage/event checks

Why

  • Deduplicate identical incremental-sync skip logic across adapters
  • Keep parser-version and include_events handling in one place for consistency

Verification

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test -p recall adapters::cursor (9 passed)
  • cargo test -p recall adapters::opencode (13 passed)

Signed-off-by: samzong <samzong.lu@gmail.com>
@samzong samzong merged commit 8293fca into main Jul 8, 2026
1 check passed
@samzong samzong deleted the refactor/shared-session-state-current branch July 8, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant