feat: 更新 Web 前端页面
- 更新 Agents、Chat、Settings 等页面 - 新增 ModelAPIs 页面 - 更新各个模块的 composables - 更新 vite 配置和依赖版本 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,32 +1,39 @@
|
||||
import { defineConfig } from 'vite'
|
||||
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({
|
||||
plugins: [
|
||||
vue(),
|
||||
(monacoEditorPlugin as any).default({})
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, 'src')
|
||||
}
|
||||
},
|
||||
server: {
|
||||
fs: {
|
||||
allow: ['..']
|
||||
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')
|
||||
}
|
||||
},
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:8082',
|
||||
changeOrigin: true,
|
||||
ws: true
|
||||
server: {
|
||||
fs: {
|
||||
allow: ['..']
|
||||
},
|
||||
'/model': {
|
||||
target: 'http://localhost:8082',
|
||||
changeOrigin: true,
|
||||
ws: true
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: apiBase,
|
||||
changeOrigin: true,
|
||||
ws: true
|
||||
},
|
||||
'/model': {
|
||||
target: apiBase,
|
||||
changeOrigin: true,
|
||||
ws: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user