Skip to content

Commit ee760bf

Browse files
committed
fixes voice tui
1 parent 7a97095 commit ee760bf

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

clients/tui/components/chat.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ export const chat = (
182182
if (showSpinner) {
183183
if (lastIsYou) renderedLines.push('');
184184
renderedLines.push(` ${loader.render(width - 1)[1]}`);
185+
renderedLines.push('');
185186
}
186187
return [...renderedLines, ...editor.render(width)];
187188
},

clients/tui/components/editor/voice.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export function createVoiceEditor(tui: TUI): Tools {
116116
};
117117

118118
const renderVoiceBox = (width: number, children: Component[]): string[] => {
119-
const box = new Box(1, 1, (text) => pc.bgBlack(text));
119+
const box = new Box(2, 1, (text) => pc.bgBlack(text));
120120
children.forEach((child) => {
121121
box.addChild(child);
122122
});
@@ -279,5 +279,6 @@ export function createVoiceEditor(tui: TUI): Tools {
279279
}
280280
},
281281
setCommands() {},
282+
resetCommands() {},
282283
};
283284
}

clients/tui/tui.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,9 @@ export async function start({
245245
}
246246

247247
void activeClient
248-
.prompt(`${message}\n\n[Sent from the TUI]`)
248+
.prompt(
249+
`${message}\n\n[Sent from the TUI]${voiceMode ? '[Greg is running in voice mode. Replies will be spoken out loud. Make sure responses do not use formatting and can be read out loud without confusion.]' : ''}`
250+
)
249251
.then(() => {
250252
stream?.close();
251253
stream = null;

0 commit comments

Comments
 (0)