@@ -643,7 +643,8 @@ define(function (require, exports, module) {
643643 "mcp__phoenix-editor__resizeLivePreview" : { icon : "fa-solid fa-arrows-left-right" , color : "#66bb6a" , label : Strings . AI_CHAT_TOOL_RESIZE_PREVIEW } ,
644644 "mcp__phoenix-editor__wait" : { icon : "fa-solid fa-hourglass-half" , color : "#adb9bd" , label : Strings . AI_CHAT_TOOL_WAIT } ,
645645 TodoWrite : { icon : "fa-solid fa-list-check" , color : "#66bb6a" , label : Strings . AI_CHAT_TOOL_TASKS } ,
646- AskUserQuestion : { icon : "fa-solid fa-circle-question" , color : "#66bb6a" , label : Strings . AI_CHAT_TOOL_QUESTION }
646+ AskUserQuestion : { icon : "fa-solid fa-circle-question" , color : "#66bb6a" , label : Strings . AI_CHAT_TOOL_QUESTION } ,
647+ Task : { icon : "fa-solid fa-diagram-project" , color : "#6b9eff" , label : Strings . AI_CHAT_TOOL_TASK }
647648 } ;
648649
649650 function _onProgress ( _event , data ) {
@@ -1542,6 +1543,17 @@ define(function (require, exports, module) {
15421543 $tool . find ( ".ai-tool-header" ) . on ( "click" , function ( ) {
15431544 $tool . toggleClass ( "ai-tool-expanded" ) ;
15441545 } ) . css ( "cursor" , "pointer" ) ;
1546+ } else if ( toolName === "Task" && toolInput ) {
1547+ const $detail = $ ( '<div class="ai-tool-detail"></div>' ) ;
1548+ const desc = toolInput . description || toolInput . prompt || "" ;
1549+ if ( desc ) {
1550+ $detail . append ( $ ( '<div class="ai-tool-detail-line"></div>' ) . text ( desc . slice ( 0 , 200 ) ) ) ;
1551+ }
1552+ $tool . append ( $detail ) ;
1553+ $tool . addClass ( "ai-tool-expanded" ) ;
1554+ $tool . find ( ".ai-tool-header" ) . on ( "click" , function ( ) {
1555+ $tool . toggleClass ( "ai-tool-expanded" ) ;
1556+ } ) . css ( "cursor" , "pointer" ) ;
15451557 } else if ( detail . lines && detail . lines . length ) {
15461558 // Add expandable detail if available
15471559 const $detail = $ ( '<div class="ai-tool-detail"></div>' ) ;
@@ -1674,6 +1686,17 @@ define(function (require, exports, module) {
16741686 lines : qs . map ( function ( q ) { return q . question ; } )
16751687 } ;
16761688 }
1689+ case "Task" : {
1690+ const desc = input . description || input . prompt || "" ;
1691+ const agentType = input . subagent_type || "" ;
1692+ const summary = agentType
1693+ ? StringUtils . format ( Strings . AI_CHAT_TOOL_TASK_NAME , agentType )
1694+ : Strings . AI_CHAT_TOOL_TASK ;
1695+ return {
1696+ summary : summary ,
1697+ lines : desc ? [ desc . split ( "\n" ) [ 0 ] . slice ( 0 , 120 ) ] : [ ]
1698+ } ;
1699+ }
16771700 case "TodoWrite" : {
16781701 const todos = input . todos || [ ] ;
16791702 const completed = todos . filter ( function ( t ) { return t . status === "completed" ; } ) . length ;
0 commit comments