Simplify agent list UI and add bearer token auth for Codex MCP

- Replace SectionList with FlatList in agent list, sorting attention items to top
- Persist server selection preference in create agent modal
- Add bearer token authentication support for agent-control MCP endpoint
- Pass bearer token through Codex wrapper script for MCP auth

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Mohamed Boudra
2025-12-23 22:11:51 +07:00
co-authored by Claude Opus 4.5
parent bf0ec80fb5
commit 6a9b57ae0c
4 changed files with 109 additions and 114 deletions
@@ -470,6 +470,7 @@ function AgentFlowModal({
mode: false,
model: false,
workingDir: false,
serverId: false,
});
const prevVisibilityRef = useRef(isVisible);
const dictationRequestIdRef = useRef<string | null>(null);
@@ -730,6 +731,7 @@ function AgentFlowModal({
provider?: AgentProvider;
mode?: string;
model?: string;
serverId?: string;
};
if (
parsed.provider &&
@@ -756,6 +758,12 @@ function AgentFlowModal({
) {
setSelectedModel(parsed.model);
}
if (
typeof parsed.serverId === "string" &&
!userEditedPreferencesRef.current.serverId
) {
setSelectedServerId(parsed.serverId);
}
} catch (error) {
console.error(
"[CreateAgentModal] Failed to hydrate form preferences:",
@@ -786,6 +794,7 @@ function AgentFlowModal({
provider: selectedProvider,
mode: selectedMode,
model: selectedModel,
serverId: selectedServerId,
})
);
} catch (error) {
@@ -796,7 +805,7 @@ function AgentFlowModal({
}
};
void persist();
}, [selectedMode, selectedProvider, workingDir]);
}, [selectedMode, selectedProvider, workingDir, selectedModel, selectedServerId]);
const providerFilterOptions = useMemo(
() => [
@@ -1250,6 +1259,7 @@ function AgentFlowModal({
}, [router, selectedDaemonId]);
const handleSelectServer = useCallback((serverId: string) => {
userEditedPreferencesRef.current.serverId = true;
setSelectedServerId(serverId);
}, []);