Rust backend (axum/tokio): agent loop with streaming, tools (fs, bash, web_fetch, todo, ask_user, subagents, skills, craft snapshots/compare), permissions with modes and rules, Anthropic + OpenAI-compatible providers, MCP client (stdio/HTTP, elicitation), SQLite sessions, usage statistics, compaction, commented TOML config editable via toml_edit. React PWA: chat with live streaming, permission/question cards, modes (build/plan/craft), settings for providers/models/prices/MCP/permissions, raw config editor, statistics dashboard, i18n (en/de). Docker setup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { VitePWA } from "vite-plugin-pwa";
|
|
|
|
const backend = process.env.CODECRAFT_BACKEND ?? "http://127.0.0.1:8787";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
VitePWA({
|
|
registerType: "autoUpdate",
|
|
includeAssets: ["icon.svg", "apple-touch-icon.png"],
|
|
manifest: {
|
|
name: "CodeCraft",
|
|
short_name: "CodeCraft",
|
|
description: "Web-based coding harness for AI models",
|
|
theme_color: "#282828",
|
|
background_color: "#282828",
|
|
display: "standalone",
|
|
start_url: "/",
|
|
icons: [
|
|
{ src: "icon-192.png", sizes: "192x192", type: "image/png" },
|
|
{ src: "icon-512.png", sizes: "512x512", type: "image/png" },
|
|
{ src: "icon-512.png", sizes: "512x512", type: "image/png", purpose: "maskable" },
|
|
{ src: "icon.svg", sizes: "any", type: "image/svg+xml" },
|
|
],
|
|
},
|
|
workbox: {
|
|
// The API is always live data; only the app shell is cached.
|
|
navigateFallbackDenylist: [/^\/api/],
|
|
runtimeCaching: [],
|
|
},
|
|
}),
|
|
],
|
|
server: {
|
|
proxy: {
|
|
"/api": { target: backend, ws: true, changeOrigin: true },
|
|
},
|
|
},
|
|
});
|