From a74e1e765a4063cdeada69b62c20d74c80da5d05 Mon Sep 17 00:00:00 2001 From: Owen Date: Tue, 18 Aug 2026 14:59:10 -0400 Subject: [PATCH] Pass 3 - add commands, remove run, formatting, mobile view --- .../ai-client-config/AiClientConfigCard.tsx | 35 ++++++------------- .../AiClientConfigSection.tsx | 13 ++++--- .../ai-client-config/AiConfigCodeBlock.tsx | 8 +++-- src/lib/aiClientConfig.ts | 22 ++++-------- 4 files changed, 27 insertions(+), 51 deletions(-) diff --git a/src/components/ai-client-config/AiClientConfigCard.tsx b/src/components/ai-client-config/AiClientConfigCard.tsx index c8bcc8f8d..3ef196aa8 100644 --- a/src/components/ai-client-config/AiClientConfigCard.tsx +++ b/src/components/ai-client-config/AiClientConfigCard.tsx @@ -38,7 +38,6 @@ type AiClientConfigCardProps = { keyAuth: AiClientAuthInput; description: string; icon: LucideIcon; - stackBlocks?: boolean; }; export function AiClientConfigCard({ @@ -47,8 +46,7 @@ export function AiClientConfigCard({ endpoint, keyAuth, description, - icon: Icon, - stackBlocks = true + icon: Icon }: AiClientConfigCardProps) { const t = useTranslations(); const [open, setOpen] = useState(false); @@ -94,7 +92,7 @@ export function AiClientConfigCard({ guide?.presets.find((p) => p.id === presetId) ?? guide?.presets[0]; const manualContent = guide ? ( -
+
{guide.presets.length > 1 ? ( ) : null} -
1 && - "@lg:grid-cols-2" - )} - > +
{preset?.blocks.map((block) => ( ))} @@ -133,7 +124,7 @@ export function AiClientConfigCard({ @@ -150,7 +141,7 @@ export function AiClientConfigCard({ )} /> - + {!guide && revealing ? (
@@ -179,27 +170,21 @@ export function AiClientConfigCard({ - {guide.cli.configureWithKey ? ( ) : null} - {guide.cli.runWithKey ? ( - - ) : null} - + {manualContent} diff --git a/src/components/ai-client-config/AiClientConfigSection.tsx b/src/components/ai-client-config/AiClientConfigSection.tsx index 77be92f09..a419abe27 100644 --- a/src/components/ai-client-config/AiClientConfigSection.tsx +++ b/src/components/ai-client-config/AiClientConfigSection.tsx @@ -21,10 +21,10 @@ type AiClientConfigSectionProps = { endpoint: string; auth: AiClientAuthInput; /** - * "wide" lays the client cards out side by side and allows a card's - * code blocks to sit side by side once there's room (e.g. the Keys - * page). "compact" always stacks both, which is what fits the - * Resource Launcher's side panel. + * "wide" lays the client cards out side by side once there's room + * (e.g. the Keys page). "compact" always stacks them, which is what + * fits the Resource Launcher's side panel. A card's own code blocks + * always stack regardless of this setting. */ layout?: "wide" | "compact"; className?: string; @@ -64,10 +64,10 @@ export function AiClientConfigSection({ -
+
@@ -80,7 +80,6 @@ export function AiClientConfigSection({ keyAuth={auth} description={descriptions[clientId]} icon={CLIENT_ICONS[clientId]} - stackBlocks={!isWide} /> ))}
diff --git a/src/components/ai-client-config/AiConfigCodeBlock.tsx b/src/components/ai-client-config/AiConfigCodeBlock.tsx index c4021a8c4..95c088160 100644 --- a/src/components/ai-client-config/AiConfigCodeBlock.tsx +++ b/src/components/ai-client-config/AiConfigCodeBlock.tsx @@ -2,19 +2,21 @@ import CopyTextBox from "@app/components/CopyTextBox"; import type { AiConfigBlock } from "@app/lib/aiClientConfig"; +import { cn } from "@app/lib/cn"; export function AiConfigCodeBlock({ block }: { block: AiConfigBlock }) { return ( -
+

{block.label}