Handle auth for claude (#36442)
We'll now use the anthropic provider to get credentials for `claude` and embed its configuration view in the panel when they are not present. Release Notes: - N/A
This commit is contained in:
parent
50819a9d20
commit
8b89ea1a80
32 changed files with 400 additions and 124 deletions
|
|
@ -107,7 +107,7 @@ pub enum Event {
|
|||
InlineAssistantModelChanged,
|
||||
CommitMessageModelChanged,
|
||||
ThreadSummaryModelChanged,
|
||||
ProviderStateChanged,
|
||||
ProviderStateChanged(LanguageModelProviderId),
|
||||
AddedProvider(LanguageModelProviderId),
|
||||
RemovedProvider(LanguageModelProviderId),
|
||||
}
|
||||
|
|
@ -148,8 +148,11 @@ impl LanguageModelRegistry {
|
|||
) {
|
||||
let id = provider.id();
|
||||
|
||||
let subscription = provider.subscribe(cx, |_, cx| {
|
||||
cx.emit(Event::ProviderStateChanged);
|
||||
let subscription = provider.subscribe(cx, {
|
||||
let id = id.clone();
|
||||
move |_, cx| {
|
||||
cx.emit(Event::ProviderStateChanged(id.clone()));
|
||||
}
|
||||
});
|
||||
if let Some(subscription) = subscription {
|
||||
subscription.detach();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue