{"record":{"id":"1e806092af2ad3ef","repo":"ueberdosis/tiptap","slug":"tiptap-warn-aiinsertreveal-needs-a-positive","errorCode":null,"errorMessage":"[tiptap warn]: \"AiInsertReveal\" needs a positive \"durationMs\" to hold a reveal, got ${durationMs}. Nothing is revealed.","messagePattern":"\\[tiptap warn\\]: \"AiInsertReveal\" needs a positive \"durationMs\" to hold a reveal, got (.+?)\\. Nothing is revealed\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/ai-toolkit/src/streaming-reveal.ts","lineNumber":249,"sourceCode":"      provider: null,\n    }\n  },\n\n  onCreate() {\n    const { provider, durationMs } = this.options\n\n    if (!provider) {\n      console.warn(\n        '[tiptap warn]: The \"provider\" option is required for \"AiInsertReveal\" to tell the AI apart from other collaborators. Nothing is revealed without it.',\n      )\n    } else if (!provider.awareness) {\n      console.warn(\n        '[tiptap warn]: The provider passed to \"AiInsertReveal\" has no awareness, so the AI cannot be identified. Nothing is revealed.',\n      )\n    }\n\n    if (durationMs <= 0) {\n      console.warn(\n        `[tiptap warn]: \"AiInsertReveal\" needs a positive \"durationMs\" to hold a reveal, got ${durationMs}. Nothing is revealed.`,\n      )\n    }\n  },\n\n  addProseMirrorPlugins() {\n    const { className, durationMs, provider } = this.options\n\n    // Runs in insertion (time) order, so expired entries are always a prefix.\n    const entries: RevealEntry[] = []\n\n    // Never pruned: the AI clears its awareness entry when it stops, and its first\n    // tokens can arrive before that entry lands.\n    const aiClients = new Set<number>()\n\n    const dropExpired = (now: number) => {\n      let firstActive = 0\n      while (firstActive < entries.length && now - entries[firstActive].at >= durationMs) {","sourceCodeStart":231,"sourceCodeEnd":267,"githubUrl":"https://github.com/ueberdosis/tiptap/blob/496d53afd7e4e3c7424b4749adeff4f45e27ddb0/packages/ai-toolkit/src/streaming-reveal.ts#L231-L267","documentation":"Error \"[tiptap warn]: \"AiInsertReveal\" needs a positive \"durationMs\" to hold a reveal, got ${durationMs}. Nothing is revealed.\" thrown in ueberdosis/tiptap.","triggerScenarios":"Thrown at packages/ai-toolkit/src/streaming-reveal.ts:249 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"496d53afd7e4e3c7424b4749adeff4f45e27ddb0","analyzedAt":"2026-08-26T22:41:43.400Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}