Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(client): provider status pushes keep unchanged providers identical #20392

Mergedjuliusmarmingemerged 1 commit intomain fromrefs/pull/20392/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 45 additions and 36 deletions (loading 1).

x
0 of 4 viewed, 4 left
2 additions and 35 deletionsapps/web/src/components/ChatView.tsxModified
View file
@@ -6055,46 +6055,13 @@
isDesktop: isElectron,
const getShortcutContextStable = useStableCallback(getShortcutContext);
- // Every provider status push carries a new skills array, even when nothing in
- // it changed. Timeline markdown only reads names, so it keeps one identity
- // until those change; otherwise each push re-renders every visible reply.
- const nextTimelineSkills = activeProviderStatus
+ const timelineSkills = activeProviderStatus
? resolveProviderSkillsForCwd(activeProviderStatus, gitCwd)
: EMPTY_PROVIDER_SKILLS;
- const timelineSkillsKey = nextTimelineSkills
- .map((skill) => `${skill.name}\u0000${skill.displayName ?? ""}`)
- .join("\u0001");
- const [timelineSkillsState, setTimelineSkillsState] = useState({
- key: timelineSkillsKey,
- skills: nextTimelineSkills,
- });
- if (timelineSkillsState.key !== timelineSkillsKey) {
- setTimelineSkillsState({ key: timelineSkillsKey, skills: nextTimelineSkills });
- }
- const timelineSkills = timelineSkillsState.skills;
- // Same for providers: timeline rows show their names, icons and models, and
- // nothing else in a status push should re-render the conversation.
- const nextTimelineProviders =
+ const timelineProviders =
environmentById.get(
displayedThreadRef?.environmentId ?? activeThread?.environmentId ?? environmentId,
)?.serverConfig?.providers ?? EMPTY_PROVIDERS;
- const timelineProvidersKey = JSON.stringify(