You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
SchemaExport.sql - Schema export file from a SQL database
NewCode.sql - Empty file where I'll be writing queries against my schema
After initialization and sign in, I do the following:
Send a workspace/didChangeWorkspaceFolders notification with my folder in the added list
Send a textDocument/didOpen notification for each file in the folder
Activate the tab for NewCode.sql and send a textDocument/didFocus notification
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
The text was updated successfully, but these errors were encountered:
The exact context used is an implementation detail that is constantly in flux. There are no guarantees here. But the behavior you observing today is deriving from recently focused documents. Just having a document open in the background doesn't make the cut.
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:
SchemaExport.sql
- Schema export file from a SQL databaseNewCode.sql
- Empty file where I'll be writing queries against my schemaAfter initialization and sign in, I do the following:
workspace/didChangeWorkspaceFolders
notification with my folder in theadded
listtextDocument/didOpen
notification for each file in the folderNewCode.sql
and send atextDocument/didFocus
notificationtextDocument/didChange
notificationInline completions work in
NewCode.sql
, but the results are largely based on general SQL knowledge vs. knowledge of the contents ofSchemaExport.sql
.If I repeat the above steps, but activate the tab for
SchemaExport.sql
and send atextDocument/didFocus
for it, inline completions made withinSchemaExport.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
The text was updated successfully, but these errors were encountered: