fix: /bug report command, thinking indicator (#381)

- Fix `/bug` report command
- Fix thinking indicator
This commit is contained in:
Fouad Matin
2025-04-18 18:13:34 -07:00
committed by GitHub
parent c40f4891d4
commit aa32e22d4b
12 changed files with 154 additions and 183 deletions

View File

@@ -4,7 +4,7 @@ import type { ResponseItem } from "openai/resources/responses/responses.mjs";
import TerminalChatResponseItem from "./terminal-chat-response-item.js";
import TerminalHeader from "./terminal-header.js";
import { Box, Static, Text } from "ink";
import { Box, Static } from "ink";
import React, { useMemo } from "react";
// A batch entry can either be a standalone response item or a grouped set of
@@ -26,8 +26,9 @@ type MessageHistoryProps = {
const MessageHistory: React.FC<MessageHistoryProps> = ({
batch,
headerProps,
loading,
thinkingSeconds,
// `loading` and `thinkingSeconds` handled by input component now.
loading: _loading,
thinkingSeconds: _thinkingSeconds,
fullStdout,
}) => {
// Flatten batch entries to response items.
@@ -35,11 +36,8 @@ const MessageHistory: React.FC<MessageHistoryProps> = ({
return (
<Box flexDirection="column">
{loading && (
<Box marginTop={1}>
<Text color="yellow">{`thinking for ${thinkingSeconds}s`}</Text>
</Box>
)}
{/* The dedicated thinking indicator in the input area now displays the
elapsed time, so we no longer render a separate counter here. */}
<Static items={["header", ...messages]}>
{(item, index) => {
if (item === "header") {