feat: remove wait for enter in dialogue

This commit is contained in:
Lin, Hung-Shin committed 2023-10-30 14:21:52 +08:00
1 parent 8782048334
commit 51bf06e2a7
1 file changed
+3 -2
+3 -2
View File
@@ -45,7 +45,8 @@ function printLine(content, delay, color) {
i += 1
if (i >= printContent.length) {
clearInterval(timer)
waitForEnter().then(resolve)
process.stdout.write('\n')
resolve()
}
}, delay)
@@ -71,7 +72,7 @@ async function printResponses(responses, delay = 100) {
if (type === 'dialogue') {
console.log(`${speaker}:`)
for (const line of content) {
await printLine(`\t${line}`, delay, color || 'green')
await printLine(` ${line}`, delay, color || 'green')
}
}
}