ClipSpacesClipSpaces Docs
Back to app

All releases

AI space assistant (OpenRouter)

Reworked the AI panel from a one-shot "ask + apply actions" tool into a space assistant: it scans the current space, briefs you on it, then answers questions.

Added

  • OpenRouter backend (app/api/ai/route.ts, rewritten). OpenAI-compatible chat completions; configure with OPENROUTER_API_KEY (+ optional OPENROUTER_MODEL, default anthropic/claude-sonnet-4.5). Two modes: brief (opening briefing) and chat (Q&A with conversation history). The system prompt is purpose-agnostic — it infers what the space is about — and describes every card kind plus the connections.
  • Connections as context. Canvas now exposes getConnections() (the React Flow edges drawn between cards) through CanvasHandle; the panel feeds them to the model so it can reason over how cards relate.
  • Briefing + chat UI (components/AIPanel.tsx, rewritten). On open it scans the space and drops an auto-briefing as the first message, then a chat thread for follow-ups, with broad starter prompts.

Changed

  • AI now opens as a compact popover anchored above the Ask AI button — no more full-screen dim/blur backdrop or full-screen scan animation. Click outside or Esc to close.
  • Dropped the "proposed changes / Apply all" action flow from the panel (the model no longer mutates the canvas; Canvas.applyAIActions remains available for reuse).