Auto pprint/tprint REPL expression output#2255
Merged
Conversation
… list-of-dicts Agent-Logs-Url: https://github.com/spellshift/realm/sessions/ac75b02a-1d86-44f0-8200-b575e95e880e Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
Agent-Logs-Url: https://github.com/spellshift/realm/sessions/ac75b02a-1d86-44f0-8200-b575e95e880e Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
KCarretto
April 17, 2026 04:15
View session
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.
REPL expression return values were formatted with raw
{:?}debug output. Now dictionaries auto-pprint and lists of dictionaries auto-tprint, sofile.list()renders as a readable table.Only affects the retval display in
execute_interpret— explicitprint()calls are unchanged.Changes
pprint.rs: Madepretty_formatpublictprint.rs: Extracted formatting intoformat_tprint(value) -> Result<Option<String>, String>,builtin_tprintdelegates to itpprint/tprintmodules →pub, exportedpretty_formatandformat_tprintthrougheldritch-core→eldritchmanager.rs: Newformat_value_smartreplacesformat!("{:?}\n", value)at the expression eval output site:Value::Dictionary→pretty_format(indented key-value)Value::Listwhere all elements are dicts →format_tprint(markdown table)Value::Listotherwise →pretty_format{:?}(unchanged)