Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <kbd>Enter</kbd> 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 <kbd>Enter</kbd> 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 <kbd>⌥</kbd><kbd>Enter</kbd> (<kbd>Alt</kbd><kbd>Enter</kbd> 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)

Expand Down
2 changes: 1 addition & 1 deletion docs/README.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <kbd>Enter</kbd> 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 <kbd>Enter</kbd> 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 <kbd>⌥</kbd><kbd>Enter</kbd> (<kbd>Alt</kbd><kbd>Enter</kbd> 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)

Expand Down
2 changes: 1 addition & 1 deletion docs/README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ diff レンダリングエンジンが提供する機能:

### Grab — diff の選択範囲をコーディングエージェントへ

diff 内でコードをドラッグして離すと、その位置にプロンプト入力欄が開きます。<kbd>Enter</kbd> を押すと、ファイル参照・選択した行・プロンプトが**ひとかたまり**でクリップボードにコピーされ、Claude Code や Codex にそのまま貼り付けられます。
diff 内でコードをドラッグして離すと、その位置にプロンプト入力欄が開きます。<kbd>Enter</kbd> を押すと、ファイル参照・選択した行・プロンプトが**ひとかたまり**でクリップボードにコピーされ、Claude Code や Codex にそのまま貼り付けられます。コードだけが欲しいときに <kbd>⌥</kbd><kbd>Enter</kbd>(Windows・Linux は <kbd>Alt</kbd><kbd>Enter</kbd>)を押すと、プロンプトもコードフェンスもファイル見出しも付かず、選択した行だけがコピーされ、エディタにそのまま貼り付けられます。ただし diff の両側にまたがる選択は `+`/`-` マーカーなしでコピーされるため、同じ行の変更前と変更後が続けて並びます。

![Grab — diff 内でハイライトされた行と、その隣に開いたプロンプト入力欄](grab.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ diff 렌더링 엔진이 제공하는 기능:

### Grab — diff 선택을 코딩 에이전트에게 넘기기

diff에서 코드를 드래그해 놓으면 그 자리에 프롬프트 창이 뜹니다. <kbd>Enter</kbd>를 누르면 파일 참조·잡은 줄·프롬프트가 **한 덩어리**로 클립보드에 복사되어 Claude Code나 Codex에 바로 붙여넣을 수 있습니다.
diff에서 코드를 드래그해 놓으면 그 자리에 프롬프트 창이 뜹니다. <kbd>Enter</kbd>를 누르면 파일 참조·잡은 줄·프롬프트가 **한 덩어리**로 클립보드에 복사되어 Claude Code나 Codex에 바로 붙여넣을 수 있습니다. 코드만 필요하다면 <kbd>⌥</kbd><kbd>Enter</kbd>(Windows·Linux는 <kbd>Alt</kbd><kbd>Enter</kbd>)를 누르세요. 프롬프트도 코드펜스도 파일 머리말도 없이 잡은 줄만 복사되어 편집기에 그대로 붙여넣을 수 있습니다. 다만 diff의 양쪽에 걸친 선택은 `+`/`-` 마커 없이 복사되므로, 같은 줄의 옛 버전과 새 버전이 잇달아 놓입니다.

![Grab — diff에서 하이라이트된 줄과 그 옆에 열린 프롬프트 창](grab.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ diff 渲染引擎提供的功能:

### Grab — 把 diff 选区交给编码智能体

在 diff 中拖选代码并松开,提示输入框会就地打开。按 <kbd>Enter</kbd>,diffdeck 会把文件引用、你选中的确切行以及你的提示**合成一段**复制到剪贴板,可直接粘贴到 Claude Code、Codex 或任意对话中。
在 diff 中拖选代码并松开,提示输入框会就地打开。按 <kbd>Enter</kbd>,diffdeck 会把文件引用、你选中的确切行以及你的提示**合成一段**复制到剪贴板,可直接粘贴到 Claude Code、Codex 或任意对话中。只想要代码?按 <kbd>⌥</kbd><kbd>Enter</kbd>(Windows/Linux 为 <kbd>Alt</kbd><kbd>Enter</kbd>),diffdeck 只复制你选中的行 —— 不带提示、代码围栏和文件头 —— 可直接粘贴进编辑器。不过跨越 diff 两侧的选区不会带上 `+`/`-` 标记,因此同一行的旧版本与新版本会前后相邻。

![Grab — diff 中高亮的行,以及旁边打开的提示输入框](grab.png)

Expand Down
11 changes: 10 additions & 1 deletion skills/diffdeck/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down Expand Up @@ -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 <n>` — serve on a specific port (default 49573, or `$DIFFDECK_PORT`).
Expand Down
Loading