fix(notifications): suppress permission notifs when session auto-accepts

Server now mirrors client-side Permission Auto-Accept via
POST /api/notifications/auto-accept and short-circuits permission.asked
dispatch (walking the session parent chain). Prior 500ms debounce raced
the client auto-response and leaked notifications.

Also hint under Summarize Last Message that templates must contain
{last_message} for the setting to take effect.
This commit is contained in:
Bohdan Triapitsyn
2026-04-22 19:22:50 +03:00
parent 1ad64cc69e
commit a2730b793e
7 changed files with 91 additions and 0 deletions
+2
View File
@@ -646,6 +646,7 @@ const notificationTriggerRuntime = createNotificationTriggerRuntime({
});
const maybeSendPushForTrigger = (...args) => notificationTriggerRuntime.maybeSendPushForTrigger(...args);
const setAutoAcceptSession = (...args) => notificationTriggerRuntime.setAutoAcceptSession(...args);
const openCodeWatcherRuntime = createOpenCodeWatcherRuntime({
waitForOpenCodePort: (...args) => waitForOpenCodePort(...args),
@@ -1098,6 +1099,7 @@ async function main(options = {}) {
modelsMetadataCacheTtl: MODELS_METADATA_CACHE_TTL,
fetchFreeZenModels,
getCachedZenModels,
setAutoAcceptSession,
});
uiAuthController = bootstrapResult.uiAuthController;