mirror of
https://github.com/coder/coder.git
synced 2026-06-03 04:58:23 +00:00
edee917d88
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>
62 lines
1.5 KiB
TypeScript
62 lines
1.5 KiB
TypeScript
module.exports = {
|
|
// Use a big timeout for CI.
|
|
testTimeout: 20_000,
|
|
maxWorkers: 8,
|
|
projects: [
|
|
{
|
|
displayName: "test",
|
|
roots: ["<rootDir>"],
|
|
setupFiles: ["./jest.polyfills.js"],
|
|
setupFilesAfterEnv: ["./jest.setup.ts"],
|
|
extensionsToTreatAsEsm: [".ts"],
|
|
transform: {
|
|
"^.+\\.(t|j)sx?$": [
|
|
"@swc/jest",
|
|
{
|
|
jsc: {
|
|
transform: {
|
|
react: {
|
|
runtime: "automatic",
|
|
importSource: "@emotion/react",
|
|
},
|
|
},
|
|
experimental: {
|
|
plugins: [["jest_workaround", {}]],
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
testEnvironment: "jest-fixed-jsdom",
|
|
testEnvironmentOptions: {
|
|
customExportConditions: [""],
|
|
},
|
|
testRegex: "(/__tests__/.*|(\\.|/)(jest))\\.tsx?$",
|
|
testPathIgnorePatterns: ["/node_modules/", "/e2e/"],
|
|
transformIgnorePatterns: [],
|
|
moduleDirectories: ["node_modules", "<rootDir>/src"],
|
|
moduleNameMapper: {
|
|
"\\.css$": "<rootDir>/src/testHelpers/styleMock.ts",
|
|
"^@fontsource": "<rootDir>/src/testHelpers/styleMock.ts",
|
|
"^@pierre/diffs/react$":
|
|
"<rootDir>/src/testHelpers/pierreDiffsReactMock.tsx",
|
|
},
|
|
},
|
|
],
|
|
collectCoverageFrom: [
|
|
// included files
|
|
"<rootDir>/**/*.ts",
|
|
"<rootDir>/**/*.tsx",
|
|
// excluded files
|
|
"!<rootDir>/**/*.stories.tsx",
|
|
"!<rootDir>/_jest/**/*.*",
|
|
"!<rootDir>/api.ts",
|
|
"!<rootDir>/coverage/**/*.*",
|
|
"!<rootDir>/e2e/**/*.*",
|
|
"!<rootDir>/jest-runner.eslint.config.js",
|
|
"!<rootDir>/jest.config.js",
|
|
"!<rootDir>/out/**/*.*",
|
|
"!<rootDir>/storybook-static/**/*.*",
|
|
],
|
|
};
|