refresh router -> refresh assistants (#3271)

This commit is contained in:
pablodanswer
2024-11-27 11:11:58 -08:00
committed by GitHub
parent 07dfde2209
commit 9c0cc94f15
2 changed files with 4 additions and 4 deletions

View File

@@ -405,7 +405,7 @@ export function AssistantEditor({
message: `"${assistant.name}" has been added to your list.`, message: `"${assistant.name}" has been added to your list.`,
type: "success", type: "success",
}); });
router.refresh(); await refreshAssistants();
} else { } else {
setPopup({ setPopup({
message: `"${assistant.name}" could not be added to your list.`, message: `"${assistant.name}" could not be added to your list.`,

View File

@@ -90,7 +90,7 @@ export function PersonasTable() {
message: `Failed to update persona order - ${await response.text()}`, message: `Failed to update persona order - ${await response.text()}`,
}); });
setFinalPersonas(assistants); setFinalPersonas(assistants);
router.refresh(); await refreshAssistants();
return; return;
} }
@@ -151,7 +151,7 @@ export function PersonasTable() {
persona.is_visible persona.is_visible
); );
if (response.ok) { if (response.ok) {
router.refresh(); await refreshAssistants();
} else { } else {
setPopup({ setPopup({
type: "error", type: "error",
@@ -183,7 +183,7 @@ export function PersonasTable() {
onClick={async () => { onClick={async () => {
const response = await deletePersona(persona.id); const response = await deletePersona(persona.id);
if (response.ok) { if (response.ok) {
router.refresh(); await refreshAssistants();
} else { } else {
alert( alert(
`Failed to delete persona - ${await response.text()}` `Failed to delete persona - ${await response.text()}`