PBI-55: ask-user-question – triggerPush na claudeQuestion.create

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scrum4Me Agent 2026-05-07 21:37:20 +02:00
parent 18c34b63de
commit 4c476464ec

View file

@ -10,6 +10,7 @@ import { prisma } from '../prisma.js'
import { requireWriteAccess } from '../auth.js'
import { userCanAccessStory, userOwnsIdea } from '../access.js'
import { toolError, toolJson, withToolErrors } from '../errors.js'
import { triggerPush } from '../lib/push-trigger.js'
const PENDING_TTL_HOURS = 24
const POLL_INTERVAL_MS = 2_000
@ -127,6 +128,13 @@ export function registerAskUserQuestionTool(server: McpServer) {
},
})
void triggerPush(auth.userId, {
title: 'Claude heeft een vraag',
body: question.slice(0, 120),
url: '/notifications',
tag: `claude-q-${created.id}`,
})
// Async-mode (default): return direct.
if (!wait_seconds || wait_seconds === 0) {
return toolJson(summarize(created))