fix(assistant): 工具卡片不再永久转圈 - #2286
Merged
Merged
Conversation
三处叠加导致助手会话结束后仍有卡片在转: 1. 知识库工具内部通过 invoke 调检索器,等于又开了一次工具调用。 聊天里每次检索多出一张卡,名字取自检索器而非知识库,显示 「知识库已被删除」。改为直接调用,检索回到工具内部步骤。 2. 那张多出来的卡永远不闭合:检索器返回的是文档对象,结束帧 序列化直接抛异常,帧发不出去也不入库。改为对任何工具返回值 都能序列化,并容忍结束回调拿不到工具名。 3. 会话结束时前端不兜底。两个前端收到 close 只翻运行标记, 漏掉的帧没人收尾。现在会把未闭合的卡片收掉,并标记为 「工具调用未返回结果」——不给它一个没挣到的成功勾。 test/api + test/tool 45 项通过;两端 typecheck / lint / check-i18n 通过。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.