nanocoder icon indicating copy to clipboard operation
nanocoder copied to clipboard

[Feature] Terminal Bell on Task Completion

Open akramcodez opened this issue 3 months ago • 2 comments

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 bellOnFinish setting in the user configuration (defaulting to false).
  • When the state transitions from processing to idle (or when a long-running subagent finishes), write \x07 (the terminal bell character) to process.stdout if 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.

akramcodez avatar Aug 24 '26 08:08 akramcodez

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.

addyCooks avatar Aug 24 '26 21:08 addyCooks

sure go for it @addyCooks

akramcodez avatar Aug 27 '26 06:08 akramcodez