Fix CI: type gaps and hasMedia check
parent
93a103dde5
commit
d4580d1a31
|
|
@ -64,6 +64,7 @@ export type WarelayConfig = {
|
|||
claudeOutputFormat?: ClaudeOutputFormat; // when command starts with `claude`, force an output format
|
||||
mediaMaxMb?: number; // optional cap for outbound media (default 5MB)
|
||||
typingIntervalSeconds?: number; // how often to refresh typing indicator while command runs
|
||||
heartbeatMinutes?: number; // auto-ping cadence for command mode
|
||||
};
|
||||
};
|
||||
web?: WebConfig;
|
||||
|
|
|
|||
|
|
@ -147,8 +147,9 @@ export async function runWebHeartbeatOnce(opts: {
|
|||
return;
|
||||
}
|
||||
|
||||
const hasMedia =
|
||||
(replyResult.mediaUrl ?? replyResult.mediaUrls?.length ?? 0) > 0;
|
||||
const hasMedia = Boolean(
|
||||
replyResult.mediaUrl || (replyResult.mediaUrls?.length ?? 0) > 0,
|
||||
);
|
||||
const stripped = stripHeartbeatToken(replyResult.text);
|
||||
if (stripped.shouldSkip && !hasMedia) {
|
||||
// Don't let heartbeats keep sessions alive: restore previous updatedAt so idle expiry still works.
|
||||
|
|
@ -677,8 +678,9 @@ export async function monitorWebProvider(
|
|||
}
|
||||
|
||||
const stripped = stripHeartbeatToken(replyResult.text);
|
||||
const hasMedia =
|
||||
(replyResult.mediaUrl ?? replyResult.mediaUrls?.length ?? 0) > 0;
|
||||
const hasMedia = Boolean(
|
||||
replyResult.mediaUrl || (replyResult.mediaUrls?.length ?? 0) > 0,
|
||||
);
|
||||
if (stripped.shouldSkip && !hasMedia) {
|
||||
heartbeatLogger.info(
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue