@@ -12,19 +12,23 @@ function M.tool_action_line(part, status, utils)
1212 local metadata = part .state and part .state .metadata or {}
1313 local formatter = tool_formatters [tool ] or tool_formatters .tool
1414 local summary = formatter .summary or tool_formatters .tool .summary
15- local icon_name , tool_label , tool_value = summary (part , input , metadata )
15+ local icon , tool_label , tool_value = summary (part , input , metadata )
16+
1617 if status ~= ' completed' then
17- icon_name = status
18+ icon = icons . get ( status )
1819 end
1920
20- local icon = icons .get (icon_name )
2121 return utils .build_action_line (icon , tool_label or tool or ' tool' , tool_value )
2222end
2323
2424--- @param output Output
2525--- @param part OpencodeMessagePart
2626--- @param get_child_parts ? fun ( session_id : string ): OpencodeMessagePart[] ?
2727function M .format (output , part , get_child_parts )
28+ if part .tool ~= ' task' then
29+ return
30+ end
31+
2832 local input = part .state and part .state .input or {}
2933 local metadata = part .state and part .state .metadata or {}
3034 local tool_output = part .state and part .state .output or ' '
8488--- @param input TaskToolInput
8589--- @return string , string , string
8690function M .summary (_ , input )
87- return ' task' , ' task' , input .description or ' '
91+ return icons . get ( ' task' ) , ' task' , input .description or ' '
8892end
8993
9094return M
0 commit comments