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

add support for clearing variables from HttpKernel #3467

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

jonsequitur
Copy link
Contributor

No description provided.

Copy link
Contributor

@phenning phenning left a comment

Choose a reason for hiding this comment

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

This is great, exactly what we need!

@jonsequitur jonsequitur merged commit 3ba37fe into dotnet:main Feb 27, 2024
4 checks passed

namespace Microsoft.DotNet.Interactive.Http;

public class ClearValues : KernelCommand
Copy link
Contributor

@shyamnamboodiripad shyamnamboodiripad Feb 27, 2024

Choose a reason for hiding this comment

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

This seems generally useful. Any reason why this is not defined in the core Interactive assembly?

Currently the http editor does not (need to) directly reference the Interactive.Http assembly. Adding that reference may not be problematic - but still wanted to double check whether we can move this to the main assembly and avoid the additional dependency.

@@ -58,6 +56,12 @@ public class HttpKernel :
RegisterForDisposal(_client);
}

public Task HandleAsync(ClearValues command, KernelInvocationContext context)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we implement this using explicit interface implementation and avoid the public API similar to what we do for the other commands below?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants