[ 
https://issues.apache.org/jira/browse/CAMEL-25444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18127028#comment-18127028
 ] 

Claus Ibsen commented on CAMEL-25444:
-------------------------------------

Fixed in 
https://github.com/apache/camel/commit/c754310d6f88194d967d78028498840f7a5f3a00

Keys sent over MCP ({{tui_send_keys}}), and the keys of a tape, no longer 
answer a dialog that asks the user to confirm an action: quitting, stopping or 
killing an integration, Stop All, a file an AI writes, an AI edit waiting to be 
saved, a tool an ACP agent wants to run, deleting or converting a file, 
discarding changes. Such a key is dropped while one of these dialogs is open, 
and {{tui_send_keys}} says which dialog is open instead of sending.

While a tape drives the monitor (a model records one with {{tui_tape_start}}, a 
user with F2, or {{--record}} plays one) nothing asks at all, so the model or 
the tape does everything itself. Leaving the editor with unsaved changes still 
asks.

_Claude Code on behalf of Claus Ibsen_

> camel-jbang-plugin-tui - do not deliver injected keys to confirmation dialogs
> -----------------------------------------------------------------------------
>
>                 Key: CAMEL-25444
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25444
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jbang
>            Reporter: Andrea Cosentino
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> Keys injected by the tui_send_keys tool are dispatched through the same 
> handler as real user keystrokes (CamelMonitor.handleTickEvent -> 
> handleEvent), so they can reach confirmation popups such as FileWritePopup. 
> The mcpInjectedKey marker is currently used only for tape recording. Injected 
> keys should not be delivered to confirmation dialogs/popups - the existing 
> mcpInjectedKey marker can be used to exclude them.
> Module: dsl/camel-jbang/camel-jbang-plugin-tui.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to