gpts: make provider indicator icon update

This commit is contained in:
end-4
2025-04-06 17:04:33 +02:00
parent be8fd15e92
commit 885c4b9679
6 changed files with 6 additions and 7 deletions
+5 -2
View File
@@ -59,7 +59,10 @@ const ProviderSwitcher = () => {
}
let indicatorIcon = Icon({
icon: GPTService.providers[userOptions.ai.defaultGPTProvider]['logo_name'],
className: 'txt-large'
className: 'txt-large',
setup: (self) => self.hook(GPTService, (self) => {
self.icon = GPTService.providers[GPTService.providerID]['logo_name'];
}, 'providerChanged')
});
const indicatorChevron = MaterialIcon('expand_more', 'norm');
const indicatorButton = Button({
@@ -146,7 +149,7 @@ const GPTInfo = () => {
Button({
className: 'txt-subtext txt-norm icon-material',
label: 'info',
tooltipText: getString('Uses gpt-3.5-turbo.\nNot affiliated, endorsed, or sponsored by OpenAI.\n\nPrivacy: OpenAI claims they do not use your data\nwhen you use their API. Idk about others.'),
tooltipText: getString("Chat with models compatible with OpenAI's Chat Completions API.\nNot affiliated, endorsed, or sponsored by any of the providers."),
setup: setupCursorHoverInfo,
}),
]