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

Fix issue with input gesture not working #3036

Merged
merged 2 commits into from
Jun 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions src/Microsoft.DotNet.Interactive/KernelExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,20 +176,21 @@ private static async Task HandleSetMagicCommand<T>(
var sourceKernel = Kernel.Root.FindKernelByName(valueOptionResult.Kernel);

ValueProduced valueProduced;
if (
sourceKernel?.KernelInfo.IsProxy == false
&& valueOptionResult is { Name: var sourceValueName, Kernel: var sourceKernelName }
if (valueOptionResult is { Name: var sourceValueName, Kernel: var sourceKernelName }
&& sourceKernelName != "input")
{
valueProduced = events.SingleOrDefault(e =>
e.Name == sourceValueName && e.Command.TargetKernelName == sourceKernelName);
}else if (sourceKernel?.KernelInfo.IsProxy == true
&& valueOptionResult is { Name: var sourceValueName1 })
{
var destinationUri = sourceKernel?.KernelInfo.RemoteUri;

valueProduced = events.SingleOrDefault(e =>
e.Name == sourceValueName1 && e.Command.DestinationUri == destinationUri);
if (sourceKernel?.KernelInfo.IsProxy == true)
{
var destinationUri = sourceKernel?.KernelInfo.RemoteUri;

valueProduced = events.SingleOrDefault(e =>
e.Name == sourceValueName && e.Command.DestinationUri == destinationUri);
}
else
{
valueProduced = events.SingleOrDefault(e =>
e.Name == sourceValueName && e.Command.TargetKernelName == sourceKernelName);
}
}
else
{
Expand Down