fix(cookbook): bring back the Dependencies recipe-panel caret (#6747)

cb052eee removed the caret that opens a backend's recipe panel, saying
the action had moved into the Installed menu, but that menu never got a
recipe item. The panel (model picker, commands, Run) could not be
opened, and the HW Fit / serve-card deep links that click the caret
only flashed the row. Render the caret again on every recipe row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dxrpl
2026-10-15 19:59:56 +02:00
co-authored by Claude Opus 5.5
parent c74f475679
commit 8cd96aad46
2 changed files with 44 additions and 5 deletions
+6 -5
View File
@@ -1195,11 +1195,12 @@ async function _fetchDependencies() {
// For backends with a recipe catalog (vllm / sglang / llama_cpp),
// append a caret button that toggles a per-row recipe panel below.
const hasRecipe = RECIPE_BACKENDS.has(pkg.name);
// Standalone recipe-caret button removed — the "Pick install
// command" action lives inside the Installed ▾ dropdown menu
// (see _showDepMenu) so each row only has ONE caret to click.
// Kept the variable so downstream concat code stays the same.
const recipeCaret = '';
// The caret is the only way to open the recipe panel (the Installed ▾
// menu has no recipe item), and the HW Fit / serve-card deep links
// open it by clicking this caret (#6747).
const recipeCaret = hasRecipe
? `<button class="cookbook-dep-tag cookbook-dep-recipe-caret" data-dep-recipe-toggle="${esc(pkg.name)}" title="Pick a model to see the exact install commands" aria-expanded="false" style="background:none;border:1px solid var(--border);padding:2px 6px;display:inline-flex;align-items:center;cursor:pointer;"><svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" style="transition:transform 0.15s"><polyline points="6 9 12 15 18 9"/></svg></button>`
: '';
const recipePanel = hasRecipe ? _recipePanelHtml(pkg.name) : '';
// When llama_cpp (or any future engine) reports build_deps_missing
// from its system_prereqs probe, surface a one-tap install button