Skip to content

feat: Add :clone command for intelligent conversation management#1962

Merged
tusharmath merged 20 commits intotailcallhq:mainfrom
dariuszkowalski-com:feature/conversation-clone-shell-plugin-clean
Nov 29, 2025
Merged

feat: Add :clone command for intelligent conversation management#1962
tusharmath merged 20 commits intotailcallhq:mainfrom
dariuszkowalski-com:feature/conversation-clone-shell-plugin-clean

Conversation

@dariuszkowalski-com
Copy link
Copy Markdown
Contributor

@dariuszkowalski-com dariuszkowalski-com commented Nov 24, 2025

Summary

Adds a new clone command to the Forge ZSH plugin that provides intelligent conversation cloning with smart display logic.

What It Does

  • Interactive Cloning: :clone opens an fzf interface to select and clone conversations
  • Direct Cloning: :clone clones a specific conversation without selection
  • Smart Display: Shows full conversation details only when cloning different conversations
  • Clean Output: Minimal output when cloning current conversation (no redundant info)
  • Seamless Switching: Automatically switches to the cloned conversation with context

User Experience

  • Simple, intelligent single command
  • :clone for interactive selection
  • :clone for direct cloning

Key Features

  • fzf Integration: Same familiar interface as :conversation
  • Context Awareness: Knows when you are cloning current vs different conversation
  • Visual Feedback: Clear success messages and conversation switching logs
  • Zero Redundancy: Hides conversation details when they are already visible

Resolve one element of: #1818

- Add support for :conversation clone to clone current conversation
- Add support for :conversation clone <id> to clone specific conversation
- Implement proper error handling for no active conversation scenarios
- Add visual feedback with progress spinner and success/error messages
- Extract and switch to new conversation ID automatically
- Show conversation info after successful clone
- Maintain backward compatibility with existing :conversation behavior

Co-Authored-By: ForgeCode <noreply@forgecode.dev>
@github-actions github-actions Bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Nov 24, 2025
@tusharmath
Copy link
Copy Markdown
Collaborator

How about instead of using :conversation clone we just do :clone? I think its a much easier to type.

@dariuszkowalski-com
Copy link
Copy Markdown
Contributor Author

dariuszkowalski-com commented Nov 25, 2025

How about instead of using :conversation clone we just do :clone? I think its a much easier to type.

The name :clone is ambiguous; it can refer to many things. :conversation clone
indicates the specific context.

I would consider adding the alias :clone, similar to :plan for :muse

I wonder to add other contextual functions:

  • :conversation rename - rename a conversation alias (':rename' would be also ambiguous)
  • :conversation prompts list of user prompts in current conversation. Use to change to each one and continue conversation from this point of time (':prompts' alias would be possible)

@tusharmath
Copy link
Copy Markdown
Collaborator

What else could :clone conflate with?

My Concerns with :conversation clone

  1. Its too verbose. When I say :clone, or :new, I mean it in the context of the current conversation. Also the ability to specify an id :clone de0e219c-87f2-48ce-b8d7-d4ee9332f769 comes naturally.
  2. Its difficult for the user to know about this command unless its documented.
  3. It breaks a standard that we flow - <command> <parameter>, introduces a new concept for subcommands - <command> <sub-command> <parameter>.

@dariuszkowalski-com
Copy link
Copy Markdown
Contributor Author

dariuszkowalski-com commented Nov 25, 2025

What else could :clone conflate with?

My Concerns with :conversation clone

  1. Its too verbose. When I say :clone, or :new, I mean it in the context of the current conversation. Also the ability to specify an id :clone de0e219c-87f2-48ce-b8d7-d4ee9332f769 comes naturally.
  1. Its difficult for the user to know about this command unless its documented.
  1. It breaks a standard that we flow - <command> <parameter>, introduces a new concept for subcommands - <command> <sub-command> <parameter>.

We can use :clone . It would be a good idea to group all connected with conversation and show them in help (now only in interactive /help).

It could be shown as in :env

CONVERSATIONS:
:new description
:compact description
:clone description
:prompts description
:rename description
:remove description

we can do the same with other commands.
But it should be a different PR, right?

@tusharmath
Copy link
Copy Markdown
Collaborator

Im not sure if I understood it. Will the user have to take two steps?

  1. :conversation
  2. :clone

On a side note - :clone de0e219c-87f2-48ce-b8d7-d4ee9332f769 should work but if the user says just :clone we should trigger fzf for the user to select any conversation to clone.

@dariuszkowalski-com
Copy link
Copy Markdown
Contributor Author

dariuszkowalski-com commented Nov 25, 2025

Im not sure if I understood it. Will the user have to take two steps?

1. `:conversation`

2. `:clone`

On a side note - :clone de0e219c-87f2-48ce-b8d7-d4ee9332f769 should work but if the user says just :clone we should trigger fzf for the user to select any conversation to clone.

there are two scenarios:

  • when user is in a conversation can just call a :clone command . Current conversation will be duplicated, and user will continue on the clone of conversation.

  • when user enter :clone <id> conversation with will be cloned and user will continue on this copy.

Automatic switching to cloned conversation is ok, because the old one stay untouched and user will able to return it easly.

@dariuszkowalski-com
Copy link
Copy Markdown
Contributor Author

dariuszkowalski-com commented Nov 25, 2025

The first one :clone without id is more usable from my point of view.

When I work with :sage I Explore many path and ideas. I need to clone current conversation and go on with first idea.

Then I want to return to start point and clone it ones against , and continue with new idea.

This scenario will works in interactive forge.

In zsh plugin we hava fzf and choose a conversation from the list not enter id is better and more usable.

@dariuszkowalski-com dariuszkowalski-com marked this pull request as draft November 25, 2025 18:24
@dariuszkowalski-com dariuszkowalski-com changed the title feat(shell): implement :conversation clone command feat: Add :clone command for intelligent conversation management Nov 25, 2025
@dariuszkowalski-com dariuszkowalski-com marked this pull request as ready for review November 25, 2025 21:21
@dariuszkowalski-com
Copy link
Copy Markdown
Contributor Author

I have rewritten a feature and rename it. It uses fzf and a name is :clone

@dariuszkowalski-com dariuszkowalski-com changed the title feat: Add :clone command for intelligent conversation management feat: Add :clone command for intelligent conversation management Nov 26, 2025
@tusharmath
Copy link
Copy Markdown
Collaborator

Tried the PR, but it still requires :conversation clone ... command. Secondly the fzf drop down did not open automatically, when I did not pass the conversation id.

@dariuszkowalski-com
Copy link
Copy Markdown
Contributor Author

i need to check it maybe PR do not go as I expected.
I remove :conversation clone complatelly

dariuszkowalski-com and others added 4 commits November 26, 2025 15:23
- Add new :clone command for interactive conversation cloning
- Implement fzf interface similar to :conversation
- Add conditional display logic: show full details only when cloning different conversations
- Skip conversation show/info when cloning current conversation to avoid redundant output
- Update documentation with usage examples and scenarios

BREAKING CHANGE: None - adds new functionality
- Remove :conversation clone and :conversation clone <id> implementation
- Keep dedicated :clone command as the primary way to clone conversations
- Simplify _forge_action_conversation function by removing clone logic
- Ensure clean separation between conversation management and cloning

BREAKING CHANGE: :conversation clone commands are no longer available, use :clone instead
- Add :clone command to built-in commands list in UI
- Replace hardcoded echo statements with _forge_log function in shell plugin
- Ensure consistent logging format across all forge commands
- Improve user experience with proper timestamped log messages
@dariuszkowalski-com
Copy link
Copy Markdown
Contributor Author

I have added :clone to list of built-in commands and have updated code to use _forge_log

@dariuszkowalski-com dariuszkowalski-com force-pushed the feature/conversation-clone-shell-plugin-clean branch 2 times, most recently from 0b198db to c28b7bc Compare November 27, 2025 22:41
@dariuszkowalski-com dariuszkowalski-com marked this pull request as draft November 27, 2025 22:51
- Add _forge_action_clone function with fzf selection interface
- Add _forge_clone_and_switch helper function
- Add clone case to command dispatcher
- Preserve conversation cloning and switching functionality
- Maintain compatibility with existing workflow
@dariuszkowalski-com dariuszkowalski-com force-pushed the feature/conversation-clone-shell-plugin-clean branch from c28b7bc to 9e9b1e0 Compare November 27, 2025 23:12
- Add fixme.md and check.md to fixtures directory
- Fix test failure caused by missing fixture files
- Ensure test can properly parse built-in commands
- Update paths to use src/fixtures/commands/ instead of fixtures/commands/
- Fix test failure in CI environment where fixtures are in src/fixtures/
- Ensure test can find and load command fixtures correctly
- Restore original .forge/commands/ directory structure
- Remove temporary fixtures from src/fixtures/commands/
- Fix test to use original paths: ../../.forge/commands/fixme.md
- Ensure test validates real command files, not mocks
- Preserve application's command functionality
- Add missing untracked files from .forge/skills/ and benchmarks/
- Remove incorrect fixtures from src/fixtures/commands/
- Ensure all files from main branch are properly tracked
- Fix test paths to use original .forge/commands/ structure
- Reset all .forge/ and benchmarks/ files to origin/main state
- These files are not part of this branch's functionality
- Ensure clean separation from unrelated changes
- Preserve only :clone functionality changes in shell plugin and built_in_commands.json
@dariuszkowalski-com dariuszkowalski-com marked this pull request as ready for review November 27, 2025 23:53
@tusharmath tusharmath merged commit a38ed15 into tailcallhq:main Nov 29, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants