Skip to content

Cmd+K AI command panel (Raycast-like UX) #145

@tomymaritano

Description

@tomymaritano

Overview

Build a Cmd+K panel for AI-powered text transformations, separate from the existing Cmd+P command palette.

Current State

  • Cmd+P = Command Palette (21 commands)
  • Cmd+K = Currently editor:insert-link
  • AI Infrastructure = packages/ai-assistant/ (Claude client, prompts, RAG) — no UI commands wired

Design

Trigger: Cmd+K (remap insert-link to Cmd+Shift+K)

Sections:

  • Quick Actions: New Note, Search, Open Recent
  • AI Transform (requires selection): Summarize, Tweet, Rewrite, Extract, Expand, Blog Outline, Custom
  • AI Ask (knowledge context): Ask about notes, Find related ideas

Workflow: Select text → Cmd+K → "Summarize" → AI streams result → Preview → "Insert" → Replaces selection

Architecture

renderer/components/CommandK/
  ├── CommandKPanel.tsx
  ├── CommandKInput.tsx
  ├── CommandKResults.tsx
  ├── CommandKPreview.tsx
  └── useCommandK.ts

packages/ai-assistant/src/
  ├── commands/ (summarize, tweet, rewrite, etc.)
  └── registry.ts

Decisions Needed

  • AI Provider key storage (Settings? .env?)
  • Keybinding resolution (Cmd+K context-aware vs remap)
  • Streaming vs wait-for-complete
  • Context scope (current note vs RAG across all notes)

Deliverables

  • Remap Cmd+K / resolve keybinding conflict
  • CommandK panel component
  • 3 core AI commands (summarize, rewrite, tweet)
  • AI provider settings (API key in Settings)
  • Streaming preview of AI results
  • Insert/replace at cursor

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions