|
@@ -1,9 +1,11 @@
|
|
|
-<script>
|
|
|
+<script lang="ts">
|
|
|
import { toast } from 'svelte-sonner';
|
|
|
import { goto } from '$app/navigation';
|
|
|
import { prompts } from '$lib/stores';
|
|
|
import { onMount, tick, getContext } from 'svelte';
|
|
|
|
|
|
+ const i18n = getContext('i18n');
|
|
|
+
|
|
|
import { getPromptByCommand, getPrompts, updatePromptByCommand } from '$lib/apis/prompts';
|
|
|
import { page } from '$app/stores';
|
|
|
|
|
@@ -18,6 +20,7 @@
|
|
|
});
|
|
|
|
|
|
if (prompt) {
|
|
|
+ toast.success($i18n.t('Prompt updated successfully'));
|
|
|
await prompts.set(await getPrompts(localStorage.token));
|
|
|
await goto('/workspace/prompts');
|
|
|
}
|