Skip to content

Setting context for inline completions #19

Closed
@michaelstaszewski

Description

@michaelstaszewski

I am having some troubles with setting context. I would like to open multiple files and have them all participate in the context used when generating inline completions.

In my test I have a folder with two files:

  1. SchemaExport.sql - Schema export file from a SQL database
  2. NewCode.sql - Empty file where I'll be writing queries against my schema

After initialization and sign in, I do the following:

  1. Send a workspace/didChangeWorkspaceFolders notification with my folder in the added list
  2. Send a textDocument/didOpen notification for each file in the folder
  3. Activate the tab for NewCode.sql and send a textDocument/didFocus notification
  4. I send incremental updates using the textDocument/didChange notification

Inline completions work in NewCode.sql, but the results are largely based on general SQL knowledge vs. knowledge of the contents of SchemaExport.sql.

If I repeat the above steps, but activate the tab for SchemaExport.sql and send a textDocument/didFocus for it, inline completions made within SchemaExport.sql work exactly as I expect and use the contents of the file.

How can I improve upon the context? I see similar results when opening my folder in VS Code and using Copilot there.

Thanks,
Michael

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions