Skip to content

Commit 899b5f2

Browse files
committed
fix prompts parsr
1 parent 2f0e570 commit 899b5f2

2 files changed

Lines changed: 533 additions & 3 deletions

File tree

AiServer/postinstall.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Object.keys(files).forEach(dir => {
6363
let value = ''
6464
let i = 0;
6565
for await (const line of rl) {
66-
if (line.trim() === '') continue
66+
//if (line.trim() === '') continue
6767
if (!afterPrompts && !line.startsWith('# Prompts')) continue
6868
afterPrompts = true
6969

@@ -76,7 +76,7 @@ Object.keys(files).forEach(dir => {
7676
if (line.startsWith('>')) {
7777
let trimmed = line.substring(1).trim()
7878
if (trimmed.endsWith('<br/>')) {
79-
trimmed = trimmed.substring(0, trimmed.length - 5)
79+
trimmed = trimmed.substring(0, trimmed.length - 5).trim()
8080
}
8181
value += trimmed + '\n'
8282
}
@@ -129,4 +129,4 @@ async function fetchDownload(url, toFile, retries) {
129129
console.log(`get ${url} failed: ${e}${i > 0 ? `, ${i} retries remaining...` : ''}`)
130130
}
131131
}
132-
}
132+
}

0 commit comments

Comments
 (0)