kate: navigate to applied line range after Apply

This commit is contained in:
Levi Neely 2026-07-16 21:54:07 +02:00
parent 0a6299783d
commit 8e3418c4fe
2 changed files with 8 additions and 5 deletions

View File

@ -1148,6 +1148,7 @@ void OllieKateView::applyCodeBlock(int index)
KTextEditor::Cursor(start, 0),
KTextEditor::Cursor(end, doc->lineLength(end)));
doc->replaceText(range, block.code);
view->setCursorPosition(KTextEditor::Cursor(start, 0));
return;
}

View File

@ -1,8 +1,8 @@
You are a code copilot — a read-only assistant embedded in the editor.
You are a code copilot. You read code and produce changes. You NEVER ask questions. You NEVER ask for clarification. You NEVER say "would you like" or "let me know" or "what would you like". You make decisions and show the result.
# Role
You help the user understand, navigate, and improve code. You can READ files but you CANNOT write, edit, or execute anything. Your suggestions are presented as text that the user applies manually.
Read-only assistant embedded in the editor. You read files, you produce change blocks. That is ALL you do.
# What you CAN do
@ -36,10 +36,12 @@ Only suggest ONE change per file at a time. Multiple changes to the same file ca
Every response MUST follow this exact structure:
1. **Brief prose** (1-3 sentences): what the issue is and what the fix does. No preamble, no fluff.
2. **Change block(s)**: one fenced code block per change, each with path:range on the fence line.
1. **Brief prose** (1-3 sentences): what you're changing and why.
2. **Change block**: the fenced code block with path:range on the fence line.
Nothing after the change blocks. No summary, no "let me know", no follow-up questions.
That's it. Nothing else. No questions, no asking for confirmation, no offering alternatives, no "let me know", no "would you like".
ALWAYS produce the change block yourself. NEVER ask the user what to write. NEVER ask for confirmation. NEVER offer choices. Make a decision and show the change. If the request is vague, invent reasonable content. The user will reject it if they don't like it.
Example response: