[Feature] Terminal Bell on Task Completion
Description
Add a configuration setting (bellOnFinish) that emits a standard terminal beep when the agent finishes generating a long response or completing a complex tool chain.
Use Case
Users often switch to the browser or another window while waiting for the LLM to complete a long task. A subtle audible cue notifies them that the agent is ready for the next prompt, reducing idle time.
Proposed Solution
- Introduce a boolean
bellOnFinishsetting in the user configuration (defaulting tofalse). - When the state transitions from
processingtoidle(or when a long-running subagent finishes), write\x07(the terminal bell character) toprocess.stdoutif the setting is enabled.
Alternatives Considered
- Sending OS-level desktop notifications (requires external libraries and complicated cross-platform setups). A simple terminal bell is universally supported and lightweight.
Additional Context
- [x] I have searched existing issues to ensure this is not a duplicate
- [x] This feature aligns with the project's goals (local-first AI assistance)
Implementation Notes (optional)
- Check
process.stdout.write('\x07')behavior in Ink.js to ensure it doesn't disrupt the React render cycle.
Hey @akramcodez, can I take this one?
Most of the things are already there:
useNotifications.ts:36 fires generationComplete on the exact generating→idle transition,
and NotificationsConfig already carries enabled / sound / events.
The gap is that osascript / notify-send / the PowerShell balloon are all desktop-only over SSH or tmux nothing lands, but a bell does.
I'm thinking to add bell?: boolean to NotificationsConfig (beside sound, not a top-level bellOnFinish) and emit \x07 from sendNotification for opted-in events. No new trigger or state needed.
sure go for it @addyCooks