Skip to content

Commit

Permalink
initial code expansion support
Browse files Browse the repository at this point in the history
  • Loading branch information
jonsequitur committed Jan 18, 2025
1 parent ff8a3ad commit c524414
Show file tree
Hide file tree
Showing 49 changed files with 748 additions and 198 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ Microsoft.DotNet.Interactive.Events
public Microsoft.DotNet.Interactive.IKernelExtension KernelExtension { get;}
public class KernelInfoProduced : KernelEvent
.ctor(Microsoft.DotNet.Interactive.KernelInfo kernelInfo, Microsoft.DotNet.Interactive.Commands.KernelCommand command)
public System.String ConnectionShortcutCode { get; set;}
public Microsoft.DotNet.Interactive.KernelInfo KernelInfo { get;}
public class KernelReady : KernelEvent
.ctor(Microsoft.DotNet.Interactive.KernelInfo[] kernelInfos)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ Microsoft.DotNet.Interactive.Jupyter
.ctor(Microsoft.DotNet.Interactive.Kernel kernel, System.Reactive.Concurrency.IScheduler scheduler = null)
public System.Threading.Tasks.Task Handle(JupyterRequestContext context)
protected System.Void OnKernelEventReceived(Microsoft.DotNet.Interactive.Events.KernelEvent event, JupyterRequestContext context)
public class CondaEnvironment, IJupyterEnvironment
public static System.String CondaPath { get;}
public static System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<System.String>> GetEnvironmentNamesAsync()
public System.String Name { get; set;}
public System.Threading.Tasks.Task<Microsoft.DotNet.Interactive.Utility.CommandLineResult> ExecuteAsync(System.String command, System.String args, System.IO.DirectoryInfo workingDir = null, System.Nullable<System.TimeSpan> timeout = null)
public System.Diagnostics.Process StartProcess(System.String command, System.String args, System.IO.DirectoryInfo workingDir, System.Action<System.String> output = null, System.Action<System.String> error = null)
public class ConnectionInformation
public static ConnectionInformation Load(System.IO.FileInfo file)
.ctor()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Microsoft.DotNet.Interactive.PowerShell
public class SecretManager
.ctor(PowerShellKernel kernel)
public System.String VaultName { get;}
public System.Void SetSecret(System.String name, System.String value, System.String command = null, System.String source = null)
public System.Boolean TryGetSecret(System.String secretName, ref System.String& value)
public System.Void SetValue(System.String name, System.String value)
public System.Boolean TryGetValue(System.String name, ref System.String& value)
Microsoft.DotNet.Interactive.PowerShell.Commands
public class EnterAzShellCommand : System.Management.Automation.PSCmdlet
.ctor()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ public class CSharpProjectKernelTests

public CSharpProjectKernelTests(ITestOutputHelper output)
{
CSharpProjectKernel.RegisterEventsAndCommands();

_output = output;
_disposables.Add(_output.SubscribeToPocketLogger());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</ItemGroup>

<ItemGroup>
<Compile Include="..\dotnet-interactive\Pocket\Format.CustomizeLogString.cs" Link="Pocket\Format.CustomizeLogString.cs" />
<Compile Include="..\dotnet-interactive\(Pocket)\Logger\Format.CustomizeLogString.cs" Link="Pocket\Format.CustomizeLogString.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.CSharpProject\%28Recipes%29\AsyncLazy{T}.cs" Link="Utility\AsyncLazy{T}.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.CSharpProject\(Recipes)\JsonSerializationExtensions.cs" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<ItemGroup>
<Compile Include="..\dotnet-interactive\(Recipes)\TaskExtensions.cs" />
<Compile Include="..\dotnet-interactive\Pocket\Format.CustomizeLogString.cs" Link="Pocket\Format.CustomizeLogString.cs" />
<Compile Include="..\dotnet-interactive\(Pocket)\Logger\Format.CustomizeLogString.cs" Link="Pocket\Format.CustomizeLogString.cs" />
<Compile Include="..\dotnet-interactive\Utility\KernelDiagnostics.cs" Link="KernelDiagnostics.cs" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</ItemGroup>

<ItemGroup>
<Compile Include="..\dotnet-interactive\Pocket\Format.CustomizeLogString.cs" Link="Pocket\Format.CustomizeLogString.cs" />
<Compile Include="..\dotnet-interactive\(Pocket)\Logger\Format.CustomizeLogString.cs" Link="Pocket\Format.CustomizeLogString.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.Tests\ProxyKernelConnectionTestsBase.cs" Link="ProxyKernelConnectionTestsBase.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.Tests\StdIoKernelConnectorTests.cs" Link="StdIoKernelConnectorTests.cs" />
<Compile Include="..\Microsoft.DotNet.Interactive.Tests\Utility\ConnectHost.cs" Link="Utility\ConnectHost.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"token": "the-token",
"commandType": "ConnectSignalR",
"command": {
"hubUrl": "https://example.com/hub",
"kernelName": "dotnet-interactive",
"targetKernelName": null,
"originUri": null,
"destinationUri": null
},
"routingSlip": [
"kernel://somelocation/kernelName?tag=arrived",
"kernel://somelocation/kernelName"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"token": "the-token",
"commandType": "ConnectStdio",
"command": {
"command": [
"dotnet-interactive",
"stdio",
"--default-kernel",
"fsharp"
],
"kernelHost": null,
"kernelName": "dotnet-interactive",
"targetKernelName": null,
"originUri": null,
"destinationUri": null
},
"routingSlip": [
"kernel://somelocation/kernelName?tag=arrived",
"kernel://somelocation/kernelName"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"token": "the-token",
"commandType": "ExpandCode",
"command": {
"identifier": "#!sql-adventureworks",
"targetKernelName": null,
"originUri": null,
"destinationUri": null
},
"routingSlip": [
"kernel://somelocation/kernelName?tag=arrived",
"kernel://somelocation/kernelName"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"token": "the-token",
"commandType": "RequestCodeExpansionInfos",
"command": {
"targetKernelName": null,
"originUri": null,
"destinationUri": null
},
"routingSlip": [
"kernel://somelocation/kernelName?tag=arrived",
"kernel://somelocation/kernelName"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"event": {
"codeExpansionInfos": [
{
"name": "Kusto Query Language",
"kind": "WellKnownConnection",
"description": null
},
{
"name": "Microsoft SQL Database",
"kind": "WellKnownConnection",
"description": null
}
]
},
"eventType": "CodeExpansionInfosProduced",
"command": {
"token": "the-token",
"commandType": "RequestCodeExpansionInfos",
"command": {
"targetKernelName": null,
"originUri": null,
"destinationUri": null
},
"routingSlip": [
"kernel://somelocation/kernelName?tag=arrived",
"kernel://somelocation/kernelName"
]
},
"routingSlip": [
"kernel://somelocation/kernelName"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
],
"languageName": "JavaScript",
"languageVersion": null,
"isProxy": false,
"isComposite": false,
"isProxy": false,
"displayName": "javascript - JavaScript",
"localName": "javascript",
"uri": "kernel://vscode/javascript",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
],
"languageName": "JavaScript",
"languageVersion": null,
"isProxy": false,
"isComposite": false,
"isProxy": false,
"displayName": "javascript - JavaScript",
"localName": "javascript",
"uri": "kernel://vscode/javascript",
Expand All @@ -26,8 +26,8 @@
],
"languageName": "CSharp",
"languageVersion": null,
"isProxy": false,
"isComposite": false,
"isProxy": false,
"displayName": "csharp - CSharp",
"localName": "csharp",
"uri": "kernel://pid/csharp",
Expand Down
Loading

0 comments on commit c524414

Please sign in to comment.