feat(ai): improve AI implementation
enhancement
### What Problem Will This Feature Address?
When no AI provider API key is configured, the "Ask AI" badge remains visible in the bottom right of the screen. Clicking it leads to an unconfigured state, which causes UI clutter and confuses users expecting a working feature.
### Describe the Solution You'd Like
Hide the "Ask AI" badge automatically whenever no valid AI provider key is configured.
Optionally, prompt the user during installation to select and configure an existing API key:
```markdown
Do you have an API Key for an AI Provider?
[x] OpenRouter (Generic)
[ ] OpenAI (ChatGPT)
[ ] Google (Gemini)
[ ] Anthropic (Claude)
[ ] None
```
[x] shows the default
### Describe Alternatives You've Considered
Keep the badge visible, but disable input and display an empty state inside the widget:
"No AI provider configured. Please set an API key in settings to use Ask AI."
### Additional Context
If multiple AI providers are configured at once, consider adding a provider switcher dropdown in the top-left corner of the AI widget.
4 条评论