Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.
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