@kairyou/agent-tools 0.13.1 → 0.13.2
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/log/hook.mjs +3 -3
- package/integrations/log/hook.mjs +10 -7
- package/package.json +1 -1
package/dist/log/hook.mjs
CHANGED
|
@@ -1182,9 +1182,9 @@ function dailyItemText(turn) {
|
|
|
1182
1182
|
const outcome = String(turn.result_summary || "");
|
|
1183
1183
|
if (!hasSubstantiveTurn(request, outcome) || isTrivialTurn(request, outcome)) return "";
|
|
1184
1184
|
const source = outcome || request;
|
|
1185
|
-
const
|
|
1186
|
-
if (!
|
|
1187
|
-
return
|
|
1185
|
+
const flattened = source.split("\n").map((line) => line.replace(/^[#>*\-\s`|]+/, "").trim()).filter(Boolean).join(" ");
|
|
1186
|
+
if (!flattened) return "";
|
|
1187
|
+
return flattened.length > DAILY_ITEM_MAX_CHARS ? `${flattened.slice(0, DAILY_ITEM_MAX_CHARS - 3)}...` : flattened;
|
|
1188
1188
|
}
|
|
1189
1189
|
async function updateDailyFile(outputFile, day, items) {
|
|
1190
1190
|
if (items.length === 0) return;
|
|
@@ -427,14 +427,17 @@ function dailyItemText(turn) {
|
|
|
427
427
|
const outcome = String(turn.result_summary || "");
|
|
428
428
|
if (!hasSubstantiveTurn(request, outcome) || isTrivialTurn(request, outcome)) return "";
|
|
429
429
|
const source = outcome || request;
|
|
430
|
-
|
|
430
|
+
// Flattened rather than first-line: a structured summary often opens with a
|
|
431
|
+
// preamble line, and the substance sits in the lines after it.
|
|
432
|
+
const flattened = source
|
|
431
433
|
.split("\n")
|
|
432
|
-
.map((line) => line.replace(/^[#>*\-\s
|
|
433
|
-
.
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
434
|
+
.map((line) => line.replace(/^[#>*\-\s`|]+/, "").trim())
|
|
435
|
+
.filter(Boolean)
|
|
436
|
+
.join(" ");
|
|
437
|
+
if (!flattened) return "";
|
|
438
|
+
return flattened.length > DAILY_ITEM_MAX_CHARS
|
|
439
|
+
? `${flattened.slice(0, DAILY_ITEM_MAX_CHARS - 3)}...`
|
|
440
|
+
: flattened;
|
|
438
441
|
}
|
|
439
442
|
|
|
440
443
|
async function updateDailyFile(outputFile, day, items) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kairyou/agent-tools",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"description": "Reusable Agent Skills, plus integrations (statusline, provider usage, vision) that install into Codex, Claude Code, and opencode.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|