diff --git a/.gitea/workflows/prod_build_manual.yaml b/.gitea/workflows/prod_build_manual.yaml new file mode 100644 index 0000000..c4d656d --- /dev/null +++ b/.gitea/workflows/prod_build_manual.yaml @@ -0,0 +1,56 @@ +name: 手动触发 FiDA WEB-Node.js 生产分支构建部署 +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [ 18.18.0 ] + env: + REMOTE_DEPLOY_PATH: /workspace/workspace_fida/Web_Workspace_Server/Prod + + steps: + - name: 0.记录开始时间 + id: build_start_time + run: echo "current_time=$(TZ='Asia/Hong_Kong' date '+%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_OUTPUT + + - name: 1.检出代码 + uses: actions/checkout@v4 + with: + ref: main + + - name: 2.设置 Node.js 环境 + uses: actions/setup-node@v6 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm run build + - run: ls -l + + - name: 3.同步文件到远程服务器 + uses: appleboy/scp-action@v0.1.7 + with: + host: ${{ secrets.SERVER_HOST }} + username: ${{ secrets.SERVER_USER }} + key: ${{ secrets.SSH_KEY }} + source: "./dist/*" + target: ${{ env.REMOTE_DEPLOY_PATH }} + ssh_options: "-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" + strip_components: 0 + + - name: 4. 远程重载 Nginx 配置 + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.SERVER_HOST }} + username: ${{ secrets.SERVER_USER }} + key: ${{ secrets.SSH_KEY }} + # 核心:执行 Nginx 重载命令 + script: | + echo "尝试重载 Nginx 服务..." + # 💡 注意:执行此命令需要服务器用户具有 sudo 权限,并且配置了 NOPASSWD。 + # 否则工作流可能会因为权限不足而失败。 + sudo systemctl reload nginx + echo "Nginx 重载命令已发送。" \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json index e4a08f7..fc1273c 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,9 +1,10 @@ { - "$schema": "https://json.schemastore.org/prettierrc", - "semi": false, - "tabWidth": 4, - "singleQuote": true, - "printWidth": 100, - "useTabs": true, - "trailingComma": "none" + "$schema": "https://json.schemastore.org/prettierrc", + "semi": false, + "tabWidth": 4, + "singleQuote": true, + "printWidth": 100, + "useTabs": true, + "trailingComma": "none", + "vueIndentScriptAndStyle": true } diff --git a/package.json b/package.json index 005b6d2..b0fb71e 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "furniture", "version": "0.0.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/src/assets/icons/copy.svg b/src/assets/icons/copy.svg new file mode 100644 index 0000000..3b3790d --- /dev/null +++ b/src/assets/icons/copy.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/equal.svg b/src/assets/icons/equal.svg new file mode 100644 index 0000000..9c30bcf --- /dev/null +++ b/src/assets/icons/equal.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/refreshTransparent.svg b/src/assets/icons/refreshTransparent.svg new file mode 100644 index 0000000..a50b43f --- /dev/null +++ b/src/assets/icons/refreshTransparent.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/thumbDown.svg b/src/assets/icons/thumbDown.svg new file mode 100644 index 0000000..4718775 --- /dev/null +++ b/src/assets/icons/thumbDown.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/thumbUp.svg b/src/assets/icons/thumbUp.svg new file mode 100644 index 0000000..57d6b42 --- /dev/null +++ b/src/assets/icons/thumbUp.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/images/agent-thumb.jpg b/src/assets/images/agent-thumb.jpg new file mode 100644 index 0000000..2b4e3e5 Binary files /dev/null and b/src/assets/images/agent-thumb.jpg differ diff --git a/src/assets/images/sender.png b/src/assets/images/sender.png new file mode 100644 index 0000000..0579e40 Binary files /dev/null and b/src/assets/images/sender.png differ diff --git a/src/assets/images/user-thumb.jpg b/src/assets/images/user-thumb.jpg new file mode 100644 index 0000000..6f4117f Binary files /dev/null and b/src/assets/images/user-thumb.jpg differ diff --git a/src/lang/en.ts b/src/lang/en.ts index a42feb3..35681f3 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -88,7 +88,10 @@ export default { diversity: 'Diversity', relevance: 'Relevance' }, - confirm: 'Confirm' + confirm: 'Confirm', + styleTitle: 'Settings', + createProject: 'Create Project', + trendingReport: 'Trending Report' }, area: { unitedStates: 'United States', @@ -102,6 +105,10 @@ export default { canada: 'Canada', germany: 'Germany' }, + agent: { + copySuccess: 'Text copied to clipboard', + copyFaild: 'Copy failed. Your browser may be restricting clipboard access. Please try copying manually.' + }, // Version Tree VersionTree: { @@ -114,7 +121,13 @@ export default { branchingNodeTree: 'Branching Node Tree', restore: 'Restore', newChat: 'New Chat', - delete: 'Delete' + delete: 'Delete', + deleteChat:'Delete chat?', + deleteHint:'Once deleted, you won’t be able to view this conversation again.', + restoreChat:'Restore chat?', + restoreHint:'Once deleted, you won’t be able to view this conversation again.', + cancel: 'cancel', + Confirm: 'Confirm', }, //generateSketch generateSketch: { diff --git a/src/lang/zh-cn.ts b/src/lang/zh-cn.ts index 0bb4f0d..4f31f70 100644 --- a/src/lang/zh-cn.ts +++ b/src/lang/zh-cn.ts @@ -1,102 +1,133 @@ export default { - AlphaVersion: '2026版本', - Login: { - login: '登录', - register: '注册', - signUp: '注册', - loginTo: '登录到 FiDA条款、政策 和费用。', - noAccountToSignUp: `还没有账号? 注册`, - signUpFor: '注册账号', - registerTip: '一个多智能体画布,用于快速、趋势驱动的设计迭代。', - havenAccountToLogin: `已经有账号? 登录`, - verifyEmail: '验证您的邮箱地址', - verifyCodeHasSent: '已发送验证码到 {email}', - verifyCode: '请输入验证码', - verify: '验证', - resendCode: '重新发送验证码', - resendCodeIn: '重新发送验证码倒计时 {time}', - orContinueWith: '或者使用', - googleLogin: '使用 Google 登录', - wechatLogin: '使用微信登录', - indexTip: '一个多智能体画布,用于快速、趋势驱动的设计迭代。', - }, - Nuic: { - hiName: '你好,{name}。这是 Fiphant。', - nuic1Title: `帮助他发现您空间中的 “YOU”。`, - nuic1Tip: `让我们设置您的个人资料。几个快速的细节将帮助 Fiphant 理解您的需求并找到您正在寻找的内容。`, - letsGo: '让我们开始,Fiphant!', - skip: '跳过', - next: '下一步', - nuic2Title: `你通常喜欢什么样的风格呢?`, - loadMore: '加载更多', - nuic3Title: `您在 哪里 工作?您从事什么 工作?`, - basedIn: '公司', - role: '角色', - allSet: '准备好了!', - loadingTip: '我们正在自定义您的仪表板。', - }, - Home: { - creditsNum: '积分: {num}', - newProject: '新建项目', - home: '首页', - history: '历史记录', - today: '今天', - yesterday: '昨天', - earlierChat: '更早的' - }, - Input: { - placeholder: '请输入', - selectPlaceholder: '请选择', - type: '类型', - area: '地区', - style: '风格', - types: { - sofa: '沙发', - desk: '书桌', - chair: '椅子' - }, - styles: { - modern: '现代', - classic: '古典' - }, - chooseStyle: '选择风格', - setting: 'Setting', - settingOptions: { - creativity: '创意度', - diversity: '多样性', - relevance: '相关度' - }, - confirm: '确认', - styleTitle: '设置', - createProject: '创建项目', - trendingReport: '趋势报告' - }, - area: { - unitedStates: '美国', - singapore: '新加坡', - australia: '澳大利亚', - southKorea: '韩国', - china: '中国', - italy: '意大利', - france: '法国', - japan: '日本', - canada: '加拿大', - germany: '德国' - } + AlphaVersion: '2026版本', + Login: { + login: '登录', + register: '注册', + signUp: '注册', + loginTo: '登录到 FiDA条款、政策 和费用。', + noAccountToSignUp: `还没有账号? 注册`, + signUpFor: '注册账号', + registerTip: '一个多智能体画布,用于快速、趋势驱动的设计迭代。', + havenAccountToLogin: `已经有账号? 登录`, + verifyEmail: '验证您的邮箱地址', + verifyCodeHasSent: '已发送验证码到 {email}', + verifyCode: '请输入验证码', + verify: '验证', + resendCode: '重新发送验证码', + resendCodeIn: '重新发送验证码倒计时 {time}', + orContinueWith: '或者使用', + googleLogin: '使用 Google 登录', + wechatLogin: '使用微信登录', + indexTip: '一个多智能体画布,用于快速、趋势驱动的设计迭代。' + }, + Nuic: { + hiName: '你好,{name}。这是 Fiphant。', + nuic1Title: `帮助他发现您空间中的 “YOU”。`, + nuic1Tip: `让我们设置您的个人资料。几个快速的细节将帮助 Fiphant 理解您的需求并找到您正在寻找的内容。`, + letsGo: '让我们开始,Fiphant!', + skip: '跳过', + next: '下一步', + nuic2Title: `你通常喜欢什么样的风格呢?`, + loadMore: '加载更多', + nuic3Title: `您在 哪里 工作?您从事什么 工作?`, + basedIn: '公司', + role: '角色', + allSet: '准备好了!', + loadingTip: '我们正在自定义您的仪表板。' + }, + Home: { + creditsNum: '积分: {num}', + newProject: '新建项目', + home: '首页', + history: '历史记录', + today: '今天', + yesterday: '昨天', + earlierChat: '更早的' + }, + Input: { + placeholder: '请输入', + selectPlaceholder: '请选择', + type: '类型', + area: '地区', + style: '风格', + types: { + sofa: '沙发', + desk: '书桌', + chair: '椅子' + }, + styles: { + modern: '现代', + classic: '古典' + }, + chooseStyle: '选择风格', + setting: 'Setting', + settingOptions: { + creativity: '创意度', + diversity: '多样性', + relevance: '相关度' + }, + confirm: '确认', + styleTitle: '设置', + createProject: '创建项目', + trendingReport: '趋势报告' + }, + area: { + unitedStates: '美国', + singapore: '新加坡', + australia: '澳大利亚', + southKorea: '韩国', + china: '中国', + italy: '意大利', + france: '法国', + japan: '日本', + canada: '加拿大', + germany: '德国' + }, + agent: { + copySuccess: '文本已复制到剪贴板', + copyFaild: + '复制失败。您的浏览器可能限制了剪贴板访问,请允许浏览器访问剪贴板或尝试手动复制。' + }, + + // Version Tree + VersionTree: { + versionInformation: '版本信息', + input: '用户请求', + userRequest: '用户请求', + sketch: '设计草图', + generateResult: '生成结果', + linearNodeTree: '线性节点树', + branchingNodeTree: '分支节点树', + restore: '恢复', + newChat: '新建对话', + delete: '删除', + deleteChat:'删除对话?', + deleteHint:'删除后将无法恢复该对话。', + restoreChat:'恢复对话?', + restoreHint:'恢复后将显示该对话。', + cancel: '取消', + Confirm: '确认', + }, + //generateSketch + generateSketch: { + restore: '恢复', + delete: '删除', + edit: '编辑' + } } diff --git a/src/router/index.ts b/src/router/index.ts index ad37270..4a4cf55 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -7,69 +7,75 @@ import { createRouter, createWebHistory } from 'vue-router' * 3. 路由的name默认是文件名,如果文件名与name不一致,通过defineOptions({ name: 'componentName' })来设置 */ const router = createRouter({ - history: createWebHistory('/'), - // history: createWebHistory(import.meta.env.VITE_APP_URL), - routes: [ - { - path: '/', - redirect: '/index' - }, - { - path: '/index', - name: 'index', - component: () => import('../views/login/index.vue'), - }, - { - path: '/login', - name: 'login', - component: () => import('../views/login/login.vue'), - }, - { - path: '/register', - name: 'register', - component: () => import('../views/login/register.vue'), - }, - { - path: '/nuic', - name: 'nuic', - component: () => import('../views/nuic/index.vue'), - }, - { - path: '/home', - name: 'home', - component: () => import('../views/home/index.vue'), - children: [ - { - path: 'test/:id', - name: 'test', - component: () => import('../views/home/test.vue'), - meta: { topNavStyle: '2' } - }, - { - path: '/home/versionTree', - name: 'versionTree', - component: () => import('../views/home/versionTree.vue'), - meta: { topNavStyle: '2' } - }, - { - path: 'mainInput', - name: 'mainInput', - component: () => import('../views/home/mainInput.vue') - }, - { - path: 'canvas', - name: 'canvas', - component: () => import('../views/canvas/index.vue'), - meta: { topNavStyle: '2' } - }, - ] - }, - { - path: '/:pathMatch(.*)', - name: '404', - component: () => import('../views/404.vue'), - } - ] + history: createWebHistory('/'), + // history: createWebHistory(import.meta.env.VITE_APP_URL), + routes: [ + { + path: '/', + redirect: '/index' + }, + { + path: '/index', + name: 'index', + component: () => import('../views/login/index.vue') + }, + { + path: '/login', + name: 'login', + component: () => import('../views/login/login.vue') + }, + { + path: '/register', + name: 'register', + component: () => import('../views/login/register.vue') + }, + { + path: '/nuic', + name: 'nuic', + component: () => import('../views/nuic/index.vue') + }, + { + path: '/home', + name: 'home', + component: () => import('../views/home/index.vue'), + children: [ + { + path: 'test/:id', + name: 'test', + component: () => import('../views/home/test.vue'), + meta: { topNavStyle: '2' } + }, + { + path: '/home/versionTree', + name: 'versionTree', + component: () => import('../views/home/VersionTree.vue'), + meta: { topNavStyle: '2' } + }, + { + path: 'mainInput', + name: 'mainInput', + component: () => import('../views/home/mainInput.vue') + }, + { + path: 'canvas', + name: 'canvas', + component: () => import('../views/canvas/index.vue'), + meta: { topNavStyle: '2' } + }, + { + path: 'agent', + name: 'agent', + component: () => import('../views/home/agent/index.vue') + } + ] + }, + + { + path: '/:pathMatch(.*)', + name: '404', + component: () => import('../views/404.vue') + } + ] }) export default router diff --git a/src/views/home/agent/components/Agent.vue b/src/views/home/agent/components/Agent.vue new file mode 100644 index 0000000..d71e631 --- /dev/null +++ b/src/views/home/agent/components/Agent.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/src/views/home/agent/components/Item.vue b/src/views/home/agent/components/Item.vue new file mode 100644 index 0000000..6a08846 --- /dev/null +++ b/src/views/home/agent/components/Item.vue @@ -0,0 +1,127 @@ + + + + + diff --git a/src/views/home/agent/components/List.vue b/src/views/home/agent/components/List.vue new file mode 100644 index 0000000..50bbddd --- /dev/null +++ b/src/views/home/agent/components/List.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/views/home/agent/index.vue b/src/views/home/agent/index.vue new file mode 100644 index 0000000..f92a8b9 --- /dev/null +++ b/src/views/home/agent/index.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/src/views/home/components/Input.vue b/src/views/home/components/Input.vue index 5f7ee4e..4d37ea8 100644 --- a/src/views/home/components/Input.vue +++ b/src/views/home/components/Input.vue @@ -1,748 +1,798 @@ diff --git a/src/views/home/versionTree/components/dialog.vue b/src/views/home/versionTree/components/dialog.vue new file mode 100644 index 0000000..0305820 --- /dev/null +++ b/src/views/home/versionTree/components/dialog.vue @@ -0,0 +1,139 @@ + + + \ No newline at end of file diff --git a/src/views/home/versionTree/detail/ChatHistory.vue b/src/views/home/versionTree/detail/chatDetail.vue similarity index 99% rename from src/views/home/versionTree/detail/ChatHistory.vue rename to src/views/home/versionTree/detail/chatDetail.vue index 227775a..ddda015 100644 --- a/src/views/home/versionTree/detail/ChatHistory.vue +++ b/src/views/home/versionTree/detail/chatDetail.vue @@ -18,7 +18,7 @@ let data = reactive({ onMounted(()=>{ }) onUnmounted(()=>{ -}) +}) defineExpose({}) const {} = toRefs(data); diff --git a/src/views/home/versionTree/detail/index.vue b/src/views/home/versionTree/detail/index.vue index 337d268..2854e66 100644 --- a/src/views/home/versionTree/detail/index.vue +++ b/src/views/home/versionTree/detail/index.vue @@ -1,7 +1,7 @@