Skip to content

Commit f6c1919

Browse files
committed
Refresh usage lock memo inputs
1 parent 3d4194f commit f6c1919

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

apps/web/src/components/ChatView.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,16 +1275,22 @@ export default function ChatView(props: ChatViewProps) {
12751275
explicitSelectedInstanceId,
12761276
) ?? ProviderDriverKind.make("codex");
12771277
const selectedProvider: ProviderDriverKind = lockedProvider ?? unlockedSelectedProvider;
1278+
const activeThreadSessionProviderInstanceId = activeThread?.session?.providerInstanceId;
1279+
const activeThreadModelInstanceId = activeThread?.modelSelection.instanceId;
12781280
const lockedContinuationGroupKey = useMemo((): string | null => {
1279-
if (!lockedProvider || !activeThread) return null;
1280-
const lockedInstanceId =
1281-
activeThread.session?.providerInstanceId ?? activeThread.modelSelection.instanceId;
1281+
if (!lockedProvider) return null;
1282+
const lockedInstanceId = activeThreadSessionProviderInstanceId ?? activeThreadModelInstanceId;
12821283
if (!lockedInstanceId) return null;
12831284
return (
12841285
providerInstanceEntries.find((entry) => entry.instanceId === lockedInstanceId)
12851286
?.continuationGroupKey ?? null
12861287
);
1287-
}, [activeThread, lockedProvider, providerInstanceEntries]);
1288+
}, [
1289+
activeThreadModelInstanceId,
1290+
activeThreadSessionProviderInstanceId,
1291+
lockedProvider,
1292+
providerInstanceEntries,
1293+
]);
12881294
const codexUsageInstanceId = useMemo(() => {
12891295
if (settings.codexUsageIndicatorMode === "off") return null;
12901296
const selectedInstanceId = resolveSelectedProviderInstanceId({

0 commit comments

Comments
 (0)