UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

22 lines • 987 B
import { COLLAPSE_RULE_CONTENT } from "./prompts.js"; import { buildErrorShellReplacement, buildNudgeMessage, buildTruncateReplacement, } from "./remediation.js"; export function buildStreamRemediation(pending, message) { if (pending.resolution.remediation.corruptionScope === "generation") { return { replacement: buildErrorShellReplacement(), nudge: null, owner: pending.resolution.owner, observedRules: pending.resolution.observedRules, retryMode: "provider-error", }; } const replaced = buildTruncateReplacement(message, pending.resolution.match.garbageStartOffset, pending.streamKind); return { replacement: replaced, nudge: buildNudgeMessage(pending.resolution.owner, COLLAPSE_RULE_CONTENT), owner: pending.resolution.owner, observedRules: pending.resolution.observedRules, retryMode: "nudge", }; } //# sourceMappingURL=stream-remediation.js.map