-
Notifications
You must be signed in to change notification settings - Fork 29.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support getting various document ranges from InteractiveSessionProviders #193656
Conversation
* create a separate type to represent a response part * rename existing `ResponsePart` to `InternalResponsePart` * fix? handle if response part's resolved value is a markdown string, which is allowed in the `IResponse` interface
…veSessionProvider's
b2ff67c
to
a25b86c
Compare
a25b86c
to
63080ad
Compare
@@ -138,7 +138,22 @@ declare module 'vscode' { | |||
treeData: FileTreeData; | |||
} | |||
|
|||
export type InteractiveProgress = InteractiveProgressContent | InteractiveProgressId | InteractiveProgressTask | InteractiveProgressFileTree; | |||
export interface DocumentContext { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work if there are multiple codeblocks? Does the context need to be associated with one of the codeblocks somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We intend for this context to be associated with all codeblocks that occur a single reply for now. We can try associating a code block in the reply with ranges in documents but it's farther in the future.
@@ -162,6 +186,8 @@ export class Response implements IResponse { | |||
} else if (isCompleteInteractiveProgressTreeData(responsePart)) { | |||
this._responseParts.push(responsePart); | |||
this._updateRepr(quiet); | |||
} else if ('documents' in responsePart) { | |||
this._usedContext = responsePart; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API would imply that it's valid to send multiple UsedContext pieces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This occurred to me as well. I think it makes sense in future to aggregate all IUsedContext
progress reports. What do you think?
There are some integration tests related to mapped edits failing, I'll soon fix them |
…t-code-mappers-context support getting various document ranges from InteractiveSessionProviders
…t-code-mappers-context support getting various document ranges from InteractiveSessionProviders
…t-code-mappers-context support getting various document ranges from InteractiveSessionProviders
…t-code-mappers-context support getting various document ranges from InteractiveSessionProviders
In this PR, we add support for getting various documents ranges from
InteractiveSessionProvider
s as part ofprovideResponseWithProgress
. This allows passing that information to mapped-edit providers (aka code mappers).We also update the API of mappedEditsProvider's.
Support for persisting document ranges across vscode sessions will happen in another PR, if that's okay with @jrieken and @roblourens