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:
AlexRV12
2026-09-09 14:20:20 +02:00
parent 598c1a1658
commit 3f10b7f91a
@@ -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)
},