Skip to content

Support OSC777 notifications #17819

@lutzky

Description

@lutzky

What would you like to be added?

Running ~/.bin/hterm-notify.sh "I am a notification" (source) creates a desktop notification with my terminal. It works over SSH, super useful.

Naturally I'd like to do this:

{
  "hooks": {
    "Notification": [
      {
        "matcher": "*",
        "hooks": [
          {
            "name": "multi_notify",
            "type": "command",
            "command": "$HOME/.bin/hterm-notify.sh \"gemini-cli: Notification\"",
            "description": "Send notifications"
          }
        ]
      }
    ]
  }
}

However, that doesn't work. I'm guessing something about gemini-cli "swallows" the ANSI codes for the OSC notification. We should either fix that, or perhaps offer built-in OSC777 notifications (and OSC9 for iTerm, and OSC99 for kitty...).

Related:

Why is this needed?

To enable notifications such as #2779 (comment), but over SSH. Having OSC support is helpful over SSH, that's why we have #9966.

Additional context

gemini-cli already has support for another OSC sequence: #9966

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to User Interface, OS Support, Core Functionalitystatus/needs-info
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions