Skip to content
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

feat: allow ➡️ to add chat context in background #213078

Merged
merged 1 commit into from
May 20, 2024

Conversation

joyceerhl
Copy link
Contributor

@joyceerhl joyceerhl self-assigned this May 20, 2024
@joyceerhl joyceerhl enabled auto-merge (squash) May 20, 2024 16:52
@vscodenpa vscodenpa added this to the May 2024 milestone May 20, 2024
override async run(accessor: ServicesAccessor, ...args: any[]): Promise<void> {
const quickInputService = accessor.get(IQuickInputService);
const chatVariablesService = accessor.get(IChatVariablesService);
const widgetService = accessor.get(IChatWidgetService);
const context: { widget?: IChatWidget } | undefined = args[0];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could args be undefined here, thus this would throw?

@@ -54,7 +60,7 @@ export interface IQuickAccessOptions {
/**
* Provider specific options for this particular showing of the
* quick access.
*/
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These got misaligned

@@ -326,6 +326,14 @@ export abstract class PickerQuickAccessProvider<T extends IPickerQuickAccessItem

// Accept the pick on accept and hide picker
disposables.add(picker.onDidAccept(event => {
if (runOptions?.handleAccept) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you use the 'accept' callback on the item to do the same thing? I don't follow

Copy link
Contributor Author

@joyceerhl joyceerhl May 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the consumer of the quick access from chat context action land, we don't control the items in the picker, they are populated from the anything quick access in this case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could overwrite the accept handler for all items in the anything quick access layer, but this feels more explicit

@joyceerhl joyceerhl merged commit c00f279 into main May 20, 2024
7 checks passed
@joyceerhl joyceerhl deleted the dev/joyceerhl/rival-dingo branch May 20, 2024 17:09
mustard-mh pushed a commit to gitpod-io/openvscode-server that referenced this pull request May 22, 2024
andremmsilva pushed a commit to PIC1G55/vscodeG55 that referenced this pull request May 26, 2024
@microsoft microsoft locked and limited conversation to collaborators Jul 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants