Skip to content

Commit 112c0f4

Browse files
committed
bunch of TODOs
1 parent e080a03 commit 112c0f4

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/client/extensionActivation.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ export function activateFeatures(ext: ExtensionState, _components: Components):
115115
registerStartNativeReplCommand(ext.disposables, interpreterService, ext.context);
116116
registerReplCommands(ext.disposables, interpreterService, executionHelper, commandManager, ext.context);
117117
registerReplExecuteOnEnter(ext.disposables, interpreterService, commandManager, ext.context);
118+
119+
// TODO check tabs and if they match with memto it knows about.
120+
// create repl, reload repl, close tab, then open notebook, and then we fall into trap where we think notebook is repl.
121+
// check label of editor name - if its python repl or not.
118122
}
119123

120124
/// //////////////////////////

src/client/repl/nativeRepl.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,15 @@ export class NativeRepl implements Disposable {
156156
* Function that opens interactive repl, selects kernel, and send/execute code to the native repl.
157157
*/
158158
public async sendToNativeRepl(code?: string): Promise<void> {
159+
// TODO need to check if that memento URI exist in my tab
160+
// plain untitled notebook same uri as REPL.
161+
// editor option check
159162
const mementoValue = this.context.globalState.get(NATIVE_REPL_URI_MEMENTO) as Uri | undefined;
163+
// mementoValue = undefined;
164+
165+
// try to restore notebook doc based on memento value.
166+
// if I cant, then clear momento and openInteractiveREPL.
167+
160168
const notebookEditor = await openInteractiveREPL(this.replController, this.notebookDocument, mementoValue);
161169
this.notebookDocument = notebookEditor.notebook;
162170
this.replUri = this.notebookDocument.uri;

0 commit comments

Comments
 (0)