@opengsd/gsd-pi 1.1.1-dev.3ea310e → 1.1.1-dev.74e8dd1
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.
- package/dist/resources/.managed-resources-content-hash +1 -1
- package/dist/resources/extensions/gsd/auto/phases.js +4 -3
- package/dist/resources/extensions/gsd/auto-dashboard.js +15 -4
- package/dist/resources/extensions/gsd/auto-post-unit.js +111 -5
- package/dist/resources/extensions/gsd/auto-prompts.js +9 -0
- package/dist/resources/extensions/gsd/auto-start.js +41 -12
- package/dist/resources/extensions/gsd/auto-unit-tool-scope.js +2 -1
- package/dist/resources/extensions/gsd/auto.js +3 -3
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +79 -0
- package/dist/resources/extensions/gsd/bootstrap/exec-tools.js +43 -0
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +30 -9
- package/dist/resources/extensions/gsd/bootstrap/write-gate.js +16 -10
- package/dist/resources/extensions/gsd/commands/handlers/core.js +1 -1
- package/dist/resources/extensions/gsd/commands-prefs-wizard.js +3 -1
- package/dist/resources/extensions/gsd/commands-verdict.js +1 -1
- package/dist/resources/extensions/gsd/config-overlay.js +2 -1
- package/dist/resources/extensions/gsd/error-classifier.js +2 -1
- package/dist/resources/extensions/gsd/exec-sandbox.js +2 -0
- package/dist/resources/extensions/gsd/prompts/run-uat.md +10 -4
- package/dist/resources/extensions/gsd/prompts/system.md +3 -1
- package/dist/resources/extensions/gsd/safety/destructive-guard.js +3 -0
- package/dist/resources/extensions/gsd/skill-activation.js +20 -3
- package/dist/resources/extensions/gsd/state-reconciliation/drift/roadmap.js +18 -1
- package/dist/resources/extensions/gsd/state-reconciliation/index.js +6 -0
- package/dist/resources/extensions/gsd/state.js +1 -1
- package/dist/resources/extensions/gsd/tools/exec-tool.js +109 -0
- package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +366 -3
- package/dist/resources/extensions/gsd/unit-context-manifest.js +8 -3
- package/dist/resources/extensions/gsd/validation-block-guard.js +2 -0
- package/dist/resources/extensions/gsd/workflow-mcp-auto-prep.js +1 -1
- package/dist/resources/extensions/gsd/workflow-mcp.js +5 -1
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +6 -6
- package/dist/web/standalone/.next/build-manifest.json +2 -2
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +6 -6
- package/dist/web/standalone/.next/server/chunks/8357.js +1 -1
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/package.json +2 -2
- package/packages/cloud-mcp-gateway/package.json +2 -2
- package/packages/contracts/dist/workflow.d.ts +14 -0
- package/packages/contracts/dist/workflow.d.ts.map +1 -1
- package/packages/contracts/dist/workflow.js +16 -0
- package/packages/contracts/dist/workflow.js.map +1 -1
- package/packages/contracts/package.json +1 -1
- package/packages/daemon/package.json +4 -4
- package/packages/gsd-agent-core/package.json +5 -5
- package/packages/gsd-agent-modes/dist/modes/interactive/components/settings-selector.d.ts +2 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/settings-selector.js +10 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.d.ts +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.js +69 -31
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-class-constants.d.ts +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-class-constants.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-class-constants.js +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-class-constants.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.js +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-settings.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-settings.js +5 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-settings.js.map +1 -1
- package/packages/gsd-agent-modes/package.json +7 -7
- package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.js +82 -0
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/package.json +3 -3
- package/packages/native/package.json +1 -1
- package/packages/pi-agent-core/package.json +1 -1
- package/packages/pi-ai/dist/image-models.generated.d.ts +15 -0
- package/packages/pi-ai/dist/image-models.generated.d.ts.map +1 -1
- package/packages/pi-ai/dist/image-models.generated.js +15 -0
- package/packages/pi-ai/dist/image-models.generated.js.map +1 -1
- package/packages/pi-ai/dist/models.generated.d.ts +35 -1
- package/packages/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.generated.js +53 -19
- package/packages/pi-ai/dist/models.generated.js.map +1 -1
- package/packages/pi-ai/package.json +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +3 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js +11 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/packages/pi-coding-agent/package.json +7 -7
- package/packages/pi-tui/dist/terminal.d.ts +1 -0
- package/packages/pi-tui/dist/terminal.d.ts.map +1 -1
- package/packages/pi-tui/dist/terminal.js +8 -4
- package/packages/pi-tui/dist/terminal.js.map +1 -1
- package/packages/pi-tui/package.json +1 -1
- package/packages/rpc-client/package.json +2 -2
- package/pkg/package.json +1 -1
- package/src/resources/extensions/gsd/auto/phases.ts +5 -3
- package/src/resources/extensions/gsd/auto-dashboard.ts +16 -4
- package/src/resources/extensions/gsd/auto-post-unit.ts +136 -5
- package/src/resources/extensions/gsd/auto-prompts.ts +9 -0
- package/src/resources/extensions/gsd/auto-start.ts +54 -14
- package/src/resources/extensions/gsd/auto-unit-tool-scope.ts +2 -1
- package/src/resources/extensions/gsd/auto.ts +3 -2
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +86 -0
- package/src/resources/extensions/gsd/bootstrap/exec-tools.ts +51 -0
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +51 -14
- package/src/resources/extensions/gsd/bootstrap/write-gate.ts +21 -10
- package/src/resources/extensions/gsd/commands/handlers/core.ts +1 -1
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +4 -1
- package/src/resources/extensions/gsd/commands-verdict.ts +1 -1
- package/src/resources/extensions/gsd/config-overlay.ts +3 -1
- package/src/resources/extensions/gsd/error-classifier.ts +2 -1
- package/src/resources/extensions/gsd/exec-sandbox.ts +4 -0
- package/src/resources/extensions/gsd/preferences-types.ts +1 -1
- package/src/resources/extensions/gsd/prompts/run-uat.md +10 -4
- package/src/resources/extensions/gsd/prompts/system.md +3 -1
- package/src/resources/extensions/gsd/safety/destructive-guard.ts +3 -0
- package/src/resources/extensions/gsd/skill-activation.ts +20 -2
- package/src/resources/extensions/gsd/state-reconciliation/drift/roadmap.ts +20 -0
- package/src/resources/extensions/gsd/state-reconciliation/index.ts +6 -0
- package/src/resources/extensions/gsd/state-reconciliation/types.ts +1 -0
- package/src/resources/extensions/gsd/state.ts +1 -1
- package/src/resources/extensions/gsd/tests/auto-dashboard.test.ts +51 -0
- package/src/resources/extensions/gsd/tests/auto-start-orphan-bootstrap.test.ts +16 -3
- package/src/resources/extensions/gsd/tests/commands-dispatcher-validation-block.test.ts +38 -3
- package/src/resources/extensions/gsd/tests/commands-verdict.test.ts +6 -2
- package/src/resources/extensions/gsd/tests/derive-state-db.test.ts +8 -0
- package/src/resources/extensions/gsd/tests/derive-state-helpers.test.ts +8 -0
- package/src/resources/extensions/gsd/tests/exec-sandbox.test.ts +18 -0
- package/src/resources/extensions/gsd/tests/exec-tool.test.ts +69 -0
- package/src/resources/extensions/gsd/tests/parallel-skill-prompt-integration.test.ts +54 -7
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +10 -0
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +18 -1
- package/src/resources/extensions/gsd/tests/reactive-executor.test.ts +36 -0
- package/src/resources/extensions/gsd/tests/register-hooks-depth-verification.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/restore-tools-after-discuss.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/skill-activation.test.ts +55 -0
- package/src/resources/extensions/gsd/tests/state-reconciliation-drift.test.ts +52 -0
- package/src/resources/extensions/gsd/tests/token-tool-gating.test.ts +84 -10
- package/src/resources/extensions/gsd/tests/tool-naming.test.ts +12 -2
- package/src/resources/extensions/gsd/tests/tui-header-lifecycle.test.ts +29 -6
- package/src/resources/extensions/gsd/tests/unit-context-manifest.test.ts +29 -6
- package/src/resources/extensions/gsd/tests/validation-block-guard.test.ts +21 -0
- package/src/resources/extensions/gsd/tests/workflow-mcp-auto-prep.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/workflow-tool-executors.test.ts +83 -0
- package/src/resources/extensions/gsd/tests/write-gate-planning-unit.test.ts +25 -0
- package/src/resources/extensions/gsd/tools/exec-tool.ts +130 -0
- package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +440 -2
- package/src/resources/extensions/gsd/unit-context-manifest.ts +14 -5
- package/src/resources/extensions/gsd/validation-block-guard.ts +2 -0
- package/src/resources/extensions/gsd/workflow-mcp-auto-prep.ts +1 -1
- package/src/resources/extensions/gsd/workflow-mcp.ts +5 -1
- /package/dist/web/standalone/.next/static/{xACmObbrDjwLriepRgaa9 → eRWf-RI9bzbrwEurm_3uI}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{xACmObbrDjwLriepRgaa9 → eRWf-RI9bzbrwEurm_3uI}/_ssgManifest.js +0 -0
|
@@ -20,6 +20,9 @@ let orphanedSegments = [];
|
|
|
20
20
|
// Invocation matching only reconciles IDs reported by different event streams.
|
|
21
21
|
// Same-source identical invocations are separate concurrent tool calls.
|
|
22
22
|
const toolRegistrationSources = new WeakMap();
|
|
23
|
+
const PROVISIONAL_PRE_TOOL_ACTIONS = "check|inspect|look(?:\\s+into)?|read|open|search|grep|scan|run|verify|test|trace|review|investigate|reproduce|use|gather|find|pull|query|take a look|update|patch|edit|change|modify|write|create|add|remove|apply";
|
|
24
|
+
const FIRST_PERSON_PROVISIONAL_PRE_TOOL_RE = new RegExp(`^(?:i(?:'ll| will)|i(?:'m| am) going to|let me|i need to)\\s+(?:${PROVISIONAL_PRE_TOOL_ACTIONS})\\b`, "i");
|
|
25
|
+
const GERUND_PROVISIONAL_PRE_TOOL_RE = /^(?:checking|inspecting|reading|searching|running|verifying|testing|tracing|reviewing|investigating|scanning|updating|patching|editing|writing|creating|applying)\b/i;
|
|
23
26
|
function findPendingToolByInvocation(pendingTools, toolName, args, source) {
|
|
24
27
|
let fallback;
|
|
25
28
|
for (const component of pendingTools.values()) {
|
|
@@ -244,6 +247,64 @@ function buildDesiredSegments(blocks, options = {}) {
|
|
|
244
247
|
closeRun();
|
|
245
248
|
return desired;
|
|
246
249
|
}
|
|
250
|
+
function isToolUseBlock(block) {
|
|
251
|
+
return block?.type === "toolCall" || block?.type === "serverToolUse";
|
|
252
|
+
}
|
|
253
|
+
function isMcpToolBlock(block) {
|
|
254
|
+
if (!isToolUseBlock(block))
|
|
255
|
+
return false;
|
|
256
|
+
const toolName = typeof block?.name === "string" ? block.name : "";
|
|
257
|
+
return typeof block?.mcpServer === "string" || toolName.startsWith("mcp__");
|
|
258
|
+
}
|
|
259
|
+
function hasPostToolText(blocks, firstToolIdx) {
|
|
260
|
+
if (firstToolIdx < 0)
|
|
261
|
+
return false;
|
|
262
|
+
return blocks.some((b, idx) => (idx > firstToolIdx
|
|
263
|
+
&& b?.type === "text"
|
|
264
|
+
&& typeof b?.text === "string"
|
|
265
|
+
&& b.text.trim().length > 0));
|
|
266
|
+
}
|
|
267
|
+
function normalizeProvisionalText(text) {
|
|
268
|
+
return text
|
|
269
|
+
.trim()
|
|
270
|
+
.replace(/[’`]/g, "'")
|
|
271
|
+
.replace(/\s+/g, " ");
|
|
272
|
+
}
|
|
273
|
+
export function isProvisionalPreToolProse(text) {
|
|
274
|
+
const normalized = normalizeProvisionalText(text);
|
|
275
|
+
if (!normalized)
|
|
276
|
+
return false;
|
|
277
|
+
if (textInvitesUserReply(normalized))
|
|
278
|
+
return false;
|
|
279
|
+
if (/\?\s*$/.test(normalized))
|
|
280
|
+
return false;
|
|
281
|
+
return FIRST_PERSON_PROVISIONAL_PRE_TOOL_RE.test(normalized)
|
|
282
|
+
|| GERUND_PROVISIONAL_PRE_TOOL_RE.test(normalized);
|
|
283
|
+
}
|
|
284
|
+
function getProvisionalPreToolPrunePlan(message) {
|
|
285
|
+
const blocks = message.content;
|
|
286
|
+
const firstToolIdx = blocks.findIndex(isToolUseBlock);
|
|
287
|
+
return {
|
|
288
|
+
firstToolIdx,
|
|
289
|
+
shouldPrune: message.provider === "claude-code"
|
|
290
|
+
&& firstToolIdx >= 0
|
|
291
|
+
&& blocks.some(isMcpToolBlock)
|
|
292
|
+
&& hasPostToolText(blocks, firstToolIdx),
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
function buildDesiredSegmentsForMessage(message) {
|
|
296
|
+
const { shouldPrune, firstToolIdx } = getProvisionalPreToolPrunePlan(message);
|
|
297
|
+
return buildDesiredSegments(message.content, {
|
|
298
|
+
shouldSkipTextBlock: (block, index) => {
|
|
299
|
+
if (!shouldPrune || firstToolIdx < 0 || index >= firstToolIdx)
|
|
300
|
+
return false;
|
|
301
|
+
if (getVisibleTextLikeBlockType(block) !== "text")
|
|
302
|
+
return false;
|
|
303
|
+
const textValue = typeof block?.text === "string" ? block.text : "";
|
|
304
|
+
return isProvisionalPreToolProse(textValue);
|
|
305
|
+
},
|
|
306
|
+
});
|
|
307
|
+
}
|
|
247
308
|
function hasVisibleAssistantContent(message) {
|
|
248
309
|
return message.content.some((c) => getVisibleTextLikeBlockType(c) !== undefined);
|
|
249
310
|
}
|
|
@@ -576,44 +637,21 @@ export async function handleAgentEvent(host, event) {
|
|
|
576
637
|
// Build desired segment plan from content[].
|
|
577
638
|
{
|
|
578
639
|
const blocks = host.streamingMessage.content;
|
|
579
|
-
const isClaudeCodeProvider = host.streamingMessage.provider === "claude-code";
|
|
580
|
-
const hasMcpToolBlock = blocks.some((b) => {
|
|
581
|
-
if (b?.type === "toolCall") {
|
|
582
|
-
return typeof b?.mcpServer === "string" || String(b?.name ?? "").startsWith("mcp__");
|
|
583
|
-
}
|
|
584
|
-
if (b?.type === "serverToolUse") {
|
|
585
|
-
return typeof b?.mcpServer === "string" || String(b?.name ?? "").startsWith("mcp__");
|
|
586
|
-
}
|
|
587
|
-
return false;
|
|
588
|
-
});
|
|
589
|
-
const firstToolIdx = blocks.findIndex((b) => b.type === "toolCall" || b.type === "serverToolUse");
|
|
590
|
-
const hasPostToolText = firstToolIdx >= 0
|
|
591
|
-
&& blocks.some((b, idx) => (idx > firstToolIdx
|
|
592
|
-
&& b?.type === "text"
|
|
593
|
-
&& typeof b?.text === "string"
|
|
594
|
-
&& b.text.trim().length > 0));
|
|
595
640
|
// Only prune provisional pre-tool prose after post-tool prose exists,
|
|
596
641
|
// so MCP tool-only windows do not blank the assistant content.
|
|
597
|
-
const
|
|
598
|
-
let desired =
|
|
599
|
-
shouldSkipTextBlock: (block, index) => {
|
|
600
|
-
if (!shouldDropPreToolProse || firstToolIdx < 0 || index >= firstToolIdx)
|
|
601
|
-
return false;
|
|
602
|
-
if (getVisibleTextLikeBlockType(block) !== "text")
|
|
603
|
-
return false;
|
|
604
|
-
const textValue = typeof block?.text === "string" ? block.text : "";
|
|
605
|
-
return !/\?\s*$/.test(textValue.trim());
|
|
606
|
-
},
|
|
607
|
-
});
|
|
642
|
+
const { shouldPrune: shouldPruneProvisionalPreToolProse } = getProvisionalPreToolPrunePlan(host.streamingMessage);
|
|
643
|
+
let desired = buildDesiredSegmentsForMessage(host.streamingMessage);
|
|
608
644
|
desired = filterRedundantDiscussTextRuns(desired, blocks);
|
|
609
645
|
// Claude Code MCP can emit provisional pre-tool prose that gets
|
|
610
646
|
// superseded by post-tool output. Prune stale text-run segments so
|
|
611
647
|
// the final assistant output remains below tool output.
|
|
612
|
-
if (
|
|
648
|
+
if (shouldPruneProvisionalPreToolProse) {
|
|
613
649
|
if (orphanedSegments.length > 0) {
|
|
614
650
|
const remainingOrphans = [];
|
|
615
651
|
for (const orphan of orphanedSegments) {
|
|
616
|
-
if (orphan.kind === "text-run"
|
|
652
|
+
if (orphan.kind === "text-run"
|
|
653
|
+
&& orphan.contentType === "text"
|
|
654
|
+
&& isProvisionalPreToolProse(orphan.cachedText ?? "")) {
|
|
617
655
|
host.chatContainer.removeChild(orphan.component);
|
|
618
656
|
if (host.streamingComponent === orphan.component) {
|
|
619
657
|
host.streamingComponent = undefined;
|
|
@@ -799,14 +837,14 @@ export async function handleAgentEvent(host, event) {
|
|
|
799
837
|
const shouldRenderAssistant = hasVisibleAssistantContent(host.streamingMessage)
|
|
800
838
|
|| ((host.streamingMessage.stopReason === "aborted" || host.streamingMessage.stopReason === "error")
|
|
801
839
|
&& !hasAssistantToolBlocks(host.streamingMessage));
|
|
802
|
-
const suppressRedundantHandoff = shouldSuppressRedundantHandoffText(host.session.messages, extractAssistantText(host.streamingMessage), orphanedSegments,
|
|
840
|
+
const suppressRedundantHandoff = shouldSuppressRedundantHandoffText(host.session.messages, extractAssistantText(host.streamingMessage), orphanedSegments, []);
|
|
803
841
|
// The final message_end payload can contain additional text/thinking
|
|
804
842
|
// blocks that never arrived via message_update (e.g. SDK result
|
|
805
843
|
// aggregation). Rebuild this in-flight turn from final content so
|
|
806
844
|
// ranges/components don't keep stale partial indices.
|
|
807
845
|
if (renderedSegments.length > 0) {
|
|
808
846
|
const finalBlocks = host.streamingMessage.content;
|
|
809
|
-
const desired = filterRedundantDiscussTextRuns(
|
|
847
|
+
const desired = filterRedundantDiscussTextRuns(buildDesiredSegmentsForMessage(host.streamingMessage), finalBlocks);
|
|
810
848
|
const toolComponentsById = new Map();
|
|
811
849
|
for (const [toolId, component] of host.pendingTools.entries()) {
|
|
812
850
|
toolComponentsById.set(toolId, component);
|