fix: setup wizard overwrites platform_toolsets saved by tools_command
This commit is contained in:
commit
af67ea8800
2 changed files with 7 additions and 3 deletions
|
|
@ -1671,7 +1671,7 @@ def setup_tools(config: dict, first_install: bool = False):
|
||||||
(no platform menu, prompts for all unconfigured API keys).
|
(no platform menu, prompts for all unconfigured API keys).
|
||||||
"""
|
"""
|
||||||
from hermes_cli.tools_config import tools_command
|
from hermes_cli.tools_config import tools_command
|
||||||
tools_command(first_install=first_install)
|
tools_command(first_install=first_install, config=config)
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
|
||||||
|
|
@ -858,15 +858,19 @@ def _reconfigure_simple_requirements(ts_key: str):
|
||||||
|
|
||||||
# ─── Main Entry Point ─────────────────────────────────────────────────────────
|
# ─── Main Entry Point ─────────────────────────────────────────────────────────
|
||||||
|
|
||||||
def tools_command(args=None, first_install: bool = False):
|
def tools_command(args=None, first_install: bool = False, config: dict = None):
|
||||||
"""Entry point for `hermes tools` and `hermes setup tools`.
|
"""Entry point for `hermes tools` and `hermes setup tools`.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
first_install: When True (set by the setup wizard on fresh installs),
|
first_install: When True (set by the setup wizard on fresh installs),
|
||||||
skip the platform menu, go straight to the CLI checklist, and
|
skip the platform menu, go straight to the CLI checklist, and
|
||||||
prompt for API keys on all enabled tools that need them.
|
prompt for API keys on all enabled tools that need them.
|
||||||
|
config: Optional config dict to use. When called from the setup
|
||||||
|
wizard, the wizard passes its own dict so that platform_toolsets
|
||||||
|
are written into it and survive the wizard's final save_config().
|
||||||
"""
|
"""
|
||||||
config = load_config()
|
if config is None:
|
||||||
|
config = load_config()
|
||||||
enabled_platforms = _get_enabled_platforms()
|
enabled_platforms = _get_enabled_platforms()
|
||||||
|
|
||||||
print()
|
print()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue