feat: auto-open model selector if user selects deprecated model (#427)

https://github.com/user-attachments/assets/d254dff6-f1f9-4492-9dfd-d185c38d3a75
This commit is contained in:
Abdelrhman Kamal Mahmoud Ali Slim
2025-04-20 09:51:49 -07:00
committed by GitHub
parent e372e4667b
commit 81cf47e591
3 changed files with 38 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
import type { OverlayModeType } from "./terminal-chat.js";
import type { TerminalHeaderProps } from "./terminal-header.js";
import type { GroupedResponseItem } from "./use-message-grouping.js";
import type { ResponseItem } from "openai/resources/responses/responses.mjs";
@@ -21,6 +22,7 @@ type MessageHistoryProps = {
thinkingSeconds: number;
headerProps: TerminalHeaderProps;
fullStdout: boolean;
setOverlayMode: React.Dispatch<React.SetStateAction<OverlayModeType>>;
};
const MessageHistory: React.FC<MessageHistoryProps> = ({
@@ -30,6 +32,7 @@ const MessageHistory: React.FC<MessageHistoryProps> = ({
loading: _loading,
thinkingSeconds: _thinkingSeconds,
fullStdout,
setOverlayMode,
}) => {
// Flatten batch entries to response items.
const messages = useMemo(() => batch.map(({ item }) => item!), [batch]);
@@ -65,6 +68,7 @@ const MessageHistory: React.FC<MessageHistoryProps> = ({
<TerminalChatResponseItem
item={message}
fullStdout={fullStdout}
setOverlayMode={setOverlayMode}
/>
</Box>
);