refactor(agent): remove final_answer tool references and update related logic

- Eliminated all instances of the final_answer tool from the agent's configuration and logic, transitioning to a model where the agent concludes responses with plain text instead.
- Updated event handling and response analysis to reflect this change, ensuring that the agent's output is now directly delivered as text without relying on a dedicated final answer tool.
- Adjusted localization strings across multiple languages to remove references to final_answer, enhancing clarity and consistency in user-facing messages.
- Improved the overall structure of the agent's response handling to streamline the process and reduce potential confusion regarding tool usage.

refactor(agent): streamline answer handling and preamble logic

- Updated the agent's response handling to treat any text streamed before a tool call as a preamble, ensuring it is not included in the final answer.
- Removed the superseded marker logic from the event emission process, simplifying the flow of answer content and enhancing clarity in the UI.
- Adjusted the event handling to ensure that preamble segments are correctly retracted and relocated into the steps tree, improving the overall user experience.
- Enhanced the agent's internal logic to better manage answer segments and their states during streaming, leading to a more coherent response structure.
This commit is contained in:
wizardchen
2026-06-04 02:35:54 +08:00
committed by lyingbug
parent b9dde2abe8
commit d38a6efd87
31 changed files with 722 additions and 663 deletions
+4 -2
View File
@@ -1725,6 +1725,10 @@ export default {
toolFallback: "도구",
stepsCompleted: "<strong>{steps}</strong>개 단계 완료",
stepsCompletedWithDuration: "<strong>{steps}</strong>개 단계 완료, 소요 시간 <strong>{duration}</strong>",
reasoningRounds: "사고 <strong>{rounds}</strong>회",
toolCalls: "도구 <strong>{tools}</strong>회 호출",
durationSuffix: "소요 시간 <strong>{duration}</strong>",
stepSummarySeparator: " · ",
title: "에이전트",
subtitle: "에이전트 구성 및 관리, 대화 동작 및 기능 맞춤화",
createAgent: "에이전트 만들기",
@@ -4580,7 +4584,6 @@ export default {
thinking: '사고',
imageAnalysis: '이미지 내용 분석',
queryKnowledgeGraph: '지식 그래프 조회',
finalAnswer: '답변 생성',
readSkill: '스킬 읽기',
executeSkillScript: '스킬 스크립트 실행',
dataAnalysis: '데이터 분석',
@@ -4817,7 +4820,6 @@ export default {
// 런타임 주입 (미리보기용)
webSearch: '웹 검색',
webFetch: '웹 페이지 가져오기',
finalAnswer: '최종 답변 제출',
// 그룹
groupBase: '기본',
groupRag: '지식베이스 검색 (RAG)',