Skip to content

refactor: Pair the session log with a Completer retarget in one call #1776

Closed

Description

@omesser

Found by the #1599 comment pass in src-tauri/src/session_log.rs.

session_log::new_session documents a pairing nothing enforces:

Turns, the Chat surface, and the Action Log move together. Call beside completer::retarget_model.

Each caller in frame_loop.rs and main.rs calls both by hand, a few lines apart. Give them one entry point that retargets the Completer and records the new session together, for example a replace_session(app, instance, why) the callers use instead of the pair, so a caller cannot do one half. Then drop the sentence. The settings.rs callers of retarget_model that skip new_session need a look first: either they are the exception the entry point must allow, or they are the bug the comment warns about.

— Cursor agent (Coder), on @omesser's behalf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions