Skip to content

Commit

Permalink
test completions
Browse files Browse the repository at this point in the history
test completion


fix
  • Loading branch information
colombod committed Jun 6, 2023
1 parent 9f35a70 commit 198ad41
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 24 deletions.
9 changes: 9 additions & 0 deletions NotebookTestScript.dib
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ The next code cell should have empty square brackets on the left, e.g., "`[ ]`".

#!markdown

# Verify Completions.
The next code cell contains the code`Console` at the end type `.`. The completions list with properties and methods should be displayed.

#!csharp

Console

#!markdown

# Execute the following cell.

You'll notice a counter that appears and starts incrementing. After a second or two, stop the cell. Your output should look similar to:
Expand Down
74 changes: 52 additions & 22 deletions NotebookTestScript.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3c954261",
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand All @@ -29,6 +30,35 @@
"1+1"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Verify Completions.\n",
"The next code cell contains the code`Console` at the end type `.`. The completions list with properties and methods should be displayed."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a1beba1b",
"metadata": {
"dotnet_interactive": {
"language": "csharp"
},
"polyglot_notebook": {
"kernelName": "csharp"
},
"vscode": {
"languageId": "polyglot-notebook"
}
},
"outputs": [],
"source": [
"Console"
]
},
{
"attachments": {},
"cell_type": "markdown",
Expand All @@ -49,7 +79,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "651419f5",
"id": "607c08c8",
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand Down Expand Up @@ -86,7 +116,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c4e2e24c",
"id": "4840a9c4",
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand All @@ -106,7 +136,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b0aa8c10",
"id": "5575d228",
"metadata": {
"dotnet_interactive": {
"language": "html"
Expand Down Expand Up @@ -140,7 +170,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "92eda896",
"id": "abdc83e4",
"metadata": {
"dotnet_interactive": {
"language": "javascript"
Expand All @@ -162,7 +192,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "48045d60",
"id": "3ace82f7",
"metadata": {
"dotnet_interactive": {
"language": "javascript"
Expand Down Expand Up @@ -197,7 +227,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ba1ceec1",
"id": "59833948",
"metadata": {
"dotnet_interactive": {
"language": "javascript"
Expand Down Expand Up @@ -230,7 +260,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "43ce1410",
"id": "479f9ac3",
"metadata": {
"dotnet_interactive": {
"language": "javascript"
Expand Down Expand Up @@ -265,7 +295,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "2237b214",
"id": "d14e24d1",
"metadata": {
"dotnet_interactive": {
"language": "javascript"
Expand Down Expand Up @@ -298,7 +328,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ae2fe135",
"id": "332b9dfd",
"metadata": {
"dotnet_interactive": {
"language": "javascript"
Expand Down Expand Up @@ -337,7 +367,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "19eb0cef",
"id": "501dacde",
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand Down Expand Up @@ -368,7 +398,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d8563e5a",
"id": "f93c207a",
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand Down Expand Up @@ -400,7 +430,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "4be9d9dc",
"id": "e880b0a4",
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand Down Expand Up @@ -434,7 +464,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "0ad583b9",
"id": "84da9dd4",
"metadata": {
"dotnet_interactive": {
"language": "fsharp"
Expand Down Expand Up @@ -476,7 +506,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "74551494",
"id": "d3f4ec3a",
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand Down Expand Up @@ -511,7 +541,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b15ef063",
"id": "56331cdd",
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand All @@ -532,7 +562,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "09ed2bac",
"id": "c6fb06aa",
"metadata": {
"dotnet_interactive": {
"language": "fsharp"
Expand Down Expand Up @@ -563,7 +593,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "05c36b21",
"id": "88fd88b9",
"metadata": {
"dotnet_interactive": {
"language": "value"
Expand Down Expand Up @@ -591,7 +621,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "1d588f6f",
"id": "d86b6b1b",
"metadata": {
"dotnet_interactive": {
"language": "fsharp"
Expand Down Expand Up @@ -628,7 +658,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "4ae01e6c",
"id": "342d3175",
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand Down Expand Up @@ -658,7 +688,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "4cf36dc0",
"id": "f7631f97",
"metadata": {
"dotnet_interactive": {
"language": "mermaid"
Expand Down Expand Up @@ -853,7 +883,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "12c0d2c8",
"id": "e4aa1b42",
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand Down Expand Up @@ -884,7 +914,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "830ffe6f",
"id": "ec7b7c44",
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,8 @@ export class InteractiveClient {
return new Promise<TEvent>(async (resolve, reject) => {
let handled = false;
const token = command.getOrCreateToken();
const id = command.id;
let disposable = this.subscribeToKernelTokenEvents(token, eventEnvelope => {
if (eventEnvelope.command?.getOrCreateToken() === token && eventEnvelope.eventType === expectedEventType) {
if (eventEnvelope.command?.hasSameRootCommandAs(command) && eventEnvelope.eventType === expectedEventType) {
switch (eventEnvelope.eventType) {
case CommandFailedType:
if (!handled) {
Expand Down

0 comments on commit 198ad41

Please sign in to comment.