Replies: 5 comments 1 reply
-
very cool... since these updates are small, you could try to swap system.files with system.changelog which will create diffs. But otherwise this looks good. The edit should have been applied. I will debug this Monday. |
Beta Was this translation helpful? Give feedback.
-
There's also a way to ignore more files by default (on top of .gitignore) https://microsoft.github.io/genaiscript/reference/scripts/git/#configuring-ignores |
Beta Was this translation helpful? Give feedback.
-
Found way to fix it, I had to specify a file output to make --apply-edits work. defFileOutput("**", "Any generated files by migration"); I found it by debugging // fileedits.ts
export async function writeFileEdits(...) {
for (const fileEdit of Object.entries(fileEdits || {})) {
// Destructure the filename, before content, after content, and validation from the entry
const [fn, { before, after, validation }] = fileEdit
if (!validation?.valid) continue // ❌ valid was undefined
// promptrunner.ts
function validateFileOutputs(...) {
if (fileOutputs?.length && Object.keys(fileEdits || {}).length) { // ❌ fileOutputs was empty
...
} I don't know if it's intended, but I didn't see it in documentation |
Beta Was this translation helpful? Give feedback.
-
fixed at c19e6fe |
Beta Was this translation helpful? Give feedback.
-
Btw, if you are looking at github actions build and log, you can look at the builtin "github" object which has a bunch of helpers, including giving the octokit object if you need to dig deeper. |
Beta Was this translation helpful? Give feedback.
-
I love GenAIScript it's opening a whole possibility of scripting that we could never dream of years ago !
I am trying to write a script that do automatic package migration. My idea is to analyse dependabot pull requests, and using a GenAIScript to commit automatically code changes on that PR
Here is my first try to upgrade a package, for instance react-native-adjust from v4 to v5
Then I run it like this
However when I run it, the prompt, and intention are correct :
But no changes are made. Do you know what I did wrong ?
Beta Was this translation helpful? Give feedback.
All reactions