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:
@@ -198,6 +198,7 @@ class AgentLoop:
|
||||
context_block_limit: int | None = None,
|
||||
max_tool_result_chars: int | None = None,
|
||||
provider_retry_mode: str = "standard",
|
||||
tool_hint_max_length: int | None = None,
|
||||
web_config: WebToolsConfig | None = None,
|
||||
exec_config: ExecToolConfig | None = None,
|
||||
cron_service: CronService | None = None,
|
||||
@@ -242,7 +243,10 @@ class AgentLoop:
|
||||
else defaults.max_tool_result_chars
|
||||
)
|
||||
self.provider_retry_mode = provider_retry_mode
|
||||
self.tool_hint_max_length = defaults.tool_hint_max_length
|
||||
self.tool_hint_max_length = (
|
||||
tool_hint_max_length if tool_hint_max_length is not None
|
||||
else defaults.tool_hint_max_length
|
||||
)
|
||||
self.web_config = web_config or WebToolsConfig()
|
||||
self.exec_config = exec_config or ExecToolConfig()
|
||||
self.cron_service = cron_service
|
||||
|
||||
Reference in New Issue
Block a user