feat(config): add config-reload to clear all session overrides#2819
Merged
tusharmath merged 1 commit intomainfrom Apr 3, 2026
Merged
feat(config): add config-reload to clear all session overrides#2819tusharmath merged 1 commit intomainfrom
tusharmath merged 1 commit intomainfrom
Conversation
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 narrow
model-resetcommand with a broaderconfig-reloadcommand that clears all session-scoped overrides — model, provider, and reasoning effort — restoring the global configuration in one step.Context
The existing
model-reset(mr) command only cleared_FORGE_SESSION_MODELand_FORGE_SESSION_PROVIDER. Once reasoning effort was added as a third session override, users had no single command to return to a clean, config-driven state. The newconfig-reload(cr) command fills that gap, and the old aliases (model-reset/mr) are kept for backwards compatibility.Changes
model-resetbuilt-in command toconfig-reloadwith an updated description reflecting its expanded scope_forge_action_model_reset→_forge_action_config_reloadin the shell plugin and extended it to also clear_FORGE_SESSION_REASONING_EFFORT_FORGE_SESSION_REASONING_EFFORTas a typed shell variable inconfig.zshconfig-reload|cr|model-reset|mrto the new action (backwards-compatible aliases preserved)Key Implementation Details
The dispatcher now matches four aliases (
config-reload,cr,model-reset,mr) to the same handler, so existing shell history and muscle memory continue to work. The clear-all logic in_forge_action_config_reloadchecks all three session variables before deciding whether anything needs resetting, providing a more accurate "nothing to do" message.Testing