chore(auto-reply): include cwd in timeout message

This commit is contained in:
Peter Steinberger
2025-11-26 02:18:16 +01:00
parent ce5b02a9ad
commit 4a8bb56a1e
2 changed files with 2 additions and 1 deletions

View File

@@ -5,6 +5,7 @@
- Audio transcription helpers live in `src/auto-reply/transcription.ts`.
- Shared reply types live in `src/auto-reply/types.ts` (re-exported from `reply.ts`).
- `runCommandReply` now returns `{ payload, meta }`, supports injected enqueue runners for tests, logs structured metadata, and respects `mediaMaxMb` for local media paths.
- Timeout messaging now includes `cwd` when provided to speed up debugging slow commands.
- Added focused tests:
- `src/auto-reply/command-reply.test.ts` exercises Claude flag injection, session args, timeout messaging, media token handling, and Claude metadata reporting.
- `src/auto-reply/transcription.test.ts` covers media download + transcription command invocation.

View File

@@ -341,7 +341,7 @@ export async function runCommandReply(
);
const baseMsg =
"Command timed out after " +
`${timeoutSeconds}s. Try a shorter prompt or split the request.`;
`${timeoutSeconds}s${reply.cwd ? ` (cwd: ${reply.cwd})` : ""}. Try a shorter prompt or split the request.`;
const partial = errorObj.stdout?.trim();
const partialSnippet =
partial && partial.length > 800 ? `${partial.slice(0, 800)}...` : partial;