Commit d6e876c3 authored by Romain Casati's avatar Romain Casati
Browse files

Completion support.

parent 66a8b95c
Pipeline #385340 passed with stages
in 2 minutes and 33 seconds
......@@ -274,6 +274,23 @@ define(["basthon-kernel/basthon"], function(Basthon) {
let parent_id = header.msg_id;
evalQueue.push({"code": code, "parent_id": parent_id});
break;
case "complete_request":
const cursor_end = msg.content.cursor_pos;
let completions = Basthon.complete(msg.content.code.slice(0, cursor_end));
const cursor_start = completions[1];
completions = completions[0];
this._send({
content: {
status: 'ok',
matches: completions,
cursor_start: cursor_start,
cursor_end: cursor_end,
},
header: { msg_type: "complete_reply" },
parent_header: { msg_id: header.msg_id },
channel: "shell"
});
break;
}
break;
case "iopub":
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment