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

@@ -37,6 +37,14 @@ import OpenAI from "openai";
import React, { useEffect, useMemo, useRef, useState } from "react";
import { inspect } from "util";
export type OverlayModeType =
| "none"
| "history"
| "model"
| "approval"
| "help"
| "diff";
type Props = {
config: AppConfig;
prompt?: string;
@@ -182,9 +190,7 @@ export default function TerminalChat({
explanation,
submitConfirmation,
} = useConfirmation();
const [overlayMode, setOverlayMode] = useState<
"none" | "history" | "model" | "approval" | "help" | "diff"
>("none");
const [overlayMode, setOverlayMode] = useState<OverlayModeType>("none");
// Store the diff text when opening the diff overlay so the view isnt
// recomputed on every rerender while it is open.
@@ -461,6 +467,7 @@ export default function TerminalChat({
<Box flexDirection="column">
{agent ? (
<TerminalMessageHistory
setOverlayMode={setOverlayMode}
batch={lastMessageBatch}
groupCounts={groupCounts}
items={items}