Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions ui-svelte/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions ui-svelte/src/components/playground/AudioInterface.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,6 @@
<!-- Model selector -->
<div class="shrink-0 flex flex-wrap gap-2 mb-4">
<ModelSelector bind:value={$selectedModelStore} placeholder="Select an audio model..." disabled={isTranscribing} />
<button class="btn" onclick={clearAll} disabled={!selectedFile && !transcriptionResult && !error}>
Clear
</button>
</div>

<!-- Empty state for no models configured -->
Expand Down Expand Up @@ -241,6 +238,13 @@
>
Transcribe
</button>
<button
class="btn"
onclick={clearAll}
disabled={!selectedFile && !transcriptionResult && !error}
>
Clear
</button>
{/if}
</div>
{/if}
Expand Down
6 changes: 4 additions & 2 deletions ui-svelte/src/components/playground/ExpandableTextarea.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { untrack } from "svelte";
import { Maximize2, X } from "lucide-svelte";

interface Props {
Expand Down Expand Up @@ -45,7 +46,8 @@
$effect(() => {
if (isExpanded && expandedTextarea) {
expandedTextarea.focus();
expandedTextarea.setSelectionRange(expandedValue.length, expandedValue.length);
const len = untrack(() => expandedValue.length);
expandedTextarea.setSelectionRange(len, len);
}
});
</script>
Expand All @@ -60,7 +62,7 @@
{disabled}
></textarea>
<button
class="absolute top-2 right-2 p-1.5 rounded-lg opacity-0 group-hover:opacity-100 transition-opacity bg-surface/90 hover:bg-surface border border-gray-200 dark:border-white/10 shadow-sm"
class="absolute top-2 right-2 p-1.5 rounded-lg opacity-60 md:opacity-0 group-hover:opacity-100 transition-opacity bg-surface/90 hover:bg-surface border border-gray-200 dark:border-white/10 shadow-sm"
onclick={openExpanded}
title="Expand to edit"
type="button"
Expand Down
11 changes: 8 additions & 3 deletions ui-svelte/src/components/playground/ImageInterface.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
function clearImage() {
generatedImage = null;
error = null;
prompt = "";
}

function downloadImage() {
Expand Down Expand Up @@ -117,9 +118,6 @@
<option value="1024x1792">1024x1792 (SDXL)</option>
</optgroup>
</select>
<button class="btn" onclick={clearImage} disabled={!generatedImage && !error}>
Clear
</button>
</div>

<!-- Empty state for no models configured -->
Expand Down Expand Up @@ -192,6 +190,13 @@
>
Generate
</button>
<button
class="btn flex-1 md:flex-none"
onclick={clearImage}
disabled={!generatedImage && !error && !prompt.trim()}
>
Clear
</button>
{/if}
</div>
</div>
Expand Down
Loading