Skip to content

clai: Add ability to continue last conversation #2257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

uriyyo
Copy link

@uriyyo uriyyo commented Jul 19, 2025

Hi,

Thanks for clai, I'm using it all the time 🙌

One minor feature that I miss is the ability to continue the last conversation, cause my usage looks like this:

clai "first question"
clai "next question that basically related to first one"

So now it will be possible:

clai "first question"
clai -c "next question that basically related to first one"

I'm not sure if -c is a good option name, as it is usually used for configuration, so maybe -r/--resume would be a better option. I will be happy to update the implementation with better naming.

Copy link
Contributor

hyperlint-ai bot commented Jul 19, 2025

PR Change Summary

Added the ability to continue the last conversation in the clai CLI tool.

  • Introduced the '-c' option to continue the last conversation instead of starting a new one.
  • Updated usage instructions in the README to reflect the new option.
  • Provided a suggestion for renaming the option to '-r/--resume' for clarity.

Modified Files

  • clai/README.md

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

@uriyyo
Copy link
Author

uriyyo commented Jul 20, 2025

I don't know why coverage is not 100%(

@Kludex Kludex requested review from Kludex July 21, 2025 09:08
@Kludex
Copy link
Member

Kludex commented Jul 21, 2025

Hi @uriyyo 👋 Good to see you here. :)

Instead of just continuing the last conversation, can we select the session we want to continue? It would be nice to have a drop-down where the user could select the session. We can use the prompt-toolkit package for it.

@Kludex Kludex self-assigned this Jul 21, 2025
@uriyyo
Copy link
Author

uriyyo commented Jul 21, 2025

👋 Good to see you here. :)

@Kludex Long time no see, good to see you again!

@fswair
Copy link
Contributor

fswair commented Jul 22, 2025

Can we extend this with: #1981 @uriyyo @Kludex

@uriyyo uriyyo force-pushed the feature/clai-continue-conversation branch from 00b521a to 2990a68 Compare July 26, 2025 09:25
@uriyyo
Copy link
Author

uriyyo commented Jul 26, 2025

Instead of just continuing the last conversation, can we select the session we want to continue? It would be nice to have a drop-down where the user could select the session. We can use the prompt-toolkit package for it.

@Kludex Sounds interesting, any suggestions on how it should look like?

I imagine adding input query slugify that will assign session specific slug, and then you can continue session based on a generated slug.

For instance if we are doing query like this:

clai "How to start thread in python?"

Slug might look like this - python-start-thread (eventually it will be generated by LLM).

And then you can continue this session:

clai "and how can I start 10 threads" --session python-start-thread

Also, it makes sense to add /sessions and maybe /session [session] commands for interactive mode?

Where:
/sessions - show list of available sessions.
/session - show info about the current session.
/session $session-name - switch to a specific session.

I still would love to have ability to continue just last conversation, but it can be implemented around sessions.

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