@springbrand/message-panel 0.3.0-alpha.5 → 0.3.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -745,6 +745,25 @@ function markFinalTextBlocks(entries: CloudOsEntry[]): CloudOsEntry[] {
745
745
  return entries.map((entry) => {
746
746
  if (entry.type !== "assistant") return entry;
747
747
 
748
+ // suggest_followups is the UI boundary: narration before it is work,
749
+ // while text after it is the one final answer.
750
+ const followupsBoundary = entry.blocks.findLastIndex(
751
+ (block) => block.kind === "suggestions",
752
+ );
753
+ if (
754
+ followupsBoundary !== -1 &&
755
+ entry.blocks.slice(followupsBoundary + 1).some((block) => block.kind === "text")
756
+ ) {
757
+ return {
758
+ ...entry,
759
+ blocks: entry.blocks.map((block, index) =>
760
+ block.kind === "text"
761
+ ? { ...block, final: index > followupsBoundary }
762
+ : block,
763
+ ),
764
+ };
765
+ }
766
+
748
767
  const finalOutputBoundary = entry.blocks.findLastIndex(isFinalOutputBlock);
749
768
  // Provider cleanup after final output must not pull the answer back into Work.
750
769
  const searchBefore = finalOutputBoundary === -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@springbrand/message-panel",
3
- "version": "0.3.0-alpha.5",
3
+ "version": "0.3.0-alpha.6",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src",