Docs: recipe landing page (#3122)
This commit is contained in:
@@ -12,7 +12,7 @@ export default function RecipeGenerator() {
|
||||
const [activities, setActivities] = useState([]);
|
||||
const [newActivity, setNewActivity] = useState('');
|
||||
const [copied, setCopied] = useState(false);
|
||||
const [errors, setErrors] = useState({});
|
||||
const [errors, setErrors] = useState<{[key: string]: string}>({});
|
||||
const [outputFormat, setOutputFormat] = useState('url'); // 'url' or 'yaml'
|
||||
const [authorContact, setAuthorContact] = useState('');
|
||||
const [extensionsList, setExtensionsList] = useState([
|
||||
@@ -59,7 +59,7 @@ export default function RecipeGenerator() {
|
||||
|
||||
// Form validation
|
||||
const validateForm = useCallback(() => {
|
||||
const newErrors = {};
|
||||
const newErrors: {[key: string]: string} = {};
|
||||
|
||||
if (!title.trim()) {
|
||||
newErrors.title = 'Title is required';
|
||||
@@ -89,6 +89,7 @@ export default function RecipeGenerator() {
|
||||
title,
|
||||
description,
|
||||
instructions,
|
||||
prompt: prompt.trim() || undefined,
|
||||
activities: activities.length > 0 ? activities : undefined
|
||||
};
|
||||
|
||||
@@ -272,6 +273,23 @@ instructions: ${instructions}
|
||||
{errors.instructions && <div className="text-red-500 text-sm mt-1">{errors.instructions}</div>}
|
||||
</div>
|
||||
|
||||
{/* Initial Prompt */}
|
||||
<div>
|
||||
<label htmlFor="prompt" className="block text-sm font-medium text-textStandard mb-2">
|
||||
Initial Prompt (optional)
|
||||
</label>
|
||||
<textarea
|
||||
id="prompt"
|
||||
value={prompt}
|
||||
onChange={(e) => setPrompt(e.target.value)}
|
||||
className="w-full p-3 border border-borderSubtle rounded-lg bg-bgSubtle text-textStandard min-h-[100px]"
|
||||
placeholder="Enter an initial prompt to start the conversation (optional)"
|
||||
/>
|
||||
<div className="text-sm text-textSubtle mt-1">
|
||||
If provided, this message will automatically start the conversation when the recipe is launched.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* YAML-specific fields */}
|
||||
{outputFormat === 'yaml' && (
|
||||
<>
|
||||
@@ -289,19 +307,6 @@ instructions: ${instructions}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label htmlFor="prompt" className="block text-sm font-medium text-textStandard mb-2">
|
||||
Initial Prompt (optional)
|
||||
</label>
|
||||
<textarea
|
||||
id="prompt"
|
||||
value={prompt}
|
||||
onChange={(e) => setPrompt(e.target.value)}
|
||||
className="w-full p-3 border border-borderSubtle rounded-lg bg-bgSubtle text-textStandard min-h-[100px]"
|
||||
placeholder="Enter an initial prompt for the recipe"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-textStandard mb-2">
|
||||
Extensions (optional)
|
||||
|
||||
@@ -106,7 +106,7 @@ export default function RecipePage() {
|
||||
</div>
|
||||
<p className="text-textProminent">
|
||||
Save time and skip setup — launch any{" "}
|
||||
<Link to="/docs/guides/session-recipes" className="text-purple-600 hover:underline">
|
||||
<Link to="/docs/guides/recipes/session-recipes" className="text-purple-600 hover:underline">
|
||||
Goose agent recipe
|
||||
</Link>{" "}
|
||||
shared by the community with a single click.
|
||||
|
||||
Reference in New Issue
Block a user