PicoCreator / smol-dev-js

Smol personal AI, for smol incremental tasks in a JS project
MIT License
322 stars 52 forks source link

cannot merge files - TypeError: path.resolve is not a function #7

Closed tiagoefreitas closed 1 year ago

tiagoefreitas commented 1 year ago

It created a new folder and file on the root folder instead of the exiting src folder. When I asked to merge the 2 files, I got:

✔ [you]: … you created a CustomNode.tsx in components/Flow instead of updating the src/components/Flow, why? merge the contents of components/Flow/CustomNode.tsx with src/components/Flow/CustomNode.tsx 🐣 [ai]: Here is the updated plan draft:

Merge the contents of components/Flow/CustomNode.tsx with src/components/Flow/CustomNode.tsx.

Update src/components/Flow/CustomNode.tsx with the contents from components/Flow/CustomNode.tsx.

Delete components/Flow/CustomNode.tsx. ✔ [you]: Proceed with the plan? … yes 🐣 [ai]: Working on the plan ... 🐣 [ai]: Studying 1 dependencies (in parallel) 🐣 [ai]: Performing any required modules install / file moves / deletion TypeError: path.resolve is not a function at getOperationFileMapFromPlan (/usr/local/lib/node_modules/smol-dev-js/src/ai/seq/applyOperationFileMapFromPlan.js:121:24) at generateFilesFromPrompt (/usr/local/lib/node_modules/smol-dev-js/src/ai/seq/generateFilesFromPrompt.js:106:8) at async TypeCommand.run [as _runHandler] (/usr/local/lib/node_modules/smol-dev-js/src/cli/command/prompt.js:65:4) at async Promise.all (index 3)

m4yankp commented 1 year ago

@PicoCreator https://github.com/PicoCreator/smol-dev-js/pull/15

PicoCreator commented 1 year ago

Merged =)