#!/bin/bash # Agent Chat 样式修复脚本 echo "🔧 修复 Agent Chat 样式问题..." echo "" # 1. 创建 tailwind.config.js echo "📝 创建 tailwind.config.js..." cat > tailwind.config.js << 'EOF' /** @type {import('tailwindcss').Config} */ const { heroui } = require("@heroui/react"); module.exports = { content: [ "./src/views/AgentChat/**/*.{js,jsx}", "./src/providers/AppProviders.js", ], darkMode: "class", theme: { extend: {}, }, plugins: [heroui()], } EOF echo "✅ tailwind.config.js 已创建" # 2. 确保 postcss.config.js 正确 echo "" echo "📝 检查 postcss.config.js..." cat > postcss.config.js << 'EOF' module.exports = { plugins: [ require('tailwindcss'), require('autoprefixer'), ], } EOF echo "✅ postcss.config.js 已更新" # 3. 清空 brainwave.css echo "" echo "📝 清空 brainwave.css..." echo "/* 空文件 - Brainwave 样式已不再使用 */" > src/styles/brainwave.css echo "✅ brainwave.css 已清空" # 4. 清理缓存 echo "" echo "🧹 清理缓存..." rm -rf node_modules/.cache rm -rf build echo "✅ 缓存已清理" # 5. 重新构建 echo "" echo "🏗️ 重新构建..." npm run build # 6. 检查结果 echo "" echo "📊 构建结果检查:" echo " - CSS 文件:" ls -lh build/static/css/ 2>/dev/null || echo " ❌ build 目录不存在" echo "" echo "✅ 修复完成!" echo "" echo "🌐 现在访问 https://valuefrontier.cn/agent-chat 查看效果"