Skip to content

Conversation

@bytesoverflow
Copy link

  • 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
Copy link
Author

So, this is my attempt! Critique welcome :)

- 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
- Use conversation.toml for storing latest conversation state
- Remove unnecessary directory creation in config initialization
- Update test coverage
Copy link
Owner

@efugier efugier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, good stuff!

After some testing this works nicely you really did a good job!

I am questioning the final API, maybe there should be a shorthand -e "name" instead of -e -n "name" which kinda feels redundant, and -e "name maybe should create the new conversation if it doesn't exist, then we actually lose the need for the -n except for overriding an existing one.

Let me warp my head about what would feel the most natural or use! Happy to hear your thoughts on the matter in the meantime 🙂

@bytesoverflow
Copy link
Author

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

@Flare576
Copy link

Flare576 commented Jun 13, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants