fix: wire toolHintMaxLength through AgentLoop constructors
The config field was added but never passed from config to AgentLoop. The value was always falling back to the default (40) regardless of what was set in config.json. Now passes tool_hint_max_length through all AgentLoop() call sites: - nanobot/nanobot.py (main bot) - nanobot/cli/commands.py (CLI agent, dev, webui commands) Also adds documentation in docs/configuration.md.
This commit is contained in:
@@ -557,6 +557,7 @@ def serve(
|
||||
context_block_limit=runtime_config.agents.defaults.context_block_limit,
|
||||
max_tool_result_chars=runtime_config.agents.defaults.max_tool_result_chars,
|
||||
provider_retry_mode=runtime_config.agents.defaults.provider_retry_mode,
|
||||
tool_hint_max_length=runtime_config.agents.defaults.tool_hint_max_length,
|
||||
web_config=runtime_config.tools.web,
|
||||
exec_config=runtime_config.tools.exec,
|
||||
restrict_to_workspace=runtime_config.tools.restrict_to_workspace,
|
||||
@@ -681,6 +682,7 @@ def _run_gateway(
|
||||
context_block_limit=config.agents.defaults.context_block_limit,
|
||||
max_tool_result_chars=config.agents.defaults.max_tool_result_chars,
|
||||
provider_retry_mode=config.agents.defaults.provider_retry_mode,
|
||||
tool_hint_max_length=config.agents.defaults.tool_hint_max_length,
|
||||
exec_config=config.tools.exec,
|
||||
cron_service=cron,
|
||||
restrict_to_workspace=config.tools.restrict_to_workspace,
|
||||
@@ -1073,6 +1075,7 @@ def agent(
|
||||
context_block_limit=config.agents.defaults.context_block_limit,
|
||||
max_tool_result_chars=config.agents.defaults.max_tool_result_chars,
|
||||
provider_retry_mode=config.agents.defaults.provider_retry_mode,
|
||||
tool_hint_max_length=config.agents.defaults.tool_hint_max_length,
|
||||
exec_config=config.tools.exec,
|
||||
cron_service=cron,
|
||||
restrict_to_workspace=config.tools.restrict_to_workspace,
|
||||
|
||||
Reference in New Issue
Block a user