-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Conversation
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]; |
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.
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. | |||
*/ | |||
*/ |
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.
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) { |
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.
Can't you use the 'accept' callback on the item to do the same thing? I don't follow
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.
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
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 could overwrite the accept
handler for all items in the anything quick access layer, but this feels more explicit
cc @TylerLeonhardt