- 更新 Agents、Chat、Settings 等页面 - 新增 ModelAPIs 页面 - 更新各个模块的 composables - 更新 vite 配置和依赖版本 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
41 lines
856 B
TypeScript
41 lines
856 B
TypeScript
import { defineConfig, loadEnv } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { resolve } from 'path'
|
|
import monacoEditorPlugin from 'vite-plugin-monaco-editor'
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
// 加载根目录的 .env 文件
|
|
const env = loadEnv(mode, resolve(__dirname, '..'), '')
|
|
|
|
const apiBase = env.VITE_API_BASE || 'http://localhost:8082'
|
|
|
|
return {
|
|
plugins: [
|
|
vue(),
|
|
(monacoEditorPlugin as any).default({})
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src')
|
|
}
|
|
},
|
|
server: {
|
|
fs: {
|
|
allow: ['..']
|
|
},
|
|
proxy: {
|
|
'/api': {
|
|
target: apiBase,
|
|
changeOrigin: true,
|
|
ws: true
|
|
},
|
|
'/model': {
|
|
target: apiBase,
|
|
changeOrigin: true,
|
|
ws: true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|