From fba027b7a4d979161ec6145b9555a571075b6df2 Mon Sep 17 00:00:00 2001 From: Lluis Agusti Date: Mon, 9 Feb 2026 18:44:25 +0800 Subject: [PATCH] feat: refine copilot tools styles --- .../ChatContainer/ChatContainer.tsx | 5 +- .../ChatMessagesContainer.tsx | 225 +-- .../components/EmptySession/EmptySession.tsx | 6 +- .../ToolAccordion/AccordionContent.tsx | 223 +++ .../ToolAccordion/ToolAccordion.tsx | 27 +- .../(platform)/copilot-2/styleguide/page.tsx | 1288 +++++++++++++++++ .../tools/CreateAgent/CreateAgent.tsx | 101 +- .../copilot-2/tools/CreateAgent/helpers.tsx | 8 +- .../copilot-2/tools/EditAgent/EditAgent.tsx | 101 +- .../copilot-2/tools/EditAgent/helpers.tsx | 8 +- .../copilot-2/tools/FindAgents/FindAgents.tsx | 64 +- .../copilot-2/tools/FindAgents/helpers.tsx | 15 +- .../copilot-2/tools/FindBlocks/FindBlocks.tsx | 21 +- .../copilot-2/tools/FindBlocks/helpers.tsx | 7 +- .../copilot-2/tools/RunAgent/RunAgent.tsx | 3 +- .../AgentDetailsCard/AgentDetailsCard.tsx | 27 +- .../components/ErrorCard/ErrorCard.tsx | 19 +- .../ExecutionStartedCard.tsx | 27 +- .../SetupRequirementsCard.tsx | 22 +- .../copilot-2/tools/RunAgent/helpers.tsx | 51 +- .../copilot-2/tools/RunBlock/RunBlock.tsx | 7 +- .../BlockOutputCard/BlockOutputCard.tsx | 25 +- .../components/ErrorCard/ErrorCard.tsx | 19 +- .../SetupRequirementsCard.tsx | 41 +- .../copilot-2/tools/RunBlock/helpers.tsx | 40 +- .../copilot-2/tools/SearchDocs/SearchDocs.tsx | 117 +- .../copilot-2/tools/SearchDocs/helpers.tsx | 14 +- .../tools/ViewAgentOutput/ViewAgentOutput.tsx | 135 +- .../tools/ViewAgentOutput/helpers.tsx | 8 +- .../src/components/ai-elements/message.tsx | 2 +- .../src/components/atoms/Text/Text.tsx | 3 +- 31 files changed, 2155 insertions(+), 504 deletions(-) create mode 100644 autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ToolAccordion/AccordionContent.tsx create mode 100644 autogpt_platform/frontend/src/app/(platform)/copilot-2/styleguide/page.tsx diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ChatContainer/ChatContainer.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ChatContainer/ChatContainer.tsx index 147823f708..4c727bc37c 100644 --- a/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ChatContainer/ChatContainer.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ChatContainer/ChatContainer.tsx @@ -41,8 +41,9 @@ export const ChatContainer = ({ isLoading={isLoadingSession} />
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ChatMessagesContainer/ChatMessagesContainer.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ChatMessagesContainer/ChatMessagesContainer.tsx index 597f50841c..b6048f840f 100644 --- a/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ChatMessagesContainer/ChatMessagesContainer.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ChatMessagesContainer/ChatMessagesContainer.tsx @@ -10,6 +10,7 @@ import { } from "@/components/ai-elements/message"; import { LoadingSpinner } from "@/components/atoms/LoadingSpinner/LoadingSpinner"; import { UIDataTypes, UIMessage, UITools, ToolUIPart } from "ai"; +import { useEffect, useState } from "react"; import { FindBlocksTool } from "../../tools/FindBlocks/FindBlocks"; import { FindAgentsTool } from "../../tools/FindAgents/FindAgents"; import { SearchDocsTool } from "../../tools/SearchDocs/SearchDocs"; @@ -19,6 +20,23 @@ import { ViewAgentOutputTool } from "../../tools/ViewAgentOutput/ViewAgentOutput import { CreateAgentTool } from "../../tools/CreateAgent/CreateAgent"; import { EditAgentTool } from "../../tools/EditAgent/EditAgent"; +const THINKING_PHRASES = [ + "Thinking...", + "Considering this...", + "Working through this...", + "Analyzing your request...", + "Reasoning...", + "Looking into it...", + "Processing your request...", + "Mulling this over...", + "Piecing it together...", + "On it...", +]; + +function getRandomPhrase() { + return THINKING_PHRASES[Math.floor(Math.random() * THINKING_PHRASES.length)]; +} + interface ChatMessagesContainerProps { messages: UIMessage[]; status: string; @@ -32,6 +50,27 @@ export const ChatMessagesContainer = ({ error, isLoading, }: ChatMessagesContainerProps) => { + const [thinkingPhrase, setThinkingPhrase] = useState(getRandomPhrase); + + useEffect(() => { + if (status === "submitted") { + setThinkingPhrase(getRandomPhrase()); + } + }, [status]); + + const lastMessage = messages[messages.length - 1]; + const lastAssistantHasVisibleContent = + lastMessage?.role === "assistant" && + lastMessage.parts.some( + (p) => + (p.type === "text" && p.text.trim().length > 0) || + p.type.startsWith("tool-"), + ); + + const showThinking = + status === "submitted" || + (status === "streaming" && !lastAssistantHasVisibleContent); + return ( @@ -40,94 +79,112 @@ export const ChatMessagesContainer = ({
)} - {messages.map((message) => ( - - - {message.parts.map((part, i) => { - switch (part.type) { - case "text": - return ( - - {part.text} - - ); - case "tool-find_block": - return ( - - ); - case "tool-find_agent": - case "tool-find_library_agent": - return ( - - ); - case "tool-search_docs": - case "tool-get_doc_page": - return ( - - ); - case "tool-run_block": - return ( - - ); - case "tool-run_agent": - case "tool-schedule_agent": - return ( - - ); - case "tool-create_agent": - return ( - - ); - case "tool-edit_agent": - return ( - - ); - case "tool-view_agent_output": - return ( - - ); - default: - return null; + {messages.map((message, messageIndex) => { + const isLastAssistant = + messageIndex === messages.length - 1 && + message.role === "assistant"; + const messageHasVisibleContent = message.parts.some( + (p) => + (p.type === "text" && p.text.trim().length > 0) || + p.type.startsWith("tool-"), + ); + + return ( + + - - ))} - {status === "submitted" && ( + > + {message.parts.map((part, i) => { + switch (part.type) { + case "text": + return ( + + {part.text} + + ); + case "tool-find_block": + return ( + + ); + case "tool-find_agent": + case "tool-find_library_agent": + return ( + + ); + case "tool-search_docs": + case "tool-get_doc_page": + return ( + + ); + case "tool-run_block": + return ( + + ); + case "tool-run_agent": + case "tool-schedule_agent": + return ( + + ); + case "tool-create_agent": + return ( + + ); + case "tool-edit_agent": + return ( + + ); + case "tool-view_agent_output": + return ( + + ); + default: + return null; + } + })} + {isLastAssistant && + !messageHasVisibleContent && + showThinking && ( + + {thinkingPhrase} + + )} + + + ); + })} + {showThinking && lastMessage?.role !== "assistant" && ( - Thinking... + {thinkingPhrase} diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/EmptySession/EmptySession.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/EmptySession/EmptySession.tsx index 5768f5d02b..a3565e6815 100644 --- a/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/EmptySession/EmptySession.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/EmptySession/EmptySession.tsx @@ -52,9 +52,9 @@ export function EmptySession({
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ToolAccordion/AccordionContent.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ToolAccordion/AccordionContent.tsx new file mode 100644 index 0000000000..c0675f3575 --- /dev/null +++ b/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ToolAccordion/AccordionContent.tsx @@ -0,0 +1,223 @@ +import { Link } from "@/components/atoms/Link/Link"; +import { Text } from "@/components/atoms/Text/Text"; +import { cn } from "@/lib/utils"; + +/* ------------------------------------------------------------------ */ +/* Layout */ +/* ------------------------------------------------------------------ */ + +export function ContentGrid({ + children, + className, +}: { + children: React.ReactNode; + className?: string; +}) { + return
{children}
; +} + +/* ------------------------------------------------------------------ */ +/* Card */ +/* ------------------------------------------------------------------ */ + +export function ContentCard({ + children, + className, +}: { + children: React.ReactNode; + className?: string; +}) { + return ( +
+
{children}
+
+ ); +} + +/** Flex row with a left content area (`children`) and an optional right‑side `action`. */ +export function ContentCardHeader({ + children, + action, + className, +}: { + children: React.ReactNode; + action?: React.ReactNode; + className?: string; +}) { + return ( +
+
{children}
+ {action} +
+ ); +} + +export function ContentCardTitle({ + children, + className, +}: { + children: React.ReactNode; + className?: string; +}) { + return ( + + {children} + + ); +} + +export function ContentCardSubtitle({ + children, + className, +}: { + children: React.ReactNode; + className?: string; +}) { + return ( + + {children} + + ); +} + +export function ContentCardDescription({ + children, + className, +}: { + children: React.ReactNode; + className?: string; +}) { + return ( + {children} + ); +} + +/* ------------------------------------------------------------------ */ +/* Text */ +/* ------------------------------------------------------------------ */ + +export function ContentMessage({ + children, + className, +}: { + children: React.ReactNode; + className?: string; +}) { + return {children}; +} + +export function ContentHint({ + children, + className, +}: { + children: React.ReactNode; + className?: string; +}) { + return ( + + {children} + + ); +} + +/* ------------------------------------------------------------------ */ +/* Code / data */ +/* ------------------------------------------------------------------ */ + +export function ContentCodeBlock({ + children, + className, +}: { + children: React.ReactNode; + className?: string; +}) { + return ( +
+      {children}
+    
+ ); +} + +/* ------------------------------------------------------------------ */ +/* Inline elements */ +/* ------------------------------------------------------------------ */ + +export function ContentBadge({ + children, + className, +}: { + children: React.ReactNode; + className?: string; +}) { + return ( + + {children} + + ); +} + +export function ContentLink({ + href, + children, + className, + ...rest +}: Omit, "className"> & { + className?: string; +}) { + return ( + + {children} + + ); +} + +/* ------------------------------------------------------------------ */ +/* Lists */ +/* ------------------------------------------------------------------ */ + +export function ContentSuggestionsList({ + items, + max = 5, + className, +}: { + items: string[]; + max?: number; + className?: string; +}) { + if (items.length === 0) return null; + return ( +
    + {items.slice(0, max).map((s) => ( +
  • {s}
  • + ))} +
+ ); +} diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ToolAccordion/ToolAccordion.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ToolAccordion/ToolAccordion.tsx index 2e38791c8f..f4fcafee6f 100644 --- a/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ToolAccordion/ToolAccordion.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/copilot-2/components/ToolAccordion/ToolAccordion.tsx @@ -7,8 +7,9 @@ import { useId } from "react"; import { useToolAccordion } from "./useToolAccordion"; interface Props { - badgeText: string; + icon: React.ReactNode; title: React.ReactNode; + titleClassName?: string; description?: React.ReactNode; children: React.ReactNode; className?: string; @@ -18,8 +19,9 @@ interface Props { } export function ToolAccordion({ - badgeText, + icon, title, + titleClassName, description, children, className, @@ -36,7 +38,12 @@ export function ToolAccordion({ }); return ( -
+
-
+ + ); } diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunAgent/components/SetupRequirementsCard/SetupRequirementsCard.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunAgent/components/SetupRequirementsCard/SetupRequirementsCard.tsx index 77b8360681..6d640d60ae 100644 --- a/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunAgent/components/SetupRequirementsCard/SetupRequirementsCard.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunAgent/components/SetupRequirementsCard/SetupRequirementsCard.tsx @@ -6,6 +6,12 @@ import { Button } from "@/components/atoms/Button/Button"; import type { CredentialsMetaInput } from "@/lib/autogpt-server-api/types"; import type { SetupRequirementsResponse } from "@/app/api/__generated__/models/setupRequirementsResponse"; import { useCopilotChatActions } from "../../../../components/CopilotChatActionsProvider/useCopilotChatActions"; +import { + ContentBadge, + ContentCardDescription, + ContentCardTitle, + ContentMessage, +} from "../../../../components/ToolAccordion/AccordionContent"; import { coerceCredentialFields, coerceExpectedInputs } from "./helpers"; interface Props { @@ -45,7 +51,7 @@ export function SetupRequirementsCard({ output }: Props) { return (
-

{output.message}

+ {output.message} {credentialFields.length > 0 && (
@@ -71,22 +77,22 @@ export function SetupRequirementsCard({ output }: Props) { {expectedInputs.length > 0 && (
-

Expected inputs

+ Expected inputs
{expectedInputs.map((input) => (
-

+ {input.title} -

- + + {input.required ? "Required" : "Optional"} - +
-

+ {input.name} • {input.type} {input.description ? ` \u2022 ${input.description}` : ""} -

+
))}
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunAgent/helpers.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunAgent/helpers.tsx index f969298d68..2d8a8d5def 100644 --- a/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunAgent/helpers.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunAgent/helpers.tsx @@ -1,11 +1,15 @@ -import type { ToolUIPart } from "ai"; -import { PlayIcon } from "@phosphor-icons/react"; import type { AgentDetailsResponse } from "@/app/api/__generated__/models/agentDetailsResponse"; import type { ErrorResponse } from "@/app/api/__generated__/models/errorResponse"; import type { ExecutionStartedResponse } from "@/app/api/__generated__/models/executionStartedResponse"; import type { NeedLoginResponse } from "@/app/api/__generated__/models/needLoginResponse"; import { ResponseType } from "@/app/api/__generated__/models/responseType"; import type { SetupRequirementsResponse } from "@/app/api/__generated__/models/setupRequirementsResponse"; +import { + PlayIcon, + RocketLaunchIcon, + WarningDiamondIcon, +} from "@phosphor-icons/react"; +import type { ToolUIPart } from "ai"; export interface RunAgentInput { username_agent_slug?: string; @@ -111,12 +115,6 @@ function getAgentIdentifierText( return null; } -function getExecutionModeText(input: RunAgentInput | undefined): string | null { - if (!input) return null; - const isSchedule = Boolean(input.schedule_name?.trim() || input.cron?.trim()); - return isSchedule ? "Scheduled run" : "Run"; -} - export function getAnimationText(part: { state: ToolUIPart["state"]; input?: unknown; @@ -166,21 +164,22 @@ export function ToolIcon({ isStreaming?: boolean; isError?: boolean; }) { + if (isError) { + return ; + } return ( ); } +export function AccordionIcon() { + return ; +} + export function formatMaybeJson(value: unknown): string { if (typeof value === "string") return value; try { @@ -190,19 +189,21 @@ export function formatMaybeJson(value: unknown): string { } } - export function getAccordionMeta(output: RunAgentToolOutput): { - badgeText: string; + icon: React.ReactNode; title: string; + titleClassName?: string; description?: string; } { + const icon = ; + if (isRunAgentExecutionStartedOutput(output)) { const statusText = typeof output.status === "string" && output.status.trim() ? output.status.trim() : "started"; return { - badgeText: "Run agent", + icon, title: output.graph_name, description: `Status: ${statusText}`, }; @@ -210,7 +211,7 @@ export function getAccordionMeta(output: RunAgentToolOutput): { if (isRunAgentAgentDetailsOutput(output)) { return { - badgeText: "Run agent", + icon, title: output.agent.name, description: "Inputs required", }; @@ -224,7 +225,7 @@ export function getAccordionMeta(output: RunAgentToolOutput): { >, ).length; return { - badgeText: "Run agent", + icon, title: output.setup_info.agent_name, description: missingCredsCount > 0 @@ -234,8 +235,12 @@ export function getAccordionMeta(output: RunAgentToolOutput): { } if (isRunAgentNeedLoginOutput(output)) { - return { badgeText: "Run agent", title: "Sign in required" }; + return { icon, title: "Sign in required" }; } - return { badgeText: "Run agent", title: "Error" }; -} \ No newline at end of file + return { + icon: , + title: "Error", + titleClassName: "text-red-500", + }; +} diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunBlock/RunBlock.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunBlock/RunBlock.tsx index 3d7d2cef8d..c3584157ae 100644 --- a/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunBlock/RunBlock.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunBlock/RunBlock.tsx @@ -3,6 +3,9 @@ import type { ToolUIPart } from "ai"; import { MorphingTextAnimation } from "../../components/MorphingTextAnimation/MorphingTextAnimation"; import { ToolAccordion } from "../../components/ToolAccordion/ToolAccordion"; +import { BlockOutputCard } from "./components/BlockOutputCard/BlockOutputCard"; +import { ErrorCard } from "./components/ErrorCard/ErrorCard"; +import { SetupRequirementsCard } from "./components/SetupRequirementsCard/SetupRequirementsCard"; import { getAccordionMeta, getAnimationText, @@ -11,11 +14,7 @@ import { isRunBlockErrorOutput, isRunBlockSetupRequirementsOutput, ToolIcon, - type RunBlockToolOutput, } from "./helpers"; -import { BlockOutputCard } from "./components/BlockOutputCard/BlockOutputCard"; -import { SetupRequirementsCard } from "./components/SetupRequirementsCard/SetupRequirementsCard"; -import { ErrorCard } from "./components/ErrorCard/ErrorCard"; export interface RunBlockToolPart { type: string; diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunBlock/components/BlockOutputCard/BlockOutputCard.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunBlock/components/BlockOutputCard/BlockOutputCard.tsx index 3e5e97fc27..4b8ddad37f 100644 --- a/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunBlock/components/BlockOutputCard/BlockOutputCard.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunBlock/components/BlockOutputCard/BlockOutputCard.tsx @@ -4,6 +4,13 @@ import React, { useState } from "react"; import { getGetWorkspaceDownloadFileByIdUrl } from "@/app/api/__generated__/endpoints/workspace/workspace"; import { Button } from "@/components/atoms/Button/Button"; import type { BlockOutputResponse } from "@/app/api/__generated__/models/blockOutputResponse"; +import { + ContentBadge, + ContentCard, + ContentCardTitle, + ContentGrid, + ContentMessage, +} from "../../../../components/ToolAccordion/AccordionContent"; import { formatMaybeJson } from "../../helpers"; interface Props { @@ -103,14 +110,12 @@ function OutputKeySection({ const visibleItems = expanded ? items : items.slice(0, COLLAPSED_LIMIT); return ( -
+
-

- {outputKey} -

- + {outputKey} + {items.length} item{items.length === 1 ? "" : "s"} - +
{mediaContent || (
@@ -127,18 +132,18 @@ function OutputKeySection({
           {expanded ? "Show less" : `Show all ${items.length} items`}
         
       )}
-    
+ ); } export function BlockOutputCard({ output }: Props) { return ( -
-

{output.message}

+ + {output.message} {Object.entries(output.outputs ?? {}).map(([key, items]) => ( ))} -
+ ); } diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunBlock/components/ErrorCard/ErrorCard.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunBlock/components/ErrorCard/ErrorCard.tsx index 9f83ca383d..7990428947 100644 --- a/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunBlock/components/ErrorCard/ErrorCard.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunBlock/components/ErrorCard/ErrorCard.tsx @@ -1,6 +1,11 @@ "use client"; import type { ErrorResponse } from "@/app/api/__generated__/models/errorResponse"; +import { + ContentCodeBlock, + ContentGrid, + ContentMessage, +} from "../../../../components/ToolAccordion/AccordionContent"; import { formatMaybeJson } from "../../helpers"; interface Props { @@ -9,18 +14,14 @@ interface Props { export function ErrorCard({ output }: Props) { return ( -
-

{output.message}

+ + {output.message} {output.error && ( -
-          {formatMaybeJson(output.error)}
-        
+ {formatMaybeJson(output.error)} )} {output.details && ( -
-          {formatMaybeJson(output.details)}
-        
+ {formatMaybeJson(output.details)} )} -
+ ); } diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx index aab329c929..e98fea2850 100644 --- a/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/copilot-2/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx @@ -1,17 +1,24 @@ "use client"; -import { useState } from "react"; -import { AnimatePresence, motion } from "framer-motion"; -import { CredentialsGroupedView } from "@/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView"; +import type { SetupRequirementsResponse } from "@/app/api/__generated__/models/setupRequirementsResponse"; import { Button } from "@/components/atoms/Button/Button"; +import { Text } from "@/components/atoms/Text/Text"; +import { CredentialsGroupedView } from "@/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView"; import { FormRenderer } from "@/components/renderers/InputRenderer/FormRenderer"; import type { CredentialsMetaInput } from "@/lib/autogpt-server-api/types"; -import type { SetupRequirementsResponse } from "@/app/api/__generated__/models/setupRequirementsResponse"; +import { AnimatePresence, motion } from "framer-motion"; +import { useState } from "react"; import { useCopilotChatActions } from "../../../../components/CopilotChatActionsProvider/useCopilotChatActions"; import { + ContentBadge, + ContentCardDescription, + ContentCardTitle, + ContentMessage, +} from "../../../../components/ToolAccordion/AccordionContent"; +import { + buildExpectedInputsSchema, coerceCredentialFields, coerceExpectedInputs, - buildExpectedInputsSchema, } from "./helpers"; interface Props { @@ -69,7 +76,7 @@ export function SetupRequirementsCard({ output }: Props) { return (
-

{output.message}

+ {output.message} {credentialFields.length > 0 && (
@@ -96,7 +103,7 @@ export function SetupRequirementsCard({ output }: Props) { {inputSchema && (