Commit Graph
2 Commits
Author SHA1 Message Date
Ethan d8a78b28fd refactor(coderd): share chat sends and interrupts with in-process callers (#30730)
This follows on from #30027, which added `api.CreateChatAsUser`, and
does the same for sending a message to a chat and interrupting it. These
aren't new endpoints, they're Go methods for code running inside coderd
(say, a Slack bot) that needs to keep a conversation going in a chat it
created, without an API key. Nothing calls them yet.

We'll move the bodies of `POST /api/v2/chats/{chat}/messages` and `POST
/api/v2/chats/{chat}/interrupt` into functions that both the handlers
and `api.SendChatMessageAsUser` / `api.InterruptChatAsUser` call. The
caller passes a user ID, and the call runs with that user's own roles,
so it can't do anything that user couldn't already do over the API. The
endpoints' behaviour doesn't change.
2026-10-23 12:53:39 +11:00
edee917d88 feat: add experimental agents support (#22290)
feat: add AI chat system with agent tools and chat UI

Introduce the chatd subsystem and Agents UI for AI-powered chat
within Coder workspaces.

- Add chatd package with chat loop, message compaction, prompt
  management, and LLM provider integration (OpenAI, Anthropic)
- Add agent tools: create workspace, list/read templates, read/write/
  edit files, execute commands
- Add chat API endpoints with streaming, message editing, and
  durable reconnection
- Add database schema and migrations for chats, chat messages, chat
  providers, and chat model configs
- Add RBAC policies and dbauthz enforcement for chat resources
- Add Agents UI pages with conversation timeline, queued messages
  list, diff viewer, and model configuration panel
- Add comprehensive test coverage including coderd integration tests,
  chatd unit tests, and Storybook stories
- Gate feature behind experiments flag

---------

Co-authored-by: Cian Johnston <cian@coder.com>
Co-authored-by: Danielle Maywood <danielle@themaywoods.com>
Co-authored-by: Jeremy Ruppel <jeremy@coder.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 16:50:56 +00:00