Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Best committed Feb 4, 2024
1 parent bc18d69 commit 6f26146
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { unlinkSync } from 'fs';
import cliSpinners from 'cli-spinners';
import { fileURLToPath } from 'url';
import path from 'path';
import { getHistory, parseZshHistory } from './tools/history.js';
import { parseZshHistory } from './tools/history.js';
import { getFileChangeSummary } from './dirUtils.js';
import Listener from './listener.js';
import speak from './speaker.js';
Expand Down Expand Up @@ -122,16 +122,13 @@ async function startListening() {


function setupReadline(commands) {
let inputBuffer = [];

let rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
prompt: '> ',
terminal: true,
});


rl.on('line', async (line) => {
try {
working = true;
Expand Down Expand Up @@ -171,7 +168,7 @@ function setupReadline(commands) {
console.log('\nCancelling... (ctrl-d quits)');
await dialog.cancelOutstanding();
} else {
// otherwise lets exit cleanly so we can be restarted if appropriate
// otherwise let's exit cleanly, so we can be restarted if appropriate
console.log('\nRestarting... (ctrl-d quits)');
process.exit(0);
}
Expand All @@ -193,7 +190,7 @@ function handleMessage({ role, content, historic }) {
} else {
roleString = chalk2(`\n@${dialog.assistant.name}:`) + '\n';
if (!historic && shouldSpeak) {
speak(content);
speak(content).then();
}
}
let markedContent = marked(content).trimEnd();
Expand Down

0 comments on commit 6f26146

Please sign in to comment.