Skip to content
Draft
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
7 changes: 1 addition & 6 deletions Wisp/ViewModels/ChatViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -776,12 +776,7 @@ final class ChatViewModel {
}
claudeCmd += " '\(escapedPrompt)'"

// Wrap claude with a heartbeat so the sprite stays alive while Claude
// is waiting for an API response and Wisp is detached. The heartbeat
// writes a byte to stderr every 20s — enough to count as output without
// interfering with the NDJSON stdout stream. The trap ensures cleanup.
let wrappedClaudeCmd = "{ (while true; do sleep 20; printf . >&2; done) & HBEAT=$!; trap \"kill $HBEAT 2>/dev/null\" EXIT; \(claudeCmd); kill $HBEAT 2>/dev/null; }"
commandParts.append(wrappedClaudeCmd)
commandParts.append(claudeCmd)
let fullCommand = commandParts.joined(separator: " && ")

receivedSystemEvent = false
Expand Down
Loading