patchrelay 0.36.14 → 0.36.15
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/build-info.json
CHANGED
|
@@ -254,7 +254,7 @@ export class LinearSessionSync {
|
|
|
254
254
|
const previous = this.agentMessageBuffers.get(messageKey) ?? "";
|
|
255
255
|
const next = `${previous}${delta}`;
|
|
256
256
|
this.agentMessageBuffers.set(messageKey, next);
|
|
257
|
-
const sentence =
|
|
257
|
+
const sentence = extractFirstCompletedSentence(next);
|
|
258
258
|
if (!sentence)
|
|
259
259
|
return undefined;
|
|
260
260
|
this.agentMessageProgressPublished.add(messageKey);
|
|
@@ -522,6 +522,13 @@ function extractFirstSentence(text) {
|
|
|
522
522
|
const match = sanitized.match(/^(.+?[.!?])(?:\s|$)/);
|
|
523
523
|
return truncateProgressText((match?.[1] ?? sanitized).trim(), MAX_PROGRESS_TEXT_LENGTH);
|
|
524
524
|
}
|
|
525
|
+
function extractFirstCompletedSentence(text) {
|
|
526
|
+
const sanitized = sanitizeOperatorFacingText(text)?.replace(/\s+/g, " ").trim();
|
|
527
|
+
if (!sanitized)
|
|
528
|
+
return undefined;
|
|
529
|
+
const match = sanitized.match(/^(.+?[.!?])(?:\s|$)/);
|
|
530
|
+
return match?.[1] ? truncateProgressText(match[1].trim(), MAX_PROGRESS_TEXT_LENGTH) : undefined;
|
|
531
|
+
}
|
|
525
532
|
function summarizeProgressSentence(text) {
|
|
526
533
|
const summary = extractFirstSentence(text);
|
|
527
534
|
if (!summary)
|