Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,128 @@
"id": "9f6c5e13",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-07T20:34:38.401218Z",
"iopub.status.busy": "2026-07-07T20:34:38.397218Z",
"iopub.status.idle": "2026-07-07T20:34:39.691953Z",
"shell.execute_reply": "2026-07-07T20:34:39.691382Z"
"iopub.execute_input": "2026-10-15T05:48:32.229408Z",
"iopub.status.busy": "2026-10-15T05:48:32.222462Z",
"iopub.status.idle": "2026-10-15T05:48:35.659460Z",
"shell.execute_reply": "2026-10-15T05:48:35.652073Z"
}
},
"outputs": [
{
"data": {
"text/html": [
"\r\n",
"<div>\r\n",
" <div id='dotnet-interactive-this-cell-$CACHE_BUSTER$' style='display: none'>\r\n",
" The below script needs to be able to find the current output cell; this is an easy method to get it.\r\n",
" </div>\r\n",
" <script type='text/javascript'>\r\n",

" function timeout(ms, promise) {\r\n",
" return new Promise(function (resolve, reject) {\r\n",
" setTimeout(function () {\r\n",
" reject(new Error('timeout'))\r\n",
" }, ms)\r\n",
" promise.then(resolve, reject)\r\n",
" })\r\n",
" }\r\n",
"\r\n",


"\r\n",

"\r\n",
" if (!rootUrl.endsWith('/')) {\r\n",
" rootUrl = `${rootUrl}/`;\r\n",
" }\r\n",
"\r\n",
" try {\r\n",
" let response = await timeout(1000, fetch(`${rootUrl}discovery`, {\r\n",
" method: 'POST',\r\n",
" cache: 'no-cache',\r\n",
" mode: 'cors',\r\n",
" timeout: 1000,\r\n",
" headers: {\r\n",
" 'Content-Type': 'text/plain'\r\n",
" },\r\n",

" }));\r\n",
"\r\n",
" if (response.status == 200) {\r\n",
" return rootUrl;\r\n",
" }\r\n",
" }\r\n",
" catch (e) { }\r\n",
" }\r\n",
" }\r\n",
"}\r\n",
"\r\n",


" .then((root) => {\r\n",
" // use probing to find host url and api resources\r\n",
" // load interactive helpers and language services\r\n",
" let dotnetInteractiveRequire = require.config({\r\n",
" context: '308684.Microsoft.DotNet.Interactive.Http.HttpPort',\r\n",
" paths:\r\n",
" {\r\n",
" 'dotnet-interactive': `${root}resources`\r\n",
" }\r\n",
" }) || require;\r\n",
"\r\n",
" window.dotnetInteractiveRequire = dotnetInteractiveRequire;\r\n",
"\r\n",
" window.configureRequireFromExtension = function(extensionName, extensionCacheBuster) {\r\n",
" let paths = {};\r\n",
" paths[extensionName] = `${root}extensions/${extensionName}/resources/`;\r\n",
" \r\n",
" let internalRequire = require.config({\r\n",
" context: extensionCacheBuster,\r\n",
" paths: paths,\r\n",
" urlArgs: `cacheBuster=${extensionCacheBuster}`\r\n",
" }) || require;\r\n",
"\r\n",
" return internalRequire\r\n",
" };\r\n",
" \r\n",
" dotnetInteractiveRequire([\r\n",
" 'dotnet-interactive/dotnet-interactive'\r\n",
" ],\r\n",
" function (dotnet) {\r\n",
" dotnet.init(window);\r\n",
" },\r\n",
" function (error) {\r\n",
" console.log(error);\r\n",
" }\r\n",
" );\r\n",
" })\r\n",
" .catch(error => {console.log(error);});\r\n",
" }\r\n",
"\r\n",
"// ensure `require` is available globally\r\n",
"if ((typeof(require) !== typeof(Function)) || (typeof(require.config) !== typeof(Function))) {\r\n",
" let require_script = document.createElement('script');\r\n",
" require_script.setAttribute('src', 'https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js');\r\n",
" require_script.setAttribute('type', 'text/javascript');\r\n",
" \r\n",
" \r\n",
" require_script.onload = function() {\r\n",

" };\r\n",
"\r\n",
" document.getElementsByTagName('head')[0].appendChild(require_script);\r\n",
"}\r\n",
"else {\r\n",

"}\r\n",
"\r\n",
" </script>\r\n",
"</div>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
Expand Down Expand Up @@ -108,10 +223,10 @@
"id": "617af7af",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-07T20:34:39.691953Z",
"iopub.status.busy": "2026-07-07T20:34:39.691953Z",
"iopub.status.idle": "2026-07-07T20:34:39.939052Z",
"shell.execute_reply": "2026-07-07T20:34:39.938053Z"
"iopub.execute_input": "2026-10-15T05:48:35.702940Z",
"iopub.status.busy": "2026-10-15T05:48:35.661049Z",
"iopub.status.idle": "2026-10-15T05:48:36.169115Z",
"shell.execute_reply": "2026-10-15T05:48:36.168918Z"
}
},
"outputs": [
Expand Down Expand Up @@ -256,10 +371,10 @@
"id": "3ae8ad58",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-07T20:34:39.940053Z",
"iopub.status.busy": "2026-07-07T20:34:39.940053Z",
"iopub.status.idle": "2026-07-07T20:34:40.138277Z",
"shell.execute_reply": "2026-07-07T20:34:40.138277Z"
"iopub.execute_input": "2026-10-15T05:48:36.170446Z",
"iopub.status.busy": "2026-10-15T05:48:36.170248Z",
"iopub.status.idle": "2026-10-15T05:48:36.490733Z",
"shell.execute_reply": "2026-10-15T05:48:36.490478Z"
}
},
"outputs": [
Expand Down Expand Up @@ -535,10 +650,10 @@
"id": "ceafedc4",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-07T20:34:40.138277Z",
"iopub.status.busy": "2026-07-07T20:34:40.138277Z",
"iopub.status.idle": "2026-07-07T20:34:40.214944Z",
"shell.execute_reply": "2026-07-07T20:34:40.214944Z"
"iopub.execute_input": "2026-10-15T05:48:36.492219Z",
"iopub.status.busy": "2026-10-15T05:48:36.492013Z",
"iopub.status.idle": "2026-10-15T05:48:36.723786Z",
"shell.execute_reply": "2026-10-15T05:48:36.723266Z"
}
},
"outputs": [
Expand Down Expand Up @@ -660,10 +775,10 @@
"id": "4221a27b",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-07T20:34:40.214944Z",
"iopub.status.busy": "2026-07-07T20:34:40.214944Z",
"iopub.status.idle": "2026-07-07T20:34:40.365756Z",
"shell.execute_reply": "2026-07-07T20:34:40.365756Z"
"iopub.execute_input": "2026-10-15T05:48:36.725629Z",
"iopub.status.busy": "2026-10-15T05:48:36.725384Z",
"iopub.status.idle": "2026-10-15T05:48:37.021397Z",
"shell.execute_reply": "2026-10-15T05:48:37.021252Z"
}
},
"outputs": [
Expand Down Expand Up @@ -814,10 +929,10 @@
"id": "106704b4",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-07T20:34:40.365756Z",
"iopub.status.busy": "2026-07-07T20:34:40.365756Z",
"iopub.status.idle": "2026-07-07T20:34:40.415020Z",
"shell.execute_reply": "2026-07-07T20:34:40.415020Z"
"iopub.execute_input": "2026-10-15T05:48:37.022659Z",
"iopub.status.busy": "2026-10-15T05:48:37.022498Z",
"iopub.status.idle": "2026-10-15T05:48:37.128463Z",
"shell.execute_reply": "2026-10-15T05:48:37.128276Z"
}
},
"outputs": [
Expand Down Expand Up @@ -958,10 +1073,10 @@
"id": "8d143f8c",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-07T20:34:40.415020Z",
"iopub.status.busy": "2026-07-07T20:34:40.415020Z",
"iopub.status.idle": "2026-07-07T20:34:40.467181Z",
"shell.execute_reply": "2026-07-07T20:34:40.467181Z"
"iopub.execute_input": "2026-10-15T05:48:37.129721Z",
"iopub.status.busy": "2026-10-15T05:48:37.129537Z",
"iopub.status.idle": "2026-10-15T05:48:37.260136Z",
"shell.execute_reply": "2026-10-15T05:48:37.259965Z"
}
},
"outputs": [
Expand Down Expand Up @@ -1073,10 +1188,10 @@
"id": "9fc192c8",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-07T20:34:40.468179Z",
"iopub.status.busy": "2026-07-07T20:34:40.468179Z",
"iopub.status.idle": "2026-07-07T20:34:40.555057Z",
"shell.execute_reply": "2026-07-07T20:34:40.555057Z"
"iopub.execute_input": "2026-10-15T05:48:37.261473Z",
"iopub.status.busy": "2026-10-15T05:48:37.261302Z",
"iopub.status.idle": "2026-10-15T05:48:37.520225Z",
"shell.execute_reply": "2026-10-15T05:48:37.520049Z"
}
},
"outputs": [
Expand Down Expand Up @@ -1275,18 +1390,10 @@
"text": [
" Julie\r\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\r\n",
"(1,133): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.\r\n",
"\r\n"
]
}
],
"source": [
"#nullable enable\n",
"static void PrintFamilyTree(Dictionary<string, HashSet<(string s, string o)>> rels, string root, string indent = \"\", HashSet<string>? visited = null)\n",
"{\n",
" visited ??= new HashSet<string>();\n",
Expand All @@ -1307,7 +1414,7 @@
"var allChildren = relations[\"parentOf\"].Select(p => p.o).ToHashSet();\n",
"var roots = allEntities.Where(e => relations[\"parentOf\"].Any(p => p.s == e) && !allChildren.Contains(e)).OrderBy(x => x);\n",
"foreach (var root in roots)\n",
" PrintFamilyTree(relations, root);"
" PrintFamilyTree(relations, root);\n"
]
},
{
Expand Down
Loading