github / github/copilot-cli

Automatically create missing directories with a tool call!

Abierto
#1,123 0 comentarios 0 reacciones 0 asignados Ver en GitHub
area:tools
Lenguaje dominante
Shell
Estrellas
11.2k
Forks
1.9k
Merge medio
14 h 16 min
PR fusionados (30 d)
6

Descripción

### Describe the feature or problem you'd like to solve

When copilot-cli calls “Create” tool with a filepath which includes intermediate directories which are not existing, the tool call fails!

### Proposed solution

The “Create” tool and the other tools which create or update a file, could be smarter, and check in one go if all required directories for the given filepath are existing, and if not it creates them. I don’t understand why we have to see each time a error, then the AI has to get again asked how to handle and it starts to think again then it creates the missing directories first and finally it calls “Create” again with the content and the same filepath.

That’s so stupid, I think. Why does the tool not support the AI and just create the missing directories while it creates the file, and stops the tool from failing, because the full path wasn’t existing in forehand.

I think often that would save a lot of tokens / context window space and it would make the Agent much faster and might also reduce energy consumption in the server farm where the AI is running. It would reduce a lot of requests and save my time.

### Example prompts or workflows

I have not a specific prompt which can show this improvement / feature. But a screenshot from a session which shows the issue.

Imagehich would

### Additional context

We can make it configureable via copilot-cli config to enable or disable this feature if that would be easier for everyone.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.