CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-slidev--cli

Modern presentation framework and CLI tool that transforms Markdown files into interactive, web-based slide presentations with built-in development server, export capabilities, and Vue.js integration

Overall
score

100%

Overview
Eval results
Files

task.mdevals/scenario-4/

Presentation Context Menu Extension

Build a custom context menu extension for a Slidev presentation that adds developer-friendly shortcuts when right-clicking on slides during development mode.

Requirements

Your task is to extend the Slidev context menu with custom actions that help developers work with their slides more efficiently. The context menu should include:

  1. Slide Information: Add a menu item that displays an alert showing the current slide number and total slide count (e.g., "Slide 5 of 20")

  2. Copy Slide Path: Add a menu item that copies the current slide's route path to the clipboard

  3. Jump to First Slide: Add a menu item that navigates to the first slide in the presentation

  4. Mode-Specific Display: The custom menu items should only appear in development mode, not in build/production mode

Implementation

Create a setup file that registers these custom context menu items. The setup should use the appropriate Slidev setup hook for context menu customization.

@generates

Test Cases

  • When right-clicking on a slide in development mode, all three custom menu items appear in the context menu @test

  • Clicking the "Slide Information" menu item displays an alert with the correct current slide number and total slide count @test

  • Clicking the "Copy Slide Path" menu item copies the current route path to the clipboard @test

  • Clicking the "Jump to First Slide" menu item navigates to slide 1 @test

Dependencies { .dependencies }

@slidev/cli { .dependency }

Provides presentation framework and context menu customization support.

Install with Tessl CLI

npx tessl i tessl/npm-slidev--cli

tile.json