feat: make context compaction visible in channels (#5656)
* feat: surface context compaction lifecycle * fix: complete and simplify context compaction notifications
This commit is contained in:
1 parent
455533169d
commit
5229989f28
52 files changed
+1849
-140
No files matched your search
@@ -39,6 +39,16 @@ export function assistantForkFlags(units: DisplayUnit[]): boolean[] {
|
||||
hasLaterUnitBeforeUser = false;
|
||||
continue;
|
||||
}
|
||||
if (
|
||||
unit.type === "message"
|
||||
&& unit.message.role === "assistant"
|
||||
&& unit.message.kind === "compaction"
|
||||
) {
|
||||
// Compaction notices are session lifecycle markers, not assistant answers.
|
||||
// They must neither expose nor displace the answer-level fork action.
|
||||
flags[i] = false;
|
||||
continue;
|
||||
}
|
||||
if (unit.type === "message" && unit.message.role === "assistant") {
|
||||
flags[i] = !hasLaterUnitBeforeUser;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user