Skip to content

Commit 0404c33

Browse files
cleanup
1 parent dde228f commit 0404c33

File tree

3 files changed

+4
-18
lines changed

3 files changed

+4
-18
lines changed

bin/web/views/index.ejs

+1
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ ${fields}
300300
config.id = "TS-" + Date.now() + "-" + Math.floor(Math.random() * 100000)
301301
document.querySelector("#prompt-run").classList.add("hidden")
302302
document.querySelector("#prompt-cancel").classList.remove("hidden")
303+
delete config.html
303304
localStorage.setItem("config", JSON.stringify(config))
304305
socket.emit('request', config)
305306
config.id = null

index.js

+2-17
Original file line numberDiff line numberDiff line change
@@ -278,18 +278,14 @@ class Dalai {
278278
if (!this.queue) this.queue = []
279279
if (platform === "win32") {
280280
for(let i=0;i<msg.length; i++) {
281-
console.log("msgi", msg[i]);
282281
if (msg[i] === "\\") {
283282
this.queueActive = true
284283
// start pushing to buffer
285-
// console.log("adding to queue", msg[i])
286284
this.queue.push(msg[i]);
287285
} else {
288286
// otherwise flush
289287
this.queue.push(msg[i])
290-
console.log("flushing queue", this.queue)
291288
let queueContent = this.queue.join("")
292-
console.log({ before: queueContent, beforeEscape: winEscape(queueContent), after : this.htmlencode(winEscape(queueContent)) })
293289

294290
if (!this.bufferStarted && ["\n", "\b", "\f", "\r", "\t"].includes(queueContent)) {
295291
// if the buffer hasn't started and incoming tokens are whitespaces, ignore
@@ -307,24 +303,13 @@ class Dalai {
307303
}
308304
} else {
309305
if (req.html) {
310-
cb(this.htmlencode(queueContent))
306+
cb(this.htmlencode(msg))
311307
} else {
312-
cb(queueContent)
308+
cb(msg)
313309
}
314310
}
315311
}
316312
async uninstall(core, ...models) {
317-
// delete the rest of the files
318-
319-
//const files = (await fs.promises.readdir(path.resolve(this.home, core), { withFileTypes: true }))
320-
// .filter(dirent => dirent.isFile() && !dirent.name.startsWith("."))
321-
// .map(dirent => dirent.name);
322-
//console.log("files", files)
323-
//for(let file of files) {
324-
// await fs.promises.rm(path.resolve(this.home, core, file)).catch((e) => { })
325-
//}
326-
327-
328313
if (models.length > 0) {
329314
// delete the model folder
330315
const modelsPath = path.resolve(this.home, core, "models")

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dalai",
3-
"version": "0.2.52",
3+
"version": "0.3.0",
44
"description": "",
55
"main": "index.js",
66
"author": "cocktailpeanut",

0 commit comments

Comments
 (0)