@@ -28,6 +28,8 @@ import { buildConversationMarkdown } from "../utils/chatTranscript";
2828// v0.16.1:任务对话化——对话内发起任务(按钮 + '/' 命令)+ 线程任务卡 + 追问预填
2929import TaskLaunchDialog , { type LaunchTargetRow } from "../components/TaskLaunchDialog" ;
3030import TaskThreadCard from "../components/TaskThreadCard" ;
31+ // 批 4 T13-b(B7):发起工具条拆件到 components/chat/(本页 599/600 贴边,动它必须先拆)
32+ import ChatLaunchMenu from "../components/chat/ChatLaunchMenu" ;
3133import { buildTaskFollowUpPrompt } from "../utils/taskFollowUp" ;
3234// 2026-09-09 批 1:任务标题统一按类别解析(taskRefLabel——笔记级精修
3335// ref_id=笔记 id,仅按 opType 会错查会话标题表;enrich 恒笔记级)
@@ -88,7 +90,6 @@ export default function ChatPage(props: Props) {
8890 const [ noteGroups , setNoteGroups ] = useState < NoteGroup [ ] > ( [ ] ) ;
8991 const [ saveDialog , setSaveDialog ] = useState < { initialTitle : string ; content : string } | null > ( null ) ;
9092 // v0.16.1:任务对话化——发起面板(工具条下拉)/ 启动对话框 / 目标清单
91- const [ launchMenuOpen , setLaunchMenuOpen ] = useState ( false ) ;
9293 const [ launchDialog , setLaunchDialog ] = useState < "refine" | "enrich" | null > ( null ) ;
9394 const [ launchTargetId , setLaunchTargetId ] = useState < number | null > ( null ) ;
9495 const [ sessionRows , setSessionRows ] = useState < LaunchTargetRow [ ] > ( [ ] ) ;
@@ -229,7 +230,6 @@ export default function ChatPage(props: Props) {
229230 const onTaskLaunched = useCallback ( ( taskId : number ) => {
230231 setLaunchDialog ( null ) ;
231232 setLaunchTargetId ( null ) ;
232- setLaunchMenuOpen ( false ) ;
233233 void reloadTasks ( ) ;
234234 // 启动后切到任务对话视图(进度/轨迹即时可见;聊天视图内有同款线程卡)
235235 void selectTask ( taskId ) ;
@@ -488,31 +488,10 @@ export default function ChatPage(props: Props) {
488488 { /* 内容区 */ }
489489 { activeChatId !== null && activeSession && (
490490 < >
491- { /* v0.16.1:任务对话化——发起工具条(按钮)/ '-' 命令同义 */ }
491+ { /* v0.16.1:任务对话化——发起工具条(按钮)/ '/' 命令同义。
492+ 批 4 T13-b:菜单(含透明点击层与锚定面板)已拆到 ChatLaunchMenu。 */ }
492493 < div style = { { display : "flex" , alignItems : "center" , gap : 6 , padding : "0 16px" , flexShrink : 0 } } >
493- < div style = { { position : "relative" } } >
494- < button
495- data-testid = "task-launch-open"
496- onClick = { ( ) => setLaunchMenuOpen ( ( v ) => ! v ) }
497- style = { { fontSize : 12 , cursor : "pointer" , padding : "3px 10px" , borderRadius : 6 , border : "1px solid #d1d5db" , background : "#fff" , color : "#374151" } }
498- title = "在对话中发起 AI 任务(也支持 '/refine' '/enrich')"
499- >
500- ✨ 发起任务 ▾
501- </ button >
502- { launchMenuOpen && (
503- < >
504- < div onClick = { ( ) => setLaunchMenuOpen ( false ) } style = { { position : "fixed" , inset : 0 , zIndex : 30 , background : "transparent" } } />
505- < div data-testid = "task-launch-menu" data-app-menu = "" style = { { position : "absolute" , top : "100%" , left : 0 , zIndex : 31 , background : "#fff" , border : "1px solid #e5e7eb" , borderRadius : 6 , padding : 4 , boxShadow : "0 4px 12px rgba(0,0,0,0.12)" , minWidth : 180 } } >
506- < button data-testid = "task-launch-refine" style = { { display : "block" , width : "100%" , textAlign : "left" , border : "none" , background : "none" , borderRadius : 6 , padding : "6px 10px" , fontSize : 12.5 , cursor : "pointer" , color : "#374151" } } onClick = { ( ) => { setLaunchDialog ( "refine" ) ; setLaunchTargetId ( null ) ; setLaunchMenuOpen ( false ) ; } } >
507- ✨ AI 精修(会话 → 精修成笔记)
508- </ button >
509- < button data-testid = "task-launch-enrich" style = { { display : "block" , width : "100%" , textAlign : "left" , border : "none" , background : "none" , borderRadius : 6 , padding : "6px 10px" , fontSize : 12.5 , cursor : "pointer" , color : "#374151" } } onClick = { ( ) => { setLaunchDialog ( "enrich" ) ; setLaunchTargetId ( null ) ; setLaunchMenuOpen ( false ) ; } } >
510- 📚 AI 知识补充(笔记 → 补外部知识)
511- </ button >
512- </ div >
513- </ >
514- ) }
515- </ div >
494+ < ChatLaunchMenu onLaunch = { ( kind ) => { setLaunchDialog ( kind ) ; setLaunchTargetId ( null ) ; } } />
516495 < span style = { { fontSize : 11 , color : "#9ca3af" } } > 试试 '/refine' '/enrich' 快捷命令</ span >
517496 </ div >
518497 { /* v0.16.1:线程任务卡(进行中实时 + 完成可追问);v0.17.0 精修
0 commit comments