From 3a351f67e678880aa8d3e25405ecf3ed7782647b Mon Sep 17 00:00:00 2001 From: ananthakrishnan Date: Mon, 14 Jul 2025 20:20:55 +0530 Subject: [PATCH 1/3] fix: correct agent tools name when creating new agent (#1877) --- frontend/src/agents/NewAgent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/agents/NewAgent.tsx b/frontend/src/agents/NewAgent.tsx index b3047fa9..5da72478 100644 --- a/frontend/src/agents/NewAgent.tsx +++ b/frontend/src/agents/NewAgent.tsx @@ -232,7 +232,7 @@ export default function NewAgent({ mode }: { mode: 'new' | 'edit' | 'draft' }) { const data = await response.json(); const tools: OptionType[] = data.tools.map((tool: UserToolType) => ({ id: tool.id, - label: tool.displayName, + label: tool.customName, icon: `/toolIcons/tool_${tool.name}.svg`, })); setUserTools(tools); From 789e65557a7d2399b64b7b53f53072d1674f780b Mon Sep 17 00:00:00 2001 From: ananthakrishnan Date: Tue, 15 Jul 2025 22:02:02 +0530 Subject: [PATCH 2/3] fix: Removed incorrect www from URL in DocsGPT Docs frontend (#1854) --- docs/theme.config.jsx | 2 +- frontend/src/agents/NewAgent.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/theme.config.jsx b/docs/theme.config.jsx index 77d8b9c1..bfd32b4c 100644 --- a/docs/theme.config.jsx +++ b/docs/theme.config.jsx @@ -60,7 +60,7 @@ const config = { GitHub {' | '} - + Blog diff --git a/frontend/src/agents/NewAgent.tsx b/frontend/src/agents/NewAgent.tsx index 5da72478..b3047fa9 100644 --- a/frontend/src/agents/NewAgent.tsx +++ b/frontend/src/agents/NewAgent.tsx @@ -232,7 +232,7 @@ export default function NewAgent({ mode }: { mode: 'new' | 'edit' | 'draft' }) { const data = await response.json(); const tools: OptionType[] = data.tools.map((tool: UserToolType) => ({ id: tool.id, - label: tool.customName, + label: tool.displayName, icon: `/toolIcons/tool_${tool.name}.svg`, })); setUserTools(tools); From a53f93c19579d2262d9b6d1b7d14cbd0b15bcd66 Mon Sep 17 00:00:00 2001 From: Siddhant Rai Date: Fri, 18 Jul 2025 14:02:29 +0530 Subject: [PATCH 3/3] feat: enhance dropdown component and prompts integration --- frontend/src/agents/NewAgent.tsx | 49 +- frontend/src/components/Dropdown.tsx | 34 +- .../src/components/types/Dropdown.types.ts | 45 ++ frontend/src/index.css | 599 +++++++++--------- frontend/src/settings/General.tsx | 13 +- frontend/src/settings/Prompts.tsx | 63 +- 6 files changed, 419 insertions(+), 384 deletions(-) create mode 100644 frontend/src/components/types/Dropdown.types.ts diff --git a/frontend/src/agents/NewAgent.tsx b/frontend/src/agents/NewAgent.tsx index b3047fa9..1e5e117a 100644 --- a/frontend/src/agents/NewAgent.tsx +++ b/frontend/src/agents/NewAgent.tsx @@ -20,6 +20,7 @@ import { setSelectedAgent, } from '../preferences/preferenceSlice'; import PromptsModal from '../preferences/PromptsModal'; +import Prompts from '../settings/Prompts'; import { UserToolType } from '../settings/types'; import AgentPreview from './AgentPreview'; import { Agent } from './types'; @@ -46,7 +47,7 @@ export default function NewAgent({ mode }: { mode: 'new' | 'edit' | 'draft' }) { source: '', chunks: '', retriever: '', - prompt_id: '', + prompt_id: 'default', tools: [], agent_type: '', status: '', @@ -504,32 +505,32 @@ export default function NewAgent({ mode }: { mode: 'new' | 'edit' | 'draft' }) {
-

Prompt

-
+
- ({ - label: prompt.name, - value: prompt.id, - }))} - selectedValue={ - agent.prompt_id - ? prompts.filter( - (prompt) => prompt.id === agent.prompt_id, - )[0]?.name || null - : null + prompt.id === agent.prompt_id) || + prompts[0] } - onSelect={(option: { label: string; value: string }) => - setAgent({ ...agent, prompt_id: option.value }) + onSelectPrompt={(name, id, type) => + setAgent({ ...agent, prompt_id: id }) } - size="w-full" - rounded="3xl" - border="border" - buttonClassName="bg-white dark:bg-[#222327] border-silver dark:border-[#7E7E7E]" - optionsClassName="bg-white dark:bg-[#383838] border-silver dark:border-[#7E7E7E] dark:border-[#7E7E7E] dark:bg-dark-charcoal" - placeholderClassName="text-gray-400 dark:text-silver" - placeholder="Select a prompt" - contentSize="text-sm" + setPrompts={setPrompts} + title="Prompt" + titleClassName="text-lg font-semibold dark:text-[#E0E0E0]" + showAddButton={false} + dropdownProps={{ + size: 'w-full', + rounded: '3xl', + border: 'border', + buttonClassName: + 'bg-white dark:bg-[#222327] border-silver dark:border-[#7E7E7E]', + optionsClassName: + 'bg-white dark:bg-[#383838] border-silver dark:border-[#7E7E7E]', + placeholderClassName: 'text-gray-400 dark:text-silver', + contentSize: 'text-sm', + }} />
+ {showAddButton && ( + + )}