feat(ui): replace :env and :config table with full TOML config view#2886
Merged
tusharmath merged 2 commits intomainfrom Apr 8, 2026
Merged
feat(ui): replace :env and :config table with full TOML config view#2886tusharmath merged 2 commits intomainfrom
tusharmath merged 2 commits intomainfrom
Conversation
459af52 to
9a2343e
Compare
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
Replace the fragmented
:configkey-value table and separate:envcommand with a single:configcommand that displays the complete resolvedForgeConfigas syntax-highlighted TOML.Context
Previously
:configshowed a manually curated table of a handful of fields (active model, provider, commit/suggest model, reasoning effort), while:envshowed a separate table of environment/provider metadata. Neither gave a complete picture of the effective configuration, and keeping two commands in sync added maintenance overhead.The
:envcommand is removed entirely; its shell aliases (env,e) are redirected to:configso existing muscle-memory keeps working.Changes
:configoutput redesign: serializes the fullForgeConfigstruct to pretty TOML viatoml_editand syntax-highlights it for the terminal. Porcelain mode outputs raw TOML for scripting.:envcommand:SlashCommand::Env,TopLevelCommand::Env, theon_envhandler, and the_forge_action_envshell function are all deleted. Shell plugin routesenv/eto_forge_action_config.terminal-colorsaurusto detect the terminal background at runtime and picksbase16-ocean.darkfor dark terminals orInspiredGitHubfor light terminals.SyntaxHighlighterfromsyntect's built-in defaults to thetwo-faceextended set, which includes first-class TOML support.SyntaxHighlighter:highlight()is now public and the module is re-exported fromforge_display, allowingforge_mainto call it directly.Key Implementation Details
on_show_confignow reduces to two steps:toml_edit::ser::to_string_pretty(&self.config)followed bySyntaxHighlighter::default().highlight(&toml, "toml"). The theme is resolved once per highlight call via a lightweightterminal-colorsaurusquery; on terminals that don't support the query it defaults to the dark theme.Use Cases
:config(or:env/:e) to instantly see every effective setting — model, provider, custom agents, tool permissions, reasoning config — in readable, copy-pasteable TOML.:config --porcelainoutput into scripts or config management tools.Testing