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.
Nonemeans 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.