Skip to content
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

fix: removed the diff when default profile changes. Printed the current profile info instead #92

Merged
merged 4 commits into from
Sep 26, 2024

Conversation

lifeizhou-ap
Copy link
Collaborator

@lifeizhou-ap lifeizhou-ap commented Sep 25, 2024

What

  • Removed the prompt if the default profile setting is changed
  • Displayed the profile info in use
  • Fixed the bug when the specified profile is not in the config file

Rules with this change

  1. When the config file does not exist and no profile name is specified in the command, create a config file and set a default profile with name 'default' in the file
  2. When the config file does not exist and profile name is specified in the command, create a config file and set a default profile with specified profile name in the file
  3. When profile name is not specified in the command line, use the profile with name 'default'. If 'default' does not exist, create the default profile with name 'default'
  4. When the specified profile does not exist in the config file, create a default profile settings with the specified profile name
  5. When the specified profile exist in the config file, do nothing

Screenshot 2024-09-25 at 3 19 12 PM
Screenshot 2024-09-25 at 3 19 50 PM

Screenshot 2024-09-25 at 3 20 32 PM
Screenshot 2024-09-25 at 3 20 56 PM
Screenshot 2024-09-25 at 3 21 10 PM

@lifeizhou-ap lifeizhou-ap changed the title removed the diff when default profile changes. printed the current pr… fix: removed the diff when default profile changes. Printed the current profile info instead Sep 25, 2024
@codefromthecrypt
Copy link
Collaborator

when finished, if you can put into the PR a triple backticked shell output of what it looks like now, or a screen grab, thanks

@lifeizhou-ap lifeizhou-ap linked an issue Sep 25, 2024 that may be closed by this pull request
@lifeizhou-ap lifeizhou-ap marked this pull request as ready for review September 25, 2024 05:22
Copy link
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

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

very nice!

Copy link
Collaborator

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

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

love it.

food for thought: conflate --profile when there is none there with a hint. e.g. --profile openai makes a profile for that, similarly ollama. This would allow us to skip the detection loop

Copy link
Collaborator

@baxen baxen left a comment

Choose a reason for hiding this comment

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

LGTM

@lifeizhou-ap lifeizhou-ap merged commit d56c0d6 into main Sep 26, 2024
6 checks passed
@lifeizhou-ap lifeizhou-ap deleted the lifei/remove-reminder-for-default-profile-change branch October 4, 2024 01:18
lily-de pushed a commit that referenced this pull request Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove prompt to correct default session
4 participants