From ff14d44c014bd6a32dd7d599c23a18ed9e9ee2a4 Mon Sep 17 00:00:00 2001 From: jiangchen <1703935164@qq.com> Date: Tue, 1 Sep 2026 23:05:21 +0800 Subject: [PATCH] feat: add 4th swiper page (workspace/conversation selector) + richer message types (tool/error/plan/code/table) --- src/manifest.json | 3 ++- src/pages/index/index.ux | 55 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/src/manifest.json b/src/manifest.json index 88dddfd..f2da6c6 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -12,7 +12,8 @@ "features": [ { "name": "system.router" }, { "name": "system.interconnect" }, - { "name": "system.audio" } + { "name": "system.audio" }, + { "name": "system.storage" } ], "config": { "logLevel": "log", diff --git a/src/pages/index/index.ux b/src/pages/index/index.ux index 8863eac..c2ad13f 100644 --- a/src/pages/index/index.ux +++ b/src/pages/index/index.ux @@ -3,6 +3,19 @@ + +
+ 选择对话 + DeepSeek_Harness_Watch +
小米手环10 Pro远程控制
+
DSHWatch 验收
+ reactor +
任务-001
+
任务-002
+ truestudio.online +
评估-今天
+
+
@@ -103,6 +116,7 @@
+
@@ -184,7 +198,7 @@ function playDuckSound() { export default { private: { - currentIndex: 1, + currentIndex: 2, messages: [ { role:'user', text:'帮我看看今天有什么任务', preview:'', think:null, kind:'normal', showThink:false, collapsed:false }, { role:'assistant', text:'好的,今天三件事:1) 回复 DSHWatch 进度;2) 调整手环 UI;3) 准备部署。', preview:'好的,今天三件事:1) 回复 DSHWatch 进度;2) 调整手环…', think:'正在从工作区任务列表整理,并对比上次状态…', kind:'normal', showThink:true, collapsed:true }, @@ -196,7 +210,13 @@ export default { { role:'user', text:'帮我生成一张手环 UI 草图', preview:'', think:null, kind:'normal', showThink:false, collapsed:false }, { role:'assistant', text:'生成了一张「手表主界面」草图,点击可放大。', preview:'生成了一张「手表主界面」草图…', think:'正在渲染图像…', kind:'image', showThink:true, collapsed:false }, { role:'assistant', text:'另外建议把左边做成对话流、右边放设置,中间吉祥物可交互——这样最贴合你说的“把 Harness 串流过来”。', preview:'另外建议把左边做成对话流、右边放设置…', think:'正在思考布局建议…', kind:'normal', showThink:true, collapsed:true }, - { role:'system', text:'会话已切换工作区:reactor', preview:'', think:null, kind:'normal', showThink:false, collapsed:false } + { role:'system', text:'会话已切换工作区:reactor', preview:'', think:null, kind:'normal', showThink:false, collapsed:false }, + { role:'assistant', text:'正在调用工具 bash 执行 npm run build…', preview:'正在调用工具 bash…', think:null, kind:'tool', tag:'🔧 工具调用', showThink:false, collapsed:true }, + { role:'assistant', text:'构建失败:UxLoader 错误,缺少 system.storage 特性。', preview:'构建失败:UxLoader 错误…', think:null, kind:'error', tag:'❌ 错误', showThink:false, collapsed:false }, + { role:'assistant', text:'方案一:三页结构;方案二:四页+浮动层。', preview:'方案一:三页结构;方案二:四页+浮动层…', think:'正在比较两种布局…', kind:'plan', tag:'🧭 计划', showThink:true, collapsed:true }, + { role:'assistant', text:'const a = 1;\nconsole.log(a);', preview:'const a = 1;…', think:null, kind:'code', tag:'💻 代码', showThink:false, collapsed:true }, + { role:'assistant', text:'模型 | 价格 | 状态\nFlash | 0.1 | 可用', preview:'模型 | 价格 | 状态…', think:null, kind:'table', tag:'📊 表格', showThink:false, collapsed:true }, + { role:'assistant', text:'「把 Harness 串流过来」这个目标,建议先做最小闭环。', preview:'「把 Harness 串流过来」…', think:null, kind:'normal', showThink:false, collapsed:true } ], workspaces: [ { name:'DeepSeek_Harness_Watch', conversations:['小米手环10 Pro远程控制','DSHWatch 验收'] }, @@ -300,6 +320,12 @@ export default { this.showSelect = false }, + selectConv(name) { + this.currentConv = name + this.currentIndex = 1 + this.showSelect = false + }, + toggleThink(index) { const m = this.messages[index] if (m) m.showThink = !m.showThink @@ -999,4 +1025,29 @@ export default { background-color: #33b4ff; color: #08131f; } + +.ws-name { + color: #9db3d8; + font-size: 15px; + font-weight: bold; + margin-top: 10px; + margin-bottom: 4px; +} + +.sel-conv { + width: 100%; + min-height: 40px; + flex-direction: row; + justify-content: flex-start; + align-items: center; + padding: 6px 10px; + border-radius: 10px; + background-color: #152238; + margin-bottom: 6px; +} + +.sel-conv text { + color: #e6f0ff; + font-size: 16px; +}