@@ -365,7 +365,8 @@ function M.on_message_updated(message, revert_index)
365365 end
366366
367367 if state .active_session .id ~= message .info .sessionID then
368- vim .notify (' Session id does not match, discarding message: ' .. vim .inspect (message ), vim .log .levels .WARN )
368+ --- @TODO This is probably a child session message, handle differently?
369+ -- vim.notify('Session id does not match, discarding message: ' .. vim.inspect(message), vim.log.levels.WARN)
369370 return
370371 end
371372
@@ -427,7 +428,8 @@ function M.on_part_updated(properties, revert_index)
427428 end
428429
429430 if state .active_session .id ~= part .sessionID then
430- vim .notify (' Session id does not match, discarding part: ' .. vim .inspect (part ), vim .log .levels .WARN )
431+ --- @TODO This is probably a child session part, handle differently?
432+ -- vim.notify('Session id does not match, discarding part: ' .. vim.inspect(part), vim.log.levels.WARN)
431433 return
432434 end
433435
@@ -477,7 +479,7 @@ function M.on_part_updated(properties, revert_index)
477479 M ._replace_part_in_buffer (part .id , formatted )
478480 end
479481
480- if part .type == ' file' and part .source and part .source . text then
482+ if ( part .type == ' file' or part .type == ' agent ' ) and part .source then
481483 -- we have a mention, we need to rerender the early part to highlight
482484 -- the mention.
483485 local text_part_id = M ._find_text_part_for_message (message )
0 commit comments