Repository navigation
Conversation
c60478c to
69380ec
Compare
5410857 to
a648367
Compare
The design system package (tokens, fonts, surfaces, components and Model UI), so far in the temporary ggml-org/llama-ui repository at edaf518, moves to its home in ui/lib/ui, built with @sveltejs/package and published as @ggml-org/llama-ui from here. ui/lib holds the packages, one folder each. Its references to tools/ui now name ui/apps/chat, its package.json points at this repository, and the UI workflow type-checks and packs it. ui/README.md describes the layout. Assisted-by: Claude (Opus 5.5 Medium)
The design system from allozaur/docs/storybook-overhaul: three tiers of tokens, matte glass surfaces, Llama Sans and Llama Mono, and the base components on the new tokens (Tabs and GlassKey among them). It also restyles the stack's features with it, replacing the plain stand-ins they used until now. DESIGN.md is generated from the tokens. The Storybook that documents it is the next PR. Assisted-by: Claude (Opus 5.5 Medium)
…okens and fonts Llama Chat kept its own copy of the design system: 29 base components, the three tiers of tokens, the surfaces, the theme and the fonts, next to the 12 components ui/lib/ui held. The copy goes, and the library gets what it lacked. ui/lib/ui - the 17 base components the app had and the library did not (alert, alert-dialog, button-group, checkbox, collapsible, context-menu, dialog, drawer, dropdown-menu, empty, hover-card, radio-group, scroll-area, skeleton, table, tabs, textarea), with vaul-svelte for the drawer - the inset-group and selected-row tokens and surfaces - sources import each other by relative path instead of $lib, which in an app points at the app's own src/lib - theme.css no longer imports tw-animate-css: it is a peer dependency that the consumer imports before the theme, as it does Tailwind - 0.3.0 ui/apps/chat - imports the base components as @ggml-org/llama-ui/ui/<name> and cn/tv as @ggml-org/llama-ui/utils; app.css imports the library's theme.css - compiles the library from source, with no install or build of it: scripts/vite-plugin-llama-ui.ts resolves its entry points and what it imports, and svelte.config.js gives TypeScript the same paths - src/lib/components/ui, styles/tokens, styles/surfaces.css and assets/fonts are removed; components.json moves to the library Builds - CMake stages ui/lib/ui next to the app, keeping the layout of ui/, and rebuilds when a library source changes - the Dockerfiles copy the library's sources; the Nix derivation takes ui/ as its source The built CSS has the same rules in the same order, apart from one zero-specificity rule and the @font-face rules moving, plus ten utilities and two tokens that only the library's own components use. Assisted-by: Claude (Opus 5.5 Medium)
Llama Chat's AGENTS.md says where each part lives: Llama UI is ui/lib/ui, and Chat imports its tokens, fonts and base components from there. Assisted-by: Claude (Opus 5.5 Medium)
…mmands marked in bash code The fonts in ui/lib/ui come from llama-brand's latest, with optical sizes from 10 to 36. Bash code blocks mark shell commands and flags. Assisted-by: Claude (Opus 5.5 Medium)
A submenu was rendered inside its parent menu, so the menu's scroll box clipped it: the glass menus' backdrop filter, and the filter and transform of the open animation, make the menu the containing block even for the fixed-position submenu. Dropdown and context submenus now render in a portal, like the menus themselves. Assisted-by: Claude (Opus 5.5 Medium)
Submenus had smaller corners than their menus, and context menus had none of the dropdown's glass. Context-menu parts now match the dropdown's, and both submenus take the menu's corners and height cap, with their first row level with the row that opens them, 4px past the menu's edge. Sub-triggers take the items' radius and pointer. The submenus' height cap and zoom origin named the dropdown's CSS variables, which bits-ui does not set on submenus; they now use its --bits-menu-* ones. The chat group submenu takes the actions menu's z-[999999] layer, as it no longer renders inside that menu. Assisted-by: Claude (Opus 5.5 Medium)
updateCurrentNode checked the active conversation, awaited the database write, then wrote currNode to whatever was active after it. When the conversation closed during the write it threw, and the reply ended in a streaming error dialog. When another conversation opened, that one got the wrong node. Assisted-by: Claude (Fable 5.2)
Llama Chat still kept its own copies of what the library holds above the base components. It now takes them from @ggml-org/llama-ui too, and its copies go. ui/lib/ui - ModelId gains what Chat's had: the model's own draft kind, draft sidecars with their quant (ModelDraftSidecars, new), aliases, hideName and a tooltip, in the same badge order - entry points for them, like ui/<name>: @ggml-org/llama-ui/app/<group> (actions, content, forms, misc) and @ggml-org/llama-ui/models ui/apps/chat - ActionIcon, SearchInput, SyntaxHighlightedCode, Logo, ModelCapabilityIcons, ModelDownloadProgressBar and ModelDraftSidecars come from the library; Chat's copies and the two constants only they used are removed - ModelId and ModelOrgAvatar stay as thin wrappers: ModelId parses the raw id and applies the user's display settings, ModelOrgAvatar hides the avatar while Hub metadata is off - the svelte/* TypeScript path falls back to Svelte's types/index.d.ts: svelte/reactivity has no file of its own, so a library source importing it got its types from ui/lib/ui's own install when there was one Assisted-by: Claude (Opus 5.5 Medium)
@ggml-org/llama-brand is now a dependency of the library, by the same GitHub tarball Llama Chat already installs, which now names it @ggml-org/llama-brand too. - primitives.css drops the 25 tokens it held copies of (the neutral greys, sand, the skies and cinder) and builds on llama-brand's css/colors.css instead; the skies' gradients point at llama-brand's. Apps import that file before theme.css, as they do Tailwind and tw-animate-css: the library's stylesheets import no package, so an app that compiles them from source resolves it from its own node_modules - Logo draws llama-brand's icon, in currentColor, and assets/logo.svg goes - Llama Chat's TypeScript paths resolve llama-brand from its own node_modules, like the library's other dependencies The fonts stay as the library's WOFF2 copies until llama-brand ships WOFF2 builds of them. Assisted-by: Claude (Opus 5.5 Medium)
Llama Chat redefined most of what the library exports next to its components. Where the two were the same, Chat now re-exports the library's from the files that held them, so its own imports stay as they are. - the library gets entry points for them: @ggml-org/llama-ui/constants, @ggml-org/llama-ui/enums and @ggml-org/llama-ui/code, and @ggml-org/llama-ui/models carries the model data with the Model UI - from the library now: the shared CSS classes and code-block constants, the byte units, the memory-fit constants and minMemoryTierGb, the bit depth labels, the capability and modality icons, labels and order, ColorMode, TooltipSide, BooleanString, the model enums, ModelModalities, formatParameters, highlightCode and trimCodePadding - the library's modality order follows Chat's: vision, video, audio - Chat keeps its own where they differ: UI_DATA_ATTRS and ModelDownloadProgress are supersets of the library's (the latter extends it now), and formatFileSize counts in 1024s Assisted-by: Claude (Opus 5.5 Medium)
In light, the two keys inside the chat form, white on its white glass, took the control elevation, whose soft spread blended into the form. They take a new elevation-key instead: a 0.5px hairline all round and a 1px drop. In dark they keep the control elevation. Chosen from the options in Scrapbook › UI › Composer keys. - semantic tokens: --elevation-key (light: the hairline and the drop; dark: the control elevation) - component token: --chat-form-key-shadow, for the add key and every model selector trigger - DESIGN.md names it next to the other elevations Assisted-by: Claude (Opus 5.5 Medium)
a648367 to
08894df
Compare
* origin/master: (138 commits) qwen4exp : fix graph reallocation from the n-gram table scale (ggml-org#32483) server : return 400 when grammar and ignore_eos are on (ggml-org#32377) ggml-cuda: disable quantized matvec fusion on all Pascal GPUs (ggml-org#32239) Title: CUDA: few-row MMQ for MUL_MAT_ID (ggml-org#32065) ui: turn the live markdown preview off by default (ggml-org#32469) CUDA: use block reductions for whole-row pool_1d (ggml-org#31855) ggml : decode F8_E4M3 to fp32 without ldexpf (ggml-org#32477) llama : keep the k-pool layout prefix on sequence edits (ggml-org#32137) vocab : speed up PLaMo-2/3 tokenizer table build (ggml-org#32249) convert : fix FP8 qwen4exp checkpoints (n-gram table scale, block-scaled FP8) (ggml-org#32476) ui: Llama UI design system: tokens, surfaces and fonts (ggml-org#32468) mtmd: support Minimax-Music3 (ggml-org#32435) chat: add tts_dict for kokoro G2P template (ggml-org#32397) Rotate K/V read order for better L2 cache hit rates (ggml-org#32407) ui: turn conversation tabs off by default (ggml-org#32402) ui: move Llama Chat to SvelteKit 3 and its built-in service worker (ggml-org#32463) qwen3next : apply output projection weight scale (ggml-org#32393) cuda : raise shared mem limit only for the launched kernel (ggml-org#32392) nix: expose a SYCL package (ggml-org#31066) vulkan: disable flip Flash Attention shader on AMD Windows due to a driver bug (ggml-org#32415) ...
Upstream: ggml-org/llama.cpp 054a1ba..7f106b5 (3 commits) Conflicts: - ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationActions.svelte: kept both imports: the fork ExternalLink icon (server dashboard link) and upstream ggml-org#32468's Button from @ggml-org/llama-ui. Assisted-by: Claude Opus 5.5 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YKmjzcT1LTvKtbw9EzBVGE
|
We only use four files from it: More generally, I'd keep dependencies to the ones we really need -- each one is something everyone working on the UI has to install, and it can break like this. |
I’d rather keep llama-brand as the single source than copy files in. The real culprit was the GitHub tarball, which npm 12 blocks by default. llama-brand is now on npm as @ggml-org/llama-brand (with its CSS relicensed to MIT; the icons were already fine to ship per its BRAND-USAGE.md), and #32544 switches the UI over to it, so no more |
* ui: bring @ggml-org/llama-ui into ui/lib/ui The design system package (tokens, fonts, surfaces, components and Model UI), so far in the temporary ggml-org/llama-ui repository at edaf518, moves to its home in ui/lib/ui, built with @sveltejs/package and published as @ggml-org/llama-ui from here. ui/lib holds the packages, one folder each. Its references to tools/ui now name ui/apps/chat, its package.json points at this repository, and the UI workflow type-checks and packs it. ui/README.md describes the layout. Assisted-by: Claude (Opus 5.5 Medium) * ui: Llama UI design system: tokens, surfaces and brand The design system from allozaur/docs/storybook-overhaul: three tiers of tokens, matte glass surfaces, Llama Sans and Llama Mono, and the base components on the new tokens (Tabs and GlassKey among them). It also restyles the stack's features with it, replacing the plain stand-ins they used until now. DESIGN.md is generated from the tokens. The Storybook that documents it is the next PR. Assisted-by: Claude (Opus 5.5 Medium) * ui: have Llama Chat use @ggml-org/llama-ui for its base components, tokens and fonts Llama Chat kept its own copy of the design system: 29 base components, the three tiers of tokens, the surfaces, the theme and the fonts, next to the 12 components ui/lib/ui held. The copy goes, and the library gets what it lacked. ui/lib/ui - the 17 base components the app had and the library did not (alert, alert-dialog, button-group, checkbox, collapsible, context-menu, dialog, drawer, dropdown-menu, empty, hover-card, radio-group, scroll-area, skeleton, table, tabs, textarea), with vaul-svelte for the drawer - the inset-group and selected-row tokens and surfaces - sources import each other by relative path instead of $lib, which in an app points at the app's own src/lib - theme.css no longer imports tw-animate-css: it is a peer dependency that the consumer imports before the theme, as it does Tailwind - 0.3.0 ui/apps/chat - imports the base components as @ggml-org/llama-ui/ui/<name> and cn/tv as @ggml-org/llama-ui/utils; app.css imports the library's theme.css - compiles the library from source, with no install or build of it: scripts/vite-plugin-llama-ui.ts resolves its entry points and what it imports, and svelte.config.js gives TypeScript the same paths - src/lib/components/ui, styles/tokens, styles/surfaces.css and assets/fonts are removed; components.json moves to the library Builds - CMake stages ui/lib/ui next to the app, keeping the layout of ui/, and rebuilds when a library source changes - the Dockerfiles copy the library's sources; the Nix derivation takes ui/ as its source The built CSS has the same rules in the same order, apart from one zero-specificity rule and the @font-face rules moving, plus ten utilities and two tokens that only the library's own components use. Assisted-by: Claude (Opus 5.5 Medium) * ui: AGENTS.md places Llama UI in ui/lib/ui Llama Chat's AGENTS.md says where each part lives: Llama UI is ui/lib/ui, and Chat imports its tokens, fonts and base components from there. Assisted-by: Claude (Opus 5.5 Medium) * ui: Llama Sans and Llama Mono from llama-brand's latest, and shell commands marked in bash code The fonts in ui/lib/ui come from llama-brand's latest, with optical sizes from 10 to 36. Bash code blocks mark shell commands and flags. Assisted-by: Claude (Opus 5.5 Medium) * ui: open submenus outside the menu they come from A submenu was rendered inside its parent menu, so the menu's scroll box clipped it: the glass menus' backdrop filter, and the filter and transform of the open animation, make the menu the containing block even for the fixed-position submenu. Dropdown and context submenus now render in a portal, like the menus themselves. Assisted-by: Claude (Opus 5.5 Medium) * ui: draw submenus like the menu they open from Submenus had smaller corners than their menus, and context menus had none of the dropdown's glass. Context-menu parts now match the dropdown's, and both submenus take the menu's corners and height cap, with their first row level with the row that opens them, 4px past the menu's edge. Sub-triggers take the items' radius and pointer. The submenus' height cap and zoom origin named the dropdown's CSS variables, which bits-ui does not set on submenus; they now use its --bits-menu-* ones. The chat group submenu takes the actions menu's z-[999999] layer, as it no longer renders inside that menu. Assisted-by: Claude (Opus 5.5 Medium) * ui: keep a late current-node write off a closed or switched conversation updateCurrentNode checked the active conversation, awaited the database write, then wrote currNode to whatever was active after it. When the conversation closed during the write it threw, and the reply ended in a streaming error dialog. When another conversation opened, that one got the wrong node. Assisted-by: Claude (Fable 5.2) * ui: have Llama Chat use the library's Model UI and app components Llama Chat still kept its own copies of what the library holds above the base components. It now takes them from @ggml-org/llama-ui too, and its copies go. ui/lib/ui - ModelId gains what Chat's had: the model's own draft kind, draft sidecars with their quant (ModelDraftSidecars, new), aliases, hideName and a tooltip, in the same badge order - entry points for them, like ui/<name>: @ggml-org/llama-ui/app/<group> (actions, content, forms, misc) and @ggml-org/llama-ui/models ui/apps/chat - ActionIcon, SearchInput, SyntaxHighlightedCode, Logo, ModelCapabilityIcons, ModelDownloadProgressBar and ModelDraftSidecars come from the library; Chat's copies and the two constants only they used are removed - ModelId and ModelOrgAvatar stay as thin wrappers: ModelId parses the raw id and applies the user's display settings, ModelOrgAvatar hides the avatar while Hub metadata is off - the svelte/* TypeScript path falls back to Svelte's types/index.d.ts: svelte/reactivity has no file of its own, so a library source importing it got its types from ui/lib/ui's own install when there was one Assisted-by: Claude (Opus 5.5 Medium) * ui: Llama UI takes the brand's colours and logo from llama-brand @ggml-org/llama-brand is now a dependency of the library, by the same GitHub tarball Llama Chat already installs, which now names it @ggml-org/llama-brand too. - primitives.css drops the 25 tokens it held copies of (the neutral greys, sand, the skies and cinder) and builds on llama-brand's css/colors.css instead; the skies' gradients point at llama-brand's. Apps import that file before theme.css, as they do Tailwind and tw-animate-css: the library's stylesheets import no package, so an app that compiles them from source resolves it from its own node_modules - Logo draws llama-brand's icon, in currentColor, and assets/logo.svg goes - Llama Chat's TypeScript paths resolve llama-brand from its own node_modules, like the library's other dependencies The fonts stay as the library's WOFF2 copies until llama-brand ships WOFF2 builds of them. Assisted-by: Claude (Opus 5.5 Medium) * ui: have Llama Chat take the library's constants, enums and helpers Llama Chat redefined most of what the library exports next to its components. Where the two were the same, Chat now re-exports the library's from the files that held them, so its own imports stay as they are. - the library gets entry points for them: @ggml-org/llama-ui/constants, @ggml-org/llama-ui/enums and @ggml-org/llama-ui/code, and @ggml-org/llama-ui/models carries the model data with the Model UI - from the library now: the shared CSS classes and code-block constants, the byte units, the memory-fit constants and minMemoryTierGb, the bit depth labels, the capability and modality icons, labels and order, ColorMode, TooltipSide, BooleanString, the model enums, ModelModalities, formatParameters, highlightCode and trimCodePadding - the library's modality order follows Chat's: vision, video, audio - Chat keeps its own where they differ: UI_DATA_ATTRS and ModelDownloadProgress are supersets of the library's (the latter extends it now), and formatFileSize counts in 1024s Assisted-by: Claude (Opus 5.5 Medium) * ui: give the chat form's add key and model selector a tighter shadow In light, the two keys inside the chat form, white on its white glass, took the control elevation, whose soft spread blended into the form. They take a new elevation-key instead: a 0.5px hairline all round and a 1px drop. In dark they keep the control elevation. Chosen from the options in Scrapbook › UI › Composer keys. - semantic tokens: --elevation-key (light: the hairline and the drop; dark: the control elevation) - component token: --chat-form-key-shadow, for the add key and every model selector trigger - DESIGN.md names it next to the other elevations Assisted-by: Claude (Opus 5.5 Medium)
* ui: bring @ggml-org/llama-ui into ui/lib/ui The design system package (tokens, fonts, surfaces, components and Model UI), so far in the temporary ggml-org/llama-ui repository at edaf518, moves to its home in ui/lib/ui, built with @sveltejs/package and published as @ggml-org/llama-ui from here. ui/lib holds the packages, one folder each. Its references to tools/ui now name ui/apps/chat, its package.json points at this repository, and the UI workflow type-checks and packs it. ui/README.md describes the layout. Assisted-by: Claude (Opus 5.5 Medium) * ui: Llama UI design system: tokens, surfaces and brand The design system from allozaur/docs/storybook-overhaul: three tiers of tokens, matte glass surfaces, Llama Sans and Llama Mono, and the base components on the new tokens (Tabs and GlassKey among them). It also restyles the stack's features with it, replacing the plain stand-ins they used until now. DESIGN.md is generated from the tokens. The Storybook that documents it is the next PR. Assisted-by: Claude (Opus 5.5 Medium) * ui: have Llama Chat use @ggml-org/llama-ui for its base components, tokens and fonts Llama Chat kept its own copy of the design system: 29 base components, the three tiers of tokens, the surfaces, the theme and the fonts, next to the 12 components ui/lib/ui held. The copy goes, and the library gets what it lacked. ui/lib/ui - the 17 base components the app had and the library did not (alert, alert-dialog, button-group, checkbox, collapsible, context-menu, dialog, drawer, dropdown-menu, empty, hover-card, radio-group, scroll-area, skeleton, table, tabs, textarea), with vaul-svelte for the drawer - the inset-group and selected-row tokens and surfaces - sources import each other by relative path instead of $lib, which in an app points at the app's own src/lib - theme.css no longer imports tw-animate-css: it is a peer dependency that the consumer imports before the theme, as it does Tailwind - 0.3.0 ui/apps/chat - imports the base components as @ggml-org/llama-ui/ui/<name> and cn/tv as @ggml-org/llama-ui/utils; app.css imports the library's theme.css - compiles the library from source, with no install or build of it: scripts/vite-plugin-llama-ui.ts resolves its entry points and what it imports, and svelte.config.js gives TypeScript the same paths - src/lib/components/ui, styles/tokens, styles/surfaces.css and assets/fonts are removed; components.json moves to the library Builds - CMake stages ui/lib/ui next to the app, keeping the layout of ui/, and rebuilds when a library source changes - the Dockerfiles copy the library's sources; the Nix derivation takes ui/ as its source The built CSS has the same rules in the same order, apart from one zero-specificity rule and the @font-face rules moving, plus ten utilities and two tokens that only the library's own components use. Assisted-by: Claude (Opus 5.5 Medium) * ui: AGENTS.md places Llama UI in ui/lib/ui Llama Chat's AGENTS.md says where each part lives: Llama UI is ui/lib/ui, and Chat imports its tokens, fonts and base components from there. Assisted-by: Claude (Opus 5.5 Medium) * ui: Llama Sans and Llama Mono from llama-brand's latest, and shell commands marked in bash code The fonts in ui/lib/ui come from llama-brand's latest, with optical sizes from 10 to 36. Bash code blocks mark shell commands and flags. Assisted-by: Claude (Opus 5.5 Medium) * ui: open submenus outside the menu they come from A submenu was rendered inside its parent menu, so the menu's scroll box clipped it: the glass menus' backdrop filter, and the filter and transform of the open animation, make the menu the containing block even for the fixed-position submenu. Dropdown and context submenus now render in a portal, like the menus themselves. Assisted-by: Claude (Opus 5.5 Medium) * ui: draw submenus like the menu they open from Submenus had smaller corners than their menus, and context menus had none of the dropdown's glass. Context-menu parts now match the dropdown's, and both submenus take the menu's corners and height cap, with their first row level with the row that opens them, 4px past the menu's edge. Sub-triggers take the items' radius and pointer. The submenus' height cap and zoom origin named the dropdown's CSS variables, which bits-ui does not set on submenus; they now use its --bits-menu-* ones. The chat group submenu takes the actions menu's z-[999999] layer, as it no longer renders inside that menu. Assisted-by: Claude (Opus 5.5 Medium) * ui: keep a late current-node write off a closed or switched conversation updateCurrentNode checked the active conversation, awaited the database write, then wrote currNode to whatever was active after it. When the conversation closed during the write it threw, and the reply ended in a streaming error dialog. When another conversation opened, that one got the wrong node. Assisted-by: Claude (Fable 5.2) * ui: have Llama Chat use the library's Model UI and app components Llama Chat still kept its own copies of what the library holds above the base components. It now takes them from @ggml-org/llama-ui too, and its copies go. ui/lib/ui - ModelId gains what Chat's had: the model's own draft kind, draft sidecars with their quant (ModelDraftSidecars, new), aliases, hideName and a tooltip, in the same badge order - entry points for them, like ui/<name>: @ggml-org/llama-ui/app/<group> (actions, content, forms, misc) and @ggml-org/llama-ui/models ui/apps/chat - ActionIcon, SearchInput, SyntaxHighlightedCode, Logo, ModelCapabilityIcons, ModelDownloadProgressBar and ModelDraftSidecars come from the library; Chat's copies and the two constants only they used are removed - ModelId and ModelOrgAvatar stay as thin wrappers: ModelId parses the raw id and applies the user's display settings, ModelOrgAvatar hides the avatar while Hub metadata is off - the svelte/* TypeScript path falls back to Svelte's types/index.d.ts: svelte/reactivity has no file of its own, so a library source importing it got its types from ui/lib/ui's own install when there was one Assisted-by: Claude (Opus 5.5 Medium) * ui: Llama UI takes the brand's colours and logo from llama-brand @ggml-org/llama-brand is now a dependency of the library, by the same GitHub tarball Llama Chat already installs, which now names it @ggml-org/llama-brand too. - primitives.css drops the 25 tokens it held copies of (the neutral greys, sand, the skies and cinder) and builds on llama-brand's css/colors.css instead; the skies' gradients point at llama-brand's. Apps import that file before theme.css, as they do Tailwind and tw-animate-css: the library's stylesheets import no package, so an app that compiles them from source resolves it from its own node_modules - Logo draws llama-brand's icon, in currentColor, and assets/logo.svg goes - Llama Chat's TypeScript paths resolve llama-brand from its own node_modules, like the library's other dependencies The fonts stay as the library's WOFF2 copies until llama-brand ships WOFF2 builds of them. Assisted-by: Claude (Opus 5.5 Medium) * ui: have Llama Chat take the library's constants, enums and helpers Llama Chat redefined most of what the library exports next to its components. Where the two were the same, Chat now re-exports the library's from the files that held them, so its own imports stay as they are. - the library gets entry points for them: @ggml-org/llama-ui/constants, @ggml-org/llama-ui/enums and @ggml-org/llama-ui/code, and @ggml-org/llama-ui/models carries the model data with the Model UI - from the library now: the shared CSS classes and code-block constants, the byte units, the memory-fit constants and minMemoryTierGb, the bit depth labels, the capability and modality icons, labels and order, ColorMode, TooltipSide, BooleanString, the model enums, ModelModalities, formatParameters, highlightCode and trimCodePadding - the library's modality order follows Chat's: vision, video, audio - Chat keeps its own where they differ: UI_DATA_ATTRS and ModelDownloadProgress are supersets of the library's (the latter extends it now), and formatFileSize counts in 1024s Assisted-by: Claude (Opus 5.5 Medium) * ui: give the chat form's add key and model selector a tighter shadow In light, the two keys inside the chat form, white on its white glass, took the control elevation, whose soft spread blended into the form. They take a new elevation-key instead: a 0.5px hairline all round and a 1px drop. In dark they keep the control elevation. Chosen from the options in Scrapbook › UI › Composer keys. - semantic tokens: --elevation-key (light: the hairline and the drop; dark: the control elevation) - component token: --chat-form-key-shadow, for the add key and every model selector trigger - DESIGN.md names it next to the other elevations Assisted-by: Claude (Opus 5.5 Medium)
Overview
Llama UI, the design system and component library published as
@ggml-org/llama-ui, comes into llama.cpp asui/lib/ui, with three tiers of tokens, matte glass surfaces and Llama Sans and Llama Mono. Llama Chat is built on it, taking its components, tokens, fonts and shared code from the library instead of keeping its own copy, and the library takes the brand's colours and logo from@ggml-org/llama-brand.Additional information
Read it commit by commit: the first one brings in the library as it was in the temporary
ggml-org/llama-uirepository atedaf518, without its Storybook (119 new files). The Storybook comes in a follow-up PR.@ggml-org/llama-ui0.3.0 on npm is published from thisui/lib/ui.Known gaps: the fonts are still the library's own WOFF2 copies: llama-brand ships them as TTF only, three times the size, so they move to llama-brand's once it has WOFF2 builds.
tw-animate-cssis now a peer dependency of the library, so llama.pages needs to import it beforetheme.csswhen it moves to 0.3.0.DESIGN.mdalso describes pages and packages that come in later PRs (Projects, the prompt Library, Servers and Llama Harness).Before and after
flowchart LR subgraph before["master"] direction TB chatA["Llama Chat<br/><code>ui/apps/chat</code>"] ownA["its own copies:<br/>28 base components, Model UI,<br/>ActionIcon, SearchInput, Logo…,<br/>constants, enums, helpers"] chatA --> ownA end subgraph after["this PR"] direction TB chatB["Llama Chat<br/><code>ui/apps/chat</code>"] lib["Llama UI<br/><code>ui/lib/ui</code> · <code>@ggml-org/llama-ui</code>"] brand["<code>@ggml-org/llama-brand</code><br/>colours, logo, fonts"] chatB -- "imports" --> lib lib -- "colors.css, icon" --> brand end before ==> afterLlama Chat does not install the library: it compiles
ui/lib/ui's sources as part of its own build, so a change in the library shows in the app at once.flowchart LR src["<code>ui/lib/ui/src</code>"] --> plugin["<code>vite-plugin-llama-ui</code><br/>maps <code>@ggml-org/llama-ui/*</code> to the sources,<br/>their dependencies to Chat's <code>node_modules</code>"] plugin --> vite["Llama Chat's Vite build<br/>one copy of Svelte and bits-ui"] vite --> cmake["CMake stages <code>ui/lib/ui</code><br/>next to the app"] cmake --> server["llama-server<br/>embedded UI"]What it looks like
Screenshots from the Storybook that comes with the follow-up PR, in the light and the dark theme.
Typography: Llama Sans and Llama Mono, set through type roles
Surfaces: matte glass, float, key, well, sheen and the status lamps
Colour tokens: primitives and semantic tokens
Primitives
Semantic tokens, the only tier that changes between light and dark
Sizing, shapes and elevation
Sizing: control heights and icon sizes
Shapes: corner roles
Elevation
Components
Button
ButtonGroup
ToggleGroup
Input
Select
Switch
Checkbox
Badge
Card
Alert
Table
Tabs
Dialog
DropdownMenu with a submenu, opening outside its menu
Patterns
SearchInput
ActionIcon
InfoBadges
KeyValuePairs
What the diff is made of
GitHub shows +12,413 / −2,326 across 490 files. 136 of those files moved from Llama Chat into the library almost unchanged, so they count as renames instead of deletions plus additions.
pie showData title Lines added "Library: components, tokens, Model UI, mockups" : 5564 "Library lockfile (generated)" : 4419 "DESIGN.md, the design rules for agents" : 1148 "Llama Chat: restyle and imports" : 1196 "Build and CI" : 86pie showData title Lines removed "Chat components: restyle, old copies" : 1019 "Chat's own base components" : 594 "Chat's copies of shared constants and helpers" : 389 "Other Chat source" : 161 "Moved files, small edits" : 140 "Tests, config, build" : 23The diff, area by area
ui/lib/ui/package-lock.jsonui/apps/chat/DESIGN.mdui-assets.cmake, workflowsThe commits, in order
flowchart LR c1["1 · bring <code>@ggml-org/llama-ui</code> into <code>ui/lib/ui</code><br/>+10,413"] c2["2 · the design system: tokens, surfaces, fonts<br/>+2,984 −732"] c3["3 · Llama Chat on the library's base components, tokens, fonts<br/>+1,022 −2,764"] c4["4 · AGENTS.md places Llama UI"] c5["5 · Llama Sans and Mono from llama-brand's latest,<br/>shell commands marked in bash code"] c6["6 · submenus open outside their menu"] c7["7 · submenus drawn like their menu"] c8["8 · a late current-node write kept off a closed conversation"] c9["9 · Llama Chat on the library's Model UI and app components<br/>+200 −845"] c10["10 · colours and logo from llama-brand"] c11["11 · Llama Chat on the library's constants, enums, helpers<br/>+97 −393"] c12["12 · a tighter shadow on the chat form's keys"] subgraph import["the library"] direction TB c1 end subgraph system["the design system"] direction TB c2 --> c3 --> c4 --> c5 end subgraph fixes["fixes"] direction TB c6 --> c7 --> c8 end subgraph more["more of Llama Chat on the library"] direction TB c9 --> c10 --> c11 --> c12 end import --> system --> fixes --> moreDesign tokens: from llama-brand to a component
Every colour a component draws goes through three tiers. Only the semantic tier changes between light and dark, and
@ggml-org/llama-brand'scolors.csssupplies the brand's own primitives under the same names.flowchart LR brand["<code>@ggml-org/llama-brand</code> <code>colors.css</code><br/><code>--neutral-950</code>, <code>--art-cinder</code>…"] prim["primitives<br/><code>--cool-gray-200</code>, <code>--red-500</code>,<br/><code>--white-a30</code>, <code>--length-24</code>…"] sem["semantic<br/><code>--surface-glass</code>, <code>--fg-muted</code>,<br/><code>--line-field</code>, <code>--status-warning</code>…<br/>light and dark"] comp["component<br/><code>--button-primary-background</code>,<br/><code>--chat-form-edge-side-focus</code>…"] ui["components<br/><code>bg-(--button-primary-background)</code>"] brand --> prim --> sem --> comp --> uiDESIGN.mdmirrors the three token files for agents; when they disagree, the CSS wins.What Llama Chat imports from the library
flowchart LR chat["Llama Chat"] chat --> ui["<code>@ggml-org/llama-ui/ui/<name></code><br/>29 base components"] chat --> app["<code>…/app/actions · content · forms · misc</code><br/>ActionIcon, SyntaxHighlightedCode,<br/>SearchInput, Logo"] chat --> models["<code>…/models</code><br/>ModelId, ModelCapabilityIcons, ModelOrgAvatar,<br/>ModelDownloadProgressBar, ModelDraftSidecars,<br/>model constants, enums, formatters"] chat --> shared["<code>…/constants · enums · code</code><br/>shared classes, ColorMode, TooltipSide,<br/>highlightCode"] chat --> utils["<code>…/utils</code><br/>cn, tv"] chat --> theme["<code>…/theme.css</code><br/>fonts, tokens, surfaces"]ModelIdandModelOrgAvatarstay in Chat as thin wrappers:ModelIdparses a raw model id and applies the user's display settings (raw names, quantization, tags),ModelOrgAvatarhides the avatar while Hugging Face metadata is off. The library'sModelIdgained what Chat's had: the model's own draft kind, draft sidecars with their quant, aliases and a raw-id tooltip, in the same badge order.UI_DATA_ATTRS(a superset of the library's),formatFileSize(it counts in 1024s) andModelDownloadProgress, which now extends the library's.Submenus: why they were cut off, and the fix
flowchart TB subgraph beforeFix["before"] direction TB menuA["menu: scroll box with a backdrop filter<br/>and an open animation"] --> subA["submenu, position: fixed,<br/>but the filter makes the menu its containing block"] subA --> clipA["clipped by the menu's scroll box"] end subgraph afterFix["after"] direction TB menuB["menu"] -.- trigger["sub-trigger"] portal["portal at the end of the body"] --> subB["submenu, its first row level with the trigger,<br/>4px past the menu's edge, the menu's corners and height cap"] trigger -.-> subB end--bits-menu-*ones now. The chat group submenu takes the actions menu'sz-[999999]layer, as it no longer renders inside that menu.The chat form's keys
In light, the add key and the model selector trigger sat white on the white chat form with the control elevation, whose soft spread blended into it. They take
--elevation-key(through--chat-form-key-shadow): a 0.5px hairline all round and a 1px drop. Dark keeps the control elevation.0 0.5px 1px,0 1px 2px,0 2px 4px -1pxat 5%0 0 0 0.5pxand0 1px 1.5pxat 8%The store race
sequenceDiagram participant UI as Chat participant Store as conversations store participant DB as IndexedDB UI->>Store: updateCurrentNode(node) for conversation A Store->>DB: write A's current node UI->>Store: the user closes A or opens B DB-->>Store: write done alt before Store->>Store: currNode = node on whatever is active now Note over Store: A closed: throws, the reply ends in an error dialog<br/>B open: B gets A's node else after Store->>Store: still A? then currNode = node Note over Store: otherwise nothing changes in memory endBuilds
ui/lib/uinext to the app, keeping the layout ofui/, and rebuilds when a library source changes.ui/as its source.npm run check,npm run prepackwith publint).@ggml-org/llama-brandis a dependency of the library by its GitHub tarball, as Llama Chat already installs it, now under the same name. The library's primitives build on itscss/colors.css, which an app imports beforetheme.css, as it does Tailwind andtw-animate-css: the library's stylesheets import no package.Testing
ui/lib/ui:npm ci,npm run check,npm run prepack(svelte-package and publint) and its 11 unit tests pass.ui/apps/chat:npm run check,npm run lintandnpm run buildpass, with 794 unit tests, 270 client tests and 49 story tests.scripts/ui-assets.cmake, and the Docker and Nix builds.Requirements
Claude (Opus 5.5 Medium)