diff --git a/packages/app/src/components/agent-status-bar.tsx b/packages/app/src/components/agent-status-bar.tsx
index 5975b697e..93941fab2 100644
--- a/packages/app/src/components/agent-status-bar.tsx
+++ b/packages/app/src/components/agent-status-bar.tsx
@@ -16,7 +16,7 @@ import {
type StyleProp,
type ViewStyle,
} from "react-native";
-import { StyleSheet, useUnistyles } from "react-native-unistyles";
+import { StyleSheet, useUnistyles, withUnistyles } from "react-native-unistyles";
import { useShallow } from "zustand/shallow";
import { useStoreWithEqualityFn } from "zustand/traditional";
import {
@@ -58,6 +58,7 @@ import type {
} from "@server/server/agent/agent-sdk-types";
import type { AgentProviderDefinition } from "@server/server/agent/provider-manifest";
import { getModeVisuals, type AgentModeColorTier } from "@server/server/agent/provider-manifest";
+import type { Theme } from "@/styles/theme";
import {
getFeatureHighlightColor,
getFeatureTooltip,
@@ -183,6 +184,21 @@ const MODE_ICONS = {
ShieldOff,
ShieldQuestionMark,
} as const;
+const ThemedShieldCheck = withUnistyles(ShieldCheck);
+const ThemedShieldAlert = withUnistyles(ShieldAlert);
+const ThemedShieldOff = withUnistyles(ShieldOff);
+const ThemedShieldQuestionMark = withUnistyles(ShieldQuestionMark);
+
+const foregroundColorMapping = (theme: Theme) => ({
+ color: theme.colors.foreground,
+});
+
+const MODE_MENU_LEADING_ICONS = {
+ ShieldCheck: ,
+ ShieldAlert: ,
+ ShieldOff: ,
+ ShieldQuestionMark: ,
+} as const;
function alwaysTrue() {
return true;
@@ -1606,19 +1622,12 @@ function ModeMenuItem({
selected: boolean;
onSelectMode?: (modeId: string) => void;
}) {
- const { theme } = useUnistyles();
const visuals = getModeVisuals(provider, mode.id, providerDefinitions);
- const Icon = visuals?.icon ? MODE_ICONS[visuals.icon] : ShieldCheck;
-
+ const leadingIcon = visuals?.icon ? MODE_MENU_LEADING_ICONS[visuals.icon] : null;
const handleSelect = useCallback(() => {
onSelectMode?.(mode.id);
}, [mode.id, onSelectMode]);
- const leadingIcon = useMemo(
- () => ,
- [Icon, theme.colors.foreground],
- );
-
return (
{mode.label}