davsclaus opened a new pull request, #27276:
URL: https://github.com/apache/camel/pull/27276

   This PR polishes the source editor's live edit mode (`/write live`), in 
which an AI change is typed into the editor and can be paused to ask about it.
   
   ## Changes
   
   - **A pace that keeps up.**
     - Each typing step was scheduled from the tick's own time, so the replay 
made one step per UI tick (40 ms). It typed 25 characters a second instead of 
the intended 83, so a 3,000-character change took two minutes.
     - Steps now follow their own schedule, with several steps in one tick when 
they are due, and after a stall the replay catches up by at most 250 ms.
     - A change is also typed within a budget of about 4 s: a small change 
keeps the natural pace, and a large one is typed faster but still typed, not 
pasted.
   - **Compact panel while asking.** F8 at a pause opened the AI panel at its 
usual height, over the edit being asked about. It now opens at a quarter of the 
screen (at least 10 rows), so the edit stays in view. Shift+F8 or dragging the 
border sizes it as usual, and a normal question opens at the usual height again.
   - **Keys stay away from the editor while asking.** Keys the AI panel does 
not take, such as Esc after the question was sent, fell through to the Source 
tab, and the editor's Esc there discards the edit. While asking, Esc and F8 now 
close the panel back to the paused edit, Ctrl+C still quits, and nothing else 
reaches the editor.
   - **No half-hour wait.** The `camel_write_file` call waited up to 30 minutes 
for save or discard, blocking the AI's turn, and then aborted the replay.
     - After 5 minutes it now returns `status: pending` and parks the edit in 
the editor, as F8 does.
     - The AI ends its turn and is told what the user did with the edit with 
the next question, through the existing parked-edit note.
     - A save at the same moment wins: the outcome is completed atomically.
   
   ## Docs and tests
   
   - The live mode section in `camel-jbang-tui-ai-agents.adoc` and the F1 help 
of the Source tab are updated.
   - New tests cover:
     - `EditReplayTest`: a small change at the natural pace under 40 ms ticks, 
and a 120-line change finishing within the budget while still being typed;
     - `AiPanelTest`: the compact height while asking, and the user override;
     - `McpFacadeWriteFileTest`: the `pending` result.
   - The camel-jbang-plugin-tui tests pass: 1604 run, 0 failures, 1 skipped.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to