@@ -348,16 +348,34 @@ export class SidebarProvider implements vscode.WebviewViewProvider {
348348 const bugs = ( report . bugs as Array < Record < string , unknown > > ) || [ ] ;
349349 if ( bugs . length > 0 ) {
350350 bugs . forEach ( ( bug , i ) => {
351+ const cat = ( bug . category as string ) || "" ;
351352 const step = bug . step_number ? ` (步骤#${ bug . step_number } )` : "" ;
352- lines . push ( `${ i + 1 } . [${ ( bug . severity as string || "medium" ) . toUpperCase ( ) } ] ${ bug . title } ${ step } ` ) ;
353+ lines . push ( `${ i + 1 } . [${ ( bug . severity as string || "medium" ) . toUpperCase ( ) } ] ${ cat ? cat + " " : "" } ${ bug . title } ${ step } ` ) ;
353354 if ( bug . description ) {
354- lines . push ( ` ${ ( bug . description as string ) . split ( "\n" ) [ 0 ] . substring ( 0 , 150 ) } ` ) ;
355+ // 包含修复建议时多显示几行
356+ const desc = bug . description as string ;
357+ const firstLine = desc . split ( "\n" ) [ 0 ] . substring ( 0 , 150 ) ;
358+ lines . push ( ` ${ firstLine } ` ) ;
359+ if ( desc . includes ( "💡 修复建议" ) ) {
360+ const suggestion = desc . split ( "💡 修复建议" ) [ 1 ] ;
361+ if ( suggestion ) {
362+ lines . push ( ` 💡 修复建议${ suggestion . split ( "\n" ) [ 0 ] . substring ( 0 , 150 ) } ` ) ;
363+ }
364+ }
355365 }
356366 } ) ;
357367 } else {
358368 lines . push ( ( report . report_markdown as string || "" ) . substring ( 0 , 1000 ) ) ;
359369 }
360- lines . push ( "" , "请根据以上Bug修复代码,修复后调用 run_blueprint_test 重新测试验证。" ) ;
370+ lines . push (
371+ "" ,
372+ "⚠️ 重要:每个Bug的category标签说明了错误归因:" ,
373+ "- [应用Bug]:被测应用代码有问题,请修复应用代码" ,
374+ "- [蓝本问题]:testpilot.json蓝本写错了(选择器错、动作类型错等),请修正蓝本文件" ,
375+ "- 无标签:需要你自行判断是应用问题还是蓝本问题" ,
376+ "" ,
377+ "请逐个修复以上Bug(蓝本错改蓝本,应用错改应用),修复后调用 run_blueprint_test 重新测试,直到全部通过为止。" ,
378+ ) ;
361379 return lines . join ( "\n" ) ;
362380 }
363381
0 commit comments