Skip to content

Commit 02d1e07

Browse files
committed
remove logging after i remember to actually build the thing
1 parent 1791cfc commit 02d1e07

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

main.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,14 @@ export default class ObsidianSage extends Plugin {
3030

3131
this.addSettingTab(new SettingTab(this.app, this));
3232

33-
new Notice("creating everything");
3433
this.createListeners()
35-
.then(() => {
34+
.then((cell_session_id) => {
3635
this.registerMarkdownCodeBlockProcessor("sage", (src, el, ctx) => {
3736
if (this.ws == null) {
3837
console.warn("tried to parse sage math before server connection established.");
3938
this.createListeners();
4039
return;
4140
}
42-
console.log('rendering eeeeeeeeeeeeeeeeeeeeeeeeee...', this.ws);
43-
new Notice("renderingggggg");
4441

4542
const req_id = nanoid();
4643
const payload = JSON.stringify({
@@ -69,8 +66,7 @@ export default class ObsidianSage extends Plugin {
6966
code_disp.addClass('sagecell-display-code')
7067
code_disp.innerText = src;
7168
this.outputWriters[req_id] = new OutputWriter(wrapper, this.settings.displayByDefault);
72-
console.log('just_before_send', this.ws);
73-
this.ws.send(`${session_id}/channels,${payload}`);
69+
this.ws.send(`${this.session_id}/channels,${payload}`);
7470
});
7571
})
7672
.catch(this.connectFailed);
@@ -86,6 +82,7 @@ export default class ObsidianSage extends Plugin {
8682
.then(res => res.json())
8783
.then(({ ws_url, id }) => {
8884
this.ws = new SockJS(`${this.settings.serverURL}sockjs?CellSessionID=${cell_session_id}`);
85+
this.session_id = id;
8986

9087
this.ws.onclose = () => { this.ws = null; }
9188
this.ws.onerror = this.connectFailed;
@@ -98,7 +95,6 @@ export default class ObsidianSage extends Plugin {
9895
const content = data.content;
9996

10097
if (msgType === 'error') {
101-
//new Notice("Obsidian Sage evaluation error occured.")
10298
this.outputWriters[msgId].appendError(content);
10399
}
104100

@@ -120,7 +116,8 @@ export default class ObsidianSage extends Plugin {
120116
//}
121117
}
122118

123-
return [ ws_url, id ];
119+
//return [ ws_url, id ];
120+
return cell_session_id;
124121
})
125122
}
126123
connectFailed(e: any) {

0 commit comments

Comments
 (0)