From b379fe610a6af45d044ef98fc6afabc0764bd174 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Fri, 18 Oct 2024 21:20:59 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=9B=A0=EF=B8=8F=20modify=20prompts?= =?UTF-8?q?=20and=20update=20file=20paths?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/promptdom.ts | 2 +- packages/sample/src/edits/editsgen.genai.mjs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/src/promptdom.ts b/packages/core/src/promptdom.ts index a7ad973816..55d77a4f4f 100644 --- a/packages/core/src/promptdom.ts +++ b/packages/core/src/promptdom.ts @@ -1065,7 +1065,7 @@ ${trimNewlines(schemaText)} const fods = fileOutputs?.filter((f) => !!f.description) if (fods?.length > 0) { - userPrompt += ` + systemPrompt += ` ## File generation rules When generating files, use the following rules which are formatted as "file glob: description": diff --git a/packages/sample/src/edits/editsgen.genai.mjs b/packages/sample/src/edits/editsgen.genai.mjs index cfd7f872e5..29086266a9 100644 --- a/packages/sample/src/edits/editsgen.genai.mjs +++ b/packages/sample/src/edits/editsgen.genai.mjs @@ -1,5 +1,5 @@ script({ - files: "src/edits/fib.ts", + files: "src/edits/fibs/fib.ts", }) $`Generation 1 variations of the SNIPPET in various programming languages and save them in files. @@ -7,4 +7,4 @@ $`Generation 1 variations of the SNIPPET in various programming languages and sa - there should be a function with a TODO comment and a BODY comment ` def("FILE", env.files) -defFileOutput("src/edits/**") +defFileOutput("src/edits/**/*", "generated files")