Skip to content

Fix: mode from config file is ignored (fixes #97) - #99

Open
galopyz wants to merge 1 commit into
AnswerDotAI:mainfrom
galopyz:fix-config-mode
Open

Fix: mode from config file is ignored (fixes #97)#99
galopyz wants to merge 1 commit into
AnswerDotAI:mainfrom
galopyz:fix-config-mode

Conversation

@galopyz

@galopyz galopyz commented Aug 12, 2026

Copy link
Copy Markdown

Fixes #97

The CLI default for mode was always 'default', so get_opts never read the mode value from shell_sage.conf. Use None as the CLI default so configured values like mode = sassy can take effect.

  • main(): mode: str = 'default'mode: str = None
  • main(): pass mode=mode to get_opts(...)
  • main(): use opts.mode for validation, the get_sage(...) call, and the Log insert

Verified: with mode = sassy in ~/.config/shell_sage/shell_sage.conf, ssage now responds in sassy mode; --mode default still overrides the config.

I did not add a regression test but I'd be happy to add one if that would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sassy mode from config file is ignored (only CLI --mode works)

1 participant