fix: Prevent API key banner from displaying when key is unavailable (#7356)
fix: prevent displaying API key banner when key is not available - Added a conditional check to ensure the API key banner is only displayed if a valid API key is retrieved. This improves user experience by avoiding unnecessary prompts.
This commit is contained in:
parent
2007495ec4
commit
b4124a4027
1 changed files with 2 additions and 1 deletions
|
|
@ -591,7 +591,8 @@ def api_key(
|
||||||
|
|
||||||
unmasked_api_key = asyncio.run(aapi_key())
|
unmasked_api_key = asyncio.run(aapi_key())
|
||||||
# Create a banner to display the API key and tell the user it won't be shown again
|
# Create a banner to display the API key and tell the user it won't be shown again
|
||||||
api_key_banner(unmasked_api_key)
|
if unmasked_api_key:
|
||||||
|
api_key_banner(unmasked_api_key)
|
||||||
|
|
||||||
|
|
||||||
def show_version(*, value: bool):
|
def show_version(*, value: bool):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue