- 为agent.json添加apiUrl、apiKey、apiModel字段支持 - 更新API接口类型定义,支持传递自定义API配置 - 优化AgentRepoList组件UI样式和交互效果 - 增强JSON文件上传校验逻辑,支持API配置验证 - 改进任务结果页面布局和视觉呈现 - 添加任务过程查看抽屉功能 - 实现执行按钮动态样式和悬停效果 - 优化节点连接线渲染逻辑和性能
59 lines
1.6 KiB
TypeScript
59 lines
1.6 KiB
TypeScript
import { resolve } from 'node:path'
|
||
import { fileURLToPath, URL } from 'node:url'
|
||
|
||
import { defineConfig } from 'vite'
|
||
import vue from '@vitejs/plugin-vue'
|
||
import vueDevTools from 'vite-plugin-vue-devtools'
|
||
import AutoImport from 'unplugin-auto-import/vite'
|
||
import Components from 'unplugin-vue-components/vite'
|
||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
||
import tailwindcss from '@tailwindcss/vite'
|
||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
||
|
||
const pathSrc = resolve(__dirname, 'src')
|
||
|
||
// https://vite.dev/config/
|
||
export default defineConfig({
|
||
plugins: [
|
||
vue(),
|
||
tailwindcss(),
|
||
vueDevTools(),
|
||
AutoImport({
|
||
imports: ['vue'],
|
||
resolvers: [ElementPlusResolver()],
|
||
eslintrc: {
|
||
enabled: false,
|
||
// 1、改为true用于生成eslint配置。2、生成后改回false,避免重复生成消耗
|
||
},
|
||
}),
|
||
Components({
|
||
resolvers: [ElementPlusResolver()],
|
||
}),
|
||
createSvgIconsPlugin({
|
||
// 指定需要缓存的图标文件夹
|
||
iconDirs: [resolve(pathSrc, 'assets/icons')],
|
||
// 指定symbolId格式
|
||
symbolId: 'icon-[dir]-[name]',
|
||
}),
|
||
],
|
||
resolve: {
|
||
alias: {
|
||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||
},
|
||
},
|
||
server: {
|
||
proxy: {
|
||
'/api': {
|
||
changeOrigin: true,
|
||
// 接口地址
|
||
// target: 'http://82.157.183.212:21092',
|
||
target: 'http://localhost:8000',
|
||
rewrite: (path: string) => path.replace(/^\/api/, ''),
|
||
configure: (proxy, options) => {
|
||
console.log('Proxy configured:', options)
|
||
},
|
||
},
|
||
},
|
||
},
|
||
})
|