slidevjs/slidev · error · Error
No slide found with title: "${input.title}".
Error message
No slide found with title: "${input.title}". What it means
Thrown by the `slidev_findSlideNoByTitle` VS Code LM tool when `project.data.slides.findIndex(slide => slide.title === input.title)` returns -1. The match is exact and case-sensitive: it compares the whole title string, so any difference in casing, whitespace, or trailing punctuation fails. Slides without a title are stored as `undefined`/empty and will never equal a non-empty query.
Source
Thrown at packages/vscode/src/lmTools.ts:55
throw new Error(`No content found for slide number ${input.slideNo} in entry: ${project.entry}. Available slides numbers: 1-${project.data.slides.length}`)
}
return `Content of slide number ${input.slideNo} in entry "${project.entry}" in file "${slide.source.filepath}":\n\n${stringifySlide(slide.source, 1)}`
})
// Get all slide titles
registerSimpleTool('slidev_getAllSlideTitles', (input: { entrySlidePath: string }) => {
const project = resolveProjectFromEntry(input.entrySlidePath)
const titles = project.data.slides.map((slide, idx) => `#${idx + 1}: ${slide.title || '(Untitled)'}`)
return formatList(titles)
})
// Find slide number by title
registerSimpleTool('slidev_findSlideNoByTitle', (input: { entrySlidePath: string, title: string }) => {
const project = resolveProjectFromEntry(input.entrySlidePath)
const idx = project.data.slides.findIndex(slide => slide.title === input.title)
if (idx === -1) {
throw new Error(`No slide found with title: "${input.title}".`)
}
return formatObject({
'Title': input.title,
'Slide number': idx + 1,
})
})
// List all loaded Slidev entries
registerSimpleTool('slidev_listEntries', () => {
const entries = [...projects.keys()]
if (entries.length === 0) {
return 'No loaded Slidev project entries.'
}
return formatList(entries)
})
// Get project preview port
registerSimpleTool('slidev_getPreviewPort', (input: { entrySlidePath: string }) => {View on GitHub (pinned to 0d798ace58)
Solutions
- Call `slidev_getAllSlideTitles` first and copy the exact title string (case, spacing, punctuation) into `title`.
- If unsure of the exact title, iterate titles from `slidev_getAllSlideTitles` and do your own case-insensitive/substring match client-side, then pass the slide number directly to `slidev_getSlideContent` instead.
- Confirm the target slide actually has a title (untitled slides appear as `(Untitled)` in the list and cannot be found by title).
Example fix
// before: approximate title fails exact match
{ entrySlidePath: 'slides.md', title: 'agenda' } // real title is 'Agenda'
// after: use the verbatim title returned by the titles tool
// slidev_getAllSlideTitles -> '#1: Agenda'
{ entrySlidePath: 'slides.md', title: 'Agenda' } Defensive patterns
Strategy: validation
Validate before calling
// Do not guess titles. Fetch the canonical list and match exactly:
// const titles = await tools.slidev_getAllSlideTitles(...)
// each line is '#k: <title>' or '#k: (Untitled)'
function findExactTitle(input: string, titles: string[]): number | null {
for (const line of titles) {
const m = line.match(/^#(\d+): (.*)$/)
if (m && m[2] === input) return Number(m[1])
}
return null // caller should fall back to slidev_getSlideContent by number
} Type guard
function isKnownTitle(title: string, knownTitles: string[]): boolean {
return knownTitles.includes(title)
} Prevention
- Never paraphrase titles; copy them verbatim from `slidev_getAllSlideTitles`.
- Remember the match is case-sensitive and whole-string — trailing spaces fail.
- If a title is uncertain, resolve it to a slide number client-side then use `slidev_getSlideContent`.
- Untitled slides (shown as `(Untitled)`) cannot be found by title; use their number instead.
When it happens
Trigger: The LM passes a title that differs from the slide's actual `title` field — wrong case, extra spaces, missing punctuation, or a paraphrased title. Also fails when the target slide has no title at all, or when the model guessed a title instead of reading it from `slidev_getAllSlideTitles`.
Common situations: The model free-forms a title rather than copying it verbatim; the deck uses Markdown formatting in titles (e.g. `## Title`) that gets stripped/parsed differently; titles contain emoji or special chars the model normalized; multiple slides share partial title text but none match exactly.
Related errors
- No active slide project found.
- No content found for slide number ${input.slideNo} in entry:
- entrySlidePath is required.
- No active slide entry found. Please set an active slide entr
- No project found for entry: ${entry}. All entries: ${formatL
AI-assisted analysis of slidevjs/slidev@0d798ace58 (2026-08-12).
Data as JSON: /api/errors/fb9623b938cde18f.
Report an issue: GitHub.