Repository navigation
KDE AI Chat 1.5.0
KDE AI Chat 1.5.0 is a big update. Direct chats can now use tools: your MCP servers, web search, reading web pages, agent tools in a workspace folder and skills, and every tool use asks you first. OpenCode 2 is supported (#14), the widget follows your Plasma theme (#15) and shows the chat itself when it is big on the desktop (#13). There is also a new ACP agent mode (beta) for other coding agents such as Gemini CLI, Goose or Codex, fallback models, spending and budgets, charts and diagrams in replies, and desktop features such as quick actions on selected text, Ask about my screen and KDE Connect.
Every new feature is off until you turn it on in Settings › Features, which also marks the ones that work in direct chats only. OpenCode and Pi chats use OpenCode's or Pi's own tools, skills, extensions and permissions. Each settings page can be reset to its defaults.
Install: download the .plasmoid file below and install it with Add Widgets › Get New Widgets › Install Widget From Local File, or run kpackagetool6 -t Plasma/Applet -u org.kde.plasma.kdeaichat-v1.5.0.plasmoid to update an installed copy.
Added
-
GitHub Sponsors. Settings › Support now also links to the developer's GitHub Sponsors page.
-
Reset a settings page to its defaults. Every settings page with settings has “Reset this page to defaults…” at its foot. It asks first, says how many settings change, and leaves your lists (providers, fallback models, tool rules, quick actions, prices), keys, chats and memories alone; Cancel in the settings window still undoes it.
-
ACP agents (beta). A new mode for other coding agents that speak the Agent Client Protocol: Gemini CLI (
gemini --acp), Goose (goose acp), Codex and Claude Code through Zed's adapters, or any other. OpenCode and Pi don't need it: they have their own built-in modes, which do more. Choose “Through an ACP agent” on Settings › Connection, pick the agent and press Check the agent. The agent runs on this computer in the chat's folder, with its own model and settings; its tool calls, plans and file changes show in the reply, and it asks before it changes things (Allow, Always allow or Reject, as the agent offers). Each chat continues its own session of the agent. ACP agent sessions… in the chat's ⋮ menu lists the agent's earlier sessions, also those started in a terminal or an editor: open one to continue it here (with what was said, if the agent can replay it) or delete it. Switch: Settings › Features › ACP agents (off by default). -
Skills in direct chats. Skill folders with a SKILL.md (the format Claude and OpenCode use) in your skills folder, or in ~/.claude/skills and ~/.config/opencode/skill once you switch them on, can be switched on in Settings › Tools › Skills. The AI sees each skill's name and one line, and reads the full instructions with a “load_skill” tool only when it needs them; skills are only instructions and nothing in them is run. A chat with a workspace folder also uses that folder's .claude/skills. Direct chats only. Switch: Settings › Features › Skills (off by default).
-
Tool permissions. Settings › Tools › Tool permissions lists every rule about the tools of direct chats in one place: “Always allow” or “Never”, for all chats or for one project's chats (a project rule wins). Add, change or remove rules there; “Always allow” on a request in a project chat is now kept for that project. A tool set to “Never” is not offered to the AI's calls and is never asked for; background tasks follow the same rules. Changing files and running commands always ask.
-
Agent tools in direct chats. A direct chat with a workspace folder can let the AI list, read and search the files in that folder (never outside it), and, if you tick them on Settings › Tools, create and edit files and run commands there. Every change and every command asks you first, every time (no "Always allow"); commands stop after 5 minutes at most. Such chats may take up to 30 tool rounds instead of 8. Switch: Settings › Features › Agent tools (off by default).
-
Fallback models. When a direct chat's model can't answer (the service is down, too slow, limiting how fast you send, out of credit, or the model is gone), the next model of your list answers instead, and the reply says so. Set the list in Settings › Connection after turning on Settings › Features › Fallback models.
-
Estimated costs from a price list. Replies from services that report no cost now get an estimate from the price of the model, marked as an estimate on Settings → Spending (kept apart from reported costs) and counted towards budgets and budget alerts. Prices come from your own prices (Settings → Spending → Prices, dollars per million tokens), then a price file that is filled only when you press Update prices (it reads OpenRouter's public model list once; nothing is fetched by itself), then OpenCode's own model list if it is installed. Models are matched by their exact name, then by the part after the last "/". A model with no price stays "not reported". Part of Settings → Features → Spending and budgets.
-
Charts and Mermaid diagrams in replies. A
chartcode block (a small JSON spec: bar, line or pie) is drawn as a chart by the widget, and amermaidblock is drawn as a diagram by a short-lived helper process using a bundled copy of Mermaid 11.4.1 (nothing is loaded from the web). Each has an Open larger button and a Show code toggle; anything that does not parse stays a normal code block. Settings › Features › Charts and diagrams turns it off. -
Context use circle. A small circle by the message box shows how much of the model's context the chat fills, from the token counts the service reported for the last reply and the model's context size from the provider's model list, OpenCode's catalog or Pi. Hover it for the numbers. When the size isn't known, it shows the token count instead. Settings › Features › Context use turns it off.
-
OpenCode version picker. Settings → Connection → OpenCode has a Version choice: Automatic (as before), OpenCode 1 or OpenCode 2. Check names the version it found and warns when the server runs the other one; OpenCode 1 hides the server password.
-
Side chats. The Side chat button under a message in a direct chat opens a small chat over the popup with the conversation up to that message as context, same prompt, provider, model and settings. Ask a side question without touching the main chat; Add to chat puts an answer into your next message as a quote (nothing is sent by itself) and Drop deletes the side chat. Messages with side chats show an "N side chats" link. Side chats are kept with their chat and have no tools; not available in agent (OpenCode, Pi, AG-UI) or incognito chats. Switch: Settings → Features → Side chats. Off by default: turn it on in Settings → Features.
-
KDE Connect: send to phone, ask from phone. A Send to phone button under every message shares its text to a paired, reachable phone with KDE Connect (one phone: at once; several: you choose; none: a clear message). The text goes over D-Bus, not on a command line other users could read. Asking from the phone: copy text there, tap the Ask KDE AI Chat Run command in the KDE Connect app, and it opens in a new chat here (new
kdeaichat-ask --clipboard; it never sends by itself). Settings → Desktop integration → Ask from phone shows the command and adds it to your paired phones' Run-command lists (only our own entry; it is removed when you turn the feature off). The switch (Settings → Features → KDE Connect) is off by default. See Desktop integration. -
Clickable answers. In direct chats, when the AI offers choices they show as buttons under its reply (a click sends it as your next message), and results with sources show as cards that open the address in your browser when you click them (
httpandhttpsonly; nothing is loaded by itself). This adds two small tools,suggest_repliesandshow_cards, to direct-mode requests; switch it off in Settings → Features → Clickable answers. See Tools. Off by default: turn it on in Settings → Features. -
Spending page with monthly budgets. Settings → Spending shows what your replies cost this month (and earlier months), per provider, per model and per day, as each provider reported it: nothing is estimated, and a reply without a cost counts in tokens only. Give a provider a monthly budget and you get one alert at 80% (you can change the share) and one at 100%, in the chat and as a notification while the popup is closed; messages are still sent. The log holds only times, providers, models and token counts, never chat text, and stays on this computer (
~/.local/share/kdeaichat/usage/). Off by default: turn it on in Settings → Features. -
Back up, restore and import chats. Settings → Storage → Backup makes one file with your chats (with their pictures and attached files), memories, schedules and, if you like, your settings. API keys are never in it, and the MCP server list loses its headers and secret values. Restoring only adds: a chat, memory or project you already have is never overwritten, and restored schedules start switched off. The same section imports a ChatGPT or Claude data export as normal chats.
-
Prompt caching in direct chats. Requests to Anthropic, and to Anthropic models through OpenRouter, mark the stable start of the conversation for the provider's prompt cache, so long chats cost less and answer sooner. Chat info shows the cached tokens. Switching a chat's model warns that the provider's cache starts over.
-
Reply from a notification. The notification for a finished reply has a Reply… box: type your answer and it is sent into that chat as a new message without opening the widget. Not offered in incognito chats or on error notifications. Switch it off in Settings → Features → Reply from a notification. See Desktop integration.
-
AG-UI agents (optional). A fourth way to chat: with any agent that speaks the AG-UI protocol (LangGraph, Mastra, CrewAI, Google ADK, the Claude Agent SDK and more). Turn on Settings → Features → AG-UI agents, then in Settings → Connection choose Through an AG-UI agent, enter the agent's address, an optional key (kept in KDE Wallet) and a name, and press Test connection. Replies stream, tool calls show as cards, and an approval request from the agent becomes an Allow / Reject (or question) card whose answer continues the same reply. Nothing is sent while the switch is off. See Modes and
scripts/dev-agui-mock.pyfor a fake agent to try it with. -
Every keyboard shortcut can be changed, and the texts show the key you use. In the chat, Settings → Appearance → Keyboard shortcuts has a row for each shortcut: click the key, press the new one, and Reset puts the original back; two shortcuts on one key, or a key the chat already uses, get a warning. The shortcuts that work in any app (selected text, my screen, the five quick actions) stay with KDE: Settings → Desktop integration shows the key in use and a Change… button that opens System Settings → Shortcuts, and the Features page does the same. Every text that named a key now names the one in use.
-
Ask about my screen. Press Meta+Alt+S in any app, or the camera button next to the message box, and Spectacle takes a picture of the current window and attaches it to the message box like a pasted picture. Nothing is sent until you type a question and send. The picture is a private file in your runtime folder and is removed like a pasted picture (when sent or dropped, after a day, or when an incognito chat closes). Needs Spectacle; if it is missing you are told how to install it, and on Wayland it may ask once for permission. The switch (Settings → Features → Ask about my screen) is off by default; the shortcut file is removed when you turn it off. See Desktop integration.
-
Background tasks. Hand a longer job to its own task, such as "research the best terminal fonts and summarise" or "fix the failing test in this project". Press Run as background task under the message box or type
/task <what to do>. The task has its own notes, keeps working after you close the chat (it runs as its ownsystemd-run --userprocess, so even a plasmashell restart does not stop it), and its result comes back to the chat it started from with a notification that never shows the answer. ⋮ → Background tasks… lists your tasks (waiting, running, needs you, done, failed, stopped) with Stop, Retry, Open and Remove, and the task's detail view lets you edit its notes. Direct tasks can use your MCP and web tools, but only those you already chose "Always allow" for; any other tool, and any OpenCode or Pi permission request, pauses the task as "Needs you" (a dot on the panel icon, Allow or Deny in the task) and is never approved by itself. OpenCode and Pi tasks use their own session, in the chat's project folder when it has one. Limits: 2 tasks at once, 30 minutes, 40 model requests, 30 minutes to answer an approval. Incognito chats can't start tasks. The switch (Settings → Features → Background tasks) is off by default; turning it off stops running tasks and keeps their notes. See Background tasks. -
Watch web pages. Be told when a public web page changes, a price on it drops below a number you choose, or a text appears on it (for example "in stock"). A watch is added in Settings → Schedules → Watches, or by typing
/watch <address> below 80in a chat, which only fills in the form. Pages are checked on a schedule from 15 minutes to a day, also with the widget closed, by one systemd user timer that exists only while the switch is on and a watch is active. Each alert fires once per new state: a notification with the watch name and what happened (with an Open page button while the widget runs) and a line in the chat you chose. A failed check is retried after twice the interval, then four times, up to 24 hours. Pages are read with the rules of the AI's Read web pages tool (public addresses only); nothing is sent to an AI, and only a fingerprint, a price or yes/no is kept, never the page. The switch (Settings → Features → Watch web pages) is off by default; turning it off removes the timer and keeps the watches. See Watch web pages. -
The panel icon shows what is happening. A small dot in the corner of the panel icon (it works with the normal icon, an animated image and a video) tells you, from all your chats, when to come back: yellow-orange when a permission or question card is waiting, red when the last request failed, blue and gently pulsing while a reply is being written or a tool runs, green when a reply finished while the chat was closed. Opening the chat clears the green and red dot for it. The tooltip gets one line, such as "Waiting for your approval in Plans"; the name of an incognito chat is never shown. The pulse stops when Plasma's animations are off. Turn it off in Settings → Features → Panel icon status (on by default; nothing is stored or sent).
-
Quick actions on selected text. Select text in any app and press Meta+Alt+1 to 5 to run an action on it: Rewrite, Fix grammar, Shorter, Explain or Translate. The result is copied to the clipboard and a notification says "Result copied — paste with Ctrl+V" (it never shows the text); Explain opens a new chat with the answer. All five actions are editable (name, instruction, copy or show in chat) in Settings → Desktop integration → Actions, with a button to go back to the defaults. The switch is in Settings → Features and is off by default, because the selected text goes to your AI provider. The five shortcut files are installed and removed with the switch; copying uses
wl-copy,xcliporxsel. Replacing the selection in place is not offered (it would need a background program that types into other apps). See Desktop integration. -
Settings → Features: one place to switch every optional feature on or off. Memory, reading web pages, read aloud, dictation, asking from KRunner, asking about a file in Dolphin and asking about selected text each have a switch and a plain explanation there. The old Memory, Tools, Voice and Desktop integration pages keep their detailed options and show a note, such as "Dictation is off. Turn it on in Settings → Features.", while the feature is off. The KRunner, Dolphin and shortcut files are still installed and removed when you press OK or Apply. The list is
contents/ui/config/Features.js; see Features. -
Tools in direct chats: your MCP servers, web search and reading web pages (#3, #5). A new Settings → Tools page takes your MCP servers in the common
mcpServersJSON format (local servers started with a command, and remote Streamable HTTP servers), a web search (SearXNG, Brave Search or Tavily; keys go to KWallet, folderKDEAIChat-tools) andfetch_url, which reads one public web page as text and refuses addresses on your computer or home network. Every tool call shows a card first: Allow, Always allow (that tool from now on; the page can clear the list) or Reject. The tools run in a small local helper process that only the widget can talk to and that stops after ten minutes without use. Scheduled runs get no tools. See Tools. -
OpenCode 2 works in OpenCode mode (#14). OpenCode 2 removed the old server routes and answers them with its web page, so the widget used to say it was running and then fail with "The server sent a reply that isn't JSON". The widget now checks which OpenCode answers, says "OpenCode 2" or "OpenCode 1" in Check setup, and talks to each with its own routes: chats (streaming, stop, permission cards, agents, providers and models) and scheduled runs. OpenCode 2 needs a password: a server the widget starts gets one made for it and kept in KWallet; for your own server there is a new Server password field in Settings → Connection → OpenCode (also KWallet, never a file or a command line). A web page where OpenCode should answer is now reported as that, not as a working server. Not shown yet with OpenCode 2: questions the agent asks.
Fixed
- “Reset this page to defaults” keeps what you built. On the Chat page it also deleted your prompt templates; templates, MCP servers, budgets, always-allowed tools and the skills you chose are now kept, as the confirmation says.
- Side chats show replies formatted (bold, lists, code) like the chat does, made safe the same way, and the “From:” line shows plain words instead of Markdown marks.
- OpenCode 2.4 is recognised as OpenCode 2. A version printed as "opencode v2.4.3" was read as version 1, so the widget spoke the old API to a new server. The widget's own server is also started with the password under both names OpenCode 2 reads, and the default address no longer ends in /v1.
- A chat's workspace skills work without agent tools. Skills in a direct chat's folder were only offered when agent tools were on.
- Fallback models also take over when the model ID is not valid. OpenRouter's "… is not a valid model ID" now counts as a missing model, so the next model in your fallback list answers.
- No more requests that wait forever. Qt ignores the time limit on web requests, so a server that accepted the connection and never answered (a stuck OpenCode server, a provider behind a broken proxy) left the chat, a provider check or a model list waiting forever. Every request now has a real limit. The Time limit in Settings › Connection now works too: it counts from the last data received, so a reply that keeps arriving is never cut off.
- Settings no longer piles up hidden windows. Pressing "Open settings" again while Settings is still opening (a held key, quick clicks) used to build a new hidden Settings window each time and keep hundreds of MB; now one window opens. Enter in Memory's add and search boxes and other add/save boxes no longer presses OK and closes Settings, the mouse wheel scrolls the page instead of changing number boxes, and a save that is running when Settings closes still finishes.
- OpenCode settings show only what the server confirmed. Provider, Model and Variant show only once the server has answered with its list; until then the saved choice is shown as a plain line. Looking for the server and loading its providers now give up after a few seconds instead of waiting forever, and a saved "OpenCode 2" no longer shows as "Automatic" when the page opens. Check setup now says the PDF and Word lines are about reading files you attach.
- Clearer setup errors. A provider with no model now says "No model is chosen for …" instead of claiming the API key is missing, and "no model set" is highlighted in the provider list. A local address such as http://localhost:11434 (no trailing slash) counts as local, a provider saved twice is listed once, and Check setup gives the "ollama serve" hint only for Ollama.
- Even line spacing. Help texts that named a settings page ("Settings → Features") had about one and a half times the normal line spacing, because the usual Plasma font has no "→". They now use "›". The tool server check also names the entries that can't be used.
- Memory, Spending and Chat settings fixes. Undo brings back every memory you just deleted, not only the last one. Budgets read 1,000 as one thousand, refuse hex and too-large amounts (the old budget stays) and say why a text isn't a budget. Templates refuse empty text, duplicate names and very long names, and broken saved entries no longer break the list. A default workspace that isn't an existing folder is warned about, Reset this page also resets the incognito question, and settings pages fit a narrow (~420 px) window.
- Settings stress fixes (Personality, Tools, Voice, Desktop, Appearance). The About you, Always/never and custom personality boxes stop at the length that is sent and show a counter; avatar paths that are too long, badly escaped or end in spaces are handled; broken server JSON says where, the SearXNG address is checked, and empty or odd replies from the tools helper no longer break the page; the Speech Note check times out; web addresses with direction-changing characters or over 2048 characters are refused; the KRunner word follows the same rule as the helper and is saved as the word in use; an emptied quick-action name or instruction shows what is saved, and instructions have a 2000-character counter; a saved text size outside 50 to 200 % is corrected; a name of only spaces is cleared.
- Schedules and Storage fixes. Schedule names are shown as plain text (no HTML). Save stays off while the schedule says "Not valid yet", the cron check names the first wrong field, a refused save's message goes away when you edit, and Add time no longer adds another invalid time. In Storage, importing a file with nothing usable now says so (and how many conversations were skipped) instead of a green success, errors read in plain words, the result box scrolls into view, sizes are real file sizes, 999 KB-style rounding shows "1 MB", and odd answers no longer break the page. Restoring a backup never stops half way, skips damaged chats and schedules and never writes through a linked attachments folder.
- The animated panel icon no longer slows down the desktop. A GIF is now decoded at icon size and its frames are kept, instead of decoding the full-size picture for every frame (about 7 times less CPU for a large GIF).
- Text from other programs is never sent into an agent chat by itself. KRunner, Dolphin, selected text and quick actions put their text in the message box of an OpenCode, Pi or AG-UI chat (agents that can run commands) and wait for you to press Send.
- Safer files. Files and folders the helper creates are private to you; starting the Pi bridge is locked so two starts can't race, and its log is rotated.
- Moving from older versions. A failed chat move is tried again on the next start (and you are told when old chats could not be moved), keys are read back from KDE Wallet before the plain copies are cleared, the old wallet folder is kept while it still holds entries, and a damaged old memory or schedules file is reported and kept instead of blocking the rest.
- The widget loads again with Qt 6.10. Qt 6.10 reads
finalas a keyword, and one function used it as a name, so the whole widget showed "Sorry! There was an error loading KDE AI Chat". - A big widget on the desktop shows the chat (#13). The widget used to stay a large icon however big it was made. Now, on the desktop, it shows the chat itself once it is bigger than about 20 × 22 grid units, and the icon when smaller; in a panel it is always the icon. The chat on the desktop can be smaller than the popup and has no resize grip (Plasma's own handles resize it).
- The chat follows the Plasma theme (#15). The Send button, the setup list, menus, fields and other controls in the chat were drawn in the application colour scheme, so with a Plasma theme in other colours they stood out (a light Send button and white rows on a dark popup). They now use Plasma's own controls, and Send is filled with the theme's accent colour. The settings window keeps the application style.
Changed
- Clearer about OpenCode, Pi, ACP and AG-UI. OpenCode and Pi are built-in modes: the widget talks to them directly, not through ACP or AG-UI. The ACP choice says it is for other coding agents and the AG-UI choice says it is for agents that run as a web service. docs/modes.md has an ACP section and a “Which one for OpenCode or Pi?” note.
- One reset per settings page. Appearance and Chat had an older “Reset this page” button above the new “Reset this page to defaults…” bar; only the bar is left, and it asks first.
- New features that haven't been tried enough with real services say “(beta)” in Settings › Features: AG-UI agents, ACP agents, background tasks, watch web pages, KDE Connect, side chats, clickable answers and reply from a notification. The AG-UI and ACP choices under Settings › Connection › Send messages say it too.
- Settings › Features says which features are for direct chats only. Clickable answers, side chats, reading web pages, agent tools, skills and fallback models are marked “Direct chats only”, and the page explains that OpenCode and Pi chats get tools, skills, MCP servers and extensions from OpenCode or Pi itself, which also decide which actions ask you first (they may change files in the chat's folder without asking unless you set up permissions there).
- The folder row can be hidden in every mode. Settings › Appearance › "Show the folder controls in the chat window" now hides the row under the title in OpenCode chats too, so KDE AI Chat handles folders by itself: new chats use the default workspace (Settings › Chat) or their project's folder, and Pi chats work in their own folder.
- A clearer Spending page. It lists only the providers used this month (or with a budget), each with its tokens (sent and received) and its cost. An "Add a budget for" picker adds the others, and the page says which chats are counted: direct, OpenCode and Pi, not AG-UI.
- Attached files are kept once as files, not inside the chat file. Each attachment is stored in the chat's folder (
attachments/<chat>/<hash>.<ext>, private, written once per file) and the chat file keeps only a short reference, so chats with pictures and documents stay small and save fast. Old chats are moved the next time they are saved, after the copy has been read back and checked. Incognito chats still write no files. Deleting a chat deletes its attachments. - Chats are read when you open them. At start only the chat list is read; a chat's messages are read when you open it (search reads the rest the first time you search).