feat: merge hidden-user turns and move message metadata to turn footer
- Remove assistant message headers; show provider icon, model, agent, thinking variant, duration and time in the turn footer (metadata left, hover-revealed actions right) - Merge turns started by hidden user messages (subagent nudges) into the previous turn so Activity, footer and spacing stay continuous - Treat compaction summary text (info.summary) as justification activity in sorted mode and skip it when picking the turn summary - Interleave activity segments with standalone tool rows so Agent Task sits chronologically between activity sections
This commit is contained in:
@@ -19,6 +19,7 @@ type BuildLiveStreamingEntryOptions = {
|
||||
liveParts: Part[];
|
||||
showTextJustificationActivity: boolean;
|
||||
showTurnChangedFiles: boolean;
|
||||
mergeHiddenUserTurns?: { planModeEnabled: boolean };
|
||||
};
|
||||
|
||||
const withLiveParts = (
|
||||
@@ -69,9 +70,21 @@ export const buildLiveStreamingEntry = <TEntry extends StreamingTailEntry>(
|
||||
return entry;
|
||||
}
|
||||
|
||||
const projection = projectTurnRecords([entry.turn.userMessage, ...assistantMessages], {
|
||||
// Re-project from the turn's full ordered message records (not just
|
||||
// userMessage + assistants) so hidden user messages merged into this turn
|
||||
// keep parenting their assistant replies.
|
||||
const liveMessageById = new Map(assistantMessages.map((message) => [message.info.id, message]));
|
||||
const sourceMessages = entry.turn.messages.length > 0
|
||||
? entry.turn.messages
|
||||
.slice()
|
||||
.sort((left, right) => left.order - right.order)
|
||||
.map((record) => liveMessageById.get(record.messageId) ?? record.message)
|
||||
: [entry.turn.userMessage, ...assistantMessages];
|
||||
|
||||
const projection = projectTurnRecords(sourceMessages, {
|
||||
showTextJustificationActivity: options.showTextJustificationActivity,
|
||||
showTurnChangedFiles: options.showTurnChangedFiles,
|
||||
mergeHiddenUserTurns: options.mergeHiddenUserTurns,
|
||||
});
|
||||
const turn = projection.turns[0] ?? {
|
||||
...entry.turn,
|
||||
|
||||
Reference in New Issue
Block a user