mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-15 06:15:57 +00:00
Pre-fetch prompt tools from the agent's toolset, not the caller's
Tool pre-fetch ran the caller's own active tools, so a teammate chatting with a shared agent had the owner's prompt fill in from their tools, and even the owner got every active tool rather than the agent's. It now uses the toolset the run gets: the agent's tools as its owner or sponsor, or the caller's tools and defaults outside an agent. Pre-fetch asks nobody, so on someone else's tool it skips approval-gated actions and anything on a connected account.
This commit is contained in:
1 parent
5b85eac858
commit
454557c3b0
3 files changed
+137
-25
No files matched your search
@@ -22,7 +22,7 @@ def _patch_db(conn):
|
||||
"docsgpt.api.answer.services.stream_processor.db_readonly", _yield
|
||||
), patch(
|
||||
"docsgpt.api.answer.services.stream_processor.db_session", _yield
|
||||
):
|
||||
), patch("docsgpt.agents.tool_executor.db_readonly", _yield):
|
||||
yield
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user