feat(i18n): localize backend messages by workspace language

This commit is contained in:
Hyu
2026-10-15 05:31:04 +00:00
committed by RockChinQ
parent b1d9484876
commit e29fd27f02
74 changed files with 2296 additions and 177 deletions
+5 -1
View File
@@ -1,5 +1,7 @@
from __future__ import annotations
from ...i18n import pipeline_notice
import typing
from .. import entities
@@ -175,7 +177,9 @@ class ResponseWrapper(stage.PipelineStage):
if result.tool_calls is not None and len(result.tool_calls) > 0: # 有函数调用
function_names = [tc.function.name for tc in result.tool_calls]
reply_text = f'Call {".".join(function_names)}...'
reply_text = pipeline_notice(
query, 'tool-call-hint', 'Calling {tools}...', tools=', '.join(function_names)
)
# Only surface the tool-call notice when the pipeline option
# is enabled. Emitting it unconditionally would become the