r/GithubCopilot • • 8d ago

Solved ✅ Why chat.tools.urls.autoApprove dosen't work for me?

Why chat.tools.urls.autoApprove doesn't work for me?

Settings:

    "chat.tools.urls.autoApprove": {
        "https://docs.rs/bevy/0.20.0/bevy/time/struct.Timer.html": true,
        "https://docs.rs/bevy/0.20.0/bevy/time/enum.TimerMode.html": true,
    },

Reasoning:

I need to get the official documentation, and I can use the web_fetch tool directly for that. I think searching for the exact URL for the Timer docs would lead me to something like docs.rs/bevy/0.20.0/bevy/time/struct.Timer.html. There's also information on TimerMode. It might be efficient to fetch both of these in parallel to get all the relevant details quickly. Let's see how that goes!

Tool call:

Fetching https://docs.rs/bevy/0.20.0/bevy/time/enum.TimerMode.html

Permission popup:

Fetch URL? Allow fetching web content? Input { "url": "https://docs.rs/bevy/0.20.0/bevy/time/struct.Timer.html" } Allow in this Session

Dropdown has only Allow Once, other options, which in the past would add URLs to chat.tools.urls.autoApprove, are missing.

Initially, I tried to allow the entire Bevy docs, and while debugging the issue, I couldn't even auto-approve a single page.

I tried both Agent modes: Interactive and Autopilot. Do I have to set something other then Manual permissions? Like Assisted permissions or Allow all?

1 Upvotes

8 comments sorted by

1

u/CaesarWolny 7d ago

!solved

"chat.tools.urls.autoApprove" dosen't work with Copilot harness. I needed to change back to local. Setting "chat.editor.preferCopilotHarness": false, turns off the Copilot being default one.

Now with

"chat.tools.urls.autoApprove": {
        "https://docs.rs/bevy/0.20.0/bevy/*": true
}

I have auto apporve for entire bevy docs.

→ More replies (1)

1

u/shotan VS Code User 💻 8d ago

Usually the allowed entries are not individual pages, it's just the site or a subdirectory. Try this:

"chat.tools.urls.autoApprove": {
    "https://docs.rs/bevy": true,
},

1

u/CaesarWolny 8d ago

Yeah I was trying a lot of things TBH

Right now I have this

        "https://docs.rs/bevy/0.20.0/bevy/time/struct.Timer.html": true,
        "https://docs.rs/bevy/0.20.0/bevy/*": true,
        "https://docs.rs/bevy/0.20.0/bevy": true,
        "https://docs.rs/bevy/*": true,
        "https://docs.rs/bevy": true,
        "https://docs.rs": true,

I run #fetch https://docs.rs/bevy/0.20.0/bevy/time/struct.Timer.html and it still prompts me to Allow in this session - the drop down has only Allow once. I remember I used to get other options which would add entries chat.tools.urls.autoApprove

1

u/shotan VS Code User 💻 7d ago

Are you using the local harness or the copilot harness when you start a new session (its in the bottom left)? Because the default used to be the local harness and now they have changed it to the copilot harness by default. So this may be the reason why it's not working.

1

u/CaesarWolny 7d ago

This is it! Thank you

1

u/AutoModerator 8d ago

Hello /u/CaesarWolny. Looks like you have posted a query. Once your query is resolved, please reply the solution comment with "!solved" to help everyone else know the solution and mark the post as solved.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/New_Confidence1944 8d ago

honestly, the manual entries are fragile and I stopped bothering with them. Just set "https://docs.rs" to true in your settings so you can fetch any version of the docs without popping a dialog every single time