feat(display): add tool_progress previews for fact_store and fact_feedback#28618
Open
zccyman wants to merge 1 commit into
Open
feat(display): add tool_progress previews for fact_store and fact_feedback#28618zccyman wants to merge 1 commit into
zccyman wants to merge 1 commit into
Conversation
…dback Previously, Feishu tool_progress bubbles showed only the tool name (e.g. '⚙️ fact_store...') for fact_store and fact_feedback calls, because build_tool_preview() had no handler for these tools. Add action-based preview generation: - fact_store: add (+content), search (query), probe (entity), reason (entities), update/remove (#id), list - fact_feedback: action + #fact_id Fixes NousResearch#28598
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.
Problem
When
tool_progressis enabled on the Feishu platform, tools likefact_storeandfact_feedbackshow unhelpful progress bubbles — only the tool name (e.g.⚙️ fact_store...) with no indication of what action is being performed or what data is involved.This is because
build_tool_preview()inagent/display.pyhad no handler for these tools, returningNonewhich falls through to a generic tool-name-only display.Solution
Add action-based preview generation for both tools in
build_tool_preview():fact_store— 6 actions:add+ "content..."+ "user prefers dark mode"searchsearch: "query..."search: "deploy process"probeprobe: entityprobe: alicereasonreason: e1, e2, e3reason: alice, bobupdateupdate: #idupdate: #42removeremove: #idremove: #7fact_feedback— shows action + fact ID:helpful: #136Long content is truncated at 25-30 chars with
...suffix, matching the existingmemorytool pattern.Testing
fact_storeactions +fact_feedback+ truncationtest_display.pypassFixes #28598