new flow for Pi provider/model settings
This commit is contained in:
@@ -131,6 +131,7 @@ export const AIHarnessesSection = () => {
|
||||
try {
|
||||
await client.put('/server-settings/pi-mono/api-keys', { key: env, value });
|
||||
queryClient.invalidateQueries({ queryKey: ['PI_MONO_API_KEYS'] });
|
||||
queryClient.invalidateQueries({ queryKey: ['PI_MODELS'] });
|
||||
setKeyInputs((prev) => {
|
||||
const next = { ...prev };
|
||||
delete next[env];
|
||||
@@ -146,6 +147,7 @@ export const AIHarnessesSection = () => {
|
||||
await client.put('/server-settings/pi-mono/api-keys', { key: env, value: '' });
|
||||
}
|
||||
queryClient.invalidateQueries({ queryKey: ['PI_MONO_API_KEYS'] });
|
||||
queryClient.invalidateQueries({ queryKey: ['PI_MODELS'] });
|
||||
if (editingProvider === provider.key) setEditingProvider(null);
|
||||
};
|
||||
|
||||
@@ -225,6 +227,7 @@ export const AIHarnessesSection = () => {
|
||||
auth,
|
||||
});
|
||||
queryClient.invalidateQueries({ queryKey: ['PI_MONO_LOCAL_PROVIDERS'] });
|
||||
queryClient.invalidateQueries({ queryKey: ['PI_MODELS'] });
|
||||
toast.success(`Connected to ${probe.name}`);
|
||||
resetLocalForm();
|
||||
} catch {
|
||||
@@ -236,6 +239,7 @@ export const AIHarnessesSection = () => {
|
||||
const removeLocalProvider = async (id: string) => {
|
||||
await client.delete(`/server-settings/pi-mono/local-providers/${id}`);
|
||||
queryClient.invalidateQueries({ queryKey: ['PI_MONO_LOCAL_PROVIDERS'] });
|
||||
queryClient.invalidateQueries({ queryKey: ['PI_MODELS'] });
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user