Skip to content

Keep earlier versions of edited messages #96

Open

Description

@neoromantic

An edit overwrites the cached message's text and raw_json, so the earlier version is gone from the cache. Messages are kept forever, but their earlier wording isn't: an agent can't answer "what did they write first?".

Proposed: before an edit replaces a message, keep the previous text, edit_date (or date) and fetched_at in a message_edits table, one row per earlier version. tg messages get --edits shows them; tg sql can query them. Only text versions are kept, not every raw_json, to bound the size; measure it on the #80 benchmark.

Done when e2e tests edit a made-up message twice and read both earlier versions, and the docs describe the table and its size cost. Related: #80.

Activity

  1. added
    enhancement
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions