Skip to content

[FEATURE]: Proposal: TUI Input Changed Hook #6810

Closed

Description

@brentlopez

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

1. Problem Statement

What problem are we solving?

OpenCode plugins currently have no visibility into what users type in the TUI prompt. Plugins can react to messages after submission, but cannot observe or respond to input as it happens. This limits plugin capabilities for features like:

  • Real-time input suggestions
  • Command detection and auto-completion
  • Input validation before submission
  • Context-aware UI hints

Who is affected?

Plugin developers who want to build interactive, responsive plugin experiences. End users who could benefit from smarter input handling.

2. Proposed Solution

Add a new tui.input.changed plugin hook that fires whenever the user types in the TUI prompt. The hook receives the current input text and session ID, enabling plugins to observe typing in real-time.

Key components:

  • New hook type definition in packages/plugin/src/index.ts
  • HTTP endpoint POST /plugin/input-changed in the server
  • Fire-and-forget fetch call from TUI prompt component on input change

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 4, 2026
  2. brentlopez commented on Jan 4, 2026

    @brentlopez
    Author
  3. xtccc commented on Feb 14, 2026

    @xtccc

    I'm developing a notification plugin that displays message alerts to the user. I need this tui.input.changed event so that my plugin can:

    1. Pause notifications when the user is actively typing in the prompt
  4. github-actions commented on Apr 16, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions