diff --git a/ui/desktop/src/components/recipes/CreateEditRecipeModal.tsx b/ui/desktop/src/components/recipes/CreateEditRecipeModal.tsx
index 3b589d081e4b..67cbdb543bda 100644
--- a/ui/desktop/src/components/recipes/CreateEditRecipeModal.tsx
+++ b/ui/desktop/src/components/recipes/CreateEditRecipeModal.tsx
@@ -1,9 +1,9 @@
import React, { useState, useEffect, useCallback } from 'react';
import { useForm } from '@tanstack/react-form';
import { Recipe, generateDeepLink, Parameter } from '../../recipe';
+import { Check, ExternalLink, Play, Save, X } from 'lucide-react';
import { Geese } from '../icons/Geese';
import Copy from '../icons/Copy';
-import { Check, Save, X, Play } from 'lucide-react';
import { ExtensionConfig } from '../ConfigContext';
import { Button } from '../ui/button';
@@ -342,8 +342,17 @@ export default function CreateEditRecipeModal({
{isCreateMode
- ? 'Create a new recipe to define agent behavior and capabilities.'
- : "You can edit the recipe below to change the agent's behavior in a new session."}
+ ? 'Create a new recipe to define agent behavior and capabilities for reusable chat sessions.'
+ : "You can edit the recipe below to change the agent's behavior in a new session."}{' '}
+
+ Learn more
+
+
diff --git a/ui/desktop/src/components/recipes/CreateRecipeFromSessionModal.tsx b/ui/desktop/src/components/recipes/CreateRecipeFromSessionModal.tsx
index 57d9c50c12dc..61cb735b4034 100644
--- a/ui/desktop/src/components/recipes/CreateRecipeFromSessionModal.tsx
+++ b/ui/desktop/src/components/recipes/CreateRecipeFromSessionModal.tsx
@@ -263,7 +263,7 @@ export default function CreateRecipeFromSessionModal({
className="text-lg font-medium text-textProminent"
data-testid="analyzing-title"
>
- Analyzing your conversation...
+ Analyzing your conversation
diff --git a/ui/desktop/src/components/recipes/shared/InstructionsEditor.tsx b/ui/desktop/src/components/recipes/shared/InstructionsEditor.tsx
index 90a908d46e52..e0c00a2fddfd 100644
--- a/ui/desktop/src/components/recipes/shared/InstructionsEditor.tsx
+++ b/ui/desktop/src/components/recipes/shared/InstructionsEditor.tsx
@@ -111,7 +111,7 @@ Use {{parameter_name}} syntax for any user-provided values.`;
className={`w-full h-full min-h-[500px] p-3 border rounded-lg bg-background-default text-text-standard focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none font-mono text-sm ${
error ? 'border-red-500' : 'border-border-subtle'
}`}
- placeholder="Detailed instructions for the AI, hidden from the user..."
+ placeholder="Detailed instructions for the AI, hidden from the user"
/>
{error &&
{error}
}
diff --git a/ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx b/ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx
index 7754c3186d5e..7d96710df994 100644
--- a/ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx
+++ b/ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx
@@ -1,12 +1,14 @@
import React, { useState } from 'react';
import { Parameter } from '../../../recipe';
+import { ChevronDown } from 'lucide-react';
import ParameterInput from '../../parameter/ParameterInput';
import RecipeActivityEditor from '../RecipeActivityEditor';
import JsonSchemaEditor from './JsonSchemaEditor';
import InstructionsEditor from './InstructionsEditor';
import { Button } from '../../ui/button';
-import { RecipeFormApi } from './recipeFormSchema';
+import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../../ui/collapsible';
+import { RecipeFormApi, RecipeFormData } from './recipeFormSchema';
// Type for field API to avoid linting issues - use any to bypass complex type constraints
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -143,6 +145,15 @@ export function RecipeFormFields({
return usedInInstructions || usedInPrompt || usedInActivities;
};
+ const checkHasAdvancedData = React.useCallback((values: RecipeFormData) => {
+ const hasActivities = Boolean(values.activities && values.activities.length > 0);
+ const hasParameters = Boolean(values.parameters && values.parameters.length > 0);
+ const hasJsonSchema = Boolean(values.jsonSchema && values.jsonSchema.trim());
+ return hasActivities || hasParameters || hasJsonSchema;
+ }, []);
+
+ const [advancedOpen, setAdvancedOpen] = useState(() => checkHasAdvancedData(form.state.values));
+
return (
{/* Title Field */}
@@ -244,12 +255,13 @@ export function RecipeFormFields({
className={`w-full p-3 border rounded-lg bg-background-default text-text-standard focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none font-mono text-sm ${
field.state.meta.errors.length > 0 ? 'border-red-500' : 'border-border-subtle'
}`}
- placeholder="Detailed instructions for the AI, hidden from the user..."
+ placeholder="Detailed instructions for the AI, hidden from the user"
rows={8}
data-testid="instructions-input"
/>
- Use {`{{parameter_name}}`} to define parameters that users can fill in
+ Use {`{{parameter_name}}`} to define parameters that can be filled in when running the
+ recipe.
{field.state.meta.errors.length > 0 && (
{field.state.meta.errors[0]}
@@ -296,7 +308,7 @@ export function RecipeFormFields({
updateParametersFromFields();
}}
className="w-full p-3 border border-border-subtle rounded-lg bg-background-default text-text-standard focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none"
- placeholder="Pre-filled prompt when the recipe starts..."
+ placeholder="Pre-filled prompt when the recipe starts"
rows={3}
data-testid="prompt-input"
/>
@@ -304,187 +316,206 @@ export function RecipeFormFields({
)}
- {/* Activities Field */}
-
- {(field: FormFieldApi) => (
-
- Parameters will be automatically detected from {`{{parameter_name}}`} syntax in
- instructions/prompt/activities or you can manually add them below.
-
+ Parameters will be automatically detected from {`{{parameter_name}}`} syntax in
+ instructions/prompt/activities or you can manually add them below.
+