Skip to main content

Module history

Module history 

Source
Expand description

Durable prompt history compatible with the retired Python client.

Python CodeSwarm stored one JSON object per line (input and timestamp). Early Rust snapshots stored bare JSON strings instead. The reader accepts both shapes so upgrading does not silently discard a user’s prompt history; damaged or partially-written lines are ignored just like the Python implementation.

Constants§

MAX_HISTORY_ENTRIES
Number of entries retained in memory by the prompt editor.

Functions§

append
Append one prompt in the Python-compatible object format.
parse_entry
Decode one history line. None means that the line is malformed or does not contain a string prompt.
read
Read valid prompts from a JSONL history file, retaining the newest bounded window in original chronological order. Missing files are empty history.