Skip to content

AI Integration

Scrimas edited this page Aug 18, 2026 · 2 revisions

AI Integration

ii-p3drovfx treats AI as a desktop citizen, not a webpage in disguise: a full assistant lives in the shell, reachable from the left sidebar, the launcher, desktop widgets and even the screenshot tool — with your choice of cloud providers or a fully local model, and your keys safely in the system keyring.

This page describes the redesigned AI stack from the feat/ai-rebuild work — the most substantial rework in the fork's history (the AI surfaces, session system, provider catalog and tool system were rebuilt from the ground up).


Your first conversation

  1. Press Super + A — the left sidebar opens on the AI chat.
  2. Pick a provider and model from the model picker in the composer:
    • Cloud — choose Gemini, Claude, OpenRouter, DeepSeek…, then paste your API key into the key manager when prompted (each provider links to where a key is obtained). Keys go into the system keyring, never into config files.
    • Local — install Ollama, ollama pull a model, and select it. No key, no cloud, nothing leaves your machine.
  3. Type. Attach images or files through the composer's attachment tray if you like.
  4. When you're comfortable, try "make my bar transparent and move it to the bottom" — the assistant asks permission, then shows a diff card of the config change before your eyes. Tool permissions (ask/allow) are tuned in Settings → AI Assistant.

Where you talk to it

  • The sidebar AI chat — the classic home: a persistent chat panel in the left sidebar (enable it via the sidebar policies, including a Local mode that restricts the panel to local models).
  • AI in Search — the launcher doubles as a Raycast-style AI surface: an expressive composer at the top, the conversation workspace below, fully keyboard-operable. It's the same conversation and backend as the sidebar, just dressed for the launcher. And it survives its own closing: draft, session, scroll position and an in-flight response all persist — a response that finishes while the launcher is closed surfaces through the Dynamic Island.
  • The desktop — an AI Chat widget and the Search Pill's AI action put the assistant on the wallpaper.
  • Ask AI from a screenshot — the Region Selector's Ask AI action drops the selected image straight into the chat as an attachment.

Sessions, personas and attachments

Conversations are sessions: named, persistent, searchable, switchable from a session drawer — shared between the sidebar and the search surface. Personas save a whole way of answering — system prompt, model, thinking mode, temperature — so switching persona reconfigures everything at once. The composer takes attachments (images and files) through a proper attachment tray.

Responses render as semantic blocks, not just a Markdown blob: text, code blocks, collapsible thinking/reasoning sections, web-search results with sources, tool calls, and config diffs each have their own component.

Providers and models

The model catalog is the single source of truth, with built-in providers:

Provider Notes
Google (Gemini) Streaming API, built-in web search support
Anthropic (Claude) Native Messages API
OpenRouter One key, many models
DeepSeek
OpenCode
Ollama Fully local — no key, no cloud
Custom Any OpenAI-compatible endpoint, with per-model capability flags (vision, tools, thinking, context window, sampling limits…)

You can add your own model entries on top of built-in providers or standalone endpoints. Model capabilities (thinking, vision, attachments, tools) are declared per model, so the UI only offers what the model can actually do.

API keys are entered through the key manager and stored in the system keyring — never in the chat, never in config.json. Each provider entry links to where its key is obtained.

Tools: the assistant can actually do things

With per-tool permission controls (ask / allow), the assistant can:

  • Read your shell configuration — the full config.json, so it knows what options exist before touching anything
  • Change your settings — multi-field config edits, presented as a diff card in the chat so you see exactly what changed ("make my bar transparent and move it to the bottom" is a legitimate request now)
  • Run a bash command — for quick non-interactive queries, with the model instructed to hand anything risky back to you
  • Search the web — switching into search mode for current information, with sources rendered in the reply

Usage dashboard

Settings → AI Assistant includes a usage dashboard: a bento grid of input/output/thinking token counts, request totals, per-model breakdowns and trend deltas across periods (today / 7 / 14 / 30 days / all time). You'll know exactly what your curiosity costs.

AI activity in the Dynamic Island

The AI status notch unifies two worlds: the built-in assistant's activity (model, runtime, token counts while generating) and external AI CLI/IDE agents detected on the system — Antigravity, Command Code, Claude CLI, Gemini CLI, Aider, Goose — shown only while they're actually working.


Configuration

Settings → AI Assistant — provider/model selection, keys, tools & permissions, usage dashboard, and advanced options. The sidebar policies control where the chat appears; persistent options live under Config.options.ai and Config.options.sidebar.ai.

Under the hood

The AI stack lives in services/ai/:

Piece Role
Ai.qml The assistant core: request lifecycle, streaming, session routing
ModelCatalog.qml Providers + models + capabilities, merged with user-defined entries
ApiStrategy.qml + AnthropicApiStrategy / GeminiApiStrategy / OpenAiCompatStrategy Per-API-format request/stream adapters
AiSessions.qml Persistent session storage and switching
AiTools.qml Tool definitions, permissions, wire formats, call logging
AiSearchPage/Surface/Router The launcher AI surface
blocks/ The semantic renderers: think blocks, code blocks, config diff cards, model picker, tools popover, key manager, attachment tray
services/AiStatusService.qml + ai_status_monitor.py Unified AI activity for the Dynamic Island

Related pages

← Back to Home

Clone this wiki locally