Restore recipe parameters functionality (#3530)

This commit is contained in:
Zane
2025-07-22 10:31:44 -07:00
committed by GitHub
parent 914c537965
commit 246ba19256
28 changed files with 1057 additions and 479 deletions
+6 -4
View File
@@ -70,11 +70,11 @@ const substituteParameters = (text: string, params: Record<string, string>): str
* This should be called after recipe parameters are collected
*/
export const updateSystemPromptWithParameters = async (
recipeParameters: Record<string, string>
recipeParameters: Record<string, string>,
recipeConfig?: { instructions?: string | null }
): Promise<void> => {
try {
const recipeConfig = window.appConfig?.get?.('recipe');
const originalInstructions = (recipeConfig as { instructions?: string })?.instructions;
const originalInstructions = recipeConfig?.instructions;
if (!originalInstructions) {
return;
@@ -96,7 +96,9 @@ export const updateSystemPromptWithParameters = async (
});
if (!response.ok) {
console.warn(`Failed to update system prompt with parameters: ${response.statusText}`);
console.warn(
`Failed to update system prompt with parameters: ${response.status} ${response.statusText}`
);
}
} catch (error) {
console.error('Error updating system prompt with parameters:', error);