feat: populate more_info with HistoryExtraInfo on history save#236
Draft
eitsupi wants to merge 3 commits into
Draft
feat: populate more_info with HistoryExtraInfo on history save#236eitsupi wants to merge 3 commits into
more_info with HistoryExtraInfo on history save#236eitsupi wants to merge 3 commits into
Conversation
Use reedline git rev 32f80f4 (pre-release of History generic ExtraInfo) to call save_with_extra<HistoryExtraInfo> in FuzzyHistory::save. - Upgrade reedline to git rev 32f80f429e709d2d16fccf23515494e2f0bc525f which adds SqliteBackedHistory::save_with_extra / search_with_extra - Upgrade rusqlite from 0.37.0 to 0.40.1 to match reedline requirement - Add with_extra<A,B>() helper to convert HistoryItem between ExtraInfo types - Set meta_command: true for commands starting with ':' on save - Filter meta commands from history browser via SQL json_extract WHERE clause - Add tests for the meta_command exclusion filter Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Show all history entries by default (including meta commands). Add filter keywords to opt in to meta filtering: - meta:no — exclude meta commands from results - meta:only — show only meta commands The is_meta flag is read from the more_info JSON column at load time and stored per entry in BrowsableHistoryItem, so filtering is in-memory without SQL roundtrips. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
more_info with HistoryExtraInfo on history save
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
32f80f4(pre-release addingSqliteBackedHistory::save_with_extra/search_with_extra) and rusqlite from 0.37 to 0.40.1 to matchwith_extra<A,B>()helper to convertHistoryItembetweenExtraInfotypes without cloningFuzzyHistory::save()now callssave_with_extra::<HistoryExtraInfo>(), settingmeta_command: truefor commands starting with:load_history) reads themore_infoJSON column and parsesis_metain Rust (safe fallback tofalsefor NULL or malformed JSON)meta:no(exclude meta commands) andmeta:only(show only meta commands)Notes
IgnoreAllExtraInfoas before).search_typed()is out of scope for this PR.Test plan
cargo testpasses (786+ unit + integration tests)cargo fmt --checkpassescargo clippy -- -D warningspasses:cd,:helpcommands, open:historybrowser, verify they appear by default and disappear withmeta:nofiltermeta:onlyshows only meta commands