Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): resolve sidebar provider icons from the thread's own environment #7292

Mergedvitalyiegorov(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/7292/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 3 changed files with 96 additions and 11 deletions.

x
0 of 3 viewed, 3 left
20 additions and 11 deletionsapps/web/src/components/Sidebar.tsxModified
View file
@@ -164,11 +164,10 @@
import { ProviderInstanceIcon } from "./chat/ProviderInstanceIcon";
import { getTriggerDisplayModelLabel } from "./chat/providerIconUtils";
import {
- deriveProviderInstanceEntries,
+ deriveProviderEntriesByEnvironment,
shouldShowInstanceBadge,
type ProviderInstanceEntry,
} from "../providerInstances";
-import { primaryServerProvidersAtom } from "../state/server";
import { useThreadRunningTerminalIds } from "../state/terminalSessions";
import { stackedThreadToast, toastManager } from "./ui/toast";
import { Button } from "./ui/button";
@@ -246,6 +245,8 @@
​
+const EMPTY_PROVIDER_ENTRIES: ReadonlyMap<string, ProviderInstanceEntry> = new Map();
+​
function terminalProcessLabel(count: number): string {
return `${count} terminal ${count === 1 ? "process" : "processes"} running`;
@@ -1860,15 +1861,18 @@
() => sortLogicalProjectsForSidebar(unsortedProjectGroups, threads, sidebarProjectSortOrder),
[sidebarProjectSortOrder, threads, unsortedProjectGroups],
- const serverProviders = useAtomValue(primaryServerProvidersAtom);
- const providerEntryByInstanceId = useMemo(