mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-20 16:47:40 +02:00
[eric] v1.0.20: add common MCP integrations, mcp OAuth, one-click connect UX, onboarding tools step, ui/ux improvements
This commit is contained in:
@@ -75,7 +75,7 @@ const initialState: SettingsState = {
|
||||
anthropic_api_key: null,
|
||||
browser_homepage: 'https://www.google.com',
|
||||
auto_select_mode_on_new_agent: false,
|
||||
expand_new_chats_in_dashboard: false,
|
||||
expand_new_chats_in_dashboard: true,
|
||||
auto_reveal_sub_agents: true,
|
||||
dev_mode: false,
|
||||
},
|
||||
|
||||
@@ -12,6 +12,7 @@ export interface ToolDefinition {
|
||||
credentials: Record<string, string>;
|
||||
auth_type: string;
|
||||
auth_status: string;
|
||||
oauth_provider?: string;
|
||||
oauth_tokens: Record<string, any>;
|
||||
tool_permissions: Record<string, any>;
|
||||
connected_account_email?: string;
|
||||
@@ -92,7 +93,10 @@ export const startOAuth = createAsyncThunk(
|
||||
'tools/startOAuth',
|
||||
async (toolId: string) => {
|
||||
const res = await fetch(`${TOOLS_API}/${toolId}/oauth/start`, { method: 'POST' });
|
||||
if (!res.ok) throw new Error('Failed to start OAuth');
|
||||
if (!res.ok) {
|
||||
const err = await res.json().catch(() => ({}));
|
||||
throw new Error(err.detail || 'Failed to start OAuth');
|
||||
}
|
||||
const data = await res.json();
|
||||
return data as { auth_url: string };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user