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

Provide white glove service if config is missing #22

Open
2 tasks
alexanderilyin opened this issue Dec 14, 2024 · 2 comments
Open
2 tasks

Provide white glove service if config is missing #22

alexanderilyin opened this issue Dec 14, 2024 · 2 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@alexanderilyin
Copy link

alexanderilyin commented Dec 14, 2024

On the first use, if no API key is found, the user should be prompted for the API key and the result should be saved in the container user home folder.

TODO

  • Integrate status of credential configuration with https://starship.rs/
    • Show if credentials are set and the source of credentials being used.
@alexanderilyin alexanderilyin added the good first issue Good for newcomers label Dec 14, 2024
@alexanderilyin alexanderilyin self-assigned this Dec 14, 2024
@alexanderilyin
Copy link
Author

  • Not sure if I actually can ask for user input from pre-commit managed hook but need to check.
  • Maybe it's possible during pre-commit install
  • Last resort in managed container is to have something installed in ~/.bashrc which will "validate" installed features and prompt for tokens if necessary.

@alexanderilyin
Copy link
Author

Here is current UX if variable has 1Password placeholder

OPENROUTER_API_KEY=op://.../.../...
PartCAD: Prepare Commit Message..........................................Failed
- hook id: prepare-commit-msg
- exit code: 1

removed '/tmp/tmp.AlndLPXVXk'
removed '/tmp/tmp.cE4azxHFsn'
removed '/tmp/tmp.VXsyFvRHmj'
ERROR: API request failed: Invalid credentials

And here is the UX for loading actual credentials:

⬢ [Docker] ❯ source env.sh 
Using configuration at non-standard location "/workspaces/partcad/.op"
Enter the password for [email protected] at my.1password.com: 
Using configuration at non-standard location "/workspaces/partcad/.op"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant