Repository navigation
feat: AI: Ask for API key inline in chat input - #357
Conversation
Signed-off-by: Ilya Boyandin <[email protected]>
Signed-off-by: Ilya Boyandin <[email protected]>
Signed-off-by: Ilya Boyandin <[email protected]>
Signed-off-by: Ilya Boyandin <[email protected]>
📝 WalkthroughWalkthroughAdds an inline API-key input component to Chat.Composer, wires it to update provider settings, and introduces per-provider API key error tracking with runtime authentication-error detection in the chat transport. Changes
Sequence DiagramsequenceDiagram
participant User
participant InlineApiKeyInput
participant MainView
participant AiSlice
participant ChatTransport
User->>InlineApiKeyInput: Type API key and Save
InlineApiKeyInput->>MainView: onSaveApiKey(provider, apiKey)
MainView->>AiSlice: updateProvider(provider, { apiKey })
AiSlice->>AiSlice: persist provider apiKey in settings
User->>ChatTransport: Send chat request
ChatTransport->>AiSlice: getApiKeyFromSettings()
AiSlice-->>ChatTransport: return apiKey
ChatTransport->>ChatTransport: perform API request
alt Authentication error detected
ChatTransport->>ChatTransport: isAuthenticationError() => true
ChatTransport->>AiSlice: setApiKeyError(provider, true)
AiSlice->>AiSlice: mark provider apiKey error
ChatTransport-->>User: surface auth error
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…r-API-key-inline-in-chat-input Signed-off-by: Ilya Boyandin <[email protected]>
Kapture.2026-02-11.at.14.33.08.mp4
Summary by CodeRabbit