Skip to content

Commit c83dee5

Browse files
vitalyiegorovclaude
andcommitted
fix(web): keep getProviderInstanceEntry for the handoff endpoint
The badge rule needs the full entry list, but the endpoint itself still resolves through getProviderInstanceEntry, which knip flagged as unused. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent ef47feb commit c83dee5

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

‎apps/web/src/components/chat/V2LifecycleRow.tsx‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ import {
3737
} from "lucide-react";
3838

3939
import { Tooltip, TooltipTrigger, TooltipPopup } from "../ui/tooltip";
40-
import { deriveProviderInstanceEntries, shouldShowInstanceBadge } from "../../providerInstances";
40+
import {
41+
deriveProviderInstanceEntries,
42+
getProviderInstanceEntry,
43+
shouldShowInstanceBadge,
44+
} from "../../providerInstances";
4145
import { formatShortTimestamp } from "../../timestampFormat";
4246
import { getTriggerDisplayModelName } from "./providerIconUtils";
4347
import { ProviderInstanceIcon, providerTextColorClassName } from "./ProviderInstanceIcon";
@@ -556,11 +560,12 @@ function HandoffEndpoint(props: {
556560
readonly instanceId: ProviderInstanceId;
557561
readonly model?: string | undefined;
558562
}) {
559-
const entries = deriveProviderInstanceEntries(props.providers);
560-
const entry = entries.find((candidate) => candidate.instanceId === props.instanceId);
563+
const entry = getProviderInstanceEntry(props.providers, props.instanceId);
561564
// Same account badge as the sidebar: a handoff between two accounts of one
562565
// provider would otherwise show the same glyph on both sides.
563-
const showBadge = entry !== undefined && shouldShowInstanceBadge(entry, entries);
566+
const showBadge =
567+
entry !== undefined &&
568+
shouldShowInstanceBadge(entry, deriveProviderInstanceEntries(props.providers));
564569
const model = props.model?.trim();
565570
const providerModel =
566571
model === undefined || model.length === 0

0 commit comments

Comments
 (0)