MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / waitForInteractiveWindow

Function waitForInteractiveWindow

src/test/datascience/helpers.ts:209–232  ·  view source on GitHub ↗
(
    interactiveWindow: IInteractiveWindow
)

Source from the content-addressed store, hash-verified

207}
208
209export async function waitForInteractiveWindow(
210 interactiveWindow: IInteractiveWindow
211): Promise<vscode.NotebookDocument> {
212 let notebookDocument: vscode.NotebookDocument | undefined;
213 await waitForCondition(
214 async () => {
215 notebookDocument = vscode.workspace.notebookDocuments.find(
216 (doc) => doc.uri.toString() === interactiveWindow?.notebookUri?.toString()
217 );
218 let inputBox = vscode.window.visibleTextEditors.find(
219 (e) => e.document.uri.path === interactiveWindow?.inputUri?.path
220 );
221 logger.debug(
222 `Waiting for Interactive Window '${interactiveWindow.notebookUri?.toString()}',`,
223 `found notebook '${notebookDocument?.uri.toString()}' and input '${inputBox?.document.uri.toString()}'`
224 );
225 return !!notebookDocument && !!inputBox;
226 },
227 defaultNotebookTestTimeout,
228 'Interactive window notebook document not found'
229 );
230
231 return notebookDocument!;
232}
233
234export async function runInteractiveWindowInput(
235 code: string,

Calls 3

waitForConditionFunction · 0.90
toStringMethod · 0.65
debugMethod · 0.65

Tested by

no test coverage detected