fix(session): cleared session-scoped tool state

Cleared queued tool-choice directives and ACP always decisions after successful logical session transitions.

Added new-session and cross-session regression coverage for staged resolves and both ACP always decisions.

Fixes #4093
This commit is contained in:
roboomp
2026-07-24 02:23:15 +02:00
committed by can1357
parent 3d64910bb0
commit e6cdfd6187
5 changed files with 121 additions and 3 deletions
@@ -158,6 +158,11 @@ export class SessionTools {
return this.#skillsSettings;
}
/** Drops cached per-session ACP `allow_always`/`reject_always` decisions. */
clearAcpPermissionDecisions(): void {
this.#acpPermissionDecisions.clear();
}
/** Re-wraps active and mounted tools after the ACP client changes. */
refreshAcpPermissionGates(): void {
this.#acpPermissionDecisions.clear();