From 768bcb565a3cbe59b43ba0a59761701d887c7c08 Mon Sep 17 00:00:00 2001 From: pewdiepie-archdaemon Date: Sun, 14 Jun 2026 22:54:38 +0900 Subject: [PATCH] Cookbook/Dependencies: variant toggle now uses the agent/chat mode-toggle; Copy inside code - Drop the 'Install via' label and the pill-tag variant buttons. The toggle is now the same sliding-pill mode-toggle used by the Agent/Chat selector in the chat input. Pip/uv on the left, Docker on the right, default = Pip/uv. CSS: extended .mode-chat::before's translateX(100%) rule to also fire on .mode-right so non-chat callers can use the same animation without claiming the chat-only class name. - Copy button moves inside the
: absolute-positioned at the
  top-right corner, icon-only, padding-right on the pre makes room.
  Matches the Setup-token copy pattern in the integrations form.
---
 static/js/cookbook.js | 29 +++++++++++++++--------------
 static/style.css      | 28 +++++++++++++++++++++++-----
 2 files changed, 38 insertions(+), 19 deletions(-)

diff --git a/static/js/cookbook.js b/static/js/cookbook.js
index f3efc0079..8d758c52a 100644
--- a/static/js/cookbook.js
+++ b/static/js/cookbook.js
@@ -868,21 +868,21 @@ async function _fetchDependencies() {
       const initial = pickRecipe(backend, '') || candidates[0];
       const initialVariant = RECIPE_DEFAULT_VARIANT;
       const initialCmds = recipeCommands(initial, initialVariant);
-      const _variantBtn = (v, label) =>
-        ``;
+      const rightActive = initialVariant === 'docker' ? ' mode-right' : '';
       return `