diff --git a/packages/frontend/src/lib/Card.svelte b/packages/frontend/src/lib/Card.svelte index 2383d8fa9..18ccb26b9 100644 --- a/packages/frontend/src/lib/Card.svelte +++ b/packages/frontend/src/lib/Card.svelte @@ -22,7 +22,7 @@ export let primaryBackground: string = 'bg-charcoal-800'; {/if} {#if title} diff --git a/packages/frontend/src/lib/Checkbox.svelte b/packages/frontend/src/lib/Checkbox.svelte index cf2ba2b17..f70c44d40 100644 --- a/packages/frontend/src/lib/Checkbox.svelte +++ b/packages/frontend/src/lib/Checkbox.svelte @@ -31,13 +31,13 @@ function onClick(checked: boolean) { class:cursor-pointer="{!disabled}" class:cursor-not-allowed="{disabled}"> {#if disabled} - + {:else if indeterminate} - + {:else if checked} - + {:else} - + {/if} diff --git a/packages/frontend/src/lib/ErrorMessage.svelte b/packages/frontend/src/lib/ErrorMessage.svelte index d286e2497..0ed44120f 100644 --- a/packages/frontend/src/lib/ErrorMessage.svelte +++ b/packages/frontend/src/lib/ErrorMessage.svelte @@ -10,14 +10,14 @@ export let icon = false; {#if icon} {#if error !== undefined && error !== ''} - + {/if} {:else}
- +
{/if} diff --git a/packages/frontend/src/lib/NavPage.svelte b/packages/frontend/src/lib/NavPage.svelte index a565f0333..3463c058a 100644 --- a/packages/frontend/src/lib/NavPage.svelte +++ b/packages/frontend/src/lib/NavPage.svelte @@ -18,7 +18,7 @@ export let contentBackground = '';
{#if icon}
- +
{/if}

{title}

diff --git a/packages/frontend/src/lib/Navigation.svelte b/packages/frontend/src/lib/Navigation.svelte index 672aff7b9..942c653ae 100644 --- a/packages/frontend/src/lib/Navigation.svelte +++ b/packages/frontend/src/lib/Navigation.svelte @@ -12,7 +12,7 @@ export let meta: TinroRouteMeta; aria-label="PreferencesNavigation">
- +

AI Studio

diff --git a/packages/frontend/src/lib/RecipeDetails.svelte b/packages/frontend/src/lib/RecipeDetails.svelte index 810613006..408b9264b 100644 --- a/packages/frontend/src/lib/RecipeDetails.svelte +++ b/packages/frontend/src/lib/RecipeDetails.svelte @@ -167,10 +167,12 @@ function startApplication() {
Repository
- - +
{#if localPath} diff --git a/packages/frontend/src/pages/ModelPlayground.svelte b/packages/frontend/src/pages/ModelPlayground.svelte index 156c11f43..e6a719d20 100644 --- a/packages/frontend/src/pages/ModelPlayground.svelte +++ b/packages/frontend/src/pages/ModelPlayground.svelte @@ -8,11 +8,12 @@ import type { QueryState } from '@shared/src/models/IPlaygroundQueryState'; import { playgroundStates } from '/@/stores/playground-states'; import type { PlaygroundState } from '@shared/src/models/IPlaygroundState'; import Card from '/@/lib/Card.svelte'; -export let model: ModelInfo | undefined; import { faPlay, faStop, faInfo, faWarning } from '@fortawesome/free-solid-svg-icons'; import ContainerIcon from '/@/lib/images/ContainerIcon.svelte'; import ErrorMessage from '/@/lib/ErrorMessage.svelte'; +export let model: ModelInfo | undefined; + let prompt = ''; let queryId: number; $: result = ''; @@ -41,11 +42,13 @@ onMount(() => { }); const unsubscribeStates = playgroundStates.subscribe((states: PlaygroundState[]) => { - playgroundState = states.find(state => state.modelId === model.id); - if (playgroundState === undefined) { - playgroundState = { modelId: model.id, status: 'none' }; + if (model) { + playgroundState = states.find(state => state.modelId === model?.id); + if (playgroundState === undefined) { + playgroundState = { modelId: model.id, status: 'none' }; + } + error = playgroundState.error ?? error; } - error = playgroundState.error ?? error; }); return () => {