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