Add browser use as MCP to providers (#889)

This commit is contained in:
Simos Mikelatos
2026-06-17 22:06:17 +02:00
committed by GitHub
parent c03ddb25fe
commit e88539170e
39 changed files with 5480 additions and 117 deletions

View File

@@ -1,6 +1,7 @@
import { MessageSquare, Terminal, Folder, GitBranch, ClipboardCheck, type LucideIcon } from 'lucide-react';
import { MessageSquare, Terminal, Folder, GitBranch, ClipboardCheck, MonitorPlay, type LucideIcon } from 'lucide-react';
import type { Dispatch, SetStateAction } from 'react';
import { useTranslation } from 'react-i18next';
import { Tooltip, PillBar, Pill } from '../../../../shared/view/ui';
import type { AppTab } from '../../../../types/app';
import { usePlugins } from '../../../../contexts/PluginsContext';
@@ -10,6 +11,7 @@ type MainContentTabSwitcherProps = {
activeTab: AppTab;
setActiveTab: Dispatch<SetStateAction<AppTab>>;
shouldShowTasksTab: boolean;
shouldShowBrowserTab: boolean;
};
type BuiltInTab = {
@@ -36,6 +38,13 @@ const BASE_TABS: BuiltInTab[] = [
{ kind: 'builtin', id: 'git', labelKey: 'tabs.git', icon: GitBranch },
];
const BROWSER_TAB: BuiltInTab = {
kind: 'builtin',
id: 'browser',
labelKey: 'tabs.browser',
icon: MonitorPlay,
};
const TASKS_TAB: BuiltInTab = {
kind: 'builtin',
id: 'tasks',
@@ -47,11 +56,16 @@ export default function MainContentTabSwitcher({
activeTab,
setActiveTab,
shouldShowTasksTab,
shouldShowBrowserTab,
}: MainContentTabSwitcherProps) {
const { t } = useTranslation();
const { plugins } = usePlugins();
const builtInTabs: BuiltInTab[] = shouldShowTasksTab ? [...BASE_TABS, TASKS_TAB] : BASE_TABS;
const builtInTabs: BuiltInTab[] = [
...BASE_TABS,
...(shouldShowBrowserTab ? [BROWSER_TAB] : []),
...(shouldShowTasksTab ? [TASKS_TAB] : []),
];
const pluginTabs: PluginTab[] = plugins
.filter((p) => p.enabled)