- Agent CLI: 多轮对话、SSH 长连接、流式推理、Evolver 按用户隔离、历史侧栏 - 终端审计: 回放播放器、命令书签、筛选分页导出、命令输出统计、录制落盘修复 - 修复 session_commands 表迁移、Kill 竞态导致录制丢失、无录制会话回放提示 - 审计历史页只读(移除删除),移除回放弹框录制搜索
58 lines
1.5 KiB
TypeScript
58 lines
1.5 KiB
TypeScript
import path from "path"
|
|
import react from "@vitejs/plugin-react"
|
|
import { defineConfig } from "vite"
|
|
import { inspectAttr } from 'kimi-plugin-inspect-react'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
// 必须用绝对路径,否则 /audit/terminal 等深链会解析成 /audit/assets/... 导致白屏 // Logan.Li
|
|
base: '/',
|
|
plugins: [inspectAttr(), react()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
// 仅拆独立大库,React 生态交给 Vite 自动分包,避免循环依赖白屏 // Logan.Li
|
|
manualChunks(id) {
|
|
if (!id.includes("node_modules")) return
|
|
if (id.includes("@codemirror") || id.includes("@uiw/react-codemirror")) return "vendor-codemirror"
|
|
if (id.includes("xterm")) return "vendor-xterm"
|
|
if (id.includes("lucide-react")) return "vendor-icons"
|
|
},
|
|
},
|
|
},
|
|
chunkSizeWarningLimit: 600,
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
host: true,
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://localhost:8080",
|
|
changeOrigin: true,
|
|
},
|
|
"/ws": {
|
|
target: "http://localhost:8080",
|
|
ws: true,
|
|
changeOrigin: true,
|
|
},
|
|
"/health": {
|
|
target: "http://localhost:8080",
|
|
changeOrigin: true,
|
|
},
|
|
"/version": {
|
|
target: "http://localhost:8080",
|
|
changeOrigin: true,
|
|
},
|
|
"/agent": {
|
|
target: "http://localhost:8080",
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
})
|