@sideboard-ai/core 0.1.238 → 0.1.240

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.
@@ -44,7 +44,7 @@ import {
44
44
  resolveLoginCommand,
45
45
  resolveQuotaFallbackAgent,
46
46
  whichOnPath
47
- } from "./chunk-K6UTJOE6.js";
47
+ } from "./chunk-QXYWLO6W.js";
48
48
  import "./chunk-BILEJG3V.js";
49
49
  import "./chunk-O3UAQAYA.js";
50
50
  import "./chunk-6K64FJDD.js";
@@ -53,7 +53,7 @@ import {
53
53
  resolveQuotaFallbackAgent,
54
54
  turnCostUsdFromCursorUsage,
55
55
  whichOnPath
56
- } from "./chunk-WRUBICEF.js";
56
+ } from "./chunk-3Q4PVZ3U.js";
57
57
  import "./chunk-OKHOYI53.js";
58
58
  import "./chunk-J5GON4SU.js";
59
59
  import "./chunk-P2BSMNHB.js";
@@ -1689,12 +1689,14 @@ function skillCommandFromInput(input) {
1689
1689
  }
1690
1690
  return void 0;
1691
1691
  }
1692
+ function looksLikeComposerSkillExpansion(text) {
1693
+ const t = text.trim();
1694
+ return /^## Skill: \//m.test(t) && /Follow this skill for the request above:/i.test(t);
1695
+ }
1692
1696
  function looksLikeSkillBody(text) {
1693
1697
  const t = text.trim();
1694
1698
  if (!t) return false;
1695
- if (/^## Skill: \//m.test(t) && /Follow this skill for the request above:/i.test(t)) {
1696
- return true;
1697
- }
1699
+ if (looksLikeComposerSkillExpansion(t)) return true;
1698
1700
  return skillNameFromFrontmatter(t) != null;
1699
1701
  }
1700
1702
  function skillNameFromFrontmatter(text) {
@@ -1715,11 +1717,13 @@ function isCompactToolName(name) {
1715
1717
  short
1716
1718
  );
1717
1719
  }
1718
- function isContextCompactInProgress(text) {
1719
- return /^Compressing context/i.test(text.trim());
1720
- }
1721
1720
  function isContextCompactDone(text) {
1722
- return /^Context compressed\b/i.test(text.trim());
1721
+ return /\bContext compressed\b/i.test(text.trim());
1722
+ }
1723
+ function isContextCompactInProgress(text) {
1724
+ const t = text.trim();
1725
+ if (isContextCompactDone(t)) return false;
1726
+ return /^Compressing context/i.test(t);
1723
1727
  }
1724
1728
  function looksLikeConversationSummary(text) {
1725
1729
  const t = text.trim();
@@ -2146,7 +2150,7 @@ function applyAgentEvent(parts, event) {
2146
2150
  );
2147
2151
  }
2148
2152
  const acc = next[next.length - 1];
2149
- if (acc?.type === "text" && looksLikeSkillBody(acc.text)) {
2153
+ if (acc?.type === "text" && looksLikeComposerSkillExpansion(acc.text)) {
2150
2154
  next[next.length - 1] = skillToolFromTextPart(acc, `skill-${next.length}`);
2151
2155
  } else if (acc?.type === "text" && looksLikeConversationSummary(acc.text)) {
2152
2156
  next[next.length - 1] = compactToolPart(acc.text, `compact-${next.length}`, {
@@ -2742,7 +2746,8 @@ function eventsFromClaudeSystem(obj) {
2742
2746
  const trigger = meta.trigger ? ` (${meta.trigger})` : "";
2743
2747
  const thinking = {
2744
2748
  type: "thinking",
2745
- data: `Context compressed${trigger}`
2749
+ data: `Context compressed${trigger}`,
2750
+ replace: true
2746
2751
  };
2747
2752
  if (meta.postTokens != null && meta.postTokens > 0) {
2748
2753
  return [