Update files
This commit is contained in:
@@ -22,6 +22,7 @@ export function AgentStatusBar({ agentId, serverId }: AgentStatusBarProps) {
|
|||||||
const { theme } = useUnistyles();
|
const { theme } = useUnistyles();
|
||||||
const IS_WEB = Platform.OS === "web";
|
const IS_WEB = Platform.OS === "web";
|
||||||
const [prefsOpen, setPrefsOpen] = useState(false);
|
const [prefsOpen, setPrefsOpen] = useState(false);
|
||||||
|
const dropdownMaxWidth = IS_WEB ? 360 : undefined;
|
||||||
|
|
||||||
// Select only the specific agent (not all agents)
|
// Select only the specific agent (not all agents)
|
||||||
const agent = useSessionStore((state) =>
|
const agent = useSessionStore((state) =>
|
||||||
@@ -101,6 +102,7 @@ export function AgentStatusBar({ agentId, serverId }: AgentStatusBarProps) {
|
|||||||
<DropdownMenuContent
|
<DropdownMenuContent
|
||||||
side="top"
|
side="top"
|
||||||
align="start"
|
align="start"
|
||||||
|
maxWidth={dropdownMaxWidth}
|
||||||
testID="agent-mode-menu"
|
testID="agent-mode-menu"
|
||||||
>
|
>
|
||||||
<DropdownMenuLabel>Mode</DropdownMenuLabel>
|
<DropdownMenuLabel>Mode</DropdownMenuLabel>
|
||||||
@@ -138,7 +140,12 @@ export function AgentStatusBar({ agentId, serverId }: AgentStatusBarProps) {
|
|||||||
<Text style={styles.modeBadgeText}>{displayModel}</Text>
|
<Text style={styles.modeBadgeText}>{displayModel}</Text>
|
||||||
<ChevronDown size={14} color={theme.colors.foregroundMuted} />
|
<ChevronDown size={14} color={theme.colors.foregroundMuted} />
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
<DropdownMenuContent side="top" align="start" testID="agent-model-menu">
|
<DropdownMenuContent
|
||||||
|
side="top"
|
||||||
|
align="start"
|
||||||
|
maxWidth={dropdownMaxWidth}
|
||||||
|
testID="agent-model-menu"
|
||||||
|
>
|
||||||
<DropdownMenuLabel>Model</DropdownMenuLabel>
|
<DropdownMenuLabel>Model</DropdownMenuLabel>
|
||||||
{models?.map((model) => {
|
{models?.map((model) => {
|
||||||
const isActive = model.id === agent.model;
|
const isActive = model.id === agent.model;
|
||||||
@@ -178,7 +185,12 @@ export function AgentStatusBar({ agentId, serverId }: AgentStatusBarProps) {
|
|||||||
<Text style={styles.modeBadgeText}>{displayThinking}</Text>
|
<Text style={styles.modeBadgeText}>{displayThinking}</Text>
|
||||||
<ChevronDown size={14} color={theme.colors.foregroundMuted} />
|
<ChevronDown size={14} color={theme.colors.foregroundMuted} />
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
<DropdownMenuContent side="top" align="start" testID="agent-thinking-menu">
|
<DropdownMenuContent
|
||||||
|
side="top"
|
||||||
|
align="start"
|
||||||
|
maxWidth={dropdownMaxWidth}
|
||||||
|
testID="agent-thinking-menu"
|
||||||
|
>
|
||||||
<DropdownMenuLabel>Thinking</DropdownMenuLabel>
|
<DropdownMenuLabel>Thinking</DropdownMenuLabel>
|
||||||
{thinkingOptions.map((opt) => {
|
{thinkingOptions.map((opt) => {
|
||||||
const isActive = opt.id === selectedThinkingId;
|
const isActive = opt.id === selectedThinkingId;
|
||||||
@@ -331,15 +343,15 @@ const styles = StyleSheet.create((theme) => ({
|
|||||||
container: {
|
container: {
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: theme.spacing[3],
|
gap: theme.spacing[1],
|
||||||
},
|
},
|
||||||
modeBadge: {
|
modeBadge: {
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
backgroundColor: theme.colors.surface2,
|
backgroundColor: theme.colors.surface2,
|
||||||
gap: theme.spacing[1],
|
gap: theme.spacing[1],
|
||||||
paddingHorizontal: theme.spacing[3],
|
paddingHorizontal: theme.spacing[2],
|
||||||
paddingVertical: theme.spacing[2],
|
paddingVertical: theme.spacing[1],
|
||||||
borderRadius: theme.borderRadius["2xl"],
|
borderRadius: theme.borderRadius["2xl"],
|
||||||
},
|
},
|
||||||
modeBadgePressed: {
|
modeBadgePressed: {
|
||||||
@@ -348,8 +360,7 @@ const styles = StyleSheet.create((theme) => ({
|
|||||||
modeBadgeText: {
|
modeBadgeText: {
|
||||||
color: theme.colors.foregroundMuted,
|
color: theme.colors.foregroundMuted,
|
||||||
fontSize: theme.fontSize.xs,
|
fontSize: theme.fontSize.xs,
|
||||||
fontWeight: theme.fontWeight.semibold,
|
fontWeight: theme.fontWeight.normal,
|
||||||
textTransform: "capitalize",
|
|
||||||
},
|
},
|
||||||
prefsButton: {
|
prefsButton: {
|
||||||
width: 32,
|
width: 32,
|
||||||
|
|||||||
Reference in New Issue
Block a user