smartcat icon indicating copy to clipboard operation
smartcat copied to clipboard

feat: implement multiple named conversations

Open bytesoverflow opened this issue 1 year ago • 3 comments

  • Replace single conversation file with a conversations directory structure
  • Add support for named conversations via -n/--name flag
  • Implement conversation name validation
  • Add test coverage for conversation management

bytesoverflow avatar Nov 06 '24 11:11 bytesoverflow

So, this is my attempt! Critique welcome :)

bytesoverflow avatar Nov 06 '24 11:11 bytesoverflow

Thank you, I agree the API feels odd - I think what you're suggesting would be an improvement.

bytesoverflow avatar Nov 11 '24 07:11 bytesoverflow

After using smartcat for a bit, I had the same thought as @bytesoverflow - that being able to have multiple conversations going would be hugely beneficial (that's the paradigm I use for ChatGPT and really enjoy it).

I tried modifying the existing -e, --extend-conversation (as I thought that was the easist way to enable this feature), but I determined that without changing some other assumptions, that approach wouldn't work - here's why:

sc "Say Hello"              # write to unnamed conversation
sc "Print wave emoji"       # over-write unnamed conversation
sc -e "Again"               # ?????
sc -e "emoji" "add a shrug" # Copy unnamed conversation to 'emoji', then add to it

The problem is that intent of line 3 is difficult to determine:

  • "Again" could be the desired "name" of the conversation, and we want to use the default template with no input
  • "Again" could be the "input" and we want to use the unnamed conversation and default template
  • "Again" could be the template and we want to use the unnamed conversation and no input

smartcat already handles the third use case by checking if Again is a known template, but differentiating the first two is problematic.

I would REALLY love to see this feature added, and I think that a secondary param of -n --name "name" would be the safest way to add it.

EDIT: I just tried out the MR, and it would be nice if this worked:

sc "Say Hello"                   # over-write unnamed converation
sc -e "Now add a wave"           # Add to unnamed conversation
sc -e -n greeting "Add a shrug"  # Copy unnamed conversation to 'greeting', then add to it

But right now I get an error saying the conversation hasn't started yet.

Flare576 avatar Jun 13 '25 19:06 Flare576