Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// CSS vars (fallback for devices where env(safe-area-inset-*) misses
// system bars or gesture areas). Re-runs on resize/visibility change
// so rotation and keyboard transitions refresh the values.
(function () {
;(function () {
function apply() {
try {
var bridge = window.AndroidBridge
Expand Down
13 changes: 10 additions & 3 deletions src/lib/components/settings/ImageModelSelect.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import type { ImageModelInfo } from '$lib/services/ai/image'

Check warning on line 2 in src/lib/components/settings/ImageModelSelect.svelte

View workflow job for this annotation

GitHub Actions / lint-and-typecheck

Import from the service public API (index.ts), not internal modules. Use relative imports within the same service
import { Autocomplete } from '$lib/components/ui/autocomplete'
import { Button } from '$lib/components/ui/button'
import { RefreshCw, Loader2, Check, ImagePlus } from 'lucide-svelte'
Expand All @@ -7,7 +7,7 @@
import {
DEFAULT_AVG_PROMPT_TOKENS,
DEFAULT_AVG_IMAGE_TOKENS,
} from '$lib/services/ai/image/constants'

Check warning on line 10 in src/lib/components/settings/ImageModelSelect.svelte

View workflow job for this annotation

GitHub Actions / lint-and-typecheck

Import from the service public API (index.ts), not internal modules. Use relative imports within the same service

interface Props {
models: ImageModelInfo[]
Expand Down Expand Up @@ -113,7 +113,14 @@
{/if}
</div>
{:else if filteredModels.length === 0}
<p class="text-muted-foreground text-sm">No models available</p>
<div class="flex items-center justify-between gap-2">
<p class="text-muted-foreground text-sm">No models available</p>
{#if showRefreshButton && onRefresh}
<Button variant="ghost" size="icon" onclick={onRefresh} aria-label="Refresh models">
<RefreshCw class="h-4 w-4" />
</Button>
{/if}
</div>
{:else}
<div class="flex items-center gap-2">
<div class="flex-1">
Expand Down Expand Up @@ -170,8 +177,8 @@
</Autocomplete>
</div>
{#if showRefreshButton && onRefresh}
<Button variant="ghost" size="icon" onclick={onRefresh} disabled={isLoading}>
<RefreshCw class="h-4 w-4 {isLoading ? 'animate-spin' : ''}" />
<Button variant="ghost" size="icon" onclick={onRefresh} aria-label="Refresh models">
<RefreshCw class="h-4 w-4" />
</Button>
{/if}
</div>
Expand Down
Loading
Loading