You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assistant: direct user to sign into anthropic when no chat providers available (#8302)
### Summary
- addresses #8256
- stop gap in place of #8292
which may be revived in
#8301https://github.com/user-attachments/assets/f769c080-0b92-48ad-be00-62ce7ab3bf08
### Release Notes
#### Bug Fixes
- Assistant: guidance to sign into Anthropic when no Chat providers are
registered (#8256)
### QA Notes
@:assistant
When the user has no Chat providers (not signed into any providers or
only signed into Copilot), the user should see:
- the "Set Up Positron Assistant" welcome page with Anthropic-specific
guidance
- an error message directing the user to sign in with Anthropic if input
is submitted in the chat
// TODO: make this more generic once we support more model providers https://github.com/posit-dev/positron/issues/8301
456
+
thrownewError('No language models available for chat. Please ensure you have logged into Anthropic as a language model provider by clicking `Add Model Provider...` or running the command `Positron Assistant: Configure Language Model Providers` and authenticating with Anthropic.');
welcomeText=localize('positronAssistant.comingSoonMessage',"Positron Assistant is under development and will be available in a future version of Positron.\n");
welcomeTitle=localize('positronAssistant.gettingStartedTitle',"Set Up Positron Assistant");
746
-
constaddLanguageModelMessage=localize('positronAssistant.addLanguageModelMessage',"Add Language Model Provider");
751
+
constaddLanguageModelMessage=hasAdditionalModels
752
+
? localize('positronAssistant.addLanguageModelMessage',"Add Language Model Provider")
753
+
: localize('positronAssistant.addLanguageModelMessageAnthropic',"Add Anthropic as a Chat Provider");
747
754
firstLinkToButton=true;
748
-
// create a multi-line message
749
-
welcomeText=localize('positronAssistant.welcomeMessage',"To use Positron Assistant you must first select and authenticate with a language model provider.\n");
755
+
welcomeText=hasAdditionalModels
756
+
? localize('positronAssistant.welcomeMessage',"To use Positron Assistant you must first select and authenticate with a language model provider.\n")
757
+
: localize('positronAssistant.welcomeMessageAnthropic',"To use Positron Assistant Chat, you must first authenticate with Anthropic.\n");
0 commit comments