Исправление: в тексте напоминания (вход 7) пропадала буква s (регэксп /s+/ вместо /\s+/); тест
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
11
packages/khbuild_assistant_prep/src/agents/step2.test.ts
Normal file
11
packages/khbuild_assistant_prep/src/agents/step2.test.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { formatPackage } from "./step2.js";
|
||||
|
||||
describe("formatPackage: вход (7)", () => {
|
||||
it("текст последнего напоминания не искажается (буквы s и пробелы сохраняются, переводы строк схлопываются)", () => {
|
||||
const text = formatPackage([
|
||||
{ input_no: 7, jt_task_id: "T1", payload: { reminders: 2, last_reminded_at: "2026-12-04", last_reminder_text: "Thanks, Arthur.\n\nMeasured against the seawall; decision pending" } },
|
||||
] as never);
|
||||
expect(text).toContain("«Thanks, Arthur. Measured against the seawall; decision pending»");
|
||||
});
|
||||
});
|
||||
@@ -39,7 +39,7 @@ export function formatPackage(rows: PackageRow[]): string {
|
||||
for (const r of items) {
|
||||
if (no === 7) {
|
||||
const p = r.payload ?? {};
|
||||
out.push(`- задача ${r.jt_task_id ?? "(без задачи)"}: напоминаний ${p.reminders ?? "?"}, последнее ${p.last_reminded_at ?? "?"}, ответ: ${p.last_reply_outcome ?? "-"} ${p.last_reply_summary ?? ""}${p.last_reminder_text ? ` | текст последнего напоминания: «${String(p.last_reminder_text).replace(/s+/g, " ")}»` : ""}`.trim());
|
||||
out.push(`- задача ${r.jt_task_id ?? "(без задачи)"}: напоминаний ${p.reminders ?? "?"}, последнее ${p.last_reminded_at ?? "?"}, ответ: ${p.last_reply_outcome ?? "-"} ${p.last_reply_summary ?? ""}${p.last_reminder_text ? ` | текст последнего напоминания: «${String(p.last_reminder_text).replace(/\s+/g, " ")}»` : ""}`.trim());
|
||||
continue;
|
||||
}
|
||||
const dates = r.start_date || r.end_date ? ` | ${r.start_date ?? "?"} .. ${r.end_date ?? "?"}` : "";
|
||||
|
||||
Reference in New Issue
Block a user