mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-21 00:02:30 +00:00
docs: record why the session tool filter runs unconditionally
The filter would strip everything from a non-GLOBAL toolset, whose names carry no policy entries. That cannot happen — `changeMode` refuses to move a session chat out of GLOBAL, and `sessionAccess` is only ever set for session chats — but the dependency was not visible at the filter itself.
This commit is contained in:
@@ -2691,7 +2691,10 @@ export class AIChatManager {
|
||||
// The one place every tool source converges, which is why the capability
|
||||
// filter belongs here and not in `globalToolsFor`. This same array both
|
||||
// advertises the tools and dispatches the calls, so a withheld tool is
|
||||
// unreachable rather than merely unlisted.
|
||||
// unreachable rather than merely unlisted. Filtering is unconditional
|
||||
// because `sessionAccess` is set only for session chats and `changeMode`
|
||||
// keeps those GLOBAL — a non-GLOBAL toolset has no policy entries and
|
||||
// would fail closed to nothing.
|
||||
get tools() {
|
||||
return filterSessionTools([...self.tools, ...self.planMode.tools], self.sessionAccess)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user