diff --git a/src/ui/TUIChat.tsx b/src/ui/TUIChat.tsx index 145da891b..550cd7c1f 100644 --- a/src/ui/TUIChat.tsx +++ b/src/ui/TUIChat.tsx @@ -3,7 +3,7 @@ import { Box, Text, useApp } from "ink"; import { ChatCompletionMessageParam } from "openai/resources.mjs"; import React, { useEffect, useState } from "react"; import { handleSlashCommands } from "../slashCommands.js"; -import { streamChatResponse, StreamCallbacks } from "../streamChatResponse.js"; +import { StreamCallbacks, streamChatResponse } from "../streamChatResponse.js"; import UserInput from "./UserInput.js"; interface TUIChatProps { @@ -112,10 +112,7 @@ const TUIChat: React.FC = ({ ]); }, onToolResult: (result: string) => { - setMessages((prev) => [ - ...prev, - { role: "system", content: result }, - ]); + setMessages((prev) => [...prev, { role: "system", content: result }]); }, onToolError: (error: string) => { setMessages((prev) => [ @@ -155,7 +152,6 @@ const TUIChat: React.FC = ({ } }; - const renderMessage = (message: DisplayMessage, index: number) => { const isUser = message.role === "user"; const isSystem = message.role === "system"; @@ -193,10 +189,10 @@ const TUIChat: React.FC = ({ {/* Status */} {isWaitingForResponse && ( - Waiting for response... + esc to interrupt )} - + {/* Input area - always at bottom */} = ({ ); }; -export default TUIChat; \ No newline at end of file +export default TUIChat;