diff --git a/README.md b/README.md index 8729429..dca1b75 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Picking a branch compares against the **merge base** — the commit your work fo ### Grab — hand a diff selection to your coding agent -Select code in the diff and a prompt box opens right where you released the drag. Press Enter and diffdeck copies **one block** to your clipboard — the file reference, the exact lines you picked, and your prompt — ready to paste into Claude Code, Codex, or any chat. +Select code in the diff and a prompt box opens right where you released the drag. Press Enter and diffdeck copies **one block** to your clipboard — the file reference, the exact lines you picked, and your prompt — ready to paste into Claude Code, Codex, or any chat. Need only the code? Press Enter (AltEnter on Windows/Linux) and diffdeck copies the picked lines by themselves — no prompt, no fence, no file header — to paste straight into an editor. A selection spanning both sides of the diff comes across without its `+`/`-` markers, so the old and new versions of a line sit one after another. ![Grab — lines highlighted in the diff with the prompt box open beside them](docs/grab.png) diff --git a/docs/README.es.md b/docs/README.es.md index 6a2a960..4603898 100644 --- a/docs/README.es.md +++ b/docs/README.es.md @@ -45,7 +45,7 @@ Al elegir una rama, la comparación es contra la **merge base**: el commit del q ### Grab — envía una selección del diff a tu agente de código -Selecciona código en el diff y se abre un cuadro de prompt justo donde soltaste el arrastre. Pulsa Enter y diffdeck copia **un solo bloque** al portapapeles — la referencia del archivo, las líneas exactas que elegiste y tu prompt — listo para pegar en Claude Code, Codex o cualquier chat. +Selecciona código en el diff y se abre un cuadro de prompt justo donde soltaste el arrastre. Pulsa Enter y diffdeck copia **un solo bloque** al portapapeles — la referencia del archivo, las líneas exactas que elegiste y tu prompt — listo para pegar en Claude Code, Codex o cualquier chat. ¿Solo quieres el código? Pulsa Enter (AltEnter en Windows/Linux) y diffdeck copia únicamente las líneas elegidas — sin prompt, sin delimitadores de código ni encabezado de archivo — para pegarlas directamente en un editor. Eso sí, una selección que abarque ambos lados del diff llega sin sus marcadores `+`/`-`, de modo que las versiones antigua y nueva de una misma línea quedan una tras otra. ![Grab — líneas resaltadas en el diff con el cuadro de prompt abierto al lado](grab.png) diff --git a/docs/README.ja.md b/docs/README.ja.md index e77ba0d..852e623 100644 --- a/docs/README.ja.md +++ b/docs/README.ja.md @@ -45,7 +45,7 @@ diff レンダリングエンジンが提供する機能: ### Grab — diff の選択範囲をコーディングエージェントへ -diff 内でコードをドラッグして離すと、その位置にプロンプト入力欄が開きます。Enter を押すと、ファイル参照・選択した行・プロンプトが**ひとかたまり**でクリップボードにコピーされ、Claude Code や Codex にそのまま貼り付けられます。 +diff 内でコードをドラッグして離すと、その位置にプロンプト入力欄が開きます。Enter を押すと、ファイル参照・選択した行・プロンプトが**ひとかたまり**でクリップボードにコピーされ、Claude Code や Codex にそのまま貼り付けられます。コードだけが欲しいときに Enter(Windows・Linux は AltEnter)を押すと、プロンプトもコードフェンスもファイル見出しも付かず、選択した行だけがコピーされ、エディタにそのまま貼り付けられます。ただし diff の両側にまたがる選択は `+`/`-` マーカーなしでコピーされるため、同じ行の変更前と変更後が続けて並びます。 ![Grab — diff 内でハイライトされた行と、その隣に開いたプロンプト入力欄](grab.png) diff --git a/docs/README.ko.md b/docs/README.ko.md index 07c10d3..147fcc6 100644 --- a/docs/README.ko.md +++ b/docs/README.ko.md @@ -45,7 +45,7 @@ diff 렌더링 엔진이 제공하는 기능: ### Grab — diff 선택을 코딩 에이전트에게 넘기기 -diff에서 코드를 드래그해 놓으면 그 자리에 프롬프트 창이 뜹니다. Enter를 누르면 파일 참조·잡은 줄·프롬프트가 **한 덩어리**로 클립보드에 복사되어 Claude Code나 Codex에 바로 붙여넣을 수 있습니다. +diff에서 코드를 드래그해 놓으면 그 자리에 프롬프트 창이 뜹니다. Enter를 누르면 파일 참조·잡은 줄·프롬프트가 **한 덩어리**로 클립보드에 복사되어 Claude Code나 Codex에 바로 붙여넣을 수 있습니다. 코드만 필요하다면 Enter(Windows·Linux는 AltEnter)를 누르세요. 프롬프트도 코드펜스도 파일 머리말도 없이 잡은 줄만 복사되어 편집기에 그대로 붙여넣을 수 있습니다. 다만 diff의 양쪽에 걸친 선택은 `+`/`-` 마커 없이 복사되므로, 같은 줄의 옛 버전과 새 버전이 잇달아 놓입니다. ![Grab — diff에서 하이라이트된 줄과 그 옆에 열린 프롬프트 창](grab.png) diff --git a/docs/README.zh.md b/docs/README.zh.md index fbe6ecf..ceb63bc 100644 --- a/docs/README.zh.md +++ b/docs/README.zh.md @@ -45,7 +45,7 @@ diff 渲染引擎提供的功能: ### Grab — 把 diff 选区交给编码智能体 -在 diff 中拖选代码并松开,提示输入框会就地打开。按 Enter,diffdeck 会把文件引用、你选中的确切行以及你的提示**合成一段**复制到剪贴板,可直接粘贴到 Claude Code、Codex 或任意对话中。 +在 diff 中拖选代码并松开,提示输入框会就地打开。按 Enter,diffdeck 会把文件引用、你选中的确切行以及你的提示**合成一段**复制到剪贴板,可直接粘贴到 Claude Code、Codex 或任意对话中。只想要代码?按 Enter(Windows/Linux 为 AltEnter),diffdeck 只复制你选中的行 —— 不带提示、代码围栏和文件头 —— 可直接粘贴进编辑器。不过跨越 diff 两侧的选区不会带上 `+`/`-` 标记,因此同一行的旧版本与新版本会前后相邻。 ![Grab — diff 中高亮的行,以及旁边打开的提示输入框](grab.png) diff --git a/skills/diffdeck/SKILL.md b/skills/diffdeck/SKILL.md index 95cfe3f..ea6c173 100644 --- a/skills/diffdeck/SKILL.md +++ b/skills/diffdeck/SKILL.md @@ -56,7 +56,8 @@ press Enter — that copies one block for them to paste back to you. ## When the human pastes a "diffdeck selection" -Grab copies a single fenced block plus the human's prompt on the line after it: +Pressing Enter copies a single fenced block plus the human's prompt on the line +after it: ````text ``` @@ -89,6 +90,14 @@ need not match the working tree (and with `, deleted` the path may be gone); and the prompt is **optional**, so a block with nothing after the fence means the human hasn't said what they want yet. Ask rather than inventing a task. +The human can also press ⌥⏎ (Alt+Enter) to copy the picked code **alone** — no +fence, no `diffdeck selection`/`File:`/`Lines:` lines, and no `-`/`+`/space +prefix even when the selection spans both sides. Such a paste is bare code: it +says nothing about where it came from, and a both-sides selection arrives with +the old and new versions of the same lines one after another — so the +strip-the-first-character rule above does not apply to it. Ask which file, and +which side, before acting on it. + ## Options - `--port ` — serve on a specific port (default 49573, or `$DIFFDECK_PORT`).