-
-
Notifications
You must be signed in to change notification settings - Fork 255
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
add llm keys remove [name]
command
#475
base: main
Are you sure you want to change the base?
Conversation
try: | ||
current = json.loads(path.read_text()) | ||
except json.decoder.JSONDecodeError: | ||
click.echo("Error reading keys file") | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think try could be ommited like in keys_list
.
if name not in current: | ||
click.echo(f"Key '{name}' not found") | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should return error (useful for scripting).
if name not in current: | ||
click.echo(f"Key '{name}' not found") | ||
return | ||
del current[name] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This maybe should check for special note key "// Note"
like keys_list does.
These commits add the
remove
functionality tollm keys
, add a test for that option, and update the relevant docs section.