mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +00:00
feat(terminal,cli): docker_extra_args + display.timestamps
Two independent opt-in QoL toggles, both off by default. terminal.docker_extra_args: - List of extra flags appended verbatim to docker run after security defaults. Useful for adding capabilities (e.g. --cap-add SETUID) or other docker run options not exposed by existing config keys. - Non-string entries are logged and skipped. - Also available via TERMINAL_DOCKER_EXTRA_ARGS='[...]' env var. display.timestamps: - Appends [HH:MM] to user input bullet and the assistant response box header. Single hub in _format_submitted_user_message_preview() covers both single-line and multi-line user previews; assistant response label gets the timestamp at box-open time. Closes #1569 (timestamps). Co-authored-by: Mibayy <Mibayy@users.noreply.github.com>
This commit is contained in:
parent
228b7d27bd
commit
ebf2ea584a
5 changed files with 38 additions and 2 deletions
|
|
@ -300,6 +300,7 @@ class DockerEnvironment(BaseEnvironment):
|
|||
host_cwd: str = None,
|
||||
auto_mount_cwd: bool = False,
|
||||
run_as_host_user: bool = False,
|
||||
extra_args: list = None,
|
||||
):
|
||||
if cwd == "~":
|
||||
cwd = "/root"
|
||||
|
|
@ -476,6 +477,15 @@ class DockerEnvironment(BaseEnvironment):
|
|||
security_args = _build_security_args(run_as_host_user and bool(user_args))
|
||||
|
||||
logger.info(f"Docker volume_args: {volume_args}")
|
||||
# User-supplied extra docker run flags (docker_extra_args in config.yaml).
|
||||
# Appended last so they can override defaults if needed.
|
||||
validated_extra = []
|
||||
for arg in (extra_args or []):
|
||||
if not isinstance(arg, str):
|
||||
logger.warning("Ignoring non-string docker_extra_args entry: %r", arg)
|
||||
continue
|
||||
validated_extra.append(arg)
|
||||
|
||||
all_run_args = (
|
||||
security_args
|
||||
+ user_args
|
||||
|
|
@ -483,6 +493,7 @@ class DockerEnvironment(BaseEnvironment):
|
|||
+ resource_args
|
||||
+ volume_args
|
||||
+ env_args
|
||||
+ validated_extra
|
||||
)
|
||||
logger.info(f"Docker run_args: {all_run_args}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue