You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
When a blank conversation is sent by clicking the send button, an event is exposed externally, allowing third-party plugins to step in and handle certain tasks.
#11844
When a user sends a regular message (by clicking the send button or pressing Enter), provide an externally exposed extension point that lets a plugin run asynchronous logic before the message is actually sent and decide how this send should be handled:
Allow: the message is sent as usual.
Reject: the message is not sent, the draft is preserved, and the user is shown a notice.
Scenario
My plugin, dsh-worktree-manager, lets users choose a "Worktree" environment and a base branch in an empty session. I want the worktree to be created at the moment the user clicks send, and the message to be sent into the new session, without requiring the user to first click a "Create and enter" button.
Currently, the input box has no pre-send interception point for plugins to use. Without it, the plugin can only require the user to click an extra create button.
Requirements
The processing logic can be asynchronous; sending waits for it to complete.
If the processing logic throws an error, do not send, keep the draft, and show a prompt.
When there are no listeners, the existing behavior remains unchanged.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Requirement
When a user sends a regular message (by clicking the send button or pressing Enter), provide an externally exposed extension point that lets a plugin run asynchronous logic before the message is actually sent and decide how this send should be handled:
Scenario
My plugin, dsh-worktree-manager, lets users choose a "Worktree" environment and a base branch in an empty session. I want the worktree to be created at the moment the user clicks send, and the message to be sent into the new session, without requiring the user to first click a "Create and enter" button.
Currently, the input box has no pre-send interception point for plugins to use. Without it, the plugin can only require the user to click an extra create button.
Requirements
All reactions