Thomas G. Lopes
commited on
Commit
·
11e0dcc
1
Parent(s):
4e7f4fc
change prompt labeling
Browse files
src/lib/components/InferencePlayground/InferencePlaygroundProjectSelect.svelte
CHANGED
@@ -25,7 +25,7 @@
|
|
25 |
});
|
26 |
|
27 |
async function saveProject() {
|
28 |
-
session.saveProject((await prompt("
|
29 |
}
|
30 |
</script>
|
31 |
|
@@ -71,7 +71,7 @@
|
|
71 |
class="grid place-items-center rounded-md p-1 text-xs hover:bg-gray-300 dark:hover:bg-gray-600"
|
72 |
on:click={async e => {
|
73 |
e.stopPropagation();
|
74 |
-
session.updateProject(id, { name: (await prompt("
|
75 |
}}
|
76 |
>
|
77 |
<IconEdit />
|
|
|
25 |
});
|
26 |
|
27 |
async function saveProject() {
|
28 |
+
session.saveProject((await prompt("Set project name")) || "Project #" + ($session.projects.length + 1));
|
29 |
}
|
30 |
</script>
|
31 |
|
|
|
71 |
class="grid place-items-center rounded-md p-1 text-xs hover:bg-gray-300 dark:hover:bg-gray-600"
|
72 |
on:click={async e => {
|
73 |
e.stopPropagation();
|
74 |
+
session.updateProject(id, { name: (await prompt("Edit project name", name)) || name });
|
75 |
}}
|
76 |
>
|
77 |
<IconEdit />
|
src/lib/components/Prompts.svelte
CHANGED
@@ -52,7 +52,9 @@
|
|
52 |
use:clickOutside={resolvePrompt}
|
53 |
>
|
54 |
<div class="flex items-center justify-between rounded-t border-b p-4 md:px-5 md:py-4 dark:border-gray-800">
|
55 |
-
<h3 class="flex items-center gap-2.5 text-lg font-semibold text-gray-900 dark:text-white">
|
|
|
|
|
56 |
<button
|
57 |
type="button"
|
58 |
class="ms-auto inline-flex h-8 w-8 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white"
|
@@ -67,7 +69,6 @@
|
|
67 |
<!-- Modal body -->
|
68 |
<div class="p-4 md:p-5">
|
69 |
<label class="flex flex-col gap-2 font-medium text-gray-900 dark:text-white">
|
70 |
-
<p>{current.label}</p>
|
71 |
<!-- This is fine in dialogs -->
|
72 |
<!-- svelte-ignore a11y-autofocus -->
|
73 |
<input
|
|
|
52 |
use:clickOutside={resolvePrompt}
|
53 |
>
|
54 |
<div class="flex items-center justify-between rounded-t border-b p-4 md:px-5 md:py-4 dark:border-gray-800">
|
55 |
+
<h3 class="flex items-center gap-2.5 text-lg font-semibold text-gray-900 dark:text-white">
|
56 |
+
{current.label ?? "Prompt"}
|
57 |
+
</h3>
|
58 |
<button
|
59 |
type="button"
|
60 |
class="ms-auto inline-flex h-8 w-8 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
|
69 |
<!-- Modal body -->
|
70 |
<div class="p-4 md:p-5">
|
71 |
<label class="flex flex-col gap-2 font-medium text-gray-900 dark:text-white">
|
|
|
72 |
<!-- This is fine in dialogs -->
|
73 |
<!-- svelte-ignore a11y-autofocus -->
|
74 |
<input
|