fix(cli): log instead of swallow preflight-warning errors; consistent TUI warning field
Follow-up to the salvaged preflight-compression warning: - Replace silent `except Exception: pass` at all 5 guard call sites (cli.py x2, gateway/slash_commands.py x2, tui_gateway/server.py) with `logger.debug(...)` so signature drift in the guard helper isn't hidden. - tui_gateway/server.py: set the confirm dict's `warning` field to the merged message (was bare expensive-model text) so it matches `confirm_message` for any future consumer reading `warning`. - Add trailing newlines to the two new files.
This commit is contained in:
parent
04730f32e7
commit
1ca29723f0
5 changed files with 13 additions and 13 deletions
8
cli.py
8
cli.py
|
|
@ -6946,8 +6946,8 @@ class HermesCLI(CLIAgentSetupMixin, CLICommandsMixin):
|
|||
messages=list(self.conversation_history or []),
|
||||
config_context_length=getattr(self.agent, "_config_context_length", None),
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as exc:
|
||||
logger.debug("preflight-compression switch warning failed: %s", exc)
|
||||
|
||||
old_model = self.model
|
||||
self.model = result.new_model
|
||||
|
|
@ -7225,8 +7225,8 @@ class HermesCLI(CLIAgentSetupMixin, CLICommandsMixin):
|
|||
messages=list(self.conversation_history or []),
|
||||
config_context_length=getattr(self.agent, "_config_context_length", None),
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as exc:
|
||||
logger.debug("preflight-compression switch warning failed: %s", exc)
|
||||
|
||||
if not self._confirm_expensive_model_switch(result):
|
||||
_cprint(" Model switch cancelled.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue