Skip to content

Commit

Permalink
fix: output format
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjastrzebski committed Dec 7, 2024
1 parent 7d8ae52 commit 0234082
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/commands/chat/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import { AssistantResponse } from '@callstack/byorg-core';
import { colorAssistant, colorVerbose } from '../../colors.js';
import { formatSpeed, formatTime } from '../../format.js';
import { getVerbose } from '../../output.js';
import { texts } from './texts.js';

export function formatResponse(response: AssistantResponse) {
let result = colorAssistant(response.content);
let result = colorAssistant(`${texts.assistantLabel} ${response.content}`);
if (getVerbose()) {
result += ` ${colorVerbose(formatResponseStats(response))}`;
}
Expand Down
3 changes: 3 additions & 0 deletions src/commands/chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ async function processMessages(app: Application, messages: Message[]) {
} else {
spinnerStop(response.content);
}

// Insert empty line after each response
output('');
}

function outputMessage(message: Message) {
Expand Down

0 comments on commit 0234082

Please sign in to comment.