qf
Browse files
src/lib/components/Playground/Playground.svelte
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
|
15 |
const messagesParam = queryParam('messages', {
|
16 |
encode: (value: Message[]) => JSON.stringify(value),
|
17 |
-
decode: (value: string | null) => value ? JSON.parse(value) : startMessages
|
18 |
});
|
19 |
|
20 |
const systemMessageParam = queryParam('system', {
|
@@ -55,7 +55,7 @@
|
|
55 |
}
|
56 |
|
57 |
function reset() {
|
58 |
-
$messagesParam = startMessages;
|
59 |
$systemMessageParam = '';
|
60 |
}
|
61 |
|
|
|
14 |
|
15 |
const messagesParam = queryParam('messages', {
|
16 |
encode: (value: Message[]) => JSON.stringify(value),
|
17 |
+
decode: (value: string | null) => (value ? JSON.parse(value) : startMessages)
|
18 |
});
|
19 |
|
20 |
const systemMessageParam = queryParam('system', {
|
|
|
55 |
}
|
56 |
|
57 |
function reset() {
|
58 |
+
$messagesParam = [...startMessages];
|
59 |
$systemMessageParam = '';
|
60 |
}
|
61 |
|