diff --git a/frontend/src/components/assistant-editor/prompt-editor.tsx b/frontend/src/components/assistant-editor/prompt-editor.tsx index ac87add..08a5474 100644 --- a/frontend/src/components/assistant-editor/prompt-editor.tsx +++ b/frontend/src/components/assistant-editor/prompt-editor.tsx @@ -30,6 +30,7 @@ import { ToolPicker, } from "@/components/assistant-editor/editor-controls"; import type { AssistantForm } from "@/components/assistant-editor/types"; +import { SectionAnchorTabs } from "@/components/editor/section-anchor-tabs"; import { SectionCard } from "@/components/editor/section-card"; import { VisionConfigSection } from "@/components/editor/vision-config-section"; import { TurnConfigEditor } from "@/components/turn-config-editor"; @@ -315,35 +316,18 @@ export function PromptEditor({ className="flex h-full min-h-0 overflow-hidden bg-background" >
- + + scrollToSection(sectionId as PromptSectionId) + } + className="bg-background px-4 pt-3 sm:px-6 sm:pt-4 lg:px-8" + contentClassName={ + debugOpen ? "w-full" : "mx-auto w-full max-w-7xl" + } + />
void; + className?: string; + /** Optional width/centering wrapper around the tab row (prompt page uses max-w-7xl). */ + contentClassName?: string; +}) { + if (sections.length === 0) return null; + + const list = ( +
+ {sections.map((section) => { + const active = activeSectionId === section.id; + + return ( + + ); + })} +
+ ); + + return ( + + ); +} diff --git a/frontend/src/components/workflow/panels/PanelAnchorNavigation.tsx b/frontend/src/components/workflow/panels/PanelAnchorNavigation.tsx index 0294dd0..c3922fa 100644 --- a/frontend/src/components/workflow/panels/PanelAnchorNavigation.tsx +++ b/frontend/src/components/workflow/panels/PanelAnchorNavigation.tsx @@ -3,6 +3,8 @@ import type { ReactNode } from "react"; import { useEffect, useRef, useState } from "react"; +import { SectionAnchorTabs } from "@/components/editor/section-anchor-tabs"; + export type PanelAnchorSection = { id: string; label: string; @@ -128,33 +130,13 @@ export function PanelAnchorNavigation({ return (
{sections.length > 1 && ( - + )}