Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

### Fixed

- Generate daily summaries for days containing a complete single exchange.
- Prevent mixed reaction replies from narrating the bot's internal choice to react while preserving natural reaction-plus-text responses.
- Run Discord-initiated Claude login in a pseudo-terminal so the CLI accepts submitted OAuth codes.
- Isolate saved history and summaries by Discord channel ID in dedicated storage namespaces so same-named channels do not share automatic context.
Expand Down
2 changes: 1 addition & 1 deletion src/storage/summaries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export async function generateDailySummary(
summariesInProgress.add(summaryPath);
try {
const log = fs.readFileSync(logPath, "utf-8").trim();
if (!log || log.split("\n").length < 3) {
if (!log || log.split("\n").length < 2) {
fs.writeFileSync(summaryPath, log, "utf-8");
return;
}
Expand Down
23 changes: 23 additions & 0 deletions tests/summaryWorkload.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,26 @@ test("daily summaries declare the daily-summary workload", async () => {
"A useful summary",
);
});

test("daily summaries include a single user-and-bot exchange", async () => {
const date = new Date("2026-08-02T12:00:00Z");
const logPath = getDailyLogPath("channel-2", date, "general");
fs.writeFileSync(logPath, "user: question\nbot: answer\n", "utf8");

let capturedLog;
await generateDailySummary(
"channel-2",
"general",
date,
async (_args, input) => {
capturedLog = input;
return { stdout: "A single-exchange summary", stderr: "" };
},
);

assert.equal(capturedLog, "user: question\nbot: answer");
assert.equal(
fs.readFileSync(getSummaryPath("channel-2", date, "general"), "utf8"),
"A single-exchange summary",
);
});