Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const primarySettingsSections: NavSection[] = [
{
label: 'Provider Settings',
items: [
{ name: 'BrowserOS AI', to: '/settings/ai', icon: Bot },
{ name: 'AI & Agents', to: '/settings/ai', icon: Bot },
{
name: 'Chat & Council Provider',
to: '/settings/chat',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CalendarClock, Cpu, Home, PlugZap, Settings } from 'lucide-react'
import { CalendarClock, Home, PlugZap, Settings } from 'lucide-react'
import type { FC } from 'react'
import { NavLink, useLocation } from 'react-router'
import {
Expand Down Expand Up @@ -31,12 +31,6 @@ const primaryNavItems: NavItem[] = [
feature: Feature.MANAGED_MCP_SUPPORT,
},
{ name: 'Scheduled Tasks', to: '/scheduled', icon: CalendarClock },
{
name: 'Agents',
to: '/agents',
icon: Cpu,
feature: Feature.ALPHA_FEATURES_SUPPORT,
},
{
name: 'Settings',
to: '/settings/ai',
Expand All @@ -49,10 +43,6 @@ function isNavItemActive(item: NavItem, pathname: string): boolean {
return pathname.startsWith('/settings')
}

if (item.to === '/agents') {
return pathname === '/agents' || pathname.startsWith('/agents/')
}

return pathname === item.to
}

Expand Down
31 changes: 12 additions & 19 deletions packages/browseros-agent/apps/agent/entrypoints/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { StepsLayout } from '../onboarding/steps/StepsLayout'
import { AgentCommandConversation } from './agent-command/AgentCommandConversation'
import { AgentCommandHome } from './agent-command/AgentCommandHome'
import { AgentCommandLayout } from './agent-command/agent-command-layout'
import { AgentsPage } from './agents/AgentsPage'
import { AISettingsPage } from './ai-settings/AISettingsPage'
import { ConnectMCP } from './connect-mcp/ConnectMCP'
import { CustomizationPage } from './customization/CustomizationPage'
Expand All @@ -38,6 +37,13 @@ function getSurveyParams(): { maxTurns?: number; experimentId?: string } {
return { maxTurns, experimentId }
}

// Agent management moved into AI & Agents settings; conversations live under
// /home/agents. Keep old /agents links alive.
const LegacyAgentRedirect: FC = () => {
const params = useParams()
return <Navigate to={`/home/agents/${params.agentId ?? ''}`} replace />
}

const OptionsRedirect: FC = () => {
const params = useParams()
const path = params['*'] || ''
Expand Down Expand Up @@ -100,24 +106,6 @@ export const App: FC = () => {
{/* Primary nav routes */}
<Route path="connect-apps" element={<ConnectMCP />} />
<Route path="scheduled" element={<ScheduledTasksPage />} />
{alphaEnabled ? (
<>
<Route path="agents" element={<AgentsPage />} />
<Route element={<AgentCommandLayout />}>
<Route
path="agents/:agentId"
element={
<AgentCommandConversation
variant="page"
backPath="/agents"
agentPathPrefix="/agents"
createAgentPath="/agents"
/>
}
/>
</Route>
</>
) : null}
</Route>

{/* Settings with dedicated sidebar */}
Expand Down Expand Up @@ -167,6 +155,11 @@ export const App: FC = () => {
element={<Navigate to="/home" replace />}
/>
<Route path="/executions" element={<Navigate to="/home" replace />} />
<Route
path="/agents"
element={<Navigate to="/settings/ai?section=claude" replace />}
/>
<Route path="/agents/:agentId" element={<LegacyAgentRedirect />} />
<Route path="/options/*" element={<OptionsRedirect />} />

{/* Fallback to home */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,12 @@ function AgentConversationController({
initialMessage,
onInitialMessageConsumed,
agents,
agentPathPrefix,
createAgentPath,
}: {
agentId: string
initialMessage: string | null
onInitialMessageConsumed: () => void
agents: AgentEntry[]
agentPathPrefix: string
createAgentPath: string
}) {
const navigate = useNavigate()
const initialMessageSentRef = useRef<string | null>(null)
const onInitialMessageConsumedRef = useRef(onInitialMessageConsumed)
const agent = agents.find((entry) => entry.agentId === agentId)
Expand Down Expand Up @@ -158,10 +153,6 @@ function AgentConversationController({
void sendRef.current({ text: query })
}, [agentId, disabled, historyReady, initialMessage, initialMessageKey])

const handleSelectAgent = (entry: AgentEntry) => {
navigate(`${agentPathPrefix}/${entry.agentId}`)
}

return (
<div className="flex min-h-0 flex-1 flex-col overflow-hidden">
<AgentChat
Expand Down Expand Up @@ -191,9 +182,6 @@ function AgentConversationController({
) : null}
<ConversationInput
variant="conversation"
agents={agents}
selectedAgentId={agentId}
onSelectAgent={handleSelectAgent}
onSend={(input) => {
const attachments = input.attachments.map((a) => a.payload)
const attachmentPreviews = input.attachments.map((a) => ({
Expand All @@ -217,11 +205,9 @@ function AgentConversationController({
}
void send({ text: input.text, attachments, attachmentPreviews })
}}
onCreateAgent={() => navigate(createAgentPath)}
onStop={handleStop}
streaming={streaming}
disabled={disabled}
status="running"
attachmentsEnabled={true}
placeholder={
streaming
Expand All @@ -239,7 +225,6 @@ interface AgentCommandConversationProps {
variant?: 'command' | 'page'
backPath?: string
agentPathPrefix?: string
createAgentPath?: string
}

function inferAdapterFromEntry(
Expand All @@ -260,7 +245,6 @@ export const AgentCommandConversation: FC<AgentCommandConversationProps> = ({
variant = 'command',
backPath = '/home',
agentPathPrefix = '/home/agents',
createAgentPath = '/agents',
}) => {
const { agentId } = useParams<{ agentId: string }>()
const [searchParams, setSearchParams] = useSearchParams()
Expand Down Expand Up @@ -369,8 +353,6 @@ export const AgentCommandConversation: FC<AgentCommandConversationProps> = ({
onInitialMessageConsumed={() => {
setSearchParams(() => new URLSearchParams(), { replace: true })
}}
agentPathPrefix={agentPathPrefix}
createAgentPath={createAgentPath}
/>
</div>
</div>
Expand Down
Loading
Loading