- 新增 Hono 代理服务(server/index.ts,端口 3001),SSE 流式转发 Claude API - 新增 src/lib/ai.ts:streamAI() 封装 fetch + ReadableStream + AbortController - 新增 AI 面板(AiPanel.tsx):流式聊天问答、全文摘要、停止按钮 - 新增模型管理弹窗(ModelSettingsModal.tsx):增删模型、切换激活模型 - 编辑器新增 AI 续写(⚡)和面板切换(✨)按钮 - 浮动工具栏新增润色(Wand2)和摘要(FileText)按钮,结果预览 Modal 支持一键替换 - appStore 新增 aiPanelOpen + toggleAiPanel - vite.config.ts 添加 /api 代理到 localhost:3001 - index.css 添加 .ai-cursor 光标动画 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
13 lines
268 B
TypeScript
13 lines
268 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
server: {
|
|
proxy: {
|
|
'/api': 'http://localhost:3001',
|
|
},
|
|
},
|
|
})
|