Skip to content

fix: show tool execution source - #6667

Merged
liuruibin merged 1 commit into
1Panel-dev:v2from
Iams4kura:bugfix/show-tool-record-source-20260812t080209z
Aug 12, 2026
Merged

fix: show tool execution source#6667
liuruibin merged 1 commit into
1Panel-dev:v2from
Iams4kura:bugfix/show-tool-record-source-20260812t080209z

Conversation

@Iams4kura

Copy link
Copy Markdown
Contributor

What this PR does / why we need it?

Fixes #6647.

Tool execution records currently show and search the selected tool name in the Trigger Source field instead of the agent, knowledge base, or trigger that invoked it.

Summary of your change

  • Restore the annotated source_name in tool execution record responses.
  • Apply source-name searches to that annotation instead of tool_name.
  • Add a regression test that gives the source and tool distinct names and verifies both behaviors.

Regression evidence

  • Before: python -m unittest tools.tests.ToolRecordSerializerTestCase.test_get_tool_records_uses_annotated_source_name -v exited 1 with ('Price Lookup', False).

  • After: the same command exited 0 with the fix.

Verification

  • python -m unittest tools.tests -v
  • .venv/bin/ruff check apps/tools/tests.py
  • .venv/bin/ruff check --isolated --select E9,F63,F7,F82 apps/tools/serializers/tool.py apps/tools/tests.py
  • .venv/bin/ruff format --check apps/tools/tests.py

Scope

  • 2 files changed, +53 / -4 lines

Please indicate you've done the following:

  • Made sure tests are passing and test coverage is added if needed.
  • Made sure commit message follow the rule of Conventional Commits specification.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed. No documentation change is required for this behavior correction.

@liuruibin
liuruibin force-pushed the bugfix/show-tool-record-source-20260812t080209z branch from b7a6e11 to cd4e29d Compare August 12, 2026 09:58
@liuruibin
liuruibin merged commit 65c5ff8 into 1Panel-dev:v2 Aug 12, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 智能体调用工具 查看工具执行记录 执行来源不是智能体名字而是工具名字

2 participants