Cookbook UI: backend-aware env vars, always-show MoE/EP/Reasoning toggles, GPU default, Firefox-mobile expand

Frontend half of the backend-detection + per-OS install command work,
plus a pile of mobile/UX fixes:

Backend awareness:
- _gpuEnvPrefix() picks CUDA_VISIBLE_DEVICES / HIP_VISIBLE_DEVICES /
  nothing based on detected hwfit backend + scanned-host match (so a
  stale ajax scan does not leak CUDA env vars into a kierkegaard
  Vulkan launch). Replaces 6 hardcoded CUDA_VISIBLE_DEVICES sites.
- GGML_CUDA_ENABLE_UNIFIED_MEMORY only emitted when backend is
  actually CUDA (was leaking onto Vulkan/ROCm via saved presets).

Per-target install command:
- Dep rows render a single mono command box + Copy button when the
  server resolved pkg.install_cmd_for_target. Reused in the build-deps
  install failure toast so the toast and the row show the same line.
- Diagnosis patterns split cmake/g++/git out of the generic
  llama-cpp-python catch-all so a missing-cmake failure surfaces a
  cmake-specific message + per-distro Copy buttons.

Form toggles always visible:
- Reasoning Parser, Expert Parallel, MoE Env Vars no longer gated on
  model-family detection. Detection still hints (parser tag shown when
  matched); toggle works with sensible defaults otherwise. MiniMax M-
  series added to MoE family detector so the auto-fill is right.

Mobile + GPU default:
- Launch tab cached-list flex collapsed to 0px on mobile because the
  desktop `flex: 1 1 0` had no parent height to grow into. Override
  to `flex: 0 0 auto` in the cookbook mobile @media block.
- doclib-card expand on mobile (Firefox no :has() support) pins
  explicit px heights so the launch form actually appears.
- llama_mode defaults to gpu when hwfit detected cuda/rocm/vulkan/
  metal on the current target, instead of always cpu (which was
  forcing -ngl 0 on first-open and burning 35GB models on CPU).
This commit is contained in:
pewdiepie-archdaemon
2026-06-19 00:33:37 +00:00
parent f01465e87f
commit ee6fd8ffe8
5 changed files with 706 additions and 76 deletions
+16 -4
View File
@@ -15930,6 +15930,17 @@ body:not(.email-doc-split-active) #email-lib-modal.email-lib-fullscreen:not(.mod
flex: 0 0 auto !important;
height: auto !important;
}
/* Launch tab's cached-list normally has `flex: 1 1 0; min-height: 0`
(so it fills the modal on desktop). On mobile the parent now has
`height: auto`, which collapses `flex: 1 1 0` to ZERO PX
models render but the list area is invisible because the flex
basis is 0 and there's no free space to grow into. Switch to
content-sized flex so the list grows with its children. */
#cookbook-modal .cookbook-group[data-backend-group="Serve"] > .admin-card > .hwfit-cached-list,
#cookbook-modal .cookbook-group[data-backend-group="Serve"] > .admin-card > #hwfit-cached-list {
flex: 0 0 auto !important;
overflow: visible !important;
}
}
#cookbook-modal .hwfit-cached-list {
flex-shrink: 0;
@@ -18560,7 +18571,7 @@ body.gallery-selecting .gallery-dl-btn,
label and center it vertically so the descenders don't clip. */
#hwfit-cache-select {
min-width: 58px;
height: 32px;
height: 28px;
display: inline-flex;
align-items: center;
justify-content: center;
@@ -19316,7 +19327,7 @@ body.gallery-selecting .gallery-dl-btn,
margin-bottom: 4px;
}
.cookbook-slot-btn {
min-width: 22px; height: 22px;
min-width: 22px; height: 28px;
padding: 0 6px;
font-size: 10px; font-weight: 600;
border: 1px solid var(--border);
@@ -19733,11 +19744,12 @@ body.gallery-selecting .gallery-dl-btn,
font-size: 12px;
padding: 0 6px;
height: 28px;
box-sizing: border-box;
}
.hwfit-sf[data-field="backend"],
.hwfit-sf[data-field="dtype"],
.hwfit-sf[data-field="tp"] {
height: 32px;
height: 28px;
box-sizing: border-box;
width: 100%;
}
@@ -23569,7 +23581,7 @@ details.hwfit-serve-advanced > .hwfit-serve-checks:last-of-type {
width: 51px;
}
#serve-search {
height: 32px;
height: 28px;
}
#cookbook-dl-btn {
position: relative;