github / github/copilot-cli

Automatically create missing directories with a tool call!

Đang mở
#1,123 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:tools
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

### 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.