This would be extremely powerful way to automatically refactor a large source file. For example a prompt might be, “extract this constant into its own file in a manner consistent with other code in the project”.
Ideally, the action would be:
$ touch <path-that-makes-sense/constantsFile>
- copy + export the selected code to that file
- import the variable from the new file and update references in the working file if required.
Capabilties like this that mix terminal commands + codebase + file strucutre context would be immensely powerful & helpful!