Skip to content

[WIP] Support for Copilot Instructions#76

Open
DanBradbury wants to merge 1 commit intomainfrom
db-copilot-instructions
Open

[WIP] Support for Copilot Instructions#76
DanBradbury wants to merge 1 commit intomainfrom
db-copilot-instructions

Conversation

@DanBradbury
Copy link
Owner

Living the RE life I'm stuck trying to figure out the black magic that VSCode is using to make this happen.

I setup a simple example using "Ask" mode with a .github/copilot-instructions.md in the working directory
image

There are 2 requests made by VSCode for this chat message

{
    "messages": [
        {
            "role": "system",
            "content": "Typical system prompt junk..|"
        },
        {
            "role": "user",
            "content": "testing"
        }
    ],
    "model": "gpt-4o-mini-2024-07-18",
    "temperature": 0.1,
    "top_p": 1,
    "max_tokens": 20,
    "stop": [
        ";"
    ],
    "n": 1,
    "stream": true
}
{
    "model": "gpt-5-mini",
    "input": [
        {
            "role": "system",
            "content": [
                {
                    "type": "input_text",
                    "text": "System message junk"
                }
            ]
        },
        {
            "role": "user",
            "content": [
                {
                    "type": "input_text",
                    "text": "When generating code, please follow these user provided coding instructions. You can ignore an instruction if it contradicts a system message.\n<instructions>\n<attachment filePath=\"/Users/danbradbury/Documents/Github/vinter/.github/copilot-instructions.md\">\nAlways add an emoji on the first line of your response\n</attachment>\n\n</instructions>\n<prompt>\ntesting\n</prompt>\n"
                }
            ]
        }
    ],
    "stream": true,
    "max_output_tokens": 64000,
    "store": false,
    "truncation": "disabled",
    "reasoning": {
        "summary": "detailed"
    },
    "include": [
        "reasoning.encrypted_content"
    ]
}

In my current working example I was able to bypass using /chat/completions entirely. There is obviously a change in the responses as well that would need to be parsed.. could still use the delta or the final text content that comes back from the response endpoint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant