agentlife 2.6.13 → 2.6.14
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/index.js +9 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1919,6 +1919,11 @@ function matchMetadata(block, key) {
|
|
|
1919
1919
|
}
|
|
1920
1920
|
return v || null;
|
|
1921
1921
|
}
|
|
1922
|
+
function isLoadingPush(rawDsl) {
|
|
1923
|
+
const header = rawDsl.split(`
|
|
1924
|
+
`, 1)[0] ?? "";
|
|
1925
|
+
return /\bstate=loading\b/.test(header);
|
|
1926
|
+
}
|
|
1922
1927
|
function hasDetailContent(rawDsl) {
|
|
1923
1928
|
const lines = rawDsl.split(`
|
|
1924
1929
|
`);
|
|
@@ -6318,7 +6323,7 @@ function registerWidgetPushTool(api, state2) {
|
|
|
6318
6323
|
const view = getSurface(state2, sid);
|
|
6319
6324
|
if (!view)
|
|
6320
6325
|
continue;
|
|
6321
|
-
if (view.isOverlay || view.isInput || view.
|
|
6326
|
+
if (view.isOverlay || view.isInput || isLoadingPush(view.rawDsl))
|
|
6322
6327
|
continue;
|
|
6323
6328
|
const notifTitle = capitalize(agentId);
|
|
6324
6329
|
const notifBody = extractWidgetText(view.lines) ?? "New update";
|
|
@@ -6351,13 +6356,14 @@ function registerWidgetPushTool(api, state2) {
|
|
|
6351
6356
|
if (r.isTransient)
|
|
6352
6357
|
continue;
|
|
6353
6358
|
const view = getSurface(state2, r.surfaceId);
|
|
6354
|
-
|
|
6359
|
+
const isLoading = view ? isLoadingPush(view.rawDsl) : false;
|
|
6360
|
+
if (view && !isLoading && !view.followup && !goalChanges.includes(r.surfaceId)) {
|
|
6355
6361
|
missingFollowup.push(r.surfaceId);
|
|
6356
6362
|
recordActivity(state2, "quality_warning", sessionKey, agentId, {
|
|
6357
6363
|
data: JSON.stringify({ issue: "missing_followup", surfaceId: r.surfaceId })
|
|
6358
6364
|
});
|
|
6359
6365
|
}
|
|
6360
|
-
if (view &&
|
|
6366
|
+
if (view && !isLoading && !view.isInput && !hasDetailContent(view.rawDsl) && !goalChanges.includes(r.surfaceId) && !missingFollowup.includes(r.surfaceId)) {
|
|
6361
6367
|
missingDetail.push(r.surfaceId);
|
|
6362
6368
|
recordActivity(state2, "quality_warning", sessionKey, agentId, {
|
|
6363
6369
|
data: JSON.stringify({ issue: "missing_detail", surfaceId: r.surfaceId })
|