diff --git a/.devops/cann.Dockerfile b/.devops/cann.Dockerfile index 1d4393613..83df40950 100644 --- a/.devops/cann.Dockerfile +++ b/.devops/cann.Dockerfile @@ -25,6 +25,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./ RUN npm ci COPY ui/apps/chat/ ./ +# the app compiles Llama UI from its source next to it +COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json +COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/ RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build FROM ${CANN_BASE_IMAGE} AS build diff --git a/.devops/cpu.Dockerfile b/.devops/cpu.Dockerfile index 605247ac2..e195b5ac8 100644 --- a/.devops/cpu.Dockerfile +++ b/.devops/cpu.Dockerfile @@ -15,6 +15,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./ RUN npm ci COPY ui/apps/chat/ ./ +# the app compiles Llama UI from its source next to it +COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json +COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/ RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build FROM docker.io/ubuntu:$UBUNTU_VERSION AS build diff --git a/.devops/cuda.Dockerfile b/.devops/cuda.Dockerfile index 33f686577..20501c1be 100644 --- a/.devops/cuda.Dockerfile +++ b/.devops/cuda.Dockerfile @@ -23,6 +23,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./ RUN npm ci COPY ui/apps/chat/ ./ +# the app compiles Llama UI from its source next to it +COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json +COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/ RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build FROM ${BASE_CUDA_DEV_CONTAINER} AS build diff --git a/.devops/intel.Dockerfile b/.devops/intel.Dockerfile index 214e3d320..16326ebbd 100644 --- a/.devops/intel.Dockerfile +++ b/.devops/intel.Dockerfile @@ -17,6 +17,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./ RUN npm ci COPY ui/apps/chat/ ./ +# the app compiles Llama UI from its source next to it +COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json +COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/ RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build FROM docker.io/intel/deep-learning-essentials:$ONEAPI_VERSION AS build diff --git a/.devops/musa.Dockerfile b/.devops/musa.Dockerfile index b4185c932..dbf9e0b41 100644 --- a/.devops/musa.Dockerfile +++ b/.devops/musa.Dockerfile @@ -21,6 +21,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./ RUN npm ci COPY ui/apps/chat/ ./ +# the app compiles Llama UI from its source next to it +COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json +COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/ RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build FROM ${BASE_MUSA_DEV_CONTAINER} AS build diff --git a/.devops/nix/package.nix b/.devops/nix/package.nix index 021063276..4ac844ff9 100644 --- a/.devops/nix/package.nix +++ b/.devops/nix/package.nix @@ -182,7 +182,9 @@ effectiveStdenv.mkDerivation (finalAttrs: { webui = stdenvNoCC.mkDerivation { pname = "webui"; version = llamaVersion; - src = lib.cleanSource ../../ui/apps/chat; + # the app compiles Llama UI from its source in ../../lib/ui, so the source is ui/ as a whole + src = lib.cleanSource ../../ui; + sourceRoot = "source/apps/chat"; nativeBuildInputs = [ nodejs diff --git a/.devops/openvino.Dockerfile b/.devops/openvino.Dockerfile index de6a16c75..e290bde9b 100644 --- a/.devops/openvino.Dockerfile +++ b/.devops/openvino.Dockerfile @@ -34,6 +34,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./ RUN npm ci COPY ui/apps/chat/ ./ +# the app compiles Llama UI from its source next to it +COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json +COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/ RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build ## Build Image diff --git a/.devops/rocm.Dockerfile b/.devops/rocm.Dockerfile index ab4ef0b74..9e667660f 100644 --- a/.devops/rocm.Dockerfile +++ b/.devops/rocm.Dockerfile @@ -23,6 +23,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./ RUN npm ci COPY ui/apps/chat/ ./ +# the app compiles Llama UI from its source next to it +COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json +COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/ RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build ### Build image diff --git a/.devops/vulkan.Dockerfile b/.devops/vulkan.Dockerfile index ce40d6969..dc8a87667 100644 --- a/.devops/vulkan.Dockerfile +++ b/.devops/vulkan.Dockerfile @@ -15,6 +15,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./ RUN npm ci COPY ui/apps/chat/ ./ +# the app compiles Llama UI from its source next to it +COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json +COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/ RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build FROM docker.io/ubuntu:$UBUNTU_VERSION AS build diff --git a/.devops/zendnn.Dockerfile b/.devops/zendnn.Dockerfile index ef9d4de45..cbc3696ed 100644 --- a/.devops/zendnn.Dockerfile +++ b/.devops/zendnn.Dockerfile @@ -15,6 +15,9 @@ COPY ui/apps/chat/package.json ui/apps/chat/package-lock.json ./ RUN npm ci COPY ui/apps/chat/ ./ +# the app compiles Llama UI from its source next to it +COPY ui/lib/ui/package.json /app/ui/lib/ui/package.json +COPY ui/lib/ui/src/lib/ /app/ui/lib/ui/src/lib/ RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build FROM docker.io/ubuntu:$UBUNTU_VERSION AS build diff --git a/.github/workflows/ui-self-hosted.yml b/.github/workflows/ui-self-hosted.yml index 4eb6620d0..346f1cfb4 100644 --- a/.github/workflows/ui-self-hosted.yml +++ b/.github/workflows/ui-self-hosted.yml @@ -18,6 +18,7 @@ on: '.github/workflows/ui-self-hosted.yml', '.github/workflows/ui-build-self-hosted.yml', 'ui/apps/chat/**.*', + 'ui/lib/ui/**.*', 'tools/server/tests/**.*' ] pull_request: @@ -26,6 +27,7 @@ on: '.github/workflows/ui-self-hosted.yml', '.github/workflows/ui-build-self-hosted.yml', 'ui/apps/chat/**.*', + 'ui/lib/ui/**.*', 'tools/server/tests/**.*' ] diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml index 0c9b85ecd..abf55d709 100644 --- a/.github/workflows/ui.yml +++ b/.github/workflows/ui.yml @@ -14,6 +14,7 @@ on: '.github/workflows/ui.yml', '.github/workflows/ui-build.yml', 'ui/apps/chat/**.*', + 'ui/lib/**.*', 'tools/server/tests/**.*' ] pull_request: @@ -22,6 +23,7 @@ on: '.github/workflows/ui.yml', '.github/workflows/ui-build.yml', 'ui/apps/chat/**.*', + 'ui/lib/**.*', 'tools/server/tests/**.*' ] @@ -107,6 +109,33 @@ jobs: run: npm run test:unit working-directory: ui/apps/chat + lib-checks: + name: Library checks + runs-on: ubuntu-24.04 + steps: + - name: Checkout code + uses: actions/checkout@v6 + with: + ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }} + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: "24" + package-manager-cache: false + + - name: Install dependencies + run: npm ci + working-directory: ui/lib/ui + + - name: Run type checking + run: npm run check + working-directory: ui/lib/ui + + - name: Build the package + run: npm run prepack + working-directory: ui/lib/ui + e2e-tests: name: E2E Tests needs: ui-build diff --git a/scripts/ui-assets.cmake b/scripts/ui-assets.cmake index 8dcb804eb..bfaa4ca4c 100644 --- a/scripts/ui-assets.cmake +++ b/scripts/ui-assets.cmake @@ -19,7 +19,11 @@ set(LLAMA_UI_GZIP "" CACHE STRING "Apply gzip compress to assets to save ban set(DIST_DIR "${UI_BINARY_DIR}/dist") set(SRC_DIST_DIR "${UI_SOURCE_DIR}/dist") -set(WORK_DIR "${UI_BINARY_DIR}/ui-src") +# The stage keeps the layout of ui/: the app in apps/chat, with the sources of +# Llama UI that it compiles next to it in lib/ui (see ui/apps/chat/scripts/llama-ui.js). +set(STAGE_DIR "${UI_BINARY_DIR}/ui-src") +set(WORK_DIR "${STAGE_DIR}/apps/chat") +set(UI_LIB_DIR "${UI_SOURCE_DIR}/../../lib/ui") set(STAMP_FILE "${UI_BINARY_DIR}/.ui-stamp") set(EMBED_STAMP "${UI_BINARY_DIR}/.ui-embed.sha256") set(UI_CPP "${UI_BINARY_DIR}/ui.cpp") @@ -316,6 +320,16 @@ function(npm_build_should_skip out_var) endfunction() function(stage_sources) + # everything but the app goes: the library, restaged below, and what a stage + # from before this layout left at the top, its node_modules included + if(EXISTS "${STAGE_DIR}") + file(GLOB staged RELATIVE "${STAGE_DIR}" "${STAGE_DIR}/*") + list(REMOVE_ITEM staged "apps") + foreach(entry ${staged}) + file(REMOVE_RECURSE "${STAGE_DIR}/${entry}") + endforeach() + endif() + if(EXISTS "${WORK_DIR}") file(GLOB staged RELATIVE "${WORK_DIR}" "${WORK_DIR}/*") list(REMOVE_ITEM staged "node_modules") @@ -329,6 +343,16 @@ function(stage_sources) NO_SOURCE_PERMISSIONS PATTERN "node_modules" EXCLUDE ) + + # what the app reads of the library: its sources and the dependency list + file(COPY "${UI_LIB_DIR}/package.json" + DESTINATION "${STAGE_DIR}/lib/ui" + NO_SOURCE_PERMISSIONS + ) + file(COPY "${UI_LIB_DIR}/src/lib" + DESTINATION "${STAGE_DIR}/lib/ui/src" + NO_SOURCE_PERMISSIONS + ) endfunction() function(npm_build out_var) diff --git a/ui/README.md b/ui/README.md new file mode 100644 index 000000000..97e6a35e7 --- /dev/null +++ b/ui/README.md @@ -0,0 +1,20 @@ +# ui + +The UI of llama.cpp: the packages in `lib` and the apps built on them. + +```text +ui/ +├── lib/ +│ └── ui/ @ggml-org/llama-ui: design tokens, fonts, surfaces and components +└── apps/ + └── chat/ Llama Chat, the chat app that llama-server serves +``` + +- [`lib/ui`](lib/ui/README.md) draws the parts and handles interaction, with no business logic. It is built with + `@sveltejs/package` and published to npm as `@ggml-org/llama-ui`. Apps in this repo skip the package: they compile + its sources as part of their own build, so they hold no copy of a component, a token or a font. +- [`apps/chat`](apps/chat/README.md) talks to llama-server, stores conversations and runs the agentic loop. CMake + builds it into llama-server (see `scripts/ui-assets.cmake`). + +Each folder is its own npm package with its own `package-lock.json`: run `npm ci` in the one you work on. Building, +checking and testing `apps/chat` needs no install in `lib/ui`. diff --git a/ui/apps/chat/.storybook/decorators/TooltipProviderDecorator.svelte b/ui/apps/chat/.storybook/decorators/TooltipProviderDecorator.svelte index ba0cabc56..76d15b48d 100644 --- a/ui/apps/chat/.storybook/decorators/TooltipProviderDecorator.svelte +++ b/ui/apps/chat/.storybook/decorators/TooltipProviderDecorator.svelte @@ -1,5 +1,5 @@ canCopy && copyToClipboard(text)} + icon={isCopied ? Check : Copy} + iconSize={iconClass} + onclick={copy} tooltip={ariaLabel} /> diff --git a/ui/apps/chat/src/lib/components/app/actions/GlassKey.svelte b/ui/apps/chat/src/lib/components/app/actions/GlassKey.svelte index 93a4079f3..d4a307799 100644 --- a/ui/apps/chat/src/lib/components/app/actions/GlassKey.svelte +++ b/ui/apps/chat/src/lib/components/app/actions/GlassKey.svelte @@ -1,5 +1,6 @@ -
- - -
+{#snippet dial(size: 'sm' | 'md' | 'key')} + +{/snippet} + +{#if corner} + + + {@render dial('key')} + +{:else} +
+ + {@render dial(deviceStore.isMobile ? 'md' : 'sm')} +
+{/if} diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugeLoadModel.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugeLoadModel.svelte index 5b0823c96..3627c7419 100644 --- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugeLoadModel.svelte +++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormContextGauge/ContextGaugeLoadModel.svelte @@ -1,6 +1,6 @@
- + {#if showSpinner} Current time - + {:else if dateMeta.errorMessage} Current time  - - {dateMeta.errorMessage} + - {dateMeta.errorMessage} {:else if dateMeta.dateString} Current time is  diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGetInfo.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGetInfo.svelte index 6875eba65..545921065 100644 --- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGetInfo.svelte +++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGetInfo.svelte @@ -60,9 +60,9 @@ {#snippet children(meta, _ctx)} {#if meta?.errorMessage}
- + {meta.errorMessage}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGrepSearch.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGrepSearch.svelte index b7a75e557..406275565 100644 --- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGrepSearch.svelte +++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockGrepSearch.svelte @@ -39,9 +39,9 @@
{:else if meta?.errorMessage}
- + {meta.errorMessage}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockReadMedia.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockReadMedia.svelte index 3d54120fb..947266bc5 100644 --- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockReadMedia.svelte +++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockReadMedia.svelte @@ -75,7 +75,7 @@
{readMediaMeta?.fileName diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockRunJavascript.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockRunJavascript.svelte index e819e9f97..c790dd994 100644 --- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockRunJavascript.svelte +++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockRunJavascript.svelte @@ -27,9 +27,9 @@
Running...
{:else if meta?.errorMessage}
- + {meta.errorMessage}
@@ -51,7 +51,7 @@ />
- + Console diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockSearchResults.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockSearchResults.svelte index eed512c56..2ed631a4f 100644 --- a/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockSearchResults.svelte +++ b/ui/apps/chat/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageToolCall/ChatMessageToolCallBlockSearchResults.svelte @@ -1,7 +1,7 @@ diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenDragOverlay.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenDragOverlay.svelte index ab4adb2c2..c3ae91a2f 100644 --- a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenDragOverlay.svelte +++ b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenDragOverlay.svelte @@ -6,9 +6,9 @@ class="pointer-events-none fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm" >
- +

Attach a file

diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenServerError.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenServerError.svelte index a189230c2..497c1efc2 100644 --- a/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenServerError.svelte +++ b/ui/apps/chat/src/lib/components/app/chat/ChatScreen/ChatScreenServerError.svelte @@ -1,6 +1,6 @@
-
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardCompact.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardCompact.svelte index 7e3c4281c..4abd93ed0 100644 --- a/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardCompact.svelte +++ b/ui/apps/chat/src/lib/components/app/mcp/McpServerCard/McpServerCardCompact.svelte @@ -1,5 +1,5 @@
- + @@ -33,10 +33,10 @@
- + - + - +
diff --git a/ui/apps/chat/src/lib/components/app/mcp/McpServerForm.svelte b/ui/apps/chat/src/lib/components/app/mcp/McpServerForm.svelte index c1b38c222..c0dd254e7 100644 --- a/ui/apps/chat/src/lib/components/app/mcp/McpServerForm.svelte +++ b/ui/apps/chat/src/lib/components/app/mcp/McpServerForm.svelte @@ -1,7 +1,7 @@ {#if resolvedShowRaw} - + {:else} - {#snippet nameAndBadges()} - {#if !hideName} - - {#if !hideOrgName && parsed.orgName}{parsed.orgName}/{/if}{displayName} - - {/if} - - {#if hasBadges} - - - {#if parsed.sidecar} - - {parsed.sidecar} - - {/if} - - {#if parsed.params && !hideParameters} - - {parsed.params}{parsed.activatedParams ? `-${parsed.activatedParams}` : ''} - - {/if} - - {#if parsed.quantization && !resolvedHideQuantization} - - {parsed.quantization} - - {/if} - - {#each uniqueDraftKinds as kind (kind)} - - {kind} - - {/each} - - - - {#if primaryAlias} - {#if primaryAlias !== parsed.modelName} - - {parsed.modelName ?? modelId} - - {/if} - {:else if uniqueAliases.length > 1} - {#each uniqueAliases.slice(0, MAX_ALIAS_BADGES) as alias (alias)} - - {alias} - - {/each} - - {#if uniqueAliases.length > MAX_ALIAS_BADGES} - - +{uniqueAliases.length - MAX_ALIAS_BADGES} more - - {/if} - {/if} - - {#if uniqueTags.length > 0 && !resolvedHideTags} - {#each uniqueTags as tag (tag)} - {tag} - {/each} - {/if} - - {/if} - {/snippet} - - - - - {#if showRawTooltip} - - - {@render nameAndBadges()} - - - -

{modelId}

-
-
- {:else} - {@render nameAndBadges()} - {/if} - - {#if !iconsOnNewLine} - - {/if} -
- - {#if iconsOnNewLine || contextLength || sizeRange} - - {#if iconsOnNewLine} - - {/if} - - {#if contextLength} - - - - {formatParameters(contextLength)} - - {/if} - - {#if sizeRange} - - - - {HuggingFaceService.formatSizeRange(sizeRange.min, sizeRange.max)} - - {/if} - - {/if} -
+ activatedParams={parsed.activatedParams ?? undefined} + class={className} + draftSidecars={draftSidecars.filter((badge) => !isAuxSidecar(badge.kind))} + name={parsed.modelName ?? modelId} + org={parsed.orgName ?? undefined} + params={hideParameters ? undefined : (parsed.params ?? undefined)} + quantization={resolvedHideQuantization ? undefined : (parsed.quantization ?? undefined)} + sidecar={parsed.sidecar ?? undefined} + tags={resolvedHideTags ? [] : [...(parsed.tags ?? []), ...(tags ?? [])]} + tooltip={showRawTooltip ? modelId : undefined} + /> {/if} diff --git a/ui/apps/chat/src/lib/components/app/models/ModelLoadControl.svelte b/ui/apps/chat/src/lib/components/app/models/ModelLoadControl.svelte index 209b74ba1..4c54d751c 100644 --- a/ui/apps/chat/src/lib/components/app/models/ModelLoadControl.svelte +++ b/ui/apps/chat/src/lib/components/app/models/ModelLoadControl.svelte @@ -37,26 +37,26 @@ {#if showAction && revealOnHover} {#if isFailed} {:else} {/if} {:else} {#if isFailed} - + {:else} {/if} @@ -73,9 +73,9 @@ > {#if isFailed} modelsStore.status.load(option.model)} stopPropagationOnClick tooltip="Retry loading model" @@ -83,9 +83,9 @@ /> {:else if isLoaded || isSleeping} modelsStore.status.unload(option.model)} stopPropagationOnClick tooltip="Unload model" @@ -93,9 +93,9 @@ /> {:else} modelsStore.status.load(option.model)} stopPropagationOnClick tooltip="Load model" diff --git a/ui/apps/chat/src/lib/components/app/models/ModelOrgAvatar.svelte b/ui/apps/chat/src/lib/components/app/models/ModelOrgAvatar.svelte index afd62d72f..39b377b04 100644 --- a/ui/apps/chat/src/lib/components/app/models/ModelOrgAvatar.svelte +++ b/ui/apps/chat/src/lib/components/app/models/ModelOrgAvatar.svelte @@ -1,130 +1,18 @@ + {#if hubEnabled} - - {#if orgAvatarFailed} - - {:else} -
- - { - failedAvatarOrgs.set(org, Date.now()); - }} - src={HuggingFaceService.getAvatarUrl(org)} - /> -
- {/if} - - {#if quantOrg && quantOrg !== org} - - - {#if quantAvatarFailed} - - {:else} - { - failedAvatarOrgs.set(quantOrg ?? '', Date.now()); - }} - src={HuggingFaceService.getAvatarUrl(quantOrg)} - /> - {/if} - - {/if} -
+ {/if} diff --git a/ui/apps/chat/src/lib/components/app/models/ModelRowActions.svelte b/ui/apps/chat/src/lib/components/app/models/ModelRowActions.svelte index 775924e93..33be4c624 100644 --- a/ui/apps/chat/src/lib/components/app/models/ModelRowActions.svelte +++ b/ui/apps/chat/src/lib/components/app/models/ModelRowActions.svelte @@ -26,9 +26,9 @@ > uiStore.openModelDetails(option.id)} tooltip="Manage model" tooltipAsTitle @@ -36,12 +36,12 @@ {#if isFav} - + modelsStore.toggleFavorite(option.model)} tooltip="Remove from favorites" tooltipAsTitle @@ -50,9 +50,9 @@