mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-20 15:33:54 +00:00
Classic CLI exposes ``/reload`` (re-reads ~/.hermes/.env into
``os.environ`` via ``hermes_cli.config.reload_env``) so newly added API
keys take effect without restarting the session. The TUI was missing
the parity command, so users had to Ctrl+C out and ``hermes --tui``
again whenever they added or rotated a credential.
Three small wires:
* New ``reload.env`` JSON-RPC method in ``tui_gateway/server.py`` that
delegates to ``hermes_cli.config.reload_env`` and returns the count
of vars updated.
* New ``/reload`` slash command in ``ui-tui/src/app/slash/commands/ops.ts``
matching the existing ``/reload-mcp`` pattern (native RPC, no slash
worker).
* Drop ``cli_only=True`` from the ``reload`` ``CommandDef`` in
``hermes_cli/commands.py`` so help/menus surface it in the TUI too.
``reload_env`` itself is environment-agnostic.
Same caveat as classic CLI: the *currently constructed* agent's
credential pool / provider routing does not auto-rebuild. Users who
want a brand-new credential resolution should follow with ``/new``.
Tests:
* New ``test_reload_env_rpc_calls_hermes_cli_reload_env`` confirms
RPC delegates and reports the count.
* New ``test_reload_env_rpc_surfaces_errors`` confirms exceptions are
rendered as JSON-RPC errors.
* ``createSlashHandler.test.ts`` slash-parity matrix extended with
``['/reload', 'reload.env', {}]`` so we can't regress the routing.
Validation:
scripts/run_tests.sh tests/test_tui_gateway_server.py — 92/92.
scripts/run_tests.sh tests/hermes_cli/test_commands.py — 128/128.
cd ui-tui && npm run type-check — clean; npm test --run — 390/390.
|
||
|---|---|---|
| .. | ||
| asCommandDispatch.test.ts | ||
| clipboard.test.ts | ||
| constants.test.ts | ||
| createGatewayEventHandler.test.ts | ||
| createSlashHandler.test.ts | ||
| details.test.ts | ||
| emoji.test.ts | ||
| forceTruecolor.test.ts | ||
| markdown.test.ts | ||
| messages.test.ts | ||
| osc52.test.ts | ||
| paths.test.ts | ||
| platform.test.ts | ||
| providers.test.ts | ||
| reasoning.test.ts | ||
| rpc.test.ts | ||
| scroll.test.ts | ||
| slashParity.test.ts | ||
| stateIsolation.test.ts | ||
| streamingMarkdown.test.ts | ||
| subagentTree.test.ts | ||
| syntax.test.ts | ||
| terminalParity.test.ts | ||
| terminalSetup.test.ts | ||
| text.test.ts | ||
| textInputLineNav.test.ts | ||
| textInputWrap.test.ts | ||
| theme.test.ts | ||
| turnStore.test.ts | ||
| useComposerState.test.ts | ||
| useConfigSync.test.ts | ||
| useQueue.test.ts | ||
| useSessionLifecycle.test.ts | ||
| useVirtualHistoryHeights.test.ts | ||
| viewport.test.ts | ||
| viewportStore.test.ts | ||
| virtualHeights.test.ts | ||
| virtualHistoryClamp.test.ts | ||
| wheelAccel.test.ts | ||