Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

🧹 refactor: Replace Arbitrary Values in the Agent Builder and Skills (#16824)

Marco Beretta2b390d656b10
diff --git a/client/src/components/Prompts/editor/Markdown.tsx b/client/src/components/Prompts/editor/Markdown.tsx
index 6b8cf18310..73d55a0080 100644
--- a/client/src/components/Prompts/editor/Markdown.tsx
+++ b/client/src/components/Prompts/editor/Markdown.tsx
@@ -21,7 +21,7 @@ const highlightVariables = (text: string): React.ReactNode[] => {
return (
<b
key={index}
- className="bg-status-warning-subtle text-text-warning ml-[0.5] rounded-lg p-[1px] font-medium"
+ className="bg-status-warning-subtle text-text-warning ml-[0.5] rounded-lg p-0.25 font-medium"
>
{`{{${part}}}`}
</b>
diff --git a/client/src/components/SidePanel/Agents/MCPToolItem.tsx b/client/src/components/SidePanel/Agents/MCPToolItem.tsx
index ee9623af8a..b804519d20 100644
--- a/client/src/components/SidePanel/Agents/MCPToolItem.tsx
+++ b/client/src/components/SidePanel/Agents/MCPToolItem.tsx
@@ -172,7 +172,7 @@ export default function MCPToolItem({
<div
id={detailsId}
className={cn(
- 'grid transition-[grid-template-rows] [transition-duration:var(--resize-dur)] [transition-timing-function:var(--resize-ease)] motion-reduce:transition-none',
+ 'resize-rows grid motion-reduce:transition-none',
expanded ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]',
)}
>
diff --git a/client/src/components/SidePanel/Agents/Tools/ItemDialog/sections/McpSection.tsx b/client/src/components/SidePanel/Agents/Tools/ItemDialog/sections/McpSection.tsx
index 6cf8115045..75d706b4c6 100644
--- a/client/src/components/SidePanel/Agents/Tools/ItemDialog/sections/McpSection.tsx
+++ b/client/src/components/SidePanel/Agents/Tools/ItemDialog/sections/McpSection.tsx
@@ -472,7 +472,7 @@ export default function McpSection({ item }: Props) {
* and the auto-height dialog follows the grid-rows tween in one motion. */}
<div
className={cn(
- 'grid transition-[grid-template-rows] [transition-duration:var(--resize-dur)] [transition-timing-function:var(--resize-ease)] motion-reduce:transition-none',
+ 'resize-rows grid motion-reduce:transition-none',
isReadyForAgent ? 'grid-rows-[0fr]' : 'grid-rows-[1fr]',
)}
>
diff --git a/client/src/components/SidePanel/Agents/Tools/SkillsSection.tsx b/client/src/components/SidePanel/Agents/Tools/SkillsSection.tsx
index 1a694066cb..04449c556d 100644
--- a/client/src/components/SidePanel/Agents/Tools/SkillsSection.tsx
+++ b/client/src/components/SidePanel/Agents/Tools/SkillsSection.tsx
@@ -102,7 +102,7 @@ function MorphHeight({ open, children }: { open: boolean; children: ReactNode })
className={cn(
'overflow-hidden',
animate &&
- 'transition-[height] [transition-duration:var(--resize-dur)] [transition-timing-function:var(--resize-ease)] motion-reduce:transition-none',
+ 'transition-[height] duration-(--resize-dur) ease-(--resize-ease) motion-reduce:transition-none',
)}
>
{/** Spacing lives inside the measured box so it collapses away with it. */}
diff --git a/client/src/components/Skills/tree/SkillFileEditor.tsx b/client/src/components/Skills/tree/SkillFileEditor.tsx
index 5d782d8df6..bef1a68864 100644
--- a/client/src/components/Skills/tree/SkillFileEditor.tsx
+++ b/client/src/components/Skills/tree/SkillFileEditor.tsx
@@ -81,7 +81,7 @@ export default function SkillFileEditor({ skillId, nodeId, fileName }: SkillFile
<span className="text-text-primary truncate text-sm font-medium">{fileName}</span>
<Circle
className={cn(
- 'size-2 shrink-0 transition-[opacity,color] duration-200',
+ 'size-2 shrink-0 transition duration-200',
isDirty ? 'text-status-warning fill-current opacity-100' : 'opacity-0',
)}
aria-hidden="true"
diff --git a/client/src/style.css b/client/src/style.css
index 3084934edd..3acbe4b34d 100644
--- a/client/src/style.css
+++ b/client/src/style.css
@@ -1589,6 +1589,15 @@ html {
--tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);
}
+/* Auto-height reveals over a grid (rows 0fr to 1fr) share the resize tween with
+ * `Collapse`, `McpOAuthDialog`, `MCPToolItem` and `McpSection`; pair with
+ * `motion-reduce:transition-none`. */
+@utility resize-rows {
+ transition-property: grid-template-rows;
+ transition-duration: var(--resize-dur);
+ transition-timing-function: var(--resize-ease);
+}
+
.assistant-item {
position: relative;
}
diff --git a/eslint-suppressions.json b/eslint-suppressions.json
index 9717469cff..e14077038c 100644
--- a/eslint-suppressions.json
+++ b/eslint-suppressions.json
@@ -1281,11 +1281,6 @@
"count": 5
}
},
- "client/src/components/Prompts/editor/Markdown.tsx": {
- "shadcn/no-arbitrary-values": {
- "count": 1
- }
- },
"client/src/components/Prompts/editor/PromptEditor.tsx": {
"shadcn/no-restyle": {
"count": 11
@@ -1542,9 +1537,6 @@
}
},
"client/src/components/SidePanel/Agents/MCPToolItem.tsx": {
- "shadcn/no-arbitrary-values": {
- "count": 3
- },
"shadcn/no-restyle": {
"count": 4
}
@@ -1590,7 +1582,7 @@
},
"client/src/components/SidePanel/Agents/Tools/ItemDialog/sections/McpSection.tsx": {
"shadcn/no-arbitrary-values": {
- "count": 4
+ "count": 1
},
"shadcn/no-restyle": {
"count": 4
@@ -1619,7 +1611,7 @@
},
"client/src/components/SidePanel/Agents/Tools/SkillsSection.tsx": {
"shadcn/no-arbitrary-values": {
- "count": 10
+ "count": 8
}
},
"client/src/components/SidePanel/Agents/Tools/ToolCard.tsx": {
@@ -1899,7 +1891,7 @@
},
"client/src/components/Skills/tree/SkillFileEditor.tsx": {
"shadcn/no-arbitrary-values": {
- "count": 4
+ "count": 3
},
"shadcn/no-restyle": {
"count": 18