tianxincode 1.0.47 → 1.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +200 -200
- package/dist/cli/commands.js +18 -18
- package/dist/core/ai/agents/caller/prompts/role.txt +50 -50
- package/dist/core/ai/agents/chat/chat.agent.js +30 -30
- package/dist/core/ai/agents/chat/prompts/role.txt +30 -30
- package/dist/core/ai/agents/code/code.agent.js +6 -6
- package/dist/core/ai/agents/code/prompts/role.txt +50 -50
- package/dist/core/ai/agents/common/prompt/role.txt +51 -51
- package/dist/core/ai/agents/common/prompts.js +26 -26
- package/dist/core/ai/agents/design/design.agent.js +6 -6
- package/dist/core/ai/agents/design/prompts/role.txt +36 -36
- package/dist/core/ai/agents/dream/prompts/init.txt +20 -20
- package/dist/core/ai/agents/mem/mem.agent.js +5 -5
- package/dist/core/ai/agents/mem/prompts/role.txt +35 -35
- package/dist/core/ai/agents/skill/prompts/role.txt +61 -61
- package/dist/core/ai/agents/skill/skill.agent.js +26 -26
- package/dist/core/ai/agents/summarizer/prompts/role.txt +30 -30
- package/dist/core/ai/agents/task/prompts/role.txt +50 -50
- package/dist/core/ai/agents/task/task.agent.js +30 -30
- package/dist/core/ai/provider/deepseek.provider.js +1 -1
- package/dist/core/ai/provider/deepseek.provider.js.map +1 -1
- package/dist/core/ai/provider/openai.provider.js +1 -1
- package/dist/core/ai/provider/openai.provider.js.map +1 -1
- package/dist/core/db/db.service.d.ts.map +1 -1
- package/dist/core/db/db.service.js +3 -1
- package/dist/core/db/db.service.js.map +1 -1
- package/dist/core/db/init_sql/ai_log.init.js +15 -15
- package/dist/core/db/init_sql/code_snippet.init.js +11 -11
- package/dist/core/db/init_sql/config.init.js +15 -15
- package/dist/core/db/init_sql/custom_action.init.js +10 -10
- package/dist/core/db/init_sql/dingding.init.js +9 -9
- package/dist/core/db/init_sql/email.init.js +14 -14
- package/dist/core/db/init_sql/lsp.init.js +8 -8
- package/dist/core/db/init_sql/message_file.init.js +11 -11
- package/dist/core/db/init_sql/project.init.js +20 -20
- package/dist/core/db/init_sql/provider.init.js +35 -35
- package/dist/core/db/init_sql/scheduler.init.js +32 -32
- package/dist/core/db/init_sql/session.init.js +23 -23
- package/dist/core/db/init_sql/spec.init.js +15 -15
- package/dist/core/db/init_sql/waf_gateway.init.js +9 -9
- package/dist/core/db/init_sql/zihao.init.js +11 -11
- package/dist/core/lsp/sql.js +11 -11
- package/dist/core/tools/provider/bash.txt +47 -47
- package/dist/core/tools/provider/code_search.txt +20 -20
- package/dist/core/tools/provider/edit_file.txt +13 -13
- package/dist/core/tools/provider/glob.txt +12 -12
- package/dist/core/tools/provider/grep.txt +14 -14
- package/dist/core/tools/provider/lsp.txt +19 -19
- package/dist/core/tools/provider/memory.txt +21 -21
- package/dist/core/tools/provider/read_file.txt +17 -17
- package/dist/core/tools/provider/todo_read.txt +16 -16
- package/dist/core/tools/provider/todo_write.txt +48 -48
- package/dist/core/tools/provider/web_fetch.txt +17 -17
- package/dist/core/tools/provider/web_search.txt +18 -18
- package/dist/core/tools/provider/write_file.txt +11 -11
- package/dist/gateway/api/skill/detail_skill.d.ts.map +1 -1
- package/dist/gateway/api/skill/detail_skill.js +7 -5
- package/dist/gateway/api/skill/detail_skill.js.map +1 -1
- package/dist/gateway/cli/commands.js +18 -18
- package/dist/modules/ai/agents/chat/prompts/role.txt +30 -30
- package/dist/modules/ai/agents/code/prompts/role.txt +50 -50
- package/dist/modules/ai/agents/mem/prompts/role.txt +35 -35
- package/dist/modules/ai/agents/skill/prompts/role.txt +61 -61
- package/dist/modules/ai/agents/task/prompts/role.txt +50 -50
- package/dist/modules/ai/ai-log.service.js +10 -10
- package/dist/modules/ai/provider/openai/prompt/role.txt +51 -51
- package/dist/modules/ai/summarizer/summarizer.prompts.js +30 -30
- package/dist/modules/config/config.service.js +5 -5
- package/dist/modules/db/db.service.js +252 -252
- package/dist/modules/email/email.config.repository.js +1 -1
- package/dist/modules/repositories/project.repository.d.ts +28 -0
- package/dist/modules/repositories/project.repository.d.ts.map +1 -0
- package/dist/modules/repositories/project.repository.js +47 -0
- package/dist/modules/repositories/project.repository.js.map +1 -0
- package/dist/modules/scheduler/task-log.service.js +1 -1
- package/dist/modules/services/project/project.service.d.ts +14 -0
- package/dist/modules/services/project/project.service.d.ts.map +1 -0
- package/dist/modules/services/project/project.service.js +47 -0
- package/dist/modules/services/project/project.service.js.map +1 -0
- package/dist/modules/skill/skill.txt +36 -36
- package/dist/modules/spec/spec.injector.js +24 -24
- package/dist/modules/tools/provider/bash.txt +47 -47
- package/dist/modules/tools/provider/code_search.txt +20 -20
- package/dist/modules/tools/provider/edit_file.txt +13 -13
- package/dist/modules/tools/provider/glob.txt +12 -12
- package/dist/modules/tools/provider/grep.txt +14 -14
- package/dist/modules/tools/provider/lsp.txt +19 -19
- package/dist/modules/tools/provider/memory.txt +21 -21
- package/dist/modules/tools/provider/read_file.txt +17 -17
- package/dist/modules/tools/provider/todo_read.txt +16 -16
- package/dist/modules/tools/provider/todo_write.txt +48 -48
- package/dist/modules/tools/provider/web_fetch.txt +17 -17
- package/dist/modules/tools/provider/web_search.txt +18 -18
- package/dist/modules/tools/provider/write_file.txt +11 -11
- package/dist/modules/waf-gateway/waf-gateway.module.js +8 -8
- package/dist/modules/waf-gateway/waf-gateway.service.js +12 -12
- package/dist/repositories/project.repository.d.ts +28 -0
- package/dist/repositories/project.repository.d.ts.map +1 -0
- package/dist/repositories/project.repository.js +47 -0
- package/dist/repositories/project.repository.js.map +1 -0
- package/dist/repository/ai_log.repository.js +1 -1
- package/dist/repository/config.repository.js +5 -5
- package/dist/repository/email.repository.js +1 -1
- package/dist/repository/memory.repository.js +1 -1
- package/dist/repository/project.repository.js +3 -3
- package/dist/repository/scheduler.repository.js +2 -2
- package/dist/repository/session.repository.js +1 -1
- package/dist/repository/zihao-config.repository.js +1 -1
- package/dist/services/skill/skill.tool.d.ts.map +1 -1
- package/dist/services/skill/skill.tool.js +6 -1
- package/dist/services/skill/skill.tool.js.map +1 -1
- package/dist/services/skill/skill.txt +36 -36
- package/package.json +76 -76
- package/scripts/copy-txt.js +31 -31
- package/scripts/ink-scroll-demo.tsx +147 -147
- package/tsconfig.test.json +9 -9
- package/web/dist/assets/{ConfirmDialog-B2bVsPFI.js → ConfirmDialog-B03GcCHQ.js} +1 -1
- package/web/dist/assets/PcLayout-CYW3zqcs.css +1 -0
- package/web/dist/assets/{PcLayout-DeXNBHu2.js → PcLayout-ZTdJNg7G.js} +1 -1
- package/web/dist/assets/{aiLogsView-JvjhLmyo.js → aiLogsView-Bt8Xg1Qx.js} +1 -1
- package/web/dist/assets/{cssMode-sYHhwUZh.js → cssMode-CBb6D87U.js} +1 -1
- package/web/dist/assets/{customActionsView-Cvmzxvl4.js → customActionsView-DdjnHzwm.js} +1 -1
- package/web/dist/assets/deployView-CD7ji9IS.css +1 -0
- package/web/dist/assets/{deployView-CjV4ySrf.js → deployView-Cj51_Job.js} +1 -1
- package/web/dist/assets/designView-C3pSX4nP.css +1 -0
- package/web/dist/assets/designView-RT8tKEN9.js +18 -0
- package/web/dist/assets/devWorkflowView-BTozmaiN.js +36 -0
- package/web/dist/assets/devWorkflowView-DYhIfbCB.css +1 -0
- package/web/dist/assets/devWorkflowViewApp-CErbhC2s.css +1 -0
- package/web/dist/assets/{devWorkflowViewApp-DPlFgiS_.js → devWorkflowViewApp-DLslXEq9.js} +3 -3
- package/web/dist/assets/{fileZihao-DvZmuTYu.js → fileZihao-CtZ4bUIH.js} +1 -1
- package/web/dist/assets/{freemarker2-DTyAQBBj.js → freemarker2-CX3jc3l2.js} +1 -1
- package/web/dist/assets/gitChanges-D6QxPcii.css +1 -0
- package/web/dist/assets/{gitChanges-Cpf4HHoF.js → gitChanges-DFRvzL5I.js} +1 -1
- package/web/dist/assets/gitChangesApp-Bjn-MCmr.css +1 -0
- package/web/dist/assets/{gitChangesApp-BOURDd_l.js → gitChangesApp-ZI7-V8oB.js} +2 -2
- package/web/dist/assets/{handlebars-DiWIXxOG.js → handlebars-CTaQD6FN.js} +1 -1
- package/web/dist/assets/{html-BCQWkFzH.js → html-BruJsfYv.js} +1 -1
- package/web/dist/assets/{htmlMode-BbMA34cR.js → htmlMode-wewroXLr.js} +1 -1
- package/web/dist/assets/{index-C_tz4Wda.css → index-C0xmVTIn.css} +1 -1
- package/web/dist/assets/{index-C7axH05o.js → index-Cn73hS12.js} +9 -9
- package/web/dist/assets/{javascript-By4MYHaO.js → javascript-B4ku8P1-.js} +1 -1
- package/web/dist/assets/{jsonMode-5JIz7tDN.js → jsonMode-BIvVuBMG.js} +1 -1
- package/web/dist/assets/{liquid-BQBVii4f.js → liquid-Bo3G0Ep7.js} +1 -1
- package/web/dist/assets/{mdx-Cwk7nqzM.js → mdx-Duv0ylZz.js} +1 -1
- package/web/dist/assets/{mediaChat-DivTDoIv.js → mediaChat-RT7iqqYb.js} +1 -1
- package/web/dist/assets/{python-L_kGfe1T.js → python-CEhCctGm.js} +1 -1
- package/web/dist/assets/{razor-XGuHliMI.js → razor-DPK8nTD7.js} +1 -1
- package/web/dist/assets/{taskView-BcJ3LAxp.js → taskView-sOyebRqn.js} +1 -1
- package/web/dist/assets/{terminalView-q-UKzK0M.js → terminalView-GTYtDlus.js} +2 -2
- package/web/dist/assets/{terminalView-CQVYh6D3.css → terminalView-eZ0agsPP.css} +1 -1
- package/web/dist/assets/{tsMode-SuiD3mJa.js → tsMode-BZvUU1nf.js} +1 -1
- package/web/dist/assets/{typescript-DJcyqRjT.js → typescript-CmEn-k1B.js} +1 -1
- package/web/dist/assets/{wikiView-ygHSGyPp.css → wikiView-C-oqMnJM.css} +1 -1
- package/web/dist/assets/{wikiView-B3GIPUlD.js → wikiView-CRjg-cZ8.js} +1 -1
- package/web/dist/assets/{xml-DQgCzk55.js → xml-bjvdKeyy.js} +1 -1
- package/web/dist/assets/{yaml-DBdEYBPA.js → yaml-N5RXWxJk.js} +1 -1
- package/web/dist/index.html +2 -2
- package/web/package.json +28 -28
- package/dist/modules/ai/react/index.d.ts +0 -5
- package/dist/modules/ai/react/index.d.ts.map +0 -1
- package/dist/modules/ai/react/index.js +0 -4
- package/dist/modules/ai/react/index.js.map +0 -1
- package/dist/modules/ai/react/prompt/role.txt +0 -51
- package/dist/modules/ai/react/provider.parser.d.ts +0 -20
- package/dist/modules/ai/react/provider.parser.d.ts.map +0 -1
- package/dist/modules/ai/react/provider.parser.js +0 -88
- package/dist/modules/ai/react/provider.parser.js.map +0 -1
- package/dist/modules/ai/react/react.parser.d.ts +0 -80
- package/dist/modules/ai/react/react.parser.d.ts.map +0 -1
- package/dist/modules/ai/react/react.parser.js +0 -365
- package/dist/modules/ai/react/react.parser.js.map +0 -1
- package/dist/modules/ai/react/react.prompts.d.ts +0 -26
- package/dist/modules/ai/react/react.prompts.d.ts.map +0 -1
- package/dist/modules/ai/react/react.prompts.js +0 -170
- package/dist/modules/ai/react/react.prompts.js.map +0 -1
- package/dist/modules/ai/react/react.types.d.ts +0 -50
- package/dist/modules/ai/react/react.types.d.ts.map +0 -1
- package/dist/modules/ai/react/react.types.js +0 -2
- package/dist/modules/ai/react/react.types.js.map +0 -1
- package/dist/modules/ai/react/react.validator.d.ts +0 -14
- package/dist/modules/ai/react/react.validator.d.ts.map +0 -1
- package/dist/modules/ai/react/react.validator.js +0 -53
- package/dist/modules/ai/react/react.validator.js.map +0 -1
- package/dist/modules/ai/react.agent.d.ts +0 -82
- package/dist/modules/ai/react.agent.d.ts.map +0 -1
- package/dist/modules/ai/react.agent.js +0 -220
- package/dist/modules/ai/react.agent.js.map +0 -1
- package/dist/modules/skill/skill.service.d.ts +0 -72
- package/dist/modules/skill/skill.service.d.ts.map +0 -1
- package/dist/modules/skill/skill.service.js +0 -283
- package/dist/modules/skill/skill.service.js.map +0 -1
- package/dist/modules/tools/builtin/bash.d.ts +0 -3
- package/dist/modules/tools/builtin/bash.d.ts.map +0 -1
- package/dist/modules/tools/builtin/bash.js +0 -126
- package/dist/modules/tools/builtin/bash.js.map +0 -1
- package/dist/modules/tools/builtin/bash.tool.d.ts +0 -6
- package/dist/modules/tools/builtin/bash.tool.d.ts.map +0 -1
- package/dist/modules/tools/builtin/bash.tool.js +0 -52
- package/dist/modules/tools/builtin/bash.tool.js.map +0 -1
- package/dist/modules/tools/builtin/bash.txt +0 -69
- package/dist/modules/tools/builtin/code_search.d.ts +0 -3
- package/dist/modules/tools/builtin/code_search.d.ts.map +0 -1
- package/dist/modules/tools/builtin/code_search.js +0 -86
- package/dist/modules/tools/builtin/code_search.js.map +0 -1
- package/dist/modules/tools/builtin/code_search.txt +0 -41
- package/dist/modules/tools/builtin/edit-file.tool.d.ts +0 -6
- package/dist/modules/tools/builtin/edit-file.tool.d.ts.map +0 -1
- package/dist/modules/tools/builtin/edit-file.tool.js +0 -58
- package/dist/modules/tools/builtin/edit-file.tool.js.map +0 -1
- package/dist/modules/tools/builtin/edit_file.d.ts +0 -3
- package/dist/modules/tools/builtin/edit_file.d.ts.map +0 -1
- package/dist/modules/tools/builtin/edit_file.js +0 -105
- package/dist/modules/tools/builtin/edit_file.js.map +0 -1
- package/dist/modules/tools/builtin/edit_file.txt +0 -61
- package/dist/modules/tools/builtin/glob.d.ts +0 -3
- package/dist/modules/tools/builtin/glob.d.ts.map +0 -1
- package/dist/modules/tools/builtin/glob.js +0 -85
- package/dist/modules/tools/builtin/glob.js.map +0 -1
- package/dist/modules/tools/builtin/glob.tool.d.ts +0 -6
- package/dist/modules/tools/builtin/glob.tool.d.ts.map +0 -1
- package/dist/modules/tools/builtin/glob.tool.js +0 -81
- package/dist/modules/tools/builtin/glob.tool.js.map +0 -1
- package/dist/modules/tools/builtin/glob.txt +0 -33
- package/dist/modules/tools/builtin/grep.d.ts +0 -3
- package/dist/modules/tools/builtin/grep.d.ts.map +0 -1
- package/dist/modules/tools/builtin/grep.js +0 -94
- package/dist/modules/tools/builtin/grep.js.map +0 -1
- package/dist/modules/tools/builtin/grep.tool.d.ts +0 -6
- package/dist/modules/tools/builtin/grep.tool.d.ts.map +0 -1
- package/dist/modules/tools/builtin/grep.tool.js +0 -96
- package/dist/modules/tools/builtin/grep.tool.js.map +0 -1
- package/dist/modules/tools/builtin/grep.txt +0 -37
- package/dist/modules/tools/builtin/index.d.ts +0 -8
- package/dist/modules/tools/builtin/index.d.ts.map +0 -1
- package/dist/modules/tools/builtin/index.js +0 -80
- package/dist/modules/tools/builtin/index.js.map +0 -1
- package/dist/modules/tools/builtin/lsp.d.ts +0 -7
- package/dist/modules/tools/builtin/lsp.d.ts.map +0 -1
- package/dist/modules/tools/builtin/lsp.js +0 -126
- package/dist/modules/tools/builtin/lsp.js.map +0 -1
- package/dist/modules/tools/builtin/lsp.txt +0 -45
- package/dist/modules/tools/builtin/memory.d.ts +0 -3
- package/dist/modules/tools/builtin/memory.d.ts.map +0 -1
- package/dist/modules/tools/builtin/memory.js +0 -77
- package/dist/modules/tools/builtin/memory.js.map +0 -1
- package/dist/modules/tools/builtin/memory.txt +0 -58
- package/dist/modules/tools/builtin/read-file.tool.d.ts +0 -6
- package/dist/modules/tools/builtin/read-file.tool.d.ts.map +0 -1
- package/dist/modules/tools/builtin/read-file.tool.js +0 -46
- package/dist/modules/tools/builtin/read-file.tool.js.map +0 -1
- package/dist/modules/tools/builtin/read_file.d.ts +0 -3
- package/dist/modules/tools/builtin/read_file.d.ts.map +0 -1
- package/dist/modules/tools/builtin/read_file.js +0 -107
- package/dist/modules/tools/builtin/read_file.js.map +0 -1
- package/dist/modules/tools/builtin/read_file.txt +0 -38
- package/dist/modules/tools/builtin/todo_read.d.ts +0 -6
- package/dist/modules/tools/builtin/todo_read.d.ts.map +0 -1
- package/dist/modules/tools/builtin/todo_read.js +0 -25
- package/dist/modules/tools/builtin/todo_read.js.map +0 -1
- package/dist/modules/tools/builtin/todo_read.txt +0 -34
- package/dist/modules/tools/builtin/todo_write.d.ts +0 -6
- package/dist/modules/tools/builtin/todo_write.d.ts.map +0 -1
- package/dist/modules/tools/builtin/todo_write.js +0 -46
- package/dist/modules/tools/builtin/todo_write.js.map +0 -1
- package/dist/modules/tools/builtin/todo_write.txt +0 -67
- package/dist/modules/tools/builtin/web_fetch.d.ts +0 -3
- package/dist/modules/tools/builtin/web_fetch.d.ts.map +0 -1
- package/dist/modules/tools/builtin/web_fetch.js +0 -52
- package/dist/modules/tools/builtin/web_fetch.js.map +0 -1
- package/dist/modules/tools/builtin/web_fetch.txt +0 -38
- package/dist/modules/tools/builtin/web_search.d.ts +0 -3
- package/dist/modules/tools/builtin/web_search.d.ts.map +0 -1
- package/dist/modules/tools/builtin/web_search.js +0 -100
- package/dist/modules/tools/builtin/web_search.js.map +0 -1
- package/dist/modules/tools/builtin/web_search.txt +0 -43
- package/dist/modules/tools/builtin/write-file.tool.d.ts +0 -6
- package/dist/modules/tools/builtin/write-file.tool.d.ts.map +0 -1
- package/dist/modules/tools/builtin/write-file.tool.js +0 -38
- package/dist/modules/tools/builtin/write-file.tool.js.map +0 -1
- package/dist/modules/tools/builtin/write_file.d.ts +0 -3
- package/dist/modules/tools/builtin/write_file.d.ts.map +0 -1
- package/dist/modules/tools/builtin/write_file.js +0 -61
- package/dist/modules/tools/builtin/write_file.js.map +0 -1
- package/dist/modules/tools/builtin/write_file.txt +0 -58
- package/dist/modules/tools/provider/openai/tools.d.ts +0 -3
- package/dist/modules/tools/provider/openai/tools.d.ts.map +0 -1
- package/dist/modules/tools/provider/openai/tools.js +0 -212
- package/dist/modules/tools/provider/openai/tools.js.map +0 -1
- package/dist/modules/tools/provider/skill.d.ts +0 -6
- package/dist/modules/tools/provider/skill.d.ts.map +0 -1
- package/dist/modules/tools/provider/skill.js +0 -64
- package/dist/modules/tools/provider/skill.js.map +0 -1
- package/web/dist/assets/PcLayout-L-XuK1oQ.css +0 -1
- package/web/dist/assets/deployView-hCh3_M8H.css +0 -1
- package/web/dist/assets/designView-CqZ75hOS.css +0 -1
- package/web/dist/assets/designView-DrUNRVEE.js +0 -18
- package/web/dist/assets/devWorkflowView-BpdJTMEb.js +0 -36
- package/web/dist/assets/devWorkflowView-D7EKjoLj.css +0 -1
- package/web/dist/assets/devWorkflowViewApp-BYYMIdCm.css +0 -1
- package/web/dist/assets/gitChanges-BYj-Y2K-.css +0 -1
- package/web/dist/assets/gitChangesApp-Btw-XKcP.css +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import{n as d,I as m,R as g,S as f,M as v,g as p,a as o,s as C,b as y,F as _,c as k,e as $,K as P,d as D}from"./index-Cn73hS12.js";import{m as S}from"./mediaChat-RT7iqqYb.js";const M={name:"WorkflowSidebar",props:{categories:{type:Array,default:()=>[]},projects:{type:Object,default:()=>{}},currentCategory:{type:String,default:""},currentProject:{type:String,default:""},currentStep:{type:Number,default:1},isLoading:{type:Boolean,default:!1}},data(){return{selectedCategory:"",selectedProject:"",steps:[{id:1,title:"新建需求",desc:"创建新的需求项目",icon:"el-icon-folder-add"},{id:2,title:"方案设计",desc:"编写需求方案",icon:"el-icon-edit"},{id:3,title:"代码生成",desc:"根据方案生成代码",icon:"el-icon-document"},{id:4,title:"测试验收",desc:"测试验证功能",icon:"el-icon-s-check"}]}},computed:{hasAnyProject(){return Object.keys(this.projects||{}).length>0},visibleSteps(){return this.hasAnyProject?this.steps:this.steps.filter(s=>s.id===1)}},watch:{currentCategory(s){this.selectedCategory=s},currentProject(s){this.selectedProject=s}},methods:{onCategoryChange(s){this.selectedProject="",this.$emit("category-change",s)},onProjectChange(s){this.$emit("project-change",s)},onStepClick(s){this.$emit("step-change",s)},isStepCompleted(s){var i;if(!this.currentProject)return!1;const e=`${this.currentCategory}/${this.currentProject}`,t=this.projects[e];return((i=t==null?void 0:t.stepStatus)==null?void 0:i[s])===!0}}};var x=function(){var e=this,t=e._self._c;return t("div",{staticClass:"workflow-sidebar"},[t("div",{staticClass:"sidebar-header"},[t("h3",[e._v("当前项目")]),t("div",{staticClass:"project-display-row"},[t("span",{staticClass:"label"},[e._v("大类")]),t("span",{staticClass:"value"},[e._v(e._s(e.currentCategory||"-"))])]),t("div",{staticClass:"project-display-row"},[t("span",{staticClass:"label"},[e._v("需求")]),t("span",{staticClass:"value"},[e._v(e._s(e.currentProject||"-"))])])]),t("div",{staticClass:"step-list"},e._l(e.visibleSteps,function(i){return t("div",{key:i.id,class:["step-item",{active:e.currentStep===i.id,completed:e.isStepCompleted(i.id)}],on:{click:function(a){return e.onStepClick(i.id)}}},[t("div",{staticClass:"step-icon"},[t("i",{class:i.icon})]),t("div",{staticClass:"step-info"},[t("div",{staticClass:"step-title"},[e._v(e._s(i.title))]),t("div",{staticClass:"step-desc"},[e._v(e._s(i.desc))])]),t("div",{staticClass:"step-status"},[e.isStepCompleted(i.id)?t("i",{staticClass:"el-icon-circle-check",staticStyle:{color:"#22c55e"}}):e._e()])])}),0)])},T=[],F=d(M,x,T,!1,null,"2e87f0c0");const j=F.exports,R={name:"Step1NewReq",props:{categories:{type:Array,default:()=>[]},projects:{type:Object,default:()=>({})},basePath:{type:String,default:""},currentCategory:{type:String,default:""},currentProject:{type:String,default:""}},data(){return{selectedCategory:"",selectedProject:"",dialogVisible:!1,dialogInput:"",requirementDialogVisible:!1,requirementDialogInput:""}},computed:{existingRequirementList(){if(!this.selectedCategory)return[];const s=`${this.selectedCategory}/`;return Object.keys(this.projects).filter(e=>e.startsWith(s)).map(e=>e.split("/")[1]).sort()}},watch:{currentCategory:{immediate:!0,handler(s){this.selectedCategory=s||""}},currentProject:{immediate:!0,handler(s){this.selectedProject=s||""}},selectedCategory(s){s||(this.selectedProject="")},existingRequirementList(s){this.selectedProject&&(!Array.isArray(s)||s.length===0||s.includes(this.selectedProject)||(this.selectedProject=""))}},methods:{onCategoryChange(){this.selectedProject="",this.$emit("category-change",this.selectedCategory||""),this.$emit("project-change","")},onProjectChange(){this.$emit("project-change",this.selectedProject||"")},showCreateRequirementDialog(){if(!this.selectedCategory){this.$message.warning("请先选择大类");return}this.requirementDialogInput="",this.requirementDialogVisible=!0},handleCreateRequirementConfirm(){const s=this.requirementDialogInput.trim();if(!s){this.$message.warning("需求名称不能为空");return}if(this.existingRequirementList.includes(s)){this.$message.warning("该需求已存在");return}this.$emit("create-requirement",{category:this.selectedCategory,name:s}),this.requirementDialogVisible=!1},showCreateCategoryDialog(){this.dialogInput="",this.dialogVisible=!0},handleDialogConfirm(){const s=this.dialogInput.trim();if(!s){this.$message.warning("名称不能为空");return}this.$emit("create-category",s),this.dialogVisible=!1}}};var V=function(){var e=this,t=e._self._c;return t("div",{staticClass:"step1-container"},[t("div",{staticClass:"step1-main"},[t("div",{staticClass:"panel-section"},[e._m(0),t("div",{staticClass:"panel-section-body"},[t("el-form",{attrs:{"label-position":"top",size:"small"}},[t("el-form-item",{attrs:{label:"所属大类"}},[t("div",{staticClass:"flex gap-2"},[t("el-select",{staticStyle:{flex:"1"},attrs:{placeholder:"请选择大类"},on:{change:e.onCategoryChange},model:{value:e.selectedCategory,callback:function(i){e.selectedCategory=i},expression:"selectedCategory"}},e._l(e.categories,function(i){return t("el-option",{key:i,attrs:{label:i,value:i}})}),1),t("el-button",{on:{click:e.showCreateCategoryDialog}},[t("i",{staticClass:"el-icon-plus"}),e._v(" 新建 ")])],1)]),t("el-form-item",{attrs:{label:"选择需求"}},[t("div",{staticClass:"flex gap-2"},[t("el-select",{staticStyle:{flex:"1"},attrs:{placeholder:"选择已有需求目录",disabled:!e.selectedCategory},on:{change:e.onProjectChange},model:{value:e.selectedProject,callback:function(i){e.selectedProject=i},expression:"selectedProject"}},e._l(e.existingRequirementList,function(i){return t("el-option",{key:i,attrs:{label:i,value:i}})}),1),t("el-button",{attrs:{disabled:!e.selectedCategory},on:{click:e.showCreateRequirementDialog}},[t("i",{staticClass:"el-icon-plus"}),e._v(" 新建 ")])],1)]),t("div",{staticClass:"form-hint",staticStyle:{color:"#84848a"}},[e._v(" "+e._s(e.selectedCategory?"可直接选择已有需求,或点击“新建”创建需求目录":"请先选择大类")+" ")])],1)],1)])]),t("el-dialog",{attrs:{title:"新建大类",visible:e.dialogVisible,width:"400px"},on:{"update:visible":function(i){e.dialogVisible=i}}},[t("el-form",[t("el-form-item",{attrs:{label:"大类名称"}},[t("el-input",{attrs:{placeholder:"输入大类名称"},model:{value:e.dialogInput,callback:function(i){e.dialogInput=i},expression:"dialogInput"}})],1)],1),t("span",{attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(i){e.dialogVisible=!1}}},[e._v("取消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.handleDialogConfirm}},[e._v("确定")])],1)],1),t("el-dialog",{attrs:{title:"新建需求",visible:e.requirementDialogVisible,width:"400px"},on:{"update:visible":function(i){e.requirementDialogVisible=i}}},[t("el-form",[t("el-form-item",{attrs:{label:"需求目录名称"}},[t("el-input",{attrs:{placeholder:"输入需求名称,如:用户管理"},model:{value:e.requirementDialogInput,callback:function(i){e.requirementDialogInput=i},expression:"requirementDialogInput"}})],1)],1),t("span",{attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(i){e.requirementDialogVisible=!1}}},[e._v("取消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.handleCreateRequirementConfirm}},[e._v("确定")])],1)],1)],1)},q=[function(){var s=this,e=s._self._c;return e("div",{staticClass:"panel-section-header"},[e("span",[e("i",{staticClass:"el-icon-folder-add"}),s._v(" 创建新需求")])])}],B=d(R,V,q,!1,null,"30b4a46d");const L=B.exports,z={name:"DesignDiscuss",components:{ModelSelectDialog:v,SkillSelectDialog:f,ResizableTextarea:g,ImagePreviewList:m},mixins:[S()],props:{category:{type:String,default:""},name:{type:String,default:""},reqBasePath:{type:String,default:""}},data(){return{discussions:[],currentDiscussion:null,dropdownOpen:!1,activeMenuId:null,renamingId:null,renameTitle:"",deleteDialogVisible:!1,deleteTarget:null,logItems:[],inputMessage:"",disabled:!1,stopping:!1,promptTokens:0,modelName:"",modelSelectVisible:!1,skillSelectVisible:!1,skillCursorPos:-1,sessionStatus:"idle",wsUnsubscribe:null}},computed:{specFilePath(){return!this.category||!this.name?"":`${this.reqBasePath}/${this.category}/${this.name}/${this.name}_方案.md`},sessionFilePath(){return!this.category||!this.name?"":`${this.reqBasePath}/${this.category}/${this.name}/session.json`}},watch:{category:{handler(){this.loadData()}},name:{handler(){this.loadData()}}},async mounted(){document.addEventListener("mousedown",this.onDocumentMouseDown),await this.loadData(),await this.loadDefaultModel()},beforeDestroy(){document.removeEventListener("mousedown",this.onDocumentMouseDown),this.wsUnsubscribe&&this.wsUnsubscribe()},methods:{handleKeydown(s){if(s.key==="Enter")if(s.ctrlKey){const e=s.target,t=e.selectionStart,i=e.selectionEnd,a=this.inputMessage;this.inputMessage=a.substring(0,t)+`
|
|
2
|
+
`+a.substring(i),this.$nextTick(()=>{e.selectionStart=e.selectionEnd=t+1})}else s.preventDefault(),this.sendMessage()},onDocumentMouseDown(s){this.activeMenuId&&!s.target.closest(".item-actions")&&(this.activeMenuId=null),this.dropdownOpen&&!s.target.closest(".discuss-dropdown")&&(this.dropdownOpen=!1)},async loadData(){await this.loadDiscussions()},async loadDiscussions(){var s;if(!this.category||!this.name){this.discussions=[],this.currentDiscussion=null;return}try{const e=await o.getFileContent(this.sessionFilePath);if(e&&((s=e.data)!=null&&s.content)){const t=JSON.parse(e.data.content);this.discussions=t.designDiscussions||[]}else this.discussions=[];this.discussions.length>0&&!this.currentDiscussion&&await this.switchDiscussion(this.discussions[0])}catch(e){console.error("Load discussions failed:",e),this.discussions=[],this.currentDiscussion=null}},async saveDiscussions(){var s;if(!(!this.category||!this.name))try{const e=await o.getFileContent(this.sessionFilePath);let t={};e&&((s=e.data)!=null&&s.content)&&(t=JSON.parse(e.data.content)),t.designDiscussions=this.discussions,await o.writeFile(this.sessionFilePath,JSON.stringify(t,null,2))}catch(e){console.error("Save discussions failed:",e)}},async createDiscussion(){var s,e,t,i;try{const a=`探讨${this.discussions.length+1}`,n=await o.createSession(a),l={id:((s=n.data)==null?void 0:s.id)||((e=n.data)==null?void 0:e.sessionId)||Date.now().toString(),sessionId:((t=n.data)==null?void 0:t.id)||((i=n.data)==null?void 0:i.sessionId),title:a,createdAt:new Date().toISOString()};this.discussions.push(l),await this.saveDiscussions(),this.dropdownOpen=!1,await this.switchDiscussion(l)}catch(a){console.error("Create discussion failed:",a),this.$message.error("创建探讨失败")}},async switchDiscussion(s){this.wsUnsubscribe&&(this.wsUnsubscribe(),this.wsUnsubscribe=null),this.currentDiscussion=s,this.dropdownOpen=!1,this.activeMenuId=null,this.logItems=[],this.inputMessage="",this.disabled=!1,this.stopping=!1,this.promptTokens=0,this.sessionStatus="idle",this.mediaFiles=[],s&&s.sessionId&&(await this.loadMessages(),this.subscribeSession())},startRename(s){this.activeMenuId=null,this.$prompt("请输入新名称","重命名探讨",{confirmButtonText:"确定",cancelButtonText:"取消",inputValue:s.title}).then(async({value:e})=>{e&&e.trim()&&(s.title=e.trim(),await this.saveDiscussions())}).catch(()=>{})},confirmDelete(s){this.activeMenuId=null,this.deleteTarget=s,this.deleteDialogVisible=!0},async doDelete(){const s=this.deleteTarget;if(this.deleteDialogVisible=!1,this.deleteTarget=null,!!s)try{await o.deleteSession(s.sessionId);const e=this.discussions.findIndex(t=>t.id===s.id);e!==-1&&this.discussions.splice(e,1),await this.saveDiscussions(),this.currentDiscussion&&this.currentDiscussion.id===s.id&&(this.discussions.length>0?await this.switchDiscussion(this.discussions[0]):(this.wsUnsubscribe&&(this.wsUnsubscribe(),this.wsUnsubscribe=null),this.currentDiscussion=null,this.logItems=[],this.promptTokens=0,this.sessionStatus="idle"))}catch(e){console.error("Delete discussion failed:",e),this.$message.error("删除探讨失败")}},async sendMessage(){const s=this.inputMessage.trim(),e=this.mediaFiles&&this.mediaFiles.length>0;if(!s&&!e||this.disabled)return;if(!this.currentDiscussion||!this.currentDiscussion.sessionId){this.$message.error("会话不存在,请刷新页面");return}this.wsUnsubscribe||this.subscribeSession();const t=`方案路径:${this.specFilePath}
|
|
3
|
+
|
|
4
|
+
这个是对这个方案的探讨 你只需要回答用户的问题即可 不需要修改方案 也不要修改代码
|
|
5
|
+
|
|
6
|
+
用户输入: ${s}`;this.inputMessage="",this.disabled=!0,this.stopping=!1;const i=(this.mediaFiles||[]).filter(a=>!a.uploading&&a.filePath).map(a=>({filePath:a.filePath,type:a.type,dataUrl:a.dataUrl}));this.logItems.push({type:"chat",content:s,mediaFiles:i}),this.scrollChatToBottom(!0),o.sessionWsSend(this.currentDiscussion.sessionId,"chat",{message:t,sessionId:this.currentDiscussion.sessionId,modelName:this.modelName||void 0,mediaFiles:i.map(a=>({filePath:a.filePath,type:a.type}))}),this.mediaFiles=[]},stopChat(){!this.currentDiscussion||!this.currentDiscussion.sessionId||this.stopping||(this.stopping=!0,o.sessionWsSend(this.currentDiscussion.sessionId,"stop",{sessionId:this.currentDiscussion.sessionId}))},subscribeSession(){!this.currentDiscussion||!this.currentDiscussion.sessionId||(this.wsUnsubscribe&&this.wsUnsubscribe(),this.wsUnsubscribe=o.wsSubscribe(this.currentDiscussion.sessionId,{running_sessions:s=>{const t=((s==null?void 0:s.runningSessionIds)||[]).includes(this.currentDiscussion.sessionId);this.sessionStatus=t?"processing":"idle",this.disabled=t},todos:s=>{s!=null&&s.todos&&this.logItems.push({type:"todos",todos:s.todos}),this.scrollChatToBottom()},step:s=>{var e;this.logItems.push({type:"step",thought:s.thought,toolCalls:s.toolCalls,success:s.success}),(e=s.usage)!=null&&e.promptTokens&&(this.promptTokens=s.usage.promptTokens),this.scrollChatToBottom()},compact:s=>{this.logItems.push({type:"system",content:`【压缩完成】${s.summary||""}`}),this.loadMessages()},done:s=>{var e;this.disabled=!1,this.stopping=!1,this.sessionStatus="completed",s!=null&&s.modelName&&(this.modelName=s.modelName),(e=s==null?void 0:s.usage)!=null&&e.promptTokens&&(this.promptTokens=s.usage.promptTokens),s!=null&&s.response&&this.logItems.push({type:"think",content:s.response}),this.scrollChatToBottom()},stopped:()=>{this.disabled=!1,this.stopping=!1,this.sessionStatus="idle",this.logItems.push({type:"think",content:"【已停止】"}),this.scrollChatToBottom()},error:s=>{this.$message.error((s==null?void 0:s.error)||"发生错误"),this.disabled=!1,this.stopping=!1,this.sessionStatus="idle"}}))},scrollChatToBottom(s=!1){const e=C(this.$refs.messagesContainer);this.$nextTick(()=>{y(this.$refs.messagesContainer,{force:s,prevSnapshot:e})})},async loadMessages(){if(!(!this.currentDiscussion||!this.currentDiscussion.sessionId))try{const s=await o.getMessages(this.currentDiscussion.sessionId);this.logItems=s.data||[],this.scrollChatToBottom(!0)}catch(s){console.error("Load messages failed:",s)}},async loadDefaultModel(){var s;try{const e=await o.getConfig("defaultModel");(s=e.data)!=null&&s.value&&(this.modelName=e.data.value)}catch(e){console.error("Load default model failed:",e)}},openModelSelector(){this.modelSelectVisible=!0},onModelSelected(s){const e=s.name.split("/");this.modelName=e.length>2?e.slice(1).join("/"):s.name,o.setConfig("defaultModel",this.modelName)},openSkillSelect(){const s=this.$el.querySelector(".input-area textarea");this.skillCursorPos=s?s.selectionStart:-1,this.skillSelectVisible=!0},onSkillSelected(s){const e=`[${s}] `,t=this.skillCursorPos>=0?this.skillCursorPos:0;this.inputMessage=this.inputMessage.slice(0,t)+e+this.inputMessage.slice(t),this.skillSelectVisible=!1},getTodoStatusIcon(s){return{completed:"✅",in_progress:"🔄",pending:"⬜",cancelled:"❌"}[s]||"⬜"},formatInput(s,e){try{const t=JSON.parse(e);return s==="bash"||s==="execute_bash"?t.command+(t.workdir?` (${t.workdir})`:""):s==="read_file"?t.file_path+(t.offset?`:${t.offset}`:""):s==="edit_file"||s==="write_file"?t.file_path:s==="glob"||s==="find_files"?t.pattern+(t.directory?` (${t.directory})`:""):s==="grep"||s==="search_content"?`"${t.pattern}" (${t.directory||""})`:e}catch{return e}},renderMarkdown(s){return s?p(s):""}}};var W=function(){var e=this,t=e._self._c;return t("div",{staticClass:"discuss-container"},[e.discussions.length>0?t("div",{staticClass:"discuss-dropdown"},[t("div",{staticClass:"dropdown-trigger",on:{click:function(i){e.dropdownOpen=!e.dropdownOpen}}},[t("span",{staticClass:"dropdown-title"},[e._v(e._s(e.currentDiscussion?e.currentDiscussion.title:"选择探讨"))]),t("i",{staticClass:"el-icon-arrow-down",class:{rotated:e.dropdownOpen}})]),e.dropdownOpen?t("div",{staticClass:"dropdown-menu"},[e._l(e.discussions,function(i){return t("div",{key:i.id,staticClass:"dropdown-item",class:{active:e.currentDiscussion&&e.currentDiscussion.id===i.id}},[t("span",{staticClass:"item-title",on:{click:function(a){return e.switchDiscussion(i)}}},[e._v(e._s(i.title))]),t("span",{staticClass:"item-actions",on:{click:function(a){a.stopPropagation()}}},[t("span",{staticClass:"menu-trigger",on:{click:function(a){a.stopPropagation(),e.activeMenuId=e.activeMenuId===i.id?null:i.id}}},[e._v("⋮")]),e.activeMenuId===i.id?t("div",{staticClass:"menu-popup"},[t("div",{staticClass:"menu-item",on:{click:function(a){return a.stopPropagation(),e.startRename(i)}}},[e._v("重命名")]),t("div",{staticClass:"menu-item danger",on:{click:function(a){return a.stopPropagation(),e.confirmDelete(i)}}},[e._v("删除")])]):e._e()])])}),t("div",{staticClass:"dropdown-item add-item",on:{click:e.createDiscussion}},[t("i",{staticClass:"el-icon-plus"}),e._v(" 新建探讨 ")])],2):e._e()]):e._e(),!e.currentDiscussion&&e.discussions.length===0?t("div",{staticClass:"empty-discuss"},[t("div",{staticClass:"empty-card",on:{click:e.createDiscussion}},[t("i",{staticClass:"el-icon-chat-dot-round"}),t("p",[e._v("新建探讨")]),t("span",[e._v("点击创建第一个方案探讨会话")])])]):e._e(),e.currentDiscussion?[t("div",{ref:"messagesContainer",staticClass:"chat-messages"},[e.logItems.length?e._e():t("div",{staticClass:"empty-state"},[t("i",{staticClass:"el-icon-chat-dot-round"}),t("p",[e._v("与AI探讨方案内容,不会修改方案文件")])]),e._l(e.logItems,function(i,a){return[i.type==="todos"?t("div",{staticClass:"todos-list"},e._l(i.todos,function(n,l){return t("div",{key:l,staticClass:"todo-item"},[t("span",{staticClass:"todo-status"},[e._v(e._s(e.getTodoStatusIcon(n.status)))]),t("span",{staticClass:"todo-name"},[e._v(e._s(n.name))])])}),0):e._e(),i.type==="chat"?t("div",{staticClass:"flex justify-end"},[t("div",{staticClass:"user-question"},[i.mediaFiles&&i.mediaFiles.length>0?t("div",{staticClass:"chat-images"},e._l(i.mediaFiles,function(n){return t("img",{key:n.filePath,staticClass:"chat-image-thumb",attrs:{src:n.url||n.dataUrl||n.filePath},on:{click:function(l){return l.stopPropagation(),e.openImagePreview(n)}}})}),0):e._e(),t("div",[e._v(e._s(i.content))])])]):i.type==="system"?t("div",{staticClass:"system-message",domProps:{innerHTML:e._s(e.renderMarkdown(i.content))}}):i.type==="step"?[i.thought?t("div",{staticClass:"ai-thought",domProps:{innerHTML:e._s(e.renderMarkdown(i.thought))}}):e._e(),e._l(i.toolCalls,function(n,l){return t("div",{key:l,staticClass:"log-mute"},[t("span",{class:i.success!==!1?"tool-success":"tool-fail"},[e._v(" "+e._s(i.success!==!1?"✓":"✗")+" ")]),e._v(" "+e._s(n.function.name)+" "),n.function.arguments?t("span",{staticClass:"tool-input"},[e._v(e._s(e.formatInput(n.function.name,n.function.arguments)))]):e._e()])})]:i.type==="think"?t("div",{staticClass:"ai-thought",domProps:{innerHTML:e._s(e.renderMarkdown(i.content))}}):e._e()]}),e.modelName?t("div",{staticClass:"build-info"},[t("span",{staticClass:"icon"},[e._v("▣")]),e._v(" Build · "+e._s(e.modelName)+" ")]):e._e()],2),t("div",{staticClass:"chat-input-area"},[e.mediaFiles&&e.mediaFiles.length>0?t("ImagePreviewList",{attrs:{files:e.mediaFiles,disabled:e.disabled},on:{remove:e.removeMedia}}):e._e(),t("div",{staticClass:"input-panel"},[t("div",{staticClass:"input-wrapper"},[t("ResizableTextarea",{staticClass:"input-area",attrs:{rows:5,placeholder:"输入探讨内容... (Enter 发送, Ctrl+Enter 换行)",disabled:e.disabled&&!e.stopping},on:{"paste-image":e.handlePasteImages},nativeOn:{keydown:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")?null:e.handleKeydown.apply(null,arguments)}},model:{value:e.inputMessage,callback:function(i){e.inputMessage=i},expression:"inputMessage"}}),t("input",{ref:"mediaInput",staticStyle:{display:"none"},attrs:{type:"file",accept:"image/*",multiple:""},on:{change:e.handleImageSelected}})],1),t("div",{staticClass:"input-actions"},[t("span",{staticClass:"status-action",on:{click:e.openSkillSelect,mousedown:function(i){i.preventDefault()}}},[e._v("选择Skill")]),t("span",{staticClass:"separator"},[e._v("|")]),t("el-button",{staticClass:"upload-btn",attrs:{disabled:e.disabled,size:"small"},on:{click:e.handleImageUpload}},[e._v("图片")]),e.disabled&&!e.stopping?t("el-button",{staticClass:"stop-btn",attrs:{type:"danger",size:"small"},on:{click:e.stopChat}},[e._v(" ■ 停止 ")]):e.stopping?t("el-button",{staticClass:"stop-btn",attrs:{type:"info",disabled:"",size:"small"}},[e._v(" 停止中... ")]):t("el-button",{staticClass:"send-btn",attrs:{type:"primary",disabled:!e.inputMessage.trim()&&e.mediaFiles.length===0,size:"small"},on:{click:e.sendMessage}},[e._v(" 发送 ")])],1)])],1),t("div",{staticClass:"status-bar"},[t("span",{class:e.sessionStatus==="processing"?"status-thinking":"status-ready"},[e.sessionStatus==="processing"?t("span",{staticClass:"thinking-spinner"}):e._e(),e._v(" "+e._s(e.sessionStatus==="processing"?"思考中":"✓ 就绪")+" ")]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",{staticClass:"model-selector",on:{click:e.openModelSelector,mousedown:function(i){i.preventDefault()}}},[e._v(" 模型:"+e._s(e.modelName||"-")+" ▾ ")]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",[e._v("会话:"+e._s(e.currentDiscussion.sessionId?e.currentDiscussion.sessionId.slice(0,8):"--------"))]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",[e._v("token:"+e._s(e.promptTokens||0))])])]:e._e(),t("el-dialog",{attrs:{visible:e.deleteDialogVisible,title:"确认删除",width:"360px","close-on-click-modal":!1},on:{"update:visible":function(i){e.deleteDialogVisible=i}}},[t("p",[e._v("确定要删除探讨「"+e._s(e.deleteTarget?e.deleteTarget.title:"")+"」吗?此操作不可恢复。")]),t("span",{attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(i){e.deleteDialogVisible=!1}}},[e._v("取消")]),t("el-button",{attrs:{type:"danger"},on:{click:e.doDelete}},[e._v("删除")])],1)]),t("ModelSelectDialog",{attrs:{visible:e.modelSelectVisible,"current-model":e.modelName},on:{"update:visible":function(i){e.modelSelectVisible=i},select:e.onModelSelected}}),t("SkillSelectDialog",{attrs:{visible:e.skillSelectVisible},on:{"update:visible":function(i){e.skillSelectVisible=i},select:e.onSkillSelected,close:function(i){e.skillSelectVisible=!1}}}),e.previewImage?t("div",{staticClass:"image-lightbox",on:{click:e.closeImagePreview}},[t("span",{staticClass:"lightbox-close",on:{click:e.closeImagePreview}},[e._v("×")]),t("img",{staticClass:"lightbox-image",attrs:{src:e.previewImage.url||e.previewImage.dataUrl||e.previewImage.filePath},on:{click:function(i){i.stopPropagation()}}})]):e._e()],2)},N=[],U=d(z,W,N,!1,null,"70b06650");const E=U.exports,O={name:"Step2Design",components:{ModelSelectDialog:v,CommandDialog:k,FileSelectDialog:_,SkillSelectDialog:f,ResizableTextarea:g,ImagePreviewList:m,DesignDiscuss:E},mixins:[S()],props:{category:{type:String,default:""},name:{type:String,default:""},reqBasePath:{type:String,default:""}},data(){return{editor:null,specContent:"",inputMessage:"",disabled:!1,stopping:!1,promptTokens:0,logItems:[],modelName:"",modelSelectVisible:!1,commandDialogVisible:!1,fileSelectVisible:!1,skillSelectVisible:!1,skillCursorPos:-1,sessionId:"",sessionStatus:"idle",customActions:[],chatTab:"assistant",parentInfo:null,chatPanelWidth:480,isResizing:!1,startX:0,startWidth:0,minChatWidth:320,maxChatWidthRatio:.6}},computed:{specFilePath(){return!this.category||!this.name?"等待选择需求...":`${this.reqBasePath}/${this.category}/${this.name}/${this.name}_方案.md`}},watch:{category:{handler(){this.loadData()}},name:{handler(){this.loadData()}},reqBasePath:{handler(s){s&&this.loadData()}}},async mounted(){document.addEventListener("mousemove",this.handleResize),document.addEventListener("mouseup",this.stopResize),this.initMonacoEditor(),await this.loadData(),await this.loadDefaultModel(),await this.loadCustomActions(),o.ws.init()},beforeDestroy(){document.removeEventListener("mousemove",this.handleResize),document.removeEventListener("mouseup",this.stopResize),this.editor&&(this.editor.dispose(),this.editor=null),this.wsUnsubscribe&&this.wsUnsubscribe()},methods:{handleKeydown(s){if(s.key==="Enter")if(s.ctrlKey){const e=s.target,t=e.selectionStart,i=e.selectionEnd,a=this.inputMessage;this.inputMessage=a.substring(0,t)+`
|
|
7
|
+
`+a.substring(i),this.$nextTick(()=>{e.selectionStart=e.selectionEnd=t+1})}else s.preventDefault(),this.sendMessage()},async loadData(){this.reqBasePath&&await Promise.all([this.loadSpec(),this.loadSession()])},async loadSpec(){var s;if(!this.category||!this.name){this.specContent=`# 选择或创建需求项目开始设计
|
|
8
|
+
`,this.syncEditorContent(this.specContent);return}try{const e=this.specFilePath,t=await o.getFileContent(e);this.specContent=((s=t.data)==null?void 0:s.content)||"",this.syncEditorContent(this.specContent)}catch(e){console.error("Load spec failed:",e),this.specContent="",this.syncEditorContent("")}},async loadSession(){var s;if(!this.category||!this.name){this.sessionId="",this.$emit("update:sessionId",""),this.parentInfo=null;return}try{const e=`${this.reqBasePath}/${this.category}/${this.name}/session.json`,t=await o.getFileContent(e);if(t&&((s=t.data)!=null&&s.content)){const i=JSON.parse(t.data.content);this.sessionId=i.designSessionId||"",this.parentInfo=i.parent||null}else this.sessionId="",this.parentInfo=null;this.$emit("update:sessionId",this.sessionId),this.sessionId?(await this.loadMessages(),this.subscribeSession()):this.logItems=[]}catch(e){console.error("Load session failed:",e),this.sessionId="",this.$emit("update:sessionId",""),this.parentInfo=null,this.logItems=[]}},syncEditorContent(s){if(!this.editor||s===void 0||s===null)return;const e=String(s);this.editor.getValue()!==e&&this.editor.setValue(e)},initMonacoEditor(){this.editor||this.$nextTick(()=>{this.createEditor()})},createEditor(){this.editor||(this.editor=$.create(this.$refs.editorContainer,{value:this.specContent||`# 选择或创建需求项目开始设计
|
|
9
|
+
`,language:"markdown",theme:"vs-dark",fontSize:14,fontFamily:"ui-monospace, SFMono-Regular, 'JetBrains Mono', Menlo, Monaco, Consolas, monospace",minimap:{enabled:!1},lineNumbers:"on",wordWrap:"on",scrollBeyondLastLine:!1,automaticLayout:!0,padding:{top:16},scrollbar:{verticalScrollbarSize:6,horizontalScrollbarSize:6,useShadows:!1}}),this.editor.addCommand(P.CtrlCmd|D.KeyS,()=>{this.saveSpec()}),this.syncEditorContent(this.specContent))},saveSpec(){if(!this.editor)return;const s=this.editor.getValue();this.$emit("save-spec",s)},async refreshSpec(){await this.loadSpec(),this.$message.success("方案已刷新")},async sendMessage(){const s=this.inputMessage.trim(),e=this.mediaFiles&&this.mediaFiles.length>0;if(!s&&!e||this.disabled)return;if(!this.sessionId){this.$message.error("会话不存在,请刷新页面");return}this.wsUnsubscribe||this.subscribeSession();let t="";this.logItems.length===0&&this.parentInfo&&(t=`
|
|
10
|
+
|
|
11
|
+
注意:当前方案是「${this.parentInfo.name}」的子方案,请参考父方案内容。父方案路径:${this.parentInfo.specPath}`);const i=`先在 ${this.specFilePath} 生成方案,先不要修改代码。${t}
|
|
12
|
+
|
|
13
|
+
用户输入: ${s}`;this.inputMessage="",this.disabled=!0,this.stopping=!1;const a=(this.mediaFiles||[]).filter(n=>!n.uploading&&n.filePath).map(n=>({filePath:n.filePath,type:n.type,dataUrl:n.dataUrl}));this.logItems.push({type:"chat",content:s,mediaFiles:a}),this.scrollChatToBottom(!0),o.sessionWsSend(this.sessionId,"chat",{message:i,sessionId:this.sessionId,modelName:this.modelName||void 0,mediaFiles:a.map(n=>({filePath:n.filePath,type:n.type}))}),this.mediaFiles=[]},stopChat(){!this.sessionId||this.stopping||(this.stopping=!0,o.sessionWsSend(this.sessionId,"stop",{sessionId:this.sessionId}))},subscribeSession(){this.sessionId&&(this.wsUnsubscribe&&this.wsUnsubscribe(),this.wsUnsubscribe=o.wsSubscribe(this.sessionId,{running_sessions:s=>{const t=((s==null?void 0:s.runningSessionIds)||[]).includes(this.sessionId);this.sessionStatus=t?"processing":"idle",this.disabled=t},todos:s=>{var e;console.log("[Step2Design] WS todos event, todos count:",(e=s==null?void 0:s.todos)==null?void 0:e.length),s!=null&&s.todos&&this.logItems.push({type:"todos",todos:s.todos}),this.scrollChatToBottom()},step:s=>{var e,t;console.log("[Step2Design] WS step event, has thought:",!!s.thought,"toolCalls:",(e=s==null?void 0:s.toolCalls)==null?void 0:e.length),this.logItems.push({type:"step",thought:s.thought,toolCalls:s.toolCalls,success:s.success}),(t=s.usage)!=null&&t.promptTokens&&(this.promptTokens=s.usage.promptTokens),this.scrollChatToBottom()},compact:s=>{this.logItems.push({type:"system",content:`【压缩完成】${s.summary||""}`}),this.loadMessages()},done:s=>{var e;console.log("[Step2Design] WS done event"),this.disabled=!1,this.stopping=!1,this.sessionStatus="completed",s!=null&&s.modelName&&(this.modelName=s.modelName),(e=s==null?void 0:s.usage)!=null&&e.promptTokens&&(this.promptTokens=s.usage.promptTokens),s!=null&&s.response&&this.logItems.push({type:"think",content:s.response}),this.$emit("spec-updated"),this.scrollChatToBottom()},stopped:()=>{console.log("[Step2Design] WS stopped event"),this.disabled=!1,this.stopping=!1,this.sessionStatus="idle",this.logItems.push({type:"think",content:"【已停止】"}),this.scrollChatToBottom()},error:s=>{this.$message.error((s==null?void 0:s.error)||"发生错误"),this.disabled=!1,this.stopping=!1,this.sessionStatus="idle"}}))},scrollChatToBottom(s=!1){const e=C(this.$refs.messagesContainer);console.log("[Step2Design] scrollChatToBottom called, force:",s,"snap:",JSON.stringify(e)),this.$nextTick(()=>{y(this.$refs.messagesContainer,{force:s,prevSnapshot:e})})},async loadMessages(){if(this.sessionId)try{const s=await o.getMessages(this.sessionId);this.logItems=s.data||[],this.scrollChatToBottom(!0)}catch(s){console.error("Load messages failed:",s)}},async loadDefaultModel(){var s;try{const e=await o.getConfig("defaultModel");(s=e.data)!=null&&s.value&&(this.modelName=e.data.value)}catch(e){console.error("Load default model failed:",e)}},openModelSelector(){this.modelSelectVisible=!0},onModelSelected(s){const e=s.name.split("/");this.modelName=e.length>2?e.slice(1).join("/"):s.name,o.setConfig("defaultModel",this.modelName)},openCommandDialog(){this.commandDialogVisible=!0},handleExecuteCommand(s){this.inputMessage=s+" ",this.$nextTick(()=>{const e=this.$el.querySelector(".input-area textarea");e&&e.focus()})},openFileSelect(){this.fileSelectVisible=!0},onFileSelected(s){const e=this.inputMessage.lastIndexOf("@");e!==-1?this.inputMessage=this.inputMessage.slice(0,e)+s+" ":this.inputMessage+=s+" ",this.cancelFileSelect()},cancelFileSelect(){this.fileSelectVisible=!1},openSkillSelect(){const s=this.$el.querySelector(".input-area textarea");this.skillCursorPos=s?s.selectionStart:-1,this.skillSelectVisible=!0},onSkillSelected(s){const e=`[${s}] `,t=this.skillCursorPos>=0?this.skillCursorPos:0;this.inputMessage=this.inputMessage.slice(0,t)+e+this.inputMessage.slice(t),this.cancelSkillSelect()},cancelSkillSelect(){this.skillSelectVisible=!1},getTodoStatusIcon(s){return{completed:"✅",in_progress:"🔄",pending:"⬜",cancelled:"❌"}[s]||"⬜"},formatInput(s,e){try{const t=JSON.parse(e);return s==="bash"||s==="execute_bash"?t.command+(t.workdir?` (${t.workdir})`:""):s==="read_file"?t.file_path+(t.offset?`:${t.offset}`:""):s==="edit_file"||s==="write_file"?t.file_path:s==="glob"||s==="find_files"?t.pattern+(t.directory?` (${t.directory})`:""):s==="grep"||s==="search_content"?`"${t.pattern}" (${t.directory||""})`:e}catch{return e}},renderMarkdown(s){return s?p(s):""},openCustomActions(){window.open("/#/views/pc/custom-actions","_blank")},async loadCustomActions(){try{const s=await o.getCustomActions("design");this.customActions=s.data||[]}catch(s){console.error("Load custom actions failed:",s)}},executeCustomAction(s){this.inputMessage=s.prompt,this.$nextTick(()=>{const e=this.$el.querySelector(".input-area textarea");e&&e.focus(),s.auto_send&&this.sendMessage()})},startResize(s){this.isResizing=!0,this.startX=s.clientX,this.startWidth=this.chatPanelWidth,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},handleResize(s){if(!this.isResizing)return;const e=this.startX-s.clientX;let t=this.startWidth+e;const i=this.$el.querySelector(".step2-main"),a=i?i.clientWidth*this.maxChatWidthRatio:800;t<this.minChatWidth&&(t=this.minChatWidth),t>a&&(t=a),this.chatPanelWidth=t},stopResize(){this.isResizing=!1,document.body.style.cursor="",document.body.style.userSelect=""}}};var A=function(){var e=this,t=e._self._c;return t("div",{staticClass:"step2-container"},[t("div",{staticClass:"step2-main"},[t("div",{staticClass:"editor-panel"},[t("div",{staticClass:"editor-header"},[t("span",{staticClass:"editor-title"},[t("i",{staticClass:"el-icon-document"}),t("span",[e._v(e._s(e.specFilePath))])]),t("div",{staticClass:"editor-actions"},[t("el-button",{attrs:{size:"small",type:"text",title:"保存方案"},on:{click:e.saveSpec}},[t("i",{staticClass:"el-icon-check"})]),t("el-button",{attrs:{size:"small",type:"text",title:"刷新方案"},on:{click:e.refreshSpec}},[t("i",{staticClass:"el-icon-refresh"})]),t("el-button",{attrs:{size:"small",type:"text",title:"新建子方案"},on:{click:function(i){return e.$emit("create-sub-scheme")}}},[t("i",{staticClass:"el-icon-plus"})])],1)]),t("div",{ref:"editorContainer",staticClass:"editor-container"})]),t("div",{staticClass:"resize-handle",on:{mousedown:e.startResize}}),t("div",{ref:"chatPanel",staticClass:"chat-panel",style:{width:e.chatPanelWidth+"px"}},[t("div",{staticClass:"panel-header panel-tabs"},[t("div",{staticClass:"panel-tab",class:{active:e.chatTab==="assistant"},on:{click:function(i){e.chatTab="assistant"}}},[t("i",{staticClass:"el-icon-chat-dot-round"}),e._v(" AI生成方案 ")]),t("div",{staticClass:"panel-tab",class:{active:e.chatTab==="discuss"},on:{click:function(i){e.chatTab="discuss"}}},[t("i",{staticClass:"el-icon-chat-dot-square"}),e._v(" AI方案交流 ")])]),e.chatTab==="assistant"?[t("div",{ref:"messagesContainer",staticClass:"chat-messages"},[e.logItems.length?e._e():t("div",{staticClass:"empty-state"},[t("i",{staticClass:"el-icon-chat-dot-round"}),t("p",[e._v("输入需求描述,AI将协助您完善方案")])]),e._l(e.logItems,function(i,a){return[i.type==="todos"?t("div",{staticClass:"todos-list"},e._l(i.todos,function(n,l){return t("div",{key:l,staticClass:"todo-item"},[t("span",{staticClass:"todo-status"},[e._v(e._s(e.getTodoStatusIcon(n.status)))]),t("span",{staticClass:"todo-name"},[e._v(e._s(n.name))])])}),0):e._e(),i.type==="chat"?t("div",{staticClass:"flex justify-end"},[t("div",{staticClass:"user-question"},[i.mediaFiles&&i.mediaFiles.length>0?t("div",{staticClass:"chat-images"},e._l(i.mediaFiles,function(n){return t("img",{key:n.filePath,staticClass:"chat-image-thumb",attrs:{src:n.url||n.dataUrl||n.filePath},on:{click:function(l){return l.stopPropagation(),e.openImagePreview(n)}}})}),0):e._e(),t("div",[e._v(e._s(i.content))])])]):i.type==="system"?t("div",{staticClass:"system-message",domProps:{innerHTML:e._s(e.renderMarkdown(i.content))}}):i.type==="step"?[i.thought?t("div",{staticClass:"ai-thought",domProps:{innerHTML:e._s(e.renderMarkdown(i.thought))}}):e._e(),e._l(i.toolCalls,function(n,l){return t("div",{key:l,staticClass:"log-mute"},[t("span",{class:i.success!==!1?"tool-success":"tool-fail"},[e._v(" "+e._s(i.success!==!1?"✓":"✗")+" ")]),e._v(" "+e._s(n.function.name)+" "),n.function.arguments?t("span",{staticClass:"tool-input"},[e._v(e._s(e.formatInput(n.function.name,n.function.arguments)))]):e._e()])})]:i.type==="think"?t("div",{staticClass:"ai-thought",domProps:{innerHTML:e._s(e.renderMarkdown(i.content))}}):e._e()]}),e.modelName?t("div",{staticClass:"build-info"},[t("span",{staticClass:"icon"},[e._v("▣")]),e._v(" Build · "+e._s(e.modelName)+" ")]):e._e()],2),t("div",{staticClass:"chat-input-area"},[e.mediaFiles&&e.mediaFiles.length>0?t("ImagePreviewList",{attrs:{files:e.mediaFiles,disabled:e.disabled},on:{remove:e.removeMedia}}):e._e(),t("div",{staticClass:"input-panel"},[t("div",{staticClass:"input-wrapper"},[t("ResizableTextarea",{staticClass:"input-area",attrs:{rows:5,placeholder:"输入消息... (Enter 发送, Ctrl+Enter 换行, @ 选择文件)",disabled:e.disabled&&!e.stopping},on:{"paste-image":e.handlePasteImages},nativeOn:{keydown:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")?null:e.handleKeydown.apply(null,arguments)}},model:{value:e.inputMessage,callback:function(i){e.inputMessage=i},expression:"inputMessage"}}),t("input",{ref:"mediaInput",staticStyle:{display:"none"},attrs:{type:"file",accept:"image/*",multiple:""},on:{change:e.handleImageSelected}})],1),t("div",{staticClass:"input-actions"},[t("div",{staticClass:"input-actions-left"},[t("span",{staticClass:"status-action",on:{click:e.openFileSelect,mousedown:function(i){i.preventDefault()}}},[e._v("选择文件")]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",{staticClass:"status-action",on:{click:e.openSkillSelect,mousedown:function(i){i.preventDefault()}}},[e._v("选择Skill")]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",{staticClass:"status-action",on:{click:e.openCommandDialog,mousedown:function(i){i.preventDefault()}}},[e._v("命令")])]),t("div",{staticClass:"input-actions-right"},[t("el-button",{staticClass:"upload-btn",attrs:{disabled:e.disabled,size:"small"},on:{click:e.handleImageUpload}},[e._v("图片")]),e._l(e.customActions,function(i){return t("el-button",{key:i.id,attrs:{type:"info",size:"small",disabled:e.disabled},on:{click:function(a){return e.executeCustomAction(i)}}},[e._v(" "+e._s(i.name)+" ")])}),e.disabled&&!e.stopping?t("el-button",{staticClass:"stop-btn",attrs:{type:"danger",size:"small"},on:{click:e.stopChat}},[e._v(" ■ 停止 ")]):e.stopping?t("el-button",{staticClass:"stop-btn",attrs:{type:"info",disabled:"",size:"small"}},[e._v(" 停止中... ")]):t("el-button",{staticClass:"send-btn",attrs:{type:"primary",disabled:!e.inputMessage.trim()&&e.mediaFiles.length===0,size:"small"},on:{click:e.sendMessage}},[e._v(" 发送 ")])],2)])]),t("div",{staticClass:"status-bar"},[t("span",{class:e.sessionStatus==="processing"?"status-thinking":"status-ready"},[e.sessionStatus==="processing"?t("span",{staticClass:"thinking-spinner"}):e._e(),e._v(" "+e._s(e.sessionStatus==="processing"?"思考中":"✓ 就绪")+" ")]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",{staticClass:"model-selector",on:{click:e.openModelSelector,mousedown:function(i){i.preventDefault()}}},[e._v(" 模型:"+e._s(e.modelName||"-")+" ▾ ")]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",[e._v("会话:"+e._s(e.sessionId?e.sessionId.slice(0,8):"--------"))]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",[e._v("token:"+e._s(e.promptTokens||0))])])],1)]:e._e(),e.chatTab==="discuss"?t("DesignDiscuss",{attrs:{category:e.category,name:e.name,reqBasePath:e.reqBasePath}}):e._e()],2)]),t("ModelSelectDialog",{attrs:{visible:e.modelSelectVisible,"current-model":e.modelName},on:{"update:visible":function(i){e.modelSelectVisible=i},select:e.onModelSelected}}),t("CommandDialog",{attrs:{visible:e.commandDialogVisible},on:{"update:visible":function(i){e.commandDialogVisible=i},execute:e.handleExecuteCommand}}),t("FileSelectDialog",{attrs:{visible:e.fileSelectVisible},on:{"update:visible":function(i){e.fileSelectVisible=i},select:e.onFileSelected,close:e.cancelFileSelect}}),t("SkillSelectDialog",{attrs:{visible:e.skillSelectVisible},on:{"update:visible":function(i){e.skillSelectVisible=i},select:e.onSkillSelected,close:e.cancelSkillSelect}}),e.previewImage?t("div",{staticClass:"image-lightbox",on:{click:e.closeImagePreview}},[t("span",{staticClass:"lightbox-close",on:{click:e.closeImagePreview}},[e._v("×")]),t("img",{staticClass:"lightbox-image",attrs:{src:e.previewImage.url||e.previewImage.dataUrl||e.previewImage.filePath},on:{click:function(i){i.stopPropagation()}}})]):e._e()],1)},K=[],J=d(O,A,K,!1,null,"733218fd");const H=J.exports,X={name:"Step3CodeGen",components:{ModelSelectDialog:v,CommandDialog:k,FileSelectDialog:_,SkillSelectDialog:f,ResizableTextarea:g,ImagePreviewList:m},mixins:[S()],props:{category:{type:String,default:""},name:{type:String,default:""},reqBasePath:{type:String,default:""}},data(){return{inputMessage:"",disabled:!1,stopping:!1,promptTokens:0,dotAnimation:"",dotInterval:null,dots:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧"],logItems:[],modelName:"",modelSelectVisible:!1,commandDialogVisible:!1,fileSelectVisible:!1,skillSelectVisible:!1,skillCursorPos:-1,sessionId:"",sessionStatus:"idle",customActions:[],devLogContent:"",devLogLoading:!1,devlogPanelWidth:400,isResizing:!1,startX:0,startWidth:0,minDevlogWidth:250,maxDevlogWidthRatio:.6}},computed:{specFilePath(){return!this.category||!this.name?"":`${this.reqBasePath}/${this.category}/${this.name}/${this.name}_方案.md`},renderedDevLog(){return this.devLogContent?p(this.devLogContent):'<p style="color: #84848a;">暂无记录</p>'}},watch:{category:{handler(){this.loadSession()}},name:{handler(){this.loadSession()}}},async mounted(){document.addEventListener("mousemove",this.handleResize),document.addEventListener("mouseup",this.stopResize),await this.loadSession(),await this.loadDefaultModel(),await this.loadCustomActions(),o.ws.init()},beforeDestroy(){document.removeEventListener("mousemove",this.handleResize),document.removeEventListener("mouseup",this.stopResize),this.dotInterval&&clearInterval(this.dotInterval),this.wsUnsubscribe&&this.wsUnsubscribe()},methods:{handleKeydown(s){if(s.key==="Enter")if(s.ctrlKey){const e=s.target,t=e.selectionStart,i=e.selectionEnd,a=this.inputMessage;this.inputMessage=a.substring(0,t)+`
|
|
14
|
+
`+a.substring(i),this.$nextTick(()=>{e.selectionStart=e.selectionEnd=t+1})}else s.preventDefault(),this.sendMessage()},async loadSession(){var s;if(!this.category||!this.name){this.sessionId="",this.$emit("update:sessionId","");return}try{const e=`${this.reqBasePath}/${this.category}/${this.name}/session.json`,t=await o.getFileContent(e);if(t&&((s=t.data)!=null&&s.content)){const i=JSON.parse(t.data.content);this.sessionId=i.codeSessionId||""}else this.sessionId="";this.$emit("update:sessionId",this.sessionId),this.sessionId?(await this.loadMessages(),this.subscribeSession()):this.logItems=[]}catch(e){console.error("Load session failed:",e),this.sessionId="",this.$emit("update:sessionId",""),this.logItems=[]}},insertGenerateCommand(){this.specFilePath&&(this.inputMessage=`根据 ${this.specFilePath} 方案开发相应功能,先不要修改方案文档。`)},async sendMessage(){const s=this.inputMessage.trim(),e=this.mediaFiles&&this.mediaFiles.length>0;if(!s&&!e||this.disabled)return;if(!this.sessionId){this.$message.error("会话不存在,请刷新页面");return}this.wsUnsubscribe||this.subscribeSession(),this.inputMessage="",this.disabled=!0,this.stopping=!1;const t=(this.mediaFiles||[]).filter(i=>!i.uploading&&i.filePath).map(i=>({filePath:i.filePath,type:i.type,dataUrl:i.dataUrl}));this.logItems.push({type:"chat",content:s,mediaFiles:t}),this.scrollChatToBottom(!0),o.sessionWsSend(this.sessionId,"chat",{message:s,sessionId:this.sessionId,modelName:this.modelName||void 0,enableDevLog:!0,mediaFiles:t.map(i=>({filePath:i.filePath,type:i.type}))}),this.mediaFiles=[]},stopChat(){!this.sessionId||this.stopping||(this.stopping=!0,o.sessionWsSend(this.sessionId,"stop",{sessionId:this.sessionId}))},subscribeSession(){this.sessionId&&(this.wsUnsubscribe&&this.wsUnsubscribe(),this.wsUnsubscribe=o.wsSubscribe(this.sessionId,{running_sessions:s=>{const t=((s==null?void 0:s.runningSessionIds)||[]).includes(this.sessionId);this.sessionStatus=t?"processing":"idle",this.disabled=t},todos:s=>{s!=null&&s.todos&&this.logItems.push({type:"todos",todos:s.todos}),this.scrollChatToBottom()},step:s=>{var e;this.logItems.push({type:"step",thought:s.thought,toolCalls:s.toolCalls,success:s.success}),(e=s.usage)!=null&&e.promptTokens&&(this.promptTokens=s.usage.promptTokens),this.scrollChatToBottom()},compact:s=>{this.logItems.push({type:"system",content:`【压缩完成】${s.summary||""}`}),this.loadMessages()},done:s=>{var e;this.disabled=!1,this.stopping=!1,this.sessionStatus="completed",s!=null&&s.modelName&&(this.modelName=s.modelName),(e=s==null?void 0:s.usage)!=null&&e.promptTokens&&(this.promptTokens=s.usage.promptTokens),s!=null&&s.response&&this.logItems.push({type:"think",content:s.response}),this.loadDevLog(),this.scrollChatToBottom()},stopped:()=>{this.disabled=!1,this.stopping=!1,this.sessionStatus="idle",this.logItems.push({type:"think",content:"【已停止】"}),this.scrollChatToBottom()},error:s=>{this.$message.error((s==null?void 0:s.error)||"发生错误"),this.disabled=!1,this.stopping=!1,this.sessionStatus="idle"}}))},scrollChatToBottom(s=!1){const e=C(this.$refs.messagesContainer);console.log("[Step3CodeGen] scrollChatToBottom called, force:",s,"snap:",JSON.stringify(e)),this.$nextTick(()=>{y(this.$refs.messagesContainer,{force:s,prevSnapshot:e})})},async loadMessages(){if(this.sessionId)try{const s=await o.getMessages(this.sessionId);this.logItems=s.data||[],this.scrollChatToBottom(!0)}catch(s){console.error("Load messages failed:",s)}},async loadDefaultModel(){var s;try{const e=await o.getConfig("defaultModel");(s=e.data)!=null&&s.value&&(this.modelName=e.data.value)}catch(e){console.error("Load default model failed:",e)}},openModelSelector(){this.modelSelectVisible=!0},onModelSelected(s){const e=s.name.split("/");this.modelName=e.length>2?e.slice(1).join("/"):s.name,o.setConfig("defaultModel",this.modelName)},openCommandDialog(){this.commandDialogVisible=!0},handleExecuteCommand(s){this.inputMessage=s+" ",this.$nextTick(()=>{const e=this.$el.querySelector(".input-area textarea");e&&e.focus()})},openFileSelect(){this.fileSelectVisible=!0},onFileSelected(s){const e=this.inputMessage.lastIndexOf("@");e!==-1?this.inputMessage=this.inputMessage.slice(0,e)+s+" ":this.inputMessage+=s+" ",this.cancelFileSelect()},cancelFileSelect(){this.fileSelectVisible=!1},openSkillSelect(){const s=this.$el.querySelector(".input-area textarea");this.skillCursorPos=s?s.selectionStart:-1,this.skillSelectVisible=!0},onSkillSelected(s){const e=`[${s}] `,t=this.skillCursorPos>=0?this.skillCursorPos:0;this.inputMessage=this.inputMessage.slice(0,t)+e+this.inputMessage.slice(t),this.cancelSkillSelect()},cancelSkillSelect(){this.skillSelectVisible=!1},getTodoStatusIcon(s){return{completed:"✅",in_progress:"🔄",pending:"⬜",cancelled:"❌"}[s]||"⬜"},formatInput(s,e){try{const t=JSON.parse(e);return s==="bash"||s==="execute_bash"?t.command+(t.workdir?` (${t.workdir})`:""):s==="read_file"?t.file_path+(t.offset?`:${t.offset}`:""):s==="edit_file"||s==="write_file"?t.file_path:s==="glob"||s==="find_files"?t.pattern+(t.directory?` (${t.directory})`:""):s==="grep"||s==="search_content"?`"${t.pattern}" (${t.directory||""})`:e}catch{return e}},renderMarkdown(s){return s?p(s):""},async loadCustomActions(){try{const s=await o.getCustomActions("code");this.customActions=s.data||[]}catch(s){console.error("Load custom actions failed:",s),this.customActions=[]}},executeCustomAction(s){this.inputMessage=s.prompt,this.$nextTick(()=>{const e=this.$el.querySelector(".input-area textarea");e&&e.focus(),s.auto_send&&this.sendMessage()})},openCustomActions(){window.open("/#/views/pc/custom-actions","_blank")},async loadDevLog(){var s;if(this.sessionId){this.devLogLoading=!0;try{const t=await(await fetch(`/api/devlog/list_devlog?sessionId=${this.sessionId}`)).json();t.success&&(this.devLogContent=((s=t.data)==null?void 0:s.content)||"")}catch(e){console.error("加载开发日志失败:",e)}finally{this.devLogLoading=!1}}},async refreshDevLog(){await this.loadDevLog()},startResize(s){this.isResizing=!0,this.startX=s.clientX,this.startWidth=this.devlogPanelWidth,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},handleResize(s){if(!this.isResizing)return;const e=this.startX-s.clientX;let t=this.startWidth+e;const i=this.$el.querySelector(".step3-main"),a=i?i.clientWidth*this.maxDevlogWidthRatio:800;t<this.minDevlogWidth&&(t=this.minDevlogWidth),t>a&&(t=a),this.devlogPanelWidth=t},stopResize(){this.isResizing=!1,document.body.style.cursor="",document.body.style.userSelect=""}}};var G=function(){var e=this,t=e._self._c;return t("div",{staticClass:"step3-container"},[t("div",{staticClass:"step3-main"},[t("div",{staticClass:"code-chat-panel"},[t("div",{staticClass:"panel-header"},[e._m(0),t("div",{staticClass:"header-actions"},[t("el-button",{attrs:{type:"primary",size:"small",disabled:e.disabled},on:{click:e.insertGenerateCommand}},[t("i",{staticClass:"el-icon-document"}),e._v(" 根据方案生成代码 ")]),t("el-button",{attrs:{type:"warning",size:"small"},on:{click:e.openCustomActions}},[t("i",{staticClass:"el-icon-setting"}),e._v(" 动作配置 ")])],1)]),t("div",{ref:"messagesContainer",staticClass:"chat-messages"},[e.logItems.length?e._e():t("div",{staticClass:"empty-state"},[t("i",{staticClass:"el-icon-chat-dot-round"}),t("p",[e._v("点击上方按钮或输入需求生成代码")])]),e._l(e.logItems,function(i,a){return[i.type==="todos"?t("div",{staticClass:"todos-list"},e._l(i.todos,function(n,l){return t("div",{key:l,staticClass:"todo-item"},[t("span",{staticClass:"todo-status"},[e._v(e._s(e.getTodoStatusIcon(n.status)))]),t("span",{staticClass:"todo-name"},[e._v(e._s(n.name))])])}),0):e._e(),i.type==="chat"?t("div",{staticClass:"flex justify-end"},[t("div",{staticClass:"user-question"},[i.mediaFiles&&i.mediaFiles.length>0?t("div",{staticClass:"chat-images"},e._l(i.mediaFiles,function(n){return t("img",{key:n.filePath,staticClass:"chat-image-thumb",attrs:{src:n.url||n.dataUrl||n.filePath},on:{click:function(l){return l.stopPropagation(),e.openImagePreview(n)}}})}),0):e._e(),t("div",[e._v(e._s(i.content))])])]):i.type==="think"?t("div",{staticClass:"ai-thought",domProps:{innerHTML:e._s(e.renderMarkdown(i.content))}}):i.type==="system"?t("div",{staticClass:"system-message",domProps:{innerHTML:e._s(e.renderMarkdown(i.content))}}):i.type==="step"?[i.thought?t("div",{staticClass:"ai-thought",domProps:{innerHTML:e._s(e.renderMarkdown(i.thought))}}):e._e(),e._l(i.toolCalls,function(n,l){return t("div",{key:l,staticClass:"log-mute"},[t("span",{class:i.success!==!1?"tool-success":"tool-fail"},[e._v(" "+e._s(i.success!==!1?"✓":"✗")+" ")]),e._v(" "+e._s(n.function.name)+" "),n.function.arguments?t("span",{staticClass:"tool-input"},[e._v(e._s(e.formatInput(n.function.name,n.function.arguments)))]):e._e()])})]:e._e()]}),e.modelName?t("div",{staticClass:"build-info"},[t("span",{staticClass:"icon"},[e._v("▣")]),e._v(" Build · "+e._s(e.modelName)+" ")]):e._e()],2),t("div",{staticClass:"chat-input-area"},[e.mediaFiles&&e.mediaFiles.length>0?t("ImagePreviewList",{attrs:{files:e.mediaFiles,disabled:e.disabled},on:{remove:e.removeMedia}}):e._e(),t("div",{staticClass:"input-wrapper"},[t("ResizableTextarea",{staticClass:"input-area",attrs:{rows:5,placeholder:"输入代码修改要求... (Enter 发送, Ctrl+Enter 换行, @ 选择文件)",disabled:e.disabled&&!e.stopping},on:{"paste-image":e.handlePasteImages},nativeOn:{keydown:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")?null:e.handleKeydown.apply(null,arguments)}},model:{value:e.inputMessage,callback:function(i){e.inputMessage=i},expression:"inputMessage"}}),t("input",{ref:"mediaInput",staticStyle:{display:"none"},attrs:{type:"file",accept:"image/*",multiple:""},on:{change:e.handleImageSelected}}),t("div",{staticClass:"input-actions"},[t("el-button",{staticClass:"upload-btn",attrs:{disabled:e.disabled,size:"small"},on:{click:e.handleImageUpload}},[e._v("图片")]),e._l(e.customActions,function(i){return t("el-button",{key:i.id,attrs:{type:"info",size:"small",disabled:e.disabled},on:{click:function(a){return e.executeCustomAction(i)}}},[e._v(" "+e._s(i.name)+" ")])}),e.disabled&&!e.stopping?t("el-button",{staticClass:"stop-btn",attrs:{type:"danger",size:"small"},on:{click:e.stopChat}},[e._v(" ■ 停止 ")]):e.stopping?t("el-button",{staticClass:"stop-btn",attrs:{type:"info",disabled:"",size:"small"}},[e._v(" 停止中... ")]):t("el-button",{staticClass:"send-btn",attrs:{type:"primary",disabled:!e.inputMessage.trim()&&e.mediaFiles.length===0,size:"small"},on:{click:e.sendMessage}},[e._v(" 发送 ")])],2)],1)],1),t("div",{staticClass:"status-bar"},[t("span",{class:e.sessionStatus==="processing"?"status-thinking":"status-ready"},[e.sessionStatus==="processing"?t("span",{staticClass:"thinking-spinner"}):e._e(),e._v(" "+e._s(e.sessionStatus==="processing"?"思考中":"✓ 就绪")+" ")]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",{staticClass:"model-selector",on:{click:e.openModelSelector,mousedown:function(i){i.preventDefault()}}},[e._v(" 模型:"+e._s(e.modelName||"-")+" ▾ ")]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",[e._v("会话:"+e._s(e.sessionId?e.sessionId.slice(0,8):"--------"))]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",[e._v("token:"+e._s(e.promptTokens||0))]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",{staticClass:"status-action",on:{click:e.openCommandDialog,mousedown:function(i){i.preventDefault()}}},[e._v("命令")]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",{staticClass:"status-action",on:{click:e.openFileSelect,mousedown:function(i){i.preventDefault()}}},[e._v("选择文件")]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",{staticClass:"status-action",on:{click:e.openSkillSelect,mousedown:function(i){i.preventDefault()}}},[e._v("选择Skill")])])]),t("div",{staticClass:"resize-handle",on:{mousedown:e.startResize}}),t("div",{ref:"devlogPanel",staticClass:"devlog-panel",style:{width:e.devlogPanelWidth+"px"}},[t("div",{staticClass:"panel-header"},[e._m(1),t("el-button",{attrs:{size:"small"},on:{click:e.refreshDevLog}},[t("i",{staticClass:"el-icon-refresh"}),e._v(" 刷新 ")])],1),t("div",{staticClass:"devlog-content",domProps:{innerHTML:e._s(e.renderedDevLog)}})])]),t("ModelSelectDialog",{attrs:{visible:e.modelSelectVisible,"current-model":e.modelName},on:{"update:visible":function(i){e.modelSelectVisible=i},select:e.onModelSelected}}),t("CommandDialog",{attrs:{visible:e.commandDialogVisible},on:{"update:visible":function(i){e.commandDialogVisible=i},execute:e.handleExecuteCommand}}),t("FileSelectDialog",{attrs:{visible:e.fileSelectVisible},on:{"update:visible":function(i){e.fileSelectVisible=i},select:e.onFileSelected,close:e.cancelFileSelect}}),t("SkillSelectDialog",{attrs:{visible:e.skillSelectVisible},on:{"update:visible":function(i){e.skillSelectVisible=i},select:e.onSkillSelected,close:e.cancelSkillSelect}}),e.previewImage?t("div",{staticClass:"image-lightbox",on:{click:e.closeImagePreview}},[t("span",{staticClass:"lightbox-close",on:{click:e.closeImagePreview}},[e._v("×")]),t("img",{staticClass:"lightbox-image",attrs:{src:e.previewImage.url||e.previewImage.dataUrl||e.previewImage.filePath},on:{click:function(i){i.stopPropagation()}}})]):e._e()],1)},Q=[function(){var s=this,e=s._self._c;return e("span",[e("i",{staticClass:"el-icon-code"}),s._v(" 代码生成对话")])},function(){var s=this,e=s._self._c;return e("span",[e("i",{staticClass:"el-icon-document"}),s._v(" 开发记录")])}],Y=d(X,G,Q,!1,null,"5d3f42f3");const Z=Y.exports,ee={name:"Step4Test",components:{ModelSelectDialog:v,CommandDialog:k,FileSelectDialog:_,SkillSelectDialog:f,ResizableTextarea:g,ImagePreviewList:m},mixins:[S()],props:{category:{type:String,default:""},name:{type:String,default:""},reqBasePath:{type:String,default:""}},data(){return{inputMessage:"",disabled:!1,stopping:!1,promptTokens:0,dotAnimation:"",dotInterval:null,dots:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧"],logItems:[],modelName:"",modelSelectVisible:!1,commandDialogVisible:!1,fileSelectVisible:!1,skillSelectVisible:!1,skillCursorPos:-1,sessionId:"",sessionStatus:"idle",customActions:[]}},computed:{specFilePath(){return!this.category||!this.name?"":`${this.reqBasePath}/${this.category}/${this.name}/${this.name}_方案.md`}},watch:{category:{handler(){this.loadSession()}},name:{handler(){this.loadSession()}}},async mounted(){await this.loadSession(),await this.loadDefaultModel(),await this.loadCustomActions(),o.ws.init()},beforeDestroy(){this.dotInterval&&clearInterval(this.dotInterval),this.wsUnsubscribe&&this.wsUnsubscribe()},methods:{handleKeydown(s){if(s.key==="Enter")if(s.ctrlKey){const e=s.target,t=e.selectionStart,i=e.selectionEnd,a=this.inputMessage;this.inputMessage=a.substring(0,t)+`
|
|
15
|
+
`+a.substring(i),this.$nextTick(()=>{e.selectionStart=e.selectionEnd=t+1})}else s.preventDefault(),this.sendMessage()},async loadSession(){var s;if(!this.category||!this.name){this.sessionId="",this.$emit("update:sessionId","");return}try{const e=`${this.reqBasePath}/${this.category}/${this.name}/session.json`,t=await o.getFileContent(e);if(t&&((s=t.data)!=null&&s.content)){const i=JSON.parse(t.data.content);this.sessionId=i.testSessionId||""}else this.sessionId="";this.$emit("update:sessionId",this.sessionId),this.sessionId?(await this.loadMessages(),this.subscribeSession()):this.logItems=[]}catch(e){console.error("Load session failed:",e),this.sessionId="",this.$emit("update:sessionId",""),this.logItems=[]}},insertTestCommand(){this.specFilePath&&(this.inputMessage=`根据 ${this.specFilePath} 方案测试相应功能是否实现。`)},async sendMessage(){const s=this.inputMessage.trim(),e=this.mediaFiles&&this.mediaFiles.length>0;if(!s&&!e||this.disabled)return;if(!this.sessionId){this.$message.error("会话不存在,请刷新页面");return}this.wsUnsubscribe||this.subscribeSession(),this.inputMessage="",this.disabled=!0,this.stopping=!1;const t=(this.mediaFiles||[]).filter(i=>!i.uploading&&i.filePath).map(i=>({filePath:i.filePath,type:i.type,dataUrl:i.dataUrl}));this.logItems.push({type:"chat",content:s,mediaFiles:t}),this.scrollChatToBottom(!0),o.sessionWsSend(this.sessionId,"chat",{message:s,sessionId:this.sessionId,modelName:this.modelName||void 0,mediaFiles:t.map(i=>({filePath:i.filePath,type:i.type}))}),this.mediaFiles=[]},stopChat(){!this.sessionId||this.stopping||(this.stopping=!0,o.sessionWsSend(this.sessionId,"stop",{sessionId:this.sessionId}))},subscribeSession(){this.sessionId&&(this.wsUnsubscribe&&this.wsUnsubscribe(),this.wsUnsubscribe=o.wsSubscribe(this.sessionId,{running_sessions:s=>{const t=((s==null?void 0:s.runningSessionIds)||[]).includes(this.sessionId);this.sessionStatus=t?"processing":"idle",this.disabled=t},todos:s=>{s!=null&&s.todos&&this.logItems.push({type:"todos",todos:s.todos}),this.scrollChatToBottom()},step:s=>{var e;this.logItems.push({type:"step",thought:s.thought,toolCalls:s.toolCalls,success:s.success}),(e=s.usage)!=null&&e.promptTokens&&(this.promptTokens=s.usage.promptTokens),this.scrollChatToBottom()},compact:s=>{this.logItems.push({type:"system",content:`【压缩完成】${s.summary||""}`}),this.loadMessages()},done:s=>{var e;this.disabled=!1,this.stopping=!1,this.sessionStatus="completed",s!=null&&s.modelName&&(this.modelName=s.modelName),(e=s==null?void 0:s.usage)!=null&&e.promptTokens&&(this.promptTokens=s.usage.promptTokens),s!=null&&s.response&&this.logItems.push({type:"think",content:s.response}),this.scrollChatToBottom()},stopped:()=>{this.disabled=!1,this.stopping=!1,this.sessionStatus="idle",this.logItems.push({type:"think",content:"【已停止】"}),this.scrollChatToBottom()},error:s=>{this.$message.error((s==null?void 0:s.error)||"发生错误"),this.disabled=!1,this.stopping=!1,this.sessionStatus="idle"}}))},scrollChatToBottom(s=!1){const e=C(this.$refs.messagesContainer);console.log("[Step4Test] scrollChatToBottom called, force:",s,"snap:",JSON.stringify(e)),this.$nextTick(()=>{y(this.$refs.messagesContainer,{force:s,prevSnapshot:e})})},async loadMessages(){if(this.sessionId)try{const s=await o.getMessages(this.sessionId);this.logItems=s.data||[],this.scrollChatToBottom(!0)}catch(s){console.error("Load messages failed:",s)}},async loadDefaultModel(){var s;try{const e=await o.getConfig("defaultModel");(s=e.data)!=null&&s.value&&(this.modelName=e.data.value)}catch(e){console.error("Load default model failed:",e)}},openModelSelector(){this.modelSelectVisible=!0},onModelSelected(s){const e=s.name.split("/");this.modelName=e.length>2?e.slice(1).join("/"):s.name,o.setConfig("defaultModel",this.modelName)},openCommandDialog(){this.commandDialogVisible=!0},handleExecuteCommand(s){this.inputMessage=s+" ",this.$nextTick(()=>{const e=this.$el.querySelector(".input-area textarea");e&&e.focus()})},openFileSelect(){this.fileSelectVisible=!0},onFileSelected(s){const e=this.inputMessage.lastIndexOf("@");e!==-1?this.inputMessage=this.inputMessage.slice(0,e)+s+" ":this.inputMessage+=s+" ",this.cancelFileSelect()},cancelFileSelect(){this.fileSelectVisible=!1},openSkillSelect(){const s=this.$el.querySelector(".input-area textarea");this.skillCursorPos=s?s.selectionStart:-1,this.skillSelectVisible=!0},onSkillSelected(s){const e=`[${s}] `,t=this.skillCursorPos>=0?this.skillCursorPos:0;this.inputMessage=this.inputMessage.slice(0,t)+e+this.inputMessage.slice(t),this.cancelSkillSelect()},cancelSkillSelect(){this.skillSelectVisible=!1},getTodoStatusIcon(s){return{completed:"✅",in_progress:"🔄",pending:"⬜",cancelled:"❌"}[s]||"⬜"},formatInput(s,e){try{const t=JSON.parse(e);return s==="bash"||s==="execute_bash"?t.command+(t.workdir?` (${t.workdir})`:""):s==="read_file"?t.file_path+(t.offset?`:${t.offset}`:""):s==="edit_file"||s==="write_file"?t.file_path:s==="glob"||s==="find_files"?t.pattern+(t.directory?` (${t.directory})`:""):s==="grep"||s==="search_content"?`"${t.pattern}" (${t.directory||""})`:e}catch{return e}},renderMarkdown(s){return s?p(s):""},async loadCustomActions(){try{const s=await o.getCustomActions("test");this.customActions=s.data||[]}catch(s){console.error("Load custom actions failed:",s),this.customActions=[]}},executeCustomAction(s){this.inputMessage=s.prompt,this.$nextTick(()=>{const e=this.$el.querySelector(".input-area textarea");e&&e.focus(),s.auto_send&&this.sendMessage()})}}};var se=function(){var e=this,t=e._self._c;return t("div",{staticClass:"step4-container"},[t("div",{staticClass:"step4-main"},[t("div",{staticClass:"code-chat-panel"},[t("div",{staticClass:"panel-header"},[e._m(0),t("el-button",{attrs:{type:"primary",size:"small",disabled:e.disabled},on:{click:e.insertTestCommand}},[t("i",{staticClass:"el-icon-s-claim"}),e._v(" 根据方案测试 ")])],1),t("div",{ref:"messagesContainer",staticClass:"chat-messages"},[e.logItems.length?e._e():t("div",{staticClass:"empty-state"},[t("i",{staticClass:"el-icon-chat-dot-round"}),t("p",[e._v("点击上方按钮或输入测试要求进行验收")])]),e._l(e.logItems,function(i,a){return[i.type==="todos"?t("div",{staticClass:"todos-list"},e._l(i.todos,function(n,l){return t("div",{key:l,staticClass:"todo-item"},[t("span",{staticClass:"todo-status"},[e._v(e._s(e.getTodoStatusIcon(n.status)))]),t("span",{staticClass:"todo-name"},[e._v(e._s(n.name))])])}),0):e._e(),i.type==="chat"?t("div",{staticClass:"flex justify-end"},[t("div",{staticClass:"user-question"},[i.mediaFiles&&i.mediaFiles.length>0?t("div",{staticClass:"chat-images"},e._l(i.mediaFiles,function(n){return t("img",{key:n.filePath,staticClass:"chat-image-thumb",attrs:{src:n.url||n.dataUrl||n.filePath},on:{click:function(l){return l.stopPropagation(),e.openImagePreview(n)}}})}),0):e._e(),t("div",[e._v(e._s(i.content))])])]):i.type==="think"?t("div",{staticClass:"ai-thought",domProps:{innerHTML:e._s(e.renderMarkdown(i.content))}}):i.type==="system"?t("div",{staticClass:"system-message",domProps:{innerHTML:e._s(e.renderMarkdown(i.content))}}):i.type==="step"?[i.thought?t("div",{staticClass:"ai-thought",domProps:{innerHTML:e._s(e.renderMarkdown(i.thought))}}):e._e(),e._l(i.toolCalls,function(n,l){return t("div",{key:l,staticClass:"log-mute"},[t("span",{class:i.success!==!1?"tool-success":"tool-fail"},[e._v(" "+e._s(i.success!==!1?"✓":"✗")+" ")]),e._v(" "+e._s(n.function.name)+" "),n.function.arguments?t("span",{staticClass:"tool-input"},[e._v(e._s(e.formatInput(n.function.name,n.function.arguments)))]):e._e()])})]:e._e()]}),e.modelName?t("div",{staticClass:"build-info"},[t("span",{staticClass:"icon"},[e._v("▣")]),e._v(" Build · "+e._s(e.modelName)+" ")]):e._e()],2),t("div",{staticClass:"chat-input-area"},[e.mediaFiles&&e.mediaFiles.length>0?t("ImagePreviewList",{attrs:{files:e.mediaFiles,disabled:e.disabled},on:{remove:e.removeMedia}}):e._e(),t("div",{staticClass:"input-wrapper"},[t("ResizableTextarea",{staticClass:"input-area",attrs:{rows:5,placeholder:"输入测试要求... (Enter 发送, Ctrl+Enter 换行, @ 选择文件)",disabled:e.disabled&&!e.stopping},on:{"paste-image":e.handlePasteImages},nativeOn:{keydown:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")?null:e.handleKeydown.apply(null,arguments)}},model:{value:e.inputMessage,callback:function(i){e.inputMessage=i},expression:"inputMessage"}}),t("input",{ref:"mediaInput",staticStyle:{display:"none"},attrs:{type:"file",accept:"image/*",multiple:""},on:{change:e.handleImageSelected}}),t("div",{staticClass:"input-actions"},[t("el-button",{staticClass:"upload-btn",attrs:{disabled:e.disabled,size:"small"},on:{click:e.handleImageUpload}},[e._v("图片")]),e._l(e.customActions,function(i){return t("el-button",{key:i.id,attrs:{type:"info",size:"small",disabled:e.disabled},on:{click:function(a){return e.executeCustomAction(i)}}},[e._v(" "+e._s(i.name)+" ")])}),e.disabled&&!e.stopping?t("el-button",{staticClass:"stop-btn",attrs:{type:"danger",size:"small"},on:{click:e.stopChat}},[e._v(" ■ 停止 ")]):e.stopping?t("el-button",{staticClass:"stop-btn",attrs:{type:"info",disabled:"",size:"small"}},[e._v(" 停止中... ")]):t("el-button",{staticClass:"send-btn",attrs:{type:"primary",disabled:!e.inputMessage.trim()&&e.mediaFiles.length===0,size:"small"},on:{click:e.sendMessage}},[e._v(" 发送 ")])],2)],1)],1),t("div",{staticClass:"status-bar"},[t("span",{class:e.sessionStatus==="processing"?"status-thinking":"status-ready"},[e.sessionStatus==="processing"?t("span",{staticClass:"thinking-spinner"}):e._e(),e._v(" "+e._s(e.sessionStatus==="processing"?"思考中":"✓ 就绪")+" ")]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",{staticClass:"model-selector",on:{click:e.openModelSelector,mousedown:function(i){i.preventDefault()}}},[e._v(" 模型:"+e._s(e.modelName||"-")+" ▾ ")]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",[e._v("会话:"+e._s(e.sessionId?e.sessionId.slice(0,8):"--------"))]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",[e._v("token:"+e._s(e.promptTokens||0))]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",{staticClass:"status-action",on:{click:e.openCommandDialog,mousedown:function(i){i.preventDefault()}}},[e._v("命令")]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",{staticClass:"status-action",on:{click:e.openFileSelect,mousedown:function(i){i.preventDefault()}}},[e._v("选择文件")]),t("span",{staticClass:"separator"},[e._v("|")]),t("span",{staticClass:"status-action",on:{click:e.openSkillSelect,mousedown:function(i){i.preventDefault()}}},[e._v("选择Skill")])])])]),t("ModelSelectDialog",{attrs:{visible:e.modelSelectVisible,"current-model":e.modelName},on:{"update:visible":function(i){e.modelSelectVisible=i},select:e.onModelSelected}}),t("CommandDialog",{attrs:{visible:e.commandDialogVisible},on:{"update:visible":function(i){e.commandDialogVisible=i},execute:e.handleExecuteCommand}}),t("FileSelectDialog",{attrs:{visible:e.fileSelectVisible},on:{"update:visible":function(i){e.fileSelectVisible=i},select:e.onFileSelected,close:e.cancelFileSelect}}),t("SkillSelectDialog",{attrs:{visible:e.skillSelectVisible},on:{"update:visible":function(i){e.skillSelectVisible=i},select:e.onSkillSelected,close:e.cancelSkillSelect}}),e.previewImage?t("div",{staticClass:"image-lightbox",on:{click:e.closeImagePreview}},[t("span",{staticClass:"lightbox-close",on:{click:e.closeImagePreview}},[e._v("×")]),t("img",{staticClass:"lightbox-image",attrs:{src:e.previewImage.url||e.previewImage.dataUrl||e.previewImage.filePath},on:{click:function(i){i.stopPropagation()}}})]):e._e()],1)},te=[function(){var s=this,e=s._self._c;return e("span",[e("i",{staticClass:"el-icon-s-check"}),s._v(" 测试验收对话")])}],ie=d(ee,se,te,!1,null,"c15a086d");const ne=ie.exports,ae={name:"SubSchemeDialog",props:{visible:{type:Boolean,default:!1},category:{type:String,default:""},parentName:{type:String,default:""},defaultName:{type:String,default:""}},data(){return{name:""}},watch:{visible(s){s&&(this.name=this.defaultName)}},methods:{handleVisibleChange(s){this.$emit("update:visible",s)},handleClose(){this.$emit("cancel")},onConfirm(){const s=this.name.trim();s&&(this.$emit("confirm",s),this.$emit("update:visible",!1))},onCancel(){this.$emit("cancel"),this.$emit("update:visible",!1)}}};var oe=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{visible:e.visible,title:"新建子方案",width:"420px"},on:{"update:visible":e.handleVisibleChange,close:e.handleClose}},[t("el-form",{attrs:{"label-width":"80px"}},[t("el-form-item",{attrs:{label:"方案名称"}},[t("el-input",{attrs:{placeholder:"请输入子方案名称"},nativeOn:{keyup:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")?null:e.onConfirm.apply(null,arguments)}},model:{value:e.name,callback:function(i){e.name=i},expression:"name"}})],1),t("el-form-item",{attrs:{label:"所属大类"}},[t("span",[e._v(e._s(e.category))])]),t("el-form-item",{attrs:{label:"父方案"}},[t("span",[e._v(e._s(e.parentName))])])],1),t("span",{attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.onCancel}},[e._v("取消")]),t("el-button",{attrs:{type:"primary",disabled:!e.name.trim()},on:{click:e.onConfirm}},[e._v("确认")])],1)],1)},le=[],re=d(ae,oe,le,!1,null,null);const ce=re.exports,de={name:"DevWorkflowView",components:{WorkflowSidebar:j,Step1NewReq:L,Step2Design:H,Step3CodeGen:Z,Step4Test:ne,SubSchemeDialog:ce},props:{sidebarVisible:{type:Boolean,default:!0}},data(){return{currentCategory:"",currentProject:"",currentStep:1,categories:[],projects:{},reqBasePath:"",isLoadingProjects:!1,designSessionId:"",codeSessionId:"",testSessionId:"",taskStatus:"idle",unsubRunning:null,subSchemeDialogVisible:!1,subSchemeDefaultName:""}},computed:{projectKey(){return!this.currentCategory||!this.currentProject?"":`${this.currentCategory}/${this.currentProject}`},hasSelectedProject(){return!!this.currentProject},stepTitle(){return{1:"新建需求",2:"方案设计",3:"代码生成",4:"测试验收"}[this.currentStep]||""},statusText(){return this.projectKey?`步骤 ${this.currentStep} / 4`:"就绪"}},created(){var a,n,l;const s=(a=this.$route.query)==null?void 0:a.category,e=(n=this.$route.query)==null?void 0:n.project,t=parseInt((l=this.$route.query)==null?void 0:l.step)||1,i=!!(s&&e);this.loadCategories(),i?(this.currentCategory=s,this.currentProject=e,this.currentStep=t):this.loadState()},mounted(){console.log("[DevWorkflow][mounted] subscribing to running_sessions"),o.ws.init(),this.unsubRunning=o.ws.on("running_sessions",s=>{var t;const e=((t=s.data)==null?void 0:t.runningSessionIds)||[];console.log("[DevWorkflow][ws] running_sessions event:",e),this.updateTaskStatus(e)})},beforeDestroy(){this.unsubRunning&&(this.unsubRunning(),this.unsubRunning=null)},watch:{currentProject(){this.updateTitle()},taskStatus(){this.updateTitle()}},methods:{updateDesignSessionId(s){console.log("[DevWorkflow][sessionId] design:",s),this.designSessionId=s},updateCodeSessionId(s){console.log("[DevWorkflow][sessionId] code:",s),this.codeSessionId=s},updateTestSessionId(s){console.log("[DevWorkflow][sessionId] test:",s),this.testSessionId=s},updateTaskStatus(s){const e=[this.designSessionId,this.codeSessionId,this.testSessionId].filter(Boolean);if(console.log("[DevWorkflow][taskStatus] mySessions:",e,"runningIds:",s),e.length===0){console.log("[DevWorkflow][taskStatus] -> idle (no sessions)"),this.taskStatus="idle";return}const t=e.some(i=>s.includes(i));console.log("[DevWorkflow][taskStatus] isRunning:",t,"prevStatus:",this.taskStatus),t?(console.log("[DevWorkflow][taskStatus] -> running"),this.taskStatus="running"):this.taskStatus==="running"&&(console.log("[DevWorkflow][taskStatus] -> completed"),this.taskStatus="completed")},updateTitle(){var t;const s=((t=this.$route.meta)==null?void 0:t.title)||"软件研发";if(!this.currentProject){document.title=`${s} - TXCode`;return}let e="";this.taskStatus==="running"?e="⏳ ":this.taskStatus==="completed"&&(e="✅ "),console.log("[DevWorkflow][updateTitle] status:",this.taskStatus,"title:",`${e}${this.currentProject} · ${s} - TXCode`),document.title=`${e}${this.currentProject} · ${s} - TXCode`},async loadState(){try{const e=(await o.getWorkflowState()).data;e&&(this.currentCategory=e.currentCategory||"",this.currentProject=e.currentProject||"",this.currentStep=e.currentStep||1)}catch(s){console.error("Load workflow state failed:",s)}},async saveState(){try{await o.updateWorkflowState(this.currentCategory,this.currentProject,this.currentStep)}catch(s){console.error("Save workflow state failed:",s)}},async loadCategories(){var s,e;try{const i=((s=(await o.getCwd()).data)==null?void 0:s.current_path)||"";this.reqBasePath=i?`${i}/.txcode/req`:"";const n=((e=(await o.browseFilesystem(this.reqBasePath)).data)==null?void 0:e.items)||[];this.categories=n.filter(l=>l.is_directory).map(l=>l.name),this.categories.sort(),this.currentCategory&&this.categories.includes(this.currentCategory)&&await this.loadProjectsForCategory(this.currentCategory)}catch(t){console.error("Load categories failed:",t),this.categories=[]}},async loadProjectsForCategory(s){var e;if(s){this.isLoadingProjects=!0;try{const t=`${this.reqBasePath}/${s}`,a=((e=(await o.browseFilesystem(t)).data)==null?void 0:e.items)||[];this.projects={},a.filter(n=>n.is_directory).forEach(n=>{const l=`${s}/${n.name}`;this.projects[l]={name:n.name,stepStatus:{}}})}catch(t){console.error("Load projects failed:",t)}finally{this.isLoadingProjects=!1}}},async onCategoryChange(s){this.currentCategory=s,this.currentProject="",this.currentStep=1,this.updateUrlQuery(),s?await this.loadProjectsForCategory(s):this.projects={}},onProjectChange(s){this.currentProject=s,!this.currentProject&&this.currentStep>1&&(this.currentStep=1),this.updateUrlQuery()},onStepChange(s){!this.currentProject&&s>1||(this.currentStep=s,this.updateUrlQuery())},updateUrlQuery(){const s={};this.currentCategory&&(s.category=this.currentCategory),this.currentProject&&(s.project=this.currentProject),this.currentStep>1&&(s.step=String(this.currentStep)),this.$router.replace({query:s}).catch(()=>{})},async createCategory(s){if(this.categories.includes(s)){this.$message.warning("大类已存在");return}try{const e=`${this.reqBasePath}/${s}`;await o.createDirectory(e),this.categories.push(s),this.categories.sort(),this.$message.success(`大类「${s}」创建成功`)}catch(e){console.error("Create category failed:",e),this.$message.error("创建大类失败")}},async renameCategory({oldName:s,newName:e}){if(this.categories.includes(e)){this.$message.warning("名称已存在");return}try{const t=`${this.reqBasePath}/${s}`,i=`${this.reqBasePath}/${e}`;await o.renameFile(t,i);const a=this.categories.indexOf(s);a>-1&&(this.categories[a]=e),this.categories.sort(),this.currentCategory===s&&(this.currentCategory=e,await this.loadProjectsForCategory(e)),await this.saveState(),this.$message.success(`已重命名为「${e}」`)}catch(t){console.error("Rename category failed:",t),this.$message.error("重命名大类失败")}},async deleteCategory(s){try{const e=`${this.reqBasePath}/${s}`;await o.deleteFile(e),this.categories=this.categories.filter(t=>t!==s),this.currentCategory===s&&(this.currentCategory="",this.currentProject="",this.currentStep=1,this.projects={}),await this.saveState(),this.$message.success(`大类「${s}」已删除`)}catch(e){console.error("Delete category failed:",e),this.$message.error("删除大类失败")}},async createRequirement({category:s,name:e}){var n,l,u;if(this.projects[e]){this.$message.warning("需求已存在");return}try{const r=`${this.reqBasePath}/${s}/${e}`;await o.createDirectory(r)}catch(r){console.error("Create requirement directory failed:",r)}const t=`# ${e}方案
|
|
16
|
+
|
|
17
|
+
> 所属大类:${s}
|
|
18
|
+
|
|
19
|
+
## 用户原始需求
|
|
20
|
+
|
|
21
|
+
## 业务目标
|
|
22
|
+
|
|
23
|
+
## 功能点
|
|
24
|
+
|
|
25
|
+
`;try{const r=`${this.reqBasePath}/${s}/${e}/${e}_方案.md`;await o.writeFile(r,t)}catch(r){console.error("Write spec file failed:",r)}let i={designSessionId:"",codeSessionId:"",testSessionId:""};try{const[r,h,c]=await Promise.all([o.createSession(`workflow:${s}/${e}:design`),o.createSession(`workflow:${s}/${e}:code`),o.createSession(`workflow:${s}/${e}:test`)]);i={designSessionId:((n=r.data)==null?void 0:n.id)||"",codeSessionId:((l=h.data)==null?void 0:l.id)||"",testSessionId:((u=c.data)==null?void 0:u.id)||""};const b=`${this.reqBasePath}/${s}/${e}/session.json`;await o.writeFile(b,JSON.stringify(i,null,2))}catch(r){console.error("Create sessions failed:",r)}const a=`${s}/${e}`;this.$set(this.projects,a,{name:e,stepStatus:{}}),this.currentCategory=s,this.currentProject=e,this.$message.success(`需求「${e}」创建成功`),this.$nextTick(()=>{this.currentStep=2})},async createSubScheme(){var e;if(!this.currentProject||!this.currentCategory){this.$message.warning("请先选择一个方案");return}const s=this.currentProject;try{const t=`${this.reqBasePath}/${this.currentCategory}`,a=((e=(await o.browseFilesystem(t)).data)==null?void 0:e.items)||[];let n=0;const l=new RegExp(`^${this.escapeRegex(s)}_(\\d+)$`);a.filter(r=>r.is_directory).forEach(r=>{const h=r.name.match(l);if(h){const c=parseInt(h[1],10);c>n&&(n=c)}});const u=String(n+1).padStart(2,"0");this.subSchemeDefaultName=`${s}_${u}`,this.subSchemeDialogVisible=!0}catch(t){console.error("Browse category failed:",t),this.$message.error("获取子方案列表失败")}},escapeRegex(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},async onSubSchemeConfirm(s){var u,r,h;this.subSchemeDialogVisible=!1;const e=this.currentProject,t=this.currentCategory;try{const c=`${this.reqBasePath}/${t}/${s}`;await o.createDirectory(c)}catch(c){console.error("Create sub-scheme directory failed:",c),this.$message.error("创建子方案目录失败");return}const i=`${this.reqBasePath}/${t}/${e}/${e}_方案.md`,a=`# ${s}_方案
|
|
26
|
+
|
|
27
|
+
> 所属大类:${t}
|
|
28
|
+
> 父方案:[../${e}/${e}_方案.md](../${e}/${e}_方案.md)
|
|
29
|
+
|
|
30
|
+
## 用户原始需求
|
|
31
|
+
|
|
32
|
+
## 业务目标
|
|
33
|
+
|
|
34
|
+
## 功能点
|
|
35
|
+
|
|
36
|
+
`;try{const c=`${this.reqBasePath}/${t}/${s}/${s}_方案.md`;await o.writeFile(c,a)}catch(c){console.error("Write spec file failed:",c)}let n={designSessionId:"",codeSessionId:"",testSessionId:""};try{const[c,b,w]=await Promise.all([o.createSession(`workflow:${t}/${s}:design`),o.createSession(`workflow:${t}/${s}:code`),o.createSession(`workflow:${t}/${s}:test`)]);n={designSessionId:((u=c.data)==null?void 0:u.id)||"",codeSessionId:((r=b.data)==null?void 0:r.id)||"",testSessionId:((h=w.data)==null?void 0:h.id)||"",parent:{name:e,specPath:i}};const I=`${this.reqBasePath}/${t}/${s}/session.json`;await o.writeFile(I,JSON.stringify(n,null,2))}catch(c){console.error("Create sessions failed:",c)}const l=`${t}/${s}`;this.$set(this.projects,l,{name:s,stepStatus:{}}),this.$message.success(`子方案「${s}」创建成功`),window.open(`#/views/pc/devWorkflow?category=${encodeURIComponent(t)}&project=${encodeURIComponent(s)}&step=2`,"_blank")},async onSaveSpec(s){if(!this.projectKey)return;const e=`${this.reqBasePath}/${this.currentCategory}/${this.currentProject}/${this.currentProject}_方案.md`;try{await o.writeFile(e,s),this.$message.success("方案已保存")}catch(t){console.error("Save spec failed:",t),this.$message.error("保存方案失败")}},async refreshSpec(){var s;(s=this.$refs.step2Ref)!=null&&s.loadSpec&&await this.$refs.step2Ref.loadSpec()}}};var ue=function(){var e=this,t=e._self._c;return t("div",{staticClass:"dev-workflow-view"},[t("WorkflowSidebar",{ref:"sidebar",attrs:{categories:e.categories,projects:e.projects,"current-category":e.currentCategory,"current-project":e.currentProject,"current-step":e.currentStep,"is-loading":e.isLoadingProjects},on:{"category-change":e.onCategoryChange,"project-change":e.onProjectChange,"step-change":e.onStepChange,"delete-category":e.deleteCategory,"rename-category":e.renameCategory}}),t("div",{staticClass:"main-content"},[t("div",{staticClass:"step-content"},[t("Step1NewReq",{directives:[{name:"show",rawName:"v-show",value:e.currentStep===1,expression:"currentStep === 1"}],attrs:{categories:e.categories,projects:e.projects,"base-path":e.reqBasePath,"current-category":e.currentCategory,"current-project":e.currentProject},on:{"category-change":e.onCategoryChange,"project-change":e.onProjectChange,"create-category":e.createCategory,"create-requirement":e.createRequirement}}),e.currentStep===2&&e.hasSelectedProject?t("Step2Design",{ref:"step2Ref",attrs:{category:e.currentCategory,name:e.currentProject,"req-base-path":e.reqBasePath},on:{"update:sessionId":e.updateDesignSessionId,"save-spec":e.onSaveSpec,"spec-updated":e.refreshSpec,"create-sub-scheme":e.createSubScheme}}):e._e(),e.currentStep===3&&e.hasSelectedProject?t("Step3CodeGen",{ref:"step3Ref",attrs:{category:e.currentCategory,name:e.currentProject,"req-base-path":e.reqBasePath},on:{"update:sessionId":e.updateCodeSessionId}}):e._e(),e.currentStep===4&&e.hasSelectedProject?t("Step4Test",{ref:"step4Ref",attrs:{category:e.currentCategory,name:e.currentProject,"req-base-path":e.reqBasePath},on:{"update:sessionId":e.updateTestSessionId}}):e._e(),t("SubSchemeDialog",{attrs:{visible:e.subSchemeDialogVisible,category:e.currentCategory,"parent-name":e.currentProject,"default-name":e.subSchemeDefaultName},on:{"update:visible":function(i){e.subSchemeDialogVisible=i},confirm:e.onSubSchemeConfirm,cancel:function(i){e.subSchemeDialogVisible=!1}}})],1),t("div",{staticClass:"status-bar"},[t("span",[t("i",{staticClass:"el-icon-info"}),e._v(" "+e._s(e.statusText)+" ")]),t("span",[e._v(e._s(e.projectKey||"未选择项目"))])])])],1)},he=[],pe=d(de,ue,he,!1,null,"a50d89b8");const fe=pe.exports;export{fe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.workflow-sidebar[data-v-2e87f0c0]{width:280px;background:#2d2d2d;border-right:1px solid #1e1e1e;display:flex;flex-direction:column;flex-shrink:0}.sidebar-header[data-v-2e87f0c0]{padding:16px;border-bottom:1px solid #1e1e1e}.sidebar-header h3[data-v-2e87f0c0]{font-size:14px;color:#84848a;margin-bottom:12px}.sidebar-header .el-select[data-v-2e87f0c0]{width:100%;margin-bottom:8px}.project-display-row[data-v-2e87f0c0]{display:flex;justify-content:space-between;gap:8px;margin-bottom:8px;padding:8px 10px;background:#ffffff0a;border:1px solid #3f3f46;border-radius:6px}.project-display-row .label[data-v-2e87f0c0]{color:#84848a;font-size:12px}.project-display-row .value[data-v-2e87f0c0]{color:#d4d4d8;font-size:12px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.step-list[data-v-2e87f0c0]{flex:1;overflow-y:auto;padding:16px}.step-item[data-v-2e87f0c0]{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:8px;margin-bottom:8px;cursor:pointer;transition:all .2s;border:1px solid transparent}.step-item[data-v-2e87f0c0]:hover{background:#ffffff0d}.step-item.active[data-v-2e87f0c0]{background:#409eff26;border-color:#409eff}.step-item.completed .step-icon[data-v-2e87f0c0]{background:#22c55e}.step-item.active .step-icon[data-v-2e87f0c0]{background:#409eff}.step-icon[data-v-2e87f0c0]{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:14px;color:#fff;flex-shrink:0}.step-info[data-v-2e87f0c0]{flex:1}.step-title[data-v-2e87f0c0]{font-size:14px;font-weight:500;margin-bottom:2px;color:#f4f4f5}.step-desc[data-v-2e87f0c0]{font-size:12px;color:#84848a}.step-status[data-v-2e87f0c0]{font-size:14px}.step1-container[data-v-30b4a46d]{height:100%;padding:80px 24px 24px;overflow:hidden}.step1-main[data-v-30b4a46d]{max-width:600px;margin:0 auto}.panel-section[data-v-30b4a46d]{background:#121212;border:1px solid #1e1e1e;border-radius:8px;overflow:hidden}.panel-section-header[data-v-30b4a46d]{background:#121212;border-bottom:1px solid #1e1e1e;padding:12px 16px;font-size:14px;font-weight:500;display:flex;align-items:center;justify-content:space-between;color:#f4f4f5}.panel-section-header .el-button[data-v-30b4a46d]{padding:4px 8px;font-size:12px}.panel-section-body[data-v-30b4a46d]{padding:24px}.form-hint[data-v-30b4a46d]{font-size:12px;color:#84848a;margin-top:8px}.form-hint code[data-v-30b4a46d]{background:#18191b;padding:2px 6px;border-radius:4px;font-family:ui-monospace,monospace;color:#409eff}.flex[data-v-30b4a46d]{display:flex}.gap-2[data-v-30b4a46d]{gap:8px}.discuss-container[data-v-70b06650]{flex:1;display:flex;flex-direction:column;overflow:hidden;min-height:0}.discuss-dropdown[data-v-70b06650]{position:relative;flex-shrink:0;border-bottom:1px solid #1e1e1e}.dropdown-trigger[data-v-70b06650]{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;cursor:pointer;color:#f4f4f5;font-size:13px}.dropdown-trigger[data-v-70b06650]:hover{background:#1a1a1a}.dropdown-title[data-v-70b06650]{font-weight:500}.dropdown-trigger .el-icon-arrow-down[data-v-70b06650]{transition:transform .2s;font-size:12px;color:#84848a}.dropdown-trigger .el-icon-arrow-down.rotated[data-v-70b06650]{transform:rotate(180deg)}.dropdown-menu[data-v-70b06650]{position:absolute;top:100%;left:0;right:0;background:#1a1a1a;border:1px solid #1e1e1e;border-top:none;z-index:100;max-height:240px;overflow-y:auto}.dropdown-item[data-v-70b06650]{display:flex;align-items:center;justify-content:space-between;padding:8px 16px;cursor:pointer;color:#d4d4d8;font-size:13px}.dropdown-item[data-v-70b06650]:hover{background:#252525}.dropdown-item.active[data-v-70b06650]{background:#1a3a5c}.dropdown-item.add-item[data-v-70b06650]{border-top:1px solid #1e1e1e;color:#60a5fa;justify-content:flex-start;gap:6px}.item-title[data-v-70b06650]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.item-actions[data-v-70b06650]{flex-shrink:0;margin-left:8px;position:relative}.menu-trigger[data-v-70b06650]{cursor:pointer;color:#84848a;padding:2px 6px;border-radius:4px}.menu-trigger[data-v-70b06650]:hover{background:#333;color:#f4f4f5}.menu-actions[data-v-70b06650]{display:flex;flex-direction:column;min-width:80px}.menu-popup[data-v-70b06650]{position:absolute;right:0;top:100%;background:#1a1a1a;border:1px solid #333;border-radius:6px;box-shadow:0 4px 12px #0006;z-index:200;min-width:100px;overflow:hidden}.menu-item[data-v-70b06650]{padding:6px 12px;cursor:pointer;font-size:13px;color:#d4d4d8}.menu-item[data-v-70b06650]:hover{background:#252525}.menu-item.danger[data-v-70b06650]{color:#ef4444}.empty-discuss[data-v-70b06650]{flex:1;display:flex;align-items:center;justify-content:center}.empty-card[data-v-70b06650]{display:flex;flex-direction:column;align-items:center;gap:12px;padding:32px 48px;border:2px dashed #3f3f46;border-radius:12px;cursor:pointer;transition:all .2s}.empty-card[data-v-70b06650]:hover{border-color:#60a5fa;background:#60a5fa0d}.empty-card i[data-v-70b06650]{font-size:36px;color:#60a5fa}.empty-card p[data-v-70b06650]{font-size:16px;color:#f4f4f5;margin:0}.empty-card span[data-v-70b06650]{font-size:13px;color:#84848a}.chat-messages[data-v-70b06650]{flex:1;overflow-y:auto;padding:0 16px 16px;font-size:14px;line-height:1.6}.chat-messages[data-v-70b06650]::-webkit-scrollbar{width:4px}.chat-messages[data-v-70b06650]::-webkit-scrollbar-track{background:transparent}.chat-messages[data-v-70b06650]::-webkit-scrollbar-thumb{background:#3f3f46;border-radius:2px}.chat-messages[data-v-70b06650]::-webkit-scrollbar-thumb:hover{background:#52525b}.empty-state[data-v-70b06650]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:#84848a}.empty-state i[data-v-70b06650]{font-size:48px;margin-bottom:16px;opacity:.5}.todos-list[data-v-70b06650]{margin-bottom:16px;color:#d4d4d8}.todo-item[data-v-70b06650]{display:flex;align-items:center;gap:8px;padding:2px 0}.user-question[data-v-70b06650]{color:#60a5fa;font-weight:700;border:1px solid #60a5fa;padding:15px;margin:15px;border-radius:10px;display:inline-block;max-width:80%;text-align:left}.ai-thought[data-v-70b06650]{color:#d4d4d8;margin-bottom:16px}.log-mute[data-v-70b06650]{color:#84848a;margin-bottom:16px;white-space:pre}.tool-success[data-v-70b06650]{color:#22c55e}.tool-fail[data-v-70b06650]{color:#ef4444}.tool-input[data-v-70b06650]{color:#60a5fa;margin-left:8px}.build-info[data-v-70b06650]{color:#84848a;display:flex;align-items:center;gap:8px;margin-bottom:16px}.chat-input-area[data-v-70b06650]{padding:12px 16px;background:#121212;border-top:1px solid #1e1e1e;flex-shrink:0}.input-panel[data-v-70b06650]{background:#fff;border-radius:6px;border:1px solid #e0e0e0;overflow:hidden}.input-wrapper[data-v-70b06650]{position:relative}.input-area[data-v-70b06650]{flex:1}.input-area[data-v-70b06650] .el-textarea__inner{border:none;border-radius:0;background:#fff;color:#4b5563;resize:none}.input-area[data-v-70b06650] .el-textarea__inner:focus{box-shadow:none}.input-panel .input-actions[data-v-70b06650]{display:flex;justify-content:flex-end;align-items:center;padding:6px 12px;gap:6px;background:#fff}.input-panel .status-action[data-v-70b06650]{cursor:pointer;font-size:12px;color:#6b7280}.input-panel .status-action[data-v-70b06650]:hover{color:#60a5fa}.input-panel .separator[data-v-70b06650]{color:#d1d5db;font-size:12px}.status-bar[data-v-70b06650]{display:flex;gap:8px;align-items:center;padding:6px 16px;font-size:12px;color:#84848a;border-top:1px solid #1e1e1e;flex-shrink:0;flex-wrap:wrap;background:#0a0a09}.status-bar .separator[data-v-70b06650]{color:#3f3f46}.status-ready[data-v-70b06650]{color:#22c55e}.status-thinking[data-v-70b06650]{color:#60a5fa}.thinking-spinner[data-v-70b06650]{display:inline-block;width:12px;height:12px;border:2px solid #60a5fa;border-top-color:transparent;border-radius:50%;animation:spin-70b06650 .8s linear infinite}@keyframes spin-70b06650{to{transform:rotate(360deg)}}.model-selector[data-v-70b06650]{cursor:pointer}.model-selector[data-v-70b06650]:hover{color:#60a5fa}.status-action[data-v-70b06650]{cursor:pointer}.status-action[data-v-70b06650]:hover{color:#60a5fa}.flex[data-v-70b06650]{display:flex}.justify-end[data-v-70b06650]{justify-content:flex-end}.chat-images[data-v-70b06650]{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}.chat-image-thumb[data-v-70b06650]{width:120px;height:120px;-o-object-fit:cover;object-fit:cover;border-radius:6px;border:1px solid #3f3f46;cursor:zoom-in;transition:border-color .2s}.chat-image-thumb[data-v-70b06650]:hover{border-color:#60a5fa}.image-lightbox[data-v-70b06650]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;background:#000000e6;display:flex;align-items:center;justify-content:center;cursor:zoom-out}.lightbox-close[data-v-70b06650]{position:absolute;top:20px;right:30px;color:#fff;font-size:40px;cursor:pointer;z-index:1}.lightbox-image[data-v-70b06650]{max-width:90vw;max-height:90vh;-o-object-fit:contain;object-fit:contain;cursor:default}.upload-btn[data-v-70b06650]{height:auto}.step2-container[data-v-733218fd]{height:100%;display:flex;flex-direction:column}.step2-main[data-v-733218fd]{display:flex;flex:1;gap:5px;overflow:hidden;padding:16px}.editor-panel[data-v-733218fd]{flex:1;min-width:300px;background:#121212;border:1px solid #1e1e1e;border-radius:8px;overflow:hidden;display:flex;flex-direction:column}.editor-header[data-v-733218fd]{background:#121212;border-bottom:1px solid #1e1e1e;padding:12px 16px;font-size:13px;color:#84848a;display:flex;align-items:center;justify-content:space-between}.editor-title[data-v-733218fd]{display:flex;align-items:center;gap:8px}.editor-actions[data-v-733218fd]{display:flex;gap:4px;align-items:center}.editor-actions .el-button--text[data-v-733218fd]{color:#84848a;padding:2px 6px;font-size:16px}.editor-actions .el-button--text[data-v-733218fd]:hover{color:#60a5fa}.editor-container[data-v-733218fd]{flex:1;min-height:0}.chat-panel[data-v-733218fd]{background:#121212;border:1px solid #1e1e1e;border-radius:8px;overflow:hidden;display:flex;flex-direction:column;flex-shrink:0}.resize-handle[data-v-733218fd]{width:4px;cursor:col-resize;background:transparent;flex-shrink:0;transition:background .15s}.resize-handle[data-v-733218fd]:hover{background:#60a5fa}.panel-header[data-v-733218fd]{background:#121212;border-bottom:1px solid #1e1e1e;padding:12px 16px;font-size:14px;font-weight:500;color:#f4f4f5;flex-shrink:0}.panel-tabs[data-v-733218fd]{display:flex;gap:0;padding:0}.panel-tab[data-v-733218fd]{flex:1;text-align:center;padding:10px 16px;cursor:pointer;color:#84848a;font-size:13px;border-bottom:2px solid transparent;transition:all .2s;display:flex;align-items:center;justify-content:center;gap:6px}.panel-tab[data-v-733218fd]:hover{color:#d4d4d8}.panel-tab.active[data-v-733218fd]{color:#60a5fa;border-bottom-color:#60a5fa}.chat-messages[data-v-733218fd]{flex:1;overflow-y:auto;padding:0 16px 16px;font-size:14px;line-height:1.6}.chat-messages[data-v-733218fd]::-webkit-scrollbar{width:4px}.chat-messages[data-v-733218fd]::-webkit-scrollbar-track{background:transparent}.chat-messages[data-v-733218fd]::-webkit-scrollbar-thumb{background:#3f3f46;border-radius:2px}.chat-messages[data-v-733218fd]::-webkit-scrollbar-thumb:hover{background:#52525b}.empty-state[data-v-733218fd]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:#84848a}.empty-state i[data-v-733218fd]{font-size:48px;margin-bottom:16px;opacity:.5}.todos-list[data-v-733218fd]{margin-bottom:16px;color:#d4d4d8}.todo-item[data-v-733218fd]{display:flex;align-items:center;gap:8px;padding:2px 0}.user-question[data-v-733218fd]{color:#60a5fa;font-weight:700;border:1px solid #60a5fa;padding:15px;margin:15px;border-radius:10px;display:inline-block;max-width:80%;text-align:left}.ai-thought[data-v-733218fd]{color:#d4d4d8;margin-bottom:16px}.log-mute[data-v-733218fd]{color:#84848a;margin-bottom:16px;white-space:pre}.tool-success[data-v-733218fd]{color:#22c55e}.tool-fail[data-v-733218fd]{color:#ef4444}.tool-input[data-v-733218fd]{color:#60a5fa;margin-left:8px}.build-info[data-v-733218fd]{color:#84848a;display:flex;align-items:center;gap:8px;margin-bottom:16px}.chat-input-area[data-v-733218fd]{padding:12px 16px;background:#121212;border-top:1px solid #1e1e1e}.input-panel[data-v-733218fd]{background:#fff;border-radius:6px;border:1px solid #e0e0e0;overflow:hidden}.input-wrapper[data-v-733218fd]{position:relative}.input-area[data-v-733218fd]{flex:1}.input-area[data-v-733218fd] .el-textarea__inner{border:none;border-radius:0;background:#fff;color:#4b5563;resize:none}.input-area[data-v-733218fd] .el-textarea__inner:focus{box-shadow:none}.input-panel .input-actions[data-v-733218fd]{display:flex;justify-content:space-between;align-items:center;padding:6px 12px;gap:6px;background:#fff}.input-actions-left[data-v-733218fd],.input-actions-right[data-v-733218fd]{display:flex;align-items:center;gap:6px}.input-panel .status-action[data-v-733218fd]{cursor:pointer;font-size:12px;color:#6b7280}.input-panel .status-action[data-v-733218fd]:hover{color:#60a5fa}.input-panel .separator[data-v-733218fd]{color:#d1d5db;font-size:12px}.status-bar[data-v-733218fd]{display:flex;gap:8px;align-items:center;padding:6px 16px;font-size:12px;color:#84848a;border-top:1px solid #1e1e1e;flex-shrink:0;flex-wrap:wrap;background:#0a0a09}.status-bar .separator[data-v-733218fd]{color:#3f3f46}.status-ready[data-v-733218fd]{color:#22c55e}.status-thinking[data-v-733218fd]{color:#60a5fa}.thinking-spinner[data-v-733218fd]{display:inline-block;width:12px;height:12px;border:2px solid #60a5fa;border-top-color:transparent;border-radius:50%;animation:spin-733218fd .8s linear infinite}@keyframes spin-733218fd{to{transform:rotate(360deg)}}.model-selector[data-v-733218fd]{cursor:pointer}.model-selector[data-v-733218fd]:hover{color:#60a5fa}.status-action[data-v-733218fd]{cursor:pointer}.status-action[data-v-733218fd]:hover{color:#60a5fa}.chat-images[data-v-733218fd]{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}.chat-image-thumb[data-v-733218fd]{width:120px;height:120px;-o-object-fit:cover;object-fit:cover;border-radius:6px;border:1px solid #3f3f46;cursor:zoom-in;transition:border-color .2s}.chat-image-thumb[data-v-733218fd]:hover{border-color:#60a5fa}.image-lightbox[data-v-733218fd]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;background:#000000e6;display:flex;align-items:center;justify-content:center;cursor:zoom-out}.lightbox-close[data-v-733218fd]{position:absolute;top:20px;right:30px;color:#fff;font-size:40px;cursor:pointer;z-index:1}.lightbox-image[data-v-733218fd]{max-width:90vw;max-height:90vh;-o-object-fit:contain;object-fit:contain;cursor:default}.upload-btn[data-v-733218fd]{height:auto}.step3-container[data-v-5d3f42f3]{height:100%;display:flex;flex-direction:column}.step3-main[data-v-5d3f42f3]{display:flex;flex:1;gap:5px;overflow:hidden;padding:16px}.code-chat-panel[data-v-5d3f42f3]{flex:1;background:#121212;border:1px solid #1e1e1e;border-radius:8px;overflow:hidden;display:flex;flex-direction:column}.panel-header[data-v-5d3f42f3]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#121212;border-bottom:1px solid #1e1e1e;flex-shrink:0}.panel-header span[data-v-5d3f42f3]{font-size:14px;font-weight:500;color:#f4f4f5}.header-actions[data-v-5d3f42f3]{display:flex;gap:8px}.chat-messages[data-v-5d3f42f3]{flex:1;overflow-y:auto;padding:16px;font-size:14px;line-height:1.6}.chat-messages[data-v-5d3f42f3]::-webkit-scrollbar{width:4px}.chat-messages[data-v-5d3f42f3]::-webkit-scrollbar-track{background:transparent}.chat-messages[data-v-5d3f42f3]::-webkit-scrollbar-thumb{background:#3f3f46;border-radius:2px}.chat-messages[data-v-5d3f42f3]::-webkit-scrollbar-thumb:hover{background:#52525b}.empty-state[data-v-5d3f42f3]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:#84848a}.empty-state i[data-v-5d3f42f3]{font-size:48px;margin-bottom:16px;opacity:.5}.todos-list[data-v-5d3f42f3]{margin-bottom:16px;color:#d4d4d8}.todo-item[data-v-5d3f42f3]{display:flex;align-items:center;gap:8px;padding:2px 0}.user-question[data-v-5d3f42f3]{color:#60a5fa;font-weight:700;border:1px solid #60a5fa;padding:15px;margin:15px;border-radius:10px;display:inline-block;max-width:80%;text-align:left}.ai-thought[data-v-5d3f42f3]{color:#d4d4d8;margin-bottom:16px}.log-mute[data-v-5d3f42f3]{color:#84848a;margin-bottom:16px;white-space:pre}.tool-success[data-v-5d3f42f3]{color:#22c55e}.tool-fail[data-v-5d3f42f3]{color:#ef4444}.tool-input[data-v-5d3f42f3]{color:#60a5fa;margin-left:8px}.build-info[data-v-5d3f42f3]{color:#84848a;display:flex;align-items:center;gap:8px;margin-bottom:16px}.chat-input-area[data-v-5d3f42f3]{padding:12px 16px;background:#121212;border-top:1px solid #1e1e1e}.input-wrapper[data-v-5d3f42f3]{position:relative;flex:1}.input-area[data-v-5d3f42f3]{flex:1}.input-wrapper .input-actions[data-v-5d3f42f3]{position:absolute;right:8px;bottom:8px;display:flex;gap:6px;z-index:5}.input-wrapper[data-v-5d3f42f3] .el-textarea__inner{padding-bottom:50px}.status-bar[data-v-5d3f42f3]{display:flex;gap:8px;align-items:center;padding:6px 16px;font-size:12px;color:#84848a;border-top:1px solid #1e1e1e;flex-shrink:0;flex-wrap:wrap;background:#0a0a09}.status-bar .separator[data-v-5d3f42f3]{color:#3f3f46}.status-ready[data-v-5d3f42f3]{color:#22c55e}.status-thinking[data-v-5d3f42f3]{color:#60a5fa}.thinking-spinner[data-v-5d3f42f3]{display:inline-block;width:12px;height:12px;border:2px solid #60a5fa;border-top-color:transparent;border-radius:50%;animation:spin-5d3f42f3 .8s linear infinite}@keyframes spin-5d3f42f3{to{transform:rotate(360deg)}}.model-selector[data-v-5d3f42f3]{cursor:pointer}.model-selector[data-v-5d3f42f3]:hover{color:#60a5fa}.devlog-panel[data-v-5d3f42f3]{background:#121212;border:1px solid #1e1e1e;border-radius:8px;overflow:hidden;display:flex;flex-direction:column;flex-shrink:0}.resize-handle[data-v-5d3f42f3]{width:4px;cursor:col-resize;background:transparent;flex-shrink:0;transition:background .15s}.resize-handle[data-v-5d3f42f3]:hover{background:#60a5fa}.devlog-panel .panel-header[data-v-5d3f42f3]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#121212;border-bottom:1px solid #1e1e1e}.devlog-panel .panel-header span[data-v-5d3f42f3]{font-size:14px;font-weight:500;color:#f4f4f5}.devlog-content[data-v-5d3f42f3]{flex:1;overflow-y:auto;padding:16px;font-size:14px;line-height:1.6;color:#d4d4d8}.devlog-content[data-v-5d3f42f3]::-webkit-scrollbar{width:4px}.devlog-content[data-v-5d3f42f3]::-webkit-scrollbar-track{background:transparent}.devlog-content[data-v-5d3f42f3]::-webkit-scrollbar-thumb{background:#3f3f46;border-radius:2px}.devlog-content[data-v-5d3f42f3]::-webkit-scrollbar-thumb:hover{background:#52525b}.chat-images[data-v-5d3f42f3]{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}.chat-image-thumb[data-v-5d3f42f3]{width:120px;height:120px;-o-object-fit:cover;object-fit:cover;border-radius:6px;border:1px solid #3f3f46;cursor:zoom-in;transition:border-color .2s}.chat-image-thumb[data-v-5d3f42f3]:hover{border-color:#60a5fa}.image-lightbox[data-v-5d3f42f3]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;background:#000000e6;display:flex;align-items:center;justify-content:center;cursor:zoom-out}.lightbox-close[data-v-5d3f42f3]{position:absolute;top:20px;right:30px;color:#fff;font-size:40px;cursor:pointer;z-index:1}.lightbox-image[data-v-5d3f42f3]{max-width:90vw;max-height:90vh;-o-object-fit:contain;object-fit:contain;cursor:default}.upload-btn[data-v-5d3f42f3]{height:auto}.step4-container[data-v-c15a086d]{height:100%;display:flex;flex-direction:column}.step4-main[data-v-c15a086d]{display:flex;flex:1;overflow:hidden;padding:16px}.code-chat-panel[data-v-c15a086d]{flex:1;background:#121212;border:1px solid #1e1e1e;border-radius:8px;overflow:hidden;display:flex;flex-direction:column}.panel-header[data-v-c15a086d]{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#121212;border-bottom:1px solid #1e1e1e;flex-shrink:0}.panel-header span[data-v-c15a086d]{font-size:14px;font-weight:500;color:#f4f4f5}.chat-messages[data-v-c15a086d]{flex:1;overflow-y:auto;padding:16px;font-size:14px;line-height:1.6}.empty-state[data-v-c15a086d]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:#84848a}.empty-state i[data-v-c15a086d]{font-size:48px;margin-bottom:16px;opacity:.5}.todos-list[data-v-c15a086d]{margin-bottom:16px;color:#d4d4d8}.todo-item[data-v-c15a086d]{display:flex;align-items:center;gap:8px;padding:2px 0}.user-question[data-v-c15a086d]{color:#60a5fa;font-weight:700;border:1px solid #60a5fa;padding:15px;margin:15px;border-radius:10px;display:inline-block;max-width:80%;text-align:left}.ai-thought[data-v-c15a086d]{color:#d4d4d8;margin-bottom:16px}.log-mute[data-v-c15a086d]{color:#84848a;margin-bottom:16px;white-space:pre}.tool-success[data-v-c15a086d]{color:#22c55e}.tool-fail[data-v-c15a086d]{color:#ef4444}.tool-input[data-v-c15a086d]{color:#60a5fa;margin-left:8px}.build-info[data-v-c15a086d]{color:#84848a;display:flex;align-items:center;gap:8px;margin-bottom:16px}.chat-input-area[data-v-c15a086d]{padding:12px 16px;background:#121212;border-top:1px solid #1e1e1e}.input-wrapper[data-v-c15a086d]{position:relative;flex:1}.input-area[data-v-c15a086d]{flex:1}.input-wrapper .input-actions[data-v-c15a086d]{position:absolute;right:8px;bottom:8px;display:flex;gap:6px;z-index:5}.input-wrapper[data-v-c15a086d] .el-textarea__inner{padding-bottom:50px}.status-bar[data-v-c15a086d]{display:flex;gap:8px;align-items:center;padding:6px 16px;font-size:12px;color:#84848a;border-top:1px solid #1e1e1e;flex-shrink:0;flex-wrap:wrap;background:#0a0a09}.status-bar .separator[data-v-c15a086d]{color:#3f3f46}.status-ready[data-v-c15a086d]{color:#22c55e}.status-thinking[data-v-c15a086d]{color:#60a5fa}.thinking-spinner[data-v-c15a086d]{display:inline-block;width:12px;height:12px;border:2px solid #60a5fa;border-top-color:transparent;border-radius:50%;animation:spin-c15a086d .8s linear infinite}@keyframes spin-c15a086d{to{transform:rotate(360deg)}}.model-selector[data-v-c15a086d]{cursor:pointer}.model-selector[data-v-c15a086d]:hover{color:#60a5fa}.chat-images[data-v-c15a086d]{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}.chat-image-thumb[data-v-c15a086d]{width:120px;height:120px;-o-object-fit:cover;object-fit:cover;border-radius:6px;border:1px solid #3f3f46;cursor:zoom-in;transition:border-color .2s}.chat-image-thumb[data-v-c15a086d]:hover{border-color:#60a5fa}.image-lightbox[data-v-c15a086d]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;background:#000000e6;display:flex;align-items:center;justify-content:center;cursor:zoom-out}.lightbox-close[data-v-c15a086d]{position:absolute;top:20px;right:30px;color:#fff;font-size:40px;cursor:pointer;z-index:1}.lightbox-image[data-v-c15a086d]{max-width:90vw;max-height:90vh;-o-object-fit:contain;object-fit:contain;cursor:default}.upload-btn[data-v-c15a086d]{height:auto}.dev-workflow-view[data-v-a50d89b8]{display:flex;height:100%;overflow:hidden;background:#0a0a09}.main-content[data-v-a50d89b8]{flex:1;display:flex;flex-direction:column;overflow:hidden}.step-content[data-v-a50d89b8]{flex:1;overflow:hidden}.status-bar[data-v-a50d89b8]{background:#121212;border-top:1px solid #1e1e1e;padding:8px 24px;font-size:12px;color:#84848a;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.workflow-step-bar[data-v-1cf39c0c]{display:flex;background:var(--bg-secondary, #121212);border-bottom:1px solid var(--border-color, #27272a);padding:8px 16px;gap:8px}.step-item[data-v-1cf39c0c]{display:flex;align-items:center;gap:8px;padding:8px 16px;border-radius:8px;cursor:pointer;color:#52525b;transition:all .2s}.step-item.active[data-v-1cf39c0c]{color:#a1a1aa}.step-item.current[data-v-1cf39c0c]{background:var(--accent, #3b82f6);color:#fff}.step-number[data-v-1cf39c0c]{width:24px;height:24px;border-radius:50%;background:var(--bg-tertiary, #18191b);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600}.step-item.current .step-number[data-v-1cf39c0c]{background:#fff3}.step-label[data-v-1cf39c0c]{font-size:14px}.step1-req[data-v-ff2d2605]{height:100%;display:flex;flex-direction:column;background:#0a0a09}.section-header[data-v-ff2d2605]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;font-size:14px;font-weight:500;color:#f4f4f5}.category-section[data-v-ff2d2605]{background:#121212}.category-list[data-v-ff2d2605]{display:flex;flex-wrap:wrap;gap:8px;padding:0 16px 16px}.category-item[data-v-ff2d2605]{display:flex;align-items:center;gap:6px;padding:8px 16px;background:#1e1e1e;border-radius:20px;font-size:13px;color:#a1a1aa;cursor:pointer;transition:all .2s}.category-item[data-v-ff2d2605]:hover{background:#27272a;color:#f4f4f5}.category-item.active[data-v-ff2d2605]{background:#3b82f6;color:#fff}.category-item.add-btn[data-v-ff2d2605]{background:transparent;border:1px dashed #3f3f46}.category-item.add-btn[data-v-ff2d2605]:hover{border-color:#3b82f6;color:#3b82f6}.divider[data-v-ff2d2605]{height:1px;background:#27272a}.project-section[data-v-ff2d2605]{flex:1;display:flex;flex-direction:column;overflow:hidden}.project-list[data-v-ff2d2605]{flex:1;overflow-y:auto;padding:0 16px 16px}.project-item[data-v-ff2d2605]{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;background:#121212;border-radius:8px;margin-bottom:8px;cursor:pointer;transition:all .2s}.project-item[data-v-ff2d2605]:hover{background:#1e1e1e}.project-info[data-v-ff2d2605]{display:flex;align-items:center;gap:10px;color:#f4f4f5;font-size:14px}.project-info i[data-v-ff2d2605]{color:#3b82f6}.project-item>i[data-v-ff2d2605]{color:#52525b;font-size:12px}.empty-hint[data-v-ff2d2605]{text-align:center;color:#52525b;font-size:13px;padding:32px 0}.btn-primary[data-v-ff2d2605]{display:flex;align-items:center;gap:4px;padding:6px 12px;background:#3b82f6;color:#fff;border:none;border-radius:6px;font-size:12px;cursor:pointer;transition:all .2s}.btn-primary[data-v-ff2d2605]:hover{background:#2563eb}.btn-primary[data-v-ff2d2605]:disabled{background:#27272a;color:#52525b;cursor:not-allowed}.dialog-overlay[data-v-ff2d2605]{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000b3;display:flex;align-items:center;justify-content:center;z-index:1000;padding:20px}.dialog[data-v-ff2d2605]{width:100%;max-width:320px;background:#18181b;border-radius:12px;overflow:hidden}.dialog-header[data-v-ff2d2605]{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid #27272a;font-size:15px;font-weight:500;color:#f4f4f5}.close-btn[data-v-ff2d2605]{background:none;border:none;color:#71717a;font-size:18px;cursor:pointer}.dialog-body[data-v-ff2d2605]{padding:16px}.dialog-body input[data-v-ff2d2605]{width:100%;padding:12px;background:#0a0a09;border:1px solid #27272a;border-radius:8px;color:#f4f4f5;font-size:14px;outline:none}.dialog-body input[data-v-ff2d2605]:focus{border-color:#3b82f6}.dialog-footer[data-v-ff2d2605]{display:flex;gap:12px;padding:16px;border-top:1px solid #27272a}.btn-cancel[data-v-ff2d2605],.btn-confirm[data-v-ff2d2605]{flex:1;padding:10px;border-radius:8px;font-size:14px;cursor:pointer;transition:all .2s}.btn-cancel[data-v-ff2d2605]{background:#27272a;border:none;color:#a1a1aa}.btn-cancel[data-v-ff2d2605]:hover{background:#3f3f46}.btn-confirm[data-v-ff2d2605]{background:#3b82f6;border:none;color:#fff}.btn-confirm[data-v-ff2d2605]:hover{background:#2563eb}.step2-design[data-v-8d203a9e]{height:100%;display:flex;flex-direction:column;background:#0a0a09}.mode-tabs[data-v-8d203a9e]{display:flex;background:#121212;border-bottom:1px solid #27272a;flex-shrink:0}.tab-btn[data-v-8d203a9e]{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:12px;background:none;border:none;color:#84848a;font-size:14px;cursor:pointer;transition:all .2s}.tab-btn.active[data-v-8d203a9e]{color:#3b82f6;border-bottom:2px solid #3b82f6}.chat-mode[data-v-8d203a9e],.spec-mode[data-v-8d203a9e]{flex:1;display:flex;flex-direction:column;overflow:hidden}.chat-toolbar[data-v-8d203a9e]{display:flex;align-items:center;gap:8px;padding:8px 16px;background:#121212;border-bottom:1px solid #27272a;flex-shrink:0}.model-name[data-v-8d203a9e]{flex:1;color:#3b82f6;font-size:13px;cursor:pointer}.chat-area[data-v-8d203a9e]{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px}.message[data-v-8d203a9e]{display:flex;flex-direction:column;max-width:85%}.message.user[data-v-8d203a9e]{align-self:flex-end}.message.assistant[data-v-8d203a9e]{align-self:flex-start}.message-bubble[data-v-8d203a9e]{padding:12px 14px;border-radius:14px;font-size:14px;line-height:1.5;word-break:break-word}.message.user .message-bubble[data-v-8d203a9e]{background:#3b82f6;color:#fff;border-bottom-right-radius:4px}.message.assistant .message-bubble[data-v-8d203a9e]{background:#121212;border:1px solid #27272a;border-bottom-left-radius:4px;color:#d4d4d8}.message.assistant.thinking .message-bubble[data-v-8d203a9e]{background:linear-gradient(135deg,#121212,#18191b)}.message-bubble.system[data-v-8d203a9e]{font-style:italic;color:#a1a1aa}.step-block[data-v-8d203a9e]{display:flex;flex-direction:column;gap:8px}.tool-log[data-v-8d203a9e]{font-size:12px;color:#84848a;padding:8px 12px;background:#18191b;border-radius:6px;font-family:ui-monospace,monospace;display:flex;align-items:center;gap:8px}.tool-success[data-v-8d203a9e]{color:#22c55e}.tool-fail[data-v-8d203a9e]{color:#ef4444}.tool-name[data-v-8d203a9e]{color:#3b82f6}.tool-args[data-v-8d203a9e]{color:#84848a}.todo-list[data-v-8d203a9e]{background:#121212;border:1px solid #27272a;border-radius:10px;padding:10px 14px}.todo-item[data-v-8d203a9e]{display:flex;align-items:center;gap:10px;padding:6px 0;font-size:13px;color:#d4d4d8}.todo-item[data-v-8d203a9e]:not(:last-child){border-bottom:1px solid #27272a}.todo-status[data-v-8d203a9e]{width:20px;height:20px;display:flex;align-items:center;justify-content:center;font-size:12px}.empty-state[data-v-8d203a9e]{flex:1;display:flex;align-items:center;justify-content:center;color:#52525b;font-size:14px;min-height:100px}.input-area[data-v-8d203a9e]{display:flex;gap:10px;padding:12px 16px;background:#121212;border-top:1px solid #27272a;flex-shrink:0}.input-wrapper[data-v-8d203a9e]{flex:1}.input-field[data-v-8d203a9e]{width:100%;min-height:44px;max-height:100px;padding:10px 14px;background:#0a0a09;border:1px solid #27272a;border-radius:20px;color:#f4f4f5;font-size:14px;resize:none;outline:none}.input-field[data-v-8d203a9e]:focus{border-color:#3b82f6}.input-field[data-v-8d203a9e]::-moz-placeholder{color:#52525b}.input-field[data-v-8d203a9e]::placeholder{color:#52525b}.send-btn[data-v-8d203a9e]{width:44px;height:44px;background:#3b82f6;border:none;border-radius:50%;color:#fff;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}.send-btn[data-v-8d203a9e]:disabled{background:#27272a;color:#52525b;cursor:not-allowed}.stop-btn[data-v-8d203a9e]{background:#ef4444}.status-bar[data-v-8d203a9e]{display:flex;align-items:center;justify-content:space-between;padding:6px 16px;background:#121212;border-top:1px solid #27272a;font-size:11px;color:#84848a;flex-shrink:0}.status-indicator[data-v-8d203a9e]{display:flex;align-items:center;gap:6px}.status-dot[data-v-8d203a9e]{width:6px;height:6px;border-radius:50%;background:#22c55e}.status-dot.processing[data-v-8d203a9e]{background:#ef4444;animation:pulse-8d203a9e 1.5s infinite}.status-processing[data-v-8d203a9e]{color:#ef4444}.status-ready[data-v-8d203a9e]{color:#22c55e}@keyframes pulse-8d203a9e{0%,to{opacity:1}50%{opacity:.4}}.spec-tabs[data-v-8d203a9e]{display:flex;background:#121212;border-bottom:1px solid #27272a;flex-shrink:0}.spec-tab-btn[data-v-8d203a9e]{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px;background:none;border:none;color:#84848a;font-size:13px;cursor:pointer}.spec-tab-btn.active[data-v-8d203a9e]{color:#3b82f6;border-bottom:2px solid #3b82f6}.editor-area[data-v-8d203a9e]{flex:1;display:flex;flex-direction:column;overflow:hidden}.editor-toolbar[data-v-8d203a9e]{display:flex;padding:8px 16px;background:#121212;border-bottom:1px solid #27272a;flex-shrink:0}.toolbar-btn[data-v-8d203a9e]{display:flex;align-items:center;gap:4px;padding:6px 12px;background:#18191b;color:#d4d4d8;border:1px solid #27272a;border-radius:6px;font-size:12px;cursor:pointer}.toolbar-btn.primary[data-v-8d203a9e]{background:#3b82f6;color:#fff;border-color:#3b82f6}.markdown-editor[data-v-8d203a9e]{flex:1;width:100%;padding:16px;background:#121212;border:none;color:#f4f4f5;font-size:14px;font-family:ui-monospace,monospace;line-height:1.6;resize:none;outline:none}.preview-area[data-v-8d203a9e]{flex:1;overflow-y:auto;padding:16px;background:#121212}.preview-content[data-v-8d203a9e]{color:#d4d4d8;font-size:14px;line-height:1.7}.preview-content[data-v-8d203a9e] h1,.preview-content[data-v-8d203a9e] h2,.preview-content[data-v-8d203a9e] h3{color:#f4f4f5;margin:16px 0 8px}.preview-content[data-v-8d203a9e] code{background:#27272a;padding:2px 6px;border-radius:4px;font-size:13px}.preview-content[data-v-8d203a9e] pre{background:#1e1e1e;padding:12px;border-radius:8px;overflow-x:auto}.drawer-overlay[data-v-8d203a9e]{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;opacity:0;visibility:hidden;transition:all .3s;z-index:999}.drawer-overlay.show[data-v-8d203a9e]{opacity:1;visibility:visible}.model-drawer[data-v-8d203a9e],.command-drawer[data-v-8d203a9e]{position:fixed;bottom:0;left:0;right:0;max-width:430px;margin:0 auto;background:#121212;border-radius:16px 16px 0 0;transform:translateY(100%);transition:transform .3s ease;z-index:1000;max-height:60vh;display:flex;flex-direction:column}.model-drawer.show[data-v-8d203a9e],.command-drawer.show[data-v-8d203a9e]{transform:translateY(0)}.drawer-header[data-v-8d203a9e]{padding:16px;border-bottom:1px solid #27272a;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.drawer-title[data-v-8d203a9e]{font-size:16px;font-weight:500;color:#f4f4f5}.drawer-close[data-v-8d203a9e]{width:32px;height:32px;border-radius:50%;background:#18191b;border:none;color:#84848a;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center}.command-list[data-v-8d203a9e]{flex:1;overflow-y:auto;padding:8px 0}.command-item[data-v-8d203a9e]{display:flex;align-items:center;padding:14px 16px;gap:12px;transition:background .2s;cursor:pointer}.command-item[data-v-8d203a9e]:active{background:#18191b}.command-item.active[data-v-8d203a9e]{background:#3b82f61a}.command-icon[data-v-8d203a9e]{width:40px;height:40px;background:#18191b;border-radius:10px;display:flex;align-items:center;justify-content:center;color:#3b82f6;flex-shrink:0}.command-item.active .command-icon[data-v-8d203a9e]{background:#3b82f6;color:#fff}.command-info[data-v-8d203a9e]{flex:1;min-width:0}.command-name[data-v-8d203a9e]{font-size:14px;font-weight:500;color:#f4f4f5;margin-bottom:4px}.command-desc[data-v-8d203a9e]{font-size:12px;color:#84848a}.message-bubble[data-v-8d203a9e] p{margin:0 0 10px}.message-bubble[data-v-8d203a9e] p:last-child{margin-bottom:0}.message-bubble[data-v-8d203a9e] code{background:#18191b;padding:2px 6px;border-radius:4px;font-family:monospace}.step3-code[data-v-2bceec20]{height:100%;display:flex;flex-direction:column;background:#0a0a09}.chat-toolbar[data-v-2bceec20]{display:flex;align-items:center;gap:8px;padding:8px 16px;background:#121212;border-bottom:1px solid #27272a;flex-shrink:0}.model-name[data-v-2bceec20]{flex:1;color:#3b82f6;font-size:13px;cursor:pointer}.toolbar-btn[data-v-2bceec20]{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:#18191b;border:1px solid #27272a;border-radius:8px;color:#d4d4d8;cursor:pointer;font-size:14px}.toolbar-btn[data-v-2bceec20]:disabled{opacity:.5;cursor:not-allowed}.chat-area[data-v-2bceec20]{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px}.empty-state[data-v-2bceec20]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#52525b;font-size:14px;min-height:100px}.empty-state i[data-v-2bceec20]{font-size:48px;margin-bottom:12px;opacity:.5}.message[data-v-2bceec20]{display:flex;flex-direction:column;max-width:85%}.message.user[data-v-2bceec20]{align-self:flex-end}.message.assistant[data-v-2bceec20]{align-self:flex-start}.message-bubble[data-v-2bceec20]{padding:12px 14px;border-radius:14px;font-size:14px;line-height:1.5;word-break:break-word}.message.user .message-bubble[data-v-2bceec20]{background:#3b82f6;color:#fff;border-bottom-right-radius:4px}.message.assistant .message-bubble[data-v-2bceec20]{background:#121212;border:1px solid #27272a;border-bottom-left-radius:4px;color:#d4d4d8}.message.assistant.thinking .message-bubble[data-v-2bceec20]{background:linear-gradient(135deg,#121212,#18191b)}.message-bubble.system[data-v-2bceec20]{font-style:italic;color:#a1a1aa}.step-block[data-v-2bceec20]{display:flex;flex-direction:column;gap:8px}.tool-log[data-v-2bceec20]{font-size:12px;color:#84848a;padding:8px 12px;background:#18191b;border-radius:6px;font-family:ui-monospace,monospace;display:flex;align-items:center;gap:8px}.tool-success[data-v-2bceec20]{color:#22c55e}.tool-fail[data-v-2bceec20]{color:#ef4444}.tool-name[data-v-2bceec20]{color:#3b82f6}.tool-args[data-v-2bceec20]{color:#84848a}.todo-list[data-v-2bceec20]{background:#121212;border:1px solid #27272a;border-radius:10px;padding:10px 14px}.todo-item[data-v-2bceec20]{display:flex;align-items:center;gap:10px;padding:6px 0;font-size:13px;color:#d4d4d8}.todo-item[data-v-2bceec20]:not(:last-child){border-bottom:1px solid #27272a}.todo-status[data-v-2bceec20]{width:20px;height:20px;display:flex;align-items:center;justify-content:center;font-size:12px}.input-area[data-v-2bceec20]{display:flex;gap:10px;padding:12px 16px;background:#121212;border-top:1px solid #27272a;flex-shrink:0}.input-wrapper[data-v-2bceec20]{flex:1}.input-field[data-v-2bceec20]{width:100%;min-height:44px;max-height:100px;padding:10px 14px;background:#0a0a09;border:1px solid #27272a;border-radius:20px;color:#f4f4f5;font-size:14px;resize:none;outline:none}.input-field[data-v-2bceec20]:focus{border-color:#3b82f6}.input-field[data-v-2bceec20]::-moz-placeholder{color:#52525b}.input-field[data-v-2bceec20]::placeholder{color:#52525b}.send-btn[data-v-2bceec20]{width:44px;height:44px;background:#3b82f6;border:none;border-radius:50%;color:#fff;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}.send-btn[data-v-2bceec20]:disabled{background:#27272a;color:#52525b;cursor:not-allowed}.stop-btn[data-v-2bceec20]{background:#ef4444}.status-bar[data-v-2bceec20]{display:flex;align-items:center;justify-content:space-between;padding:6px 16px;background:#121212;border-top:1px solid #27272a;font-size:11px;color:#84848a;flex-shrink:0}.status-indicator[data-v-2bceec20]{display:flex;align-items:center;gap:6px}.status-dot[data-v-2bceec20]{width:6px;height:6px;border-radius:50%;background:#22c55e}.status-dot.processing[data-v-2bceec20]{background:#ef4444;animation:pulse-2bceec20 1.5s infinite}@keyframes pulse-2bceec20{0%,to{opacity:1}50%{opacity:.4}}.drawer-overlay[data-v-2bceec20]{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;opacity:0;visibility:hidden;transition:all .3s;z-index:999}.drawer-overlay.show[data-v-2bceec20]{opacity:1;visibility:visible}.model-drawer[data-v-2bceec20],.command-drawer[data-v-2bceec20]{position:fixed;bottom:0;left:0;right:0;max-width:430px;margin:0 auto;background:#121212;border-radius:16px 16px 0 0;transform:translateY(100%);transition:transform .3s ease;z-index:1000;max-height:60vh;display:flex;flex-direction:column}.model-drawer.show[data-v-2bceec20],.command-drawer.show[data-v-2bceec20]{transform:translateY(0)}.drawer-header[data-v-2bceec20]{padding:16px;border-bottom:1px solid #27272a;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.drawer-title[data-v-2bceec20]{font-size:16px;font-weight:500;color:#f4f4f5}.drawer-close[data-v-2bceec20]{width:32px;height:32px;border-radius:50%;background:#18191b;border:none;color:#84848a;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center}.command-list[data-v-2bceec20]{flex:1;overflow-y:auto;padding:8px 0}.command-item[data-v-2bceec20]{display:flex;align-items:center;padding:14px 16px;gap:12px;transition:background .2s;cursor:pointer}.command-item[data-v-2bceec20]:active{background:#18191b}.command-item.active[data-v-2bceec20]{background:#3b82f61a}.command-icon[data-v-2bceec20]{width:40px;height:40px;background:#18191b;border-radius:10px;display:flex;align-items:center;justify-content:center;color:#3b82f6;flex-shrink:0}.command-item.active .command-icon[data-v-2bceec20]{background:#3b82f6;color:#fff}.command-info[data-v-2bceec20]{flex:1;min-width:0}.command-name[data-v-2bceec20]{font-size:14px;font-weight:500;color:#f4f4f5;margin-bottom:4px}.command-desc[data-v-2bceec20]{font-size:12px;color:#84848a}.message-bubble[data-v-2bceec20] p{margin:0 0 10px}.message-bubble[data-v-2bceec20] p:last-child{margin-bottom:0}.message-bubble[data-v-2bceec20] code{background:#18191b;padding:2px 6px;border-radius:4px;font-family:monospace}.step4-test[data-v-32cf5f82]{height:100%;display:flex;flex-direction:column;background:#0a0a09}.chat-toolbar[data-v-32cf5f82]{display:flex;align-items:center;gap:8px;padding:8px 16px;background:#121212;border-bottom:1px solid #27272a;flex-shrink:0}.model-name[data-v-32cf5f82]{flex:1;color:#3b82f6;font-size:13px;cursor:pointer}.toolbar-btn[data-v-32cf5f82]{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:#18191b;border:1px solid #27272a;border-radius:8px;color:#d4d4d8;cursor:pointer;font-size:14px}.toolbar-btn[data-v-32cf5f82]:disabled{opacity:.5;cursor:not-allowed}.chat-area[data-v-32cf5f82]{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px}.empty-state[data-v-32cf5f82]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#52525b;font-size:14px;min-height:100px}.empty-state i[data-v-32cf5f82]{font-size:48px;margin-bottom:12px;opacity:.5}.message[data-v-32cf5f82]{display:flex;flex-direction:column;max-width:85%}.message.user[data-v-32cf5f82]{align-self:flex-end}.message.assistant[data-v-32cf5f82]{align-self:flex-start}.message-bubble[data-v-32cf5f82]{padding:12px 14px;border-radius:14px;font-size:14px;line-height:1.5;word-break:break-word}.message.user .message-bubble[data-v-32cf5f82]{background:#3b82f6;color:#fff;border-bottom-right-radius:4px}.message.assistant .message-bubble[data-v-32cf5f82]{background:#121212;border:1px solid #27272a;border-bottom-left-radius:4px;color:#d4d4d8}.message.assistant.thinking .message-bubble[data-v-32cf5f82]{background:linear-gradient(135deg,#121212,#18191b)}.message-bubble.system[data-v-32cf5f82]{font-style:italic;color:#a1a1aa}.step-block[data-v-32cf5f82]{display:flex;flex-direction:column;gap:8px}.tool-log[data-v-32cf5f82]{font-size:12px;color:#84848a;padding:8px 12px;background:#18191b;border-radius:6px;font-family:ui-monospace,monospace;display:flex;align-items:center;gap:8px}.tool-success[data-v-32cf5f82]{color:#22c55e}.tool-fail[data-v-32cf5f82]{color:#ef4444}.tool-name[data-v-32cf5f82]{color:#3b82f6}.tool-args[data-v-32cf5f82]{color:#84848a}.todo-list[data-v-32cf5f82]{background:#121212;border:1px solid #27272a;border-radius:10px;padding:10px 14px}.todo-item[data-v-32cf5f82]{display:flex;align-items:center;gap:10px;padding:6px 0;font-size:13px;color:#d4d4d8}.todo-item[data-v-32cf5f82]:not(:last-child){border-bottom:1px solid #27272a}.todo-status[data-v-32cf5f82]{width:20px;height:20px;display:flex;align-items:center;justify-content:center;font-size:12px}.input-area[data-v-32cf5f82]{display:flex;gap:10px;padding:12px 16px;background:#121212;border-top:1px solid #27272a;flex-shrink:0}.input-wrapper[data-v-32cf5f82]{flex:1}.input-field[data-v-32cf5f82]{width:100%;min-height:44px;max-height:100px;padding:10px 14px;background:#0a0a09;border:1px solid #27272a;border-radius:20px;color:#f4f4f5;font-size:14px;resize:none;outline:none}.input-field[data-v-32cf5f82]:focus{border-color:#3b82f6}.input-field[data-v-32cf5f82]::-moz-placeholder{color:#52525b}.input-field[data-v-32cf5f82]::placeholder{color:#52525b}.send-btn[data-v-32cf5f82]{width:44px;height:44px;background:#3b82f6;border:none;border-radius:50%;color:#fff;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}.send-btn[data-v-32cf5f82]:disabled{background:#27272a;color:#52525b;cursor:not-allowed}.stop-btn[data-v-32cf5f82]{background:#ef4444}.status-bar[data-v-32cf5f82]{display:flex;align-items:center;justify-content:space-between;padding:6px 16px;background:#121212;border-top:1px solid #27272a;font-size:11px;color:#84848a;flex-shrink:0}.status-indicator[data-v-32cf5f82]{display:flex;align-items:center;gap:6px}.status-dot[data-v-32cf5f82]{width:6px;height:6px;border-radius:50%;background:#22c55e}.status-dot.processing[data-v-32cf5f82]{background:#ef4444;animation:pulse-32cf5f82 1.5s infinite}@keyframes pulse-32cf5f82{0%,to{opacity:1}50%{opacity:.4}}.drawer-overlay[data-v-32cf5f82]{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;opacity:0;visibility:hidden;transition:all .3s;z-index:999}.drawer-overlay.show[data-v-32cf5f82]{opacity:1;visibility:visible}.model-drawer[data-v-32cf5f82],.command-drawer[data-v-32cf5f82]{position:fixed;bottom:0;left:0;right:0;max-width:430px;margin:0 auto;background:#121212;border-radius:16px 16px 0 0;transform:translateY(100%);transition:transform .3s ease;z-index:1000;max-height:60vh;display:flex;flex-direction:column}.model-drawer.show[data-v-32cf5f82],.command-drawer.show[data-v-32cf5f82]{transform:translateY(0)}.drawer-header[data-v-32cf5f82]{padding:16px;border-bottom:1px solid #27272a;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.drawer-title[data-v-32cf5f82]{font-size:16px;font-weight:500;color:#f4f4f5}.drawer-close[data-v-32cf5f82]{width:32px;height:32px;border-radius:50%;background:#18191b;border:none;color:#84848a;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center}.command-list[data-v-32cf5f82]{flex:1;overflow-y:auto;padding:8px 0}.command-item[data-v-32cf5f82]{display:flex;align-items:center;padding:14px 16px;gap:12px;transition:background .2s;cursor:pointer}.command-item[data-v-32cf5f82]:active{background:#18191b}.command-item.active[data-v-32cf5f82]{background:#3b82f61a}.command-icon[data-v-32cf5f82]{width:40px;height:40px;background:#18191b;border-radius:10px;display:flex;align-items:center;justify-content:center;color:#3b82f6;flex-shrink:0}.command-item.active .command-icon[data-v-32cf5f82]{background:#3b82f6;color:#fff}.command-info[data-v-32cf5f82]{flex:1;min-width:0}.command-name[data-v-32cf5f82]{font-size:14px;font-weight:500;color:#f4f4f5;margin-bottom:4px}.command-desc[data-v-32cf5f82]{font-size:12px;color:#84848a}.message-bubble[data-v-32cf5f82] p{margin:0 0 10px}.message-bubble[data-v-32cf5f82] p:last-child{margin-bottom:0}.message-bubble[data-v-32cf5f82] code{background:#18191b;padding:2px 6px;border-radius:4px;font-family:monospace}.dialog-overlay[data-v-5af5fd68]{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;opacity:0;visibility:hidden;transition:all .3s;z-index:1000}.dialog-overlay.show[data-v-5af5fd68]{opacity:1;visibility:visible}.dialog-sheet[data-v-5af5fd68]{position:fixed;bottom:0;left:0;right:0;background:#121212;border-radius:16px 16px 0 0;transform:translateY(100%);transition:transform .3s ease;z-index:1001;max-width:430px;margin:0 auto}.dialog-sheet.show[data-v-5af5fd68]{transform:translateY(0)}.dialog-header[data-v-5af5fd68]{padding:16px;border-bottom:1px solid #27272a;display:flex;align-items:center;justify-content:space-between}.dialog-title[data-v-5af5fd68]{font-size:16px;font-weight:500;color:#f4f4f5}.dialog-close[data-v-5af5fd68]{width:32px;height:32px;border-radius:50%;background:#18191b;border:none;color:#84848a;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center}.dialog-body[data-v-5af5fd68]{padding:16px}.form-group[data-v-5af5fd68]{margin-bottom:16px}.form-group label[data-v-5af5fd68]{display:block;font-size:13px;color:#84848a;margin-bottom:6px}.form-input[data-v-5af5fd68]{width:100%;padding:10px 14px;background:#0a0a09;border:1px solid #27272a;border-radius:8px;color:#f4f4f5;font-size:14px;outline:none;box-sizing:border-box}.form-input[data-v-5af5fd68]:focus{border-color:#3b82f6}.form-text[data-v-5af5fd68]{color:#d4d4d8;font-size:14px;padding:10px 0}.dialog-actions[data-v-5af5fd68]{display:flex;gap:12px;padding:16px;border-top:1px solid #27272a}.dialog-actions button[data-v-5af5fd68]{flex:1;padding:12px;border-radius:8px;font-size:14px;cursor:pointer;border:none}.btn-cancel[data-v-5af5fd68]{background:#18191b;color:#d4d4d8}.btn-confirm[data-v-5af5fd68]{background:#3b82f6;color:#fff}.btn-confirm[data-v-5af5fd68]:disabled{background:#27272a;color:#52525b;cursor:not-allowed}.dev-workflow-view[data-v-9d2a2db4]{height:100%;display:flex;flex-direction:column;background:#0a0a09}.step-toolbar[data-v-9d2a2db4]{display:flex;justify-content:flex-end;padding:8px 16px;background:#121212;border-bottom:1px solid #27272a;flex-shrink:0}.btn-sub-scheme[data-v-9d2a2db4]{display:flex;align-items:center;gap:6px;padding:8px 16px;background:#22c55e;color:#fff;border:none;border-radius:6px;font-size:13px;cursor:pointer}.step-content[data-v-9d2a2db4]{flex:1;overflow:hidden}.status-bar[data-v-9d2a2db4]{padding:10px 16px;background:#121212;border-top:1px solid #27272a;font-size:12px;color:#84848a;text-align:center}
|