Skip to content

Feature: forking conversationsΒ #365

@jgarvin

Description

@jgarvin

The web UIs for most of the popular models now let you edit earlier answers, which then deletes everything that came after and lets you pretend the conversation went a different way. This is very useful for conserving tokens, you often go down an unhelpful path and realize you need to back up several prompts to edit something. comint lets you go to earlier prompts, and you can type on them, but when you hit enter it will repeat the original version of the prompt from that line, not the edited one. Example:

First I just say "testing":

Claude(4-opus/General)> testing
<shell-maker-end-of-prompt>
Hello! I'm here to help you with programming questions, debugging, code explanations, or any other technical topics you'd like to explore. 

What would you like to test or work on today? Here are some things I can help with:

- **Code Review**: Share code for feedback and improvements
- **Debugging**: Help track down and fix bugs
- **Algorithm Design**: Work through problem-solving approaches
- **Language-Specific Questions**: Python, JavaScript, Java, C++, and more
- **System Design**: Discuss architecture and design patterns
- **Testing Strategies**: Unit tests, integration tests, TDD approaches

Feel free to share your code or describe what you're working on!

Then I go back to edit the answer and hit enter:

Claude(4-opus/General)> testing can I change this?
<shell-maker-end-of-prompt>
Hello! I'm here to help you with programming questions, debugging, code explanations, or any other technical topics you'd like to explore. 

What would you like to test or work on today? Here are some things I can help with:

- **Code Review**: Share code for feedback and improvements
- **Debugging**: Help track down and fix bugs
- **Algorithm Design**: Work through problem-solving approaches
- **Language-Specific Questions**: Python, JavaScript, Java, C++, and more
- **System Design**: Discuss architecture and design patterns
- **Testing Strategies**: Unit tests, integration tests, TDD approaches

Feel free to share your code or describe what you're working on!

Claude(4-opus/General)> testing
<shell-maker-end-of-prompt>
I see you're testing! Yes, you can interact with me and I'll respond to help with your programming needs. 

Here's a quick example to show I'm working - let's say you wanted to test a simple function:

```python
def greet(name):
    """A simple greeting function"""
    return f"Hello, {name}! Welcome to the coding session."

# Test it out
print(greet("Developer"))
# Output: Hello, Developer! Welcome to the coding session.

Feel free to:
- **Ask specific questions** about code
- **Share code snippets** for review
- **Request examples** in any programming language
- **Explore concepts** you're learning

What would you like to test or work on specifically?

As you can see it just repeated the "testing" prompt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions