From 8b3573fa6245db6b9ee8dd0ee12149abbf1e43ec Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 29 Dec 2025 15:56:33 +0000 Subject: [PATCH] feat: Conditionally render chat and activity tabs in dev Co-authored-by: ijamespine --- .../src/inspectors/FileInspector.tsx | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/interface/src/inspectors/FileInspector.tsx b/packages/interface/src/inspectors/FileInspector.tsx index d05886b2f..fcfff0949 100644 --- a/packages/interface/src/inspectors/FileInspector.tsx +++ b/packages/interface/src/inspectors/FileInspector.tsx @@ -55,6 +55,7 @@ interface FileInspectorProps { export function FileInspector({ file }: FileInspectorProps) { const [activeTab, setActiveTab] = useState("overview"); + const isDev = import.meta.env.DEV; const fileQuery = useNormalizedQuery<{ file_id: string }, File>({ wireMethod: "query:files.by_id", @@ -70,8 +71,8 @@ export function FileInspector({ file }: FileInspectorProps) { { id: "overview", label: "Overview", icon: Info }, { id: "sidecars", label: "Sidecars", icon: Image }, { id: "instances", label: "Instances", icon: MapPin }, - { id: "chat", label: "Chat", icon: ChatCircle, badge: 3 }, - { id: "activity", label: "Activity", icon: ClockCounterClockwise }, + ...(isDev ? [{ id: "chat", label: "Chat", icon: ChatCircle, badge: 3 }] : []), + ...(isDev ? [{ id: "activity", label: "Activity", icon: ClockCounterClockwise }] : []), { id: "details", label: "More", icon: DotsThree }, ]; @@ -94,13 +95,17 @@ export function FileInspector({ file }: FileInspectorProps) { - - - + {isDev && ( + + + + )} - - - + {isDev && ( + + + + )}