feat: add tool_progress_style config (accumulate vs separate)
Add display.tool_progress_style setting to control how tool progress messages are displayed in chat platforms: - 'accumulate' (default): Edit a single message with all tool calls (new v0.9.0 behavior) - 'separate': Send each tool call as its own message, interleaved with thinking messages (pre-v0.9 behavior, better readability) The setting participates in the per-platform display override system and can be set globally or per-platform. Files: gateway/display_config.py, gateway/run.py
This commit is contained in:
committed by
Teknium
parent
98ae28657f
commit
fc956b9db6
+3
-1
@@ -13624,6 +13624,8 @@ class GatewayRunner(GatewayAuthorizationMixin, GatewayKanbanWatchersMixin, Gatew
|
||||
if _env_tp and not _tool_progress_configured
|
||||
else (_resolved_tp or _env_tp or "all")
|
||||
)
|
||||
# Tool progress style: "accumulate" (edit single msg) or "separate" (one msg per tool)
|
||||
progress_style = resolve_display_setting(user_config, platform_key, "tool_progress_style") or "accumulate"
|
||||
# Disable tool progress for webhooks - they don't support message editing,
|
||||
# so each progress line would be sent as a separate message.
|
||||
from gateway.config import Platform
|
||||
@@ -13930,7 +13932,7 @@ class GatewayRunner(GatewayAuthorizationMixin, GatewayKanbanWatchersMixin, Gatew
|
||||
|
||||
progress_lines = [] # Accumulated tool lines for the CURRENT editable bubble
|
||||
progress_msg_id = None # ID of the current progress message to edit
|
||||
can_edit = True # False once an edit fails (platform doesn't support it)
|
||||
can_edit = progress_style != "separate" # "separate" = one message per tool (pre-v0.9 behavior)
|
||||
_last_edit_ts = 0.0 # Throttle edits to avoid Telegram flood control
|
||||
_PROGRESS_EDIT_INTERVAL = 1.5 # Minimum seconds between edits
|
||||
|
||||
|
||||
Reference in New Issue
Block a user