claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[FEATURE] Show the last model response in a commented out block at the bottom of 'edit prompt' in external editor?

Open tekacs opened this issue 1 month ago • 1 comments

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When editing a prompt in an external editor, the nature of that prompt is often – for me – a response to the model's last set of question(s).

In those situations, for those of us who use a terminal $EDITOR like neovim/vim are dropped into a fullscreen view of our editor... with no view of the question(s) being asked.

Proposed Solution

It would be super helpful if Claude Code would consider including the model's last response in file-to-be-edited, in a section that it's able to automatically strip out upon completing the prompt edits, akin to how Git and JJ include context when you're making a commit.

Not only would that make it far easier to respond to the model's questions, but it'd also make it far easier to copy/quote sections of the model's response in our own response – "to where you said, <copy/paste from model response>, I think that..."

Alternative Solutions

No response

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

No response

Additional Context

Git approaches this by excluding lines beginning with # :


# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch main
#
# Initial commit
#
# Changes to be committed:
#	new file:   example
#

JJ has the neat approach that it uses JJ: markers (unlikely to show up accidentally) as well as JJ: ignore-rest, where ignore-rest makes it easy fully elide the rest of the file.


JJ: This commit contains the following changes:
JJ:     example | 1 +
JJ:     1 file changed, 1 insertion(+), 0 deletions(-)

JJ: ignore-rest
diff --git a/example b/example
new file mode 100644
index 0000000000..a042389697
--- /dev/null
+++ b/example
@@ -0,0 +1,1 @@
+hello world!

JJ: Lines starting with "JJ:" (like this one) will be removed.

tekacs avatar Nov 29 '25 13:11 tekacs