diff --git a/frontend/.eslintrc.json b/frontend/.eslintrc.json index 1ebe95e..b4803d0 100644 --- a/frontend/.eslintrc.json +++ b/frontend/.eslintrc.json @@ -1,6 +1,12 @@ { "extends": "next/core-web-vitals", "rules": { + "no-console": [ + "error", + { + "allow": [] + } + ], "no-restricted-globals": [ "warn", { diff --git a/frontend/src/app/admin/page.tsx b/frontend/src/app/admin/page.tsx index 8b461a9..f6b073f 100644 --- a/frontend/src/app/admin/page.tsx +++ b/frontend/src/app/admin/page.tsx @@ -58,7 +58,6 @@ export default function AdminPage() { const statsData = await apiClient.get("/api-internal/v1/settings/system-info"); setStats(statsData); } catch (error) { - console.error("Failed to fetch system stats:", error); } // Fetch recent activity @@ -66,10 +65,8 @@ export default function AdminPage() { const activityData = await apiClient.get("/api-internal/v1/audit?page=1&size=10") as any; setRecentActivity(activityData.logs || []); } catch (error) { - console.error("Failed to fetch recent activity:", error); } } catch (error) { - console.error("Failed to fetch admin data:", error); } finally { setLoading(false); } diff --git a/frontend/src/app/analytics/page.tsx b/frontend/src/app/analytics/page.tsx index 766f1e1..f82ede2 100644 --- a/frontend/src/app/analytics/page.tsx +++ b/frontend/src/app/analytics/page.tsx @@ -68,7 +68,6 @@ function AnalyticsPageContent() { setData(analyticsData); setLastUpdated(new Date()); } catch (error) { - console.error('Failed to fetch analytics:', error); // Set empty data structure on error setData({ overview: { diff --git a/frontend/src/app/api-keys/page.tsx b/frontend/src/app/api-keys/page.tsx index 82ecbab..61b6045 100644 --- a/frontend/src/app/api-keys/page.tsx +++ b/frontend/src/app/api-keys/page.tsx @@ -157,7 +157,6 @@ export default function ApiKeysPage() { const result = await apiClient.get("/api-internal/v1/api-keys") as any; setApiKeys(result.api_keys || result.data || []); } catch (error) { - console.error("Failed to fetch API keys:", error); toast({ title: "Error", description: "Failed to fetch API keys", @@ -173,7 +172,6 @@ export default function ApiKeysPage() { const result = await apiClient.get("/api-internal/v1/llm/models") as any; setAvailableModels(result.data || []); } catch (error) { - console.error("Failed to fetch models:", error); setAvailableModels([]); } }; @@ -183,7 +181,6 @@ export default function ApiKeysPage() { const result = await apiClient.get("/api-internal/v1/chatbot/list") as any; setAvailableChatbots(result || []); } catch (error) { - console.error("Failed to fetch chatbots:", error); setAvailableChatbots([]); } }; @@ -214,7 +211,6 @@ export default function ApiKeysPage() { await fetchApiKeys(); } catch (error) { - console.error("Failed to create API key:", error); toast({ title: "Error", description: error instanceof Error ? error.message : "Failed to create API key", @@ -237,7 +233,6 @@ export default function ApiKeysPage() { await fetchApiKeys(); } catch (error) { - console.error("Failed to toggle API key:", error); toast({ title: "Error", description: error instanceof Error ? error.message : "Failed to update API key", @@ -262,7 +257,6 @@ export default function ApiKeysPage() { setShowRegenerateDialog(null); await fetchApiKeys(); } catch (error) { - console.error("Failed to regenerate API key:", error); toast({ title: "Error", description: error instanceof Error ? error.message : "Failed to regenerate API key", @@ -289,7 +283,6 @@ export default function ApiKeysPage() { await fetchApiKeys(); } catch (error) { - console.error("Failed to delete API key:", error); toast({ title: "Error", description: error instanceof Error ? error.message : "Failed to delete API key", @@ -321,7 +314,6 @@ export default function ApiKeysPage() { setEditKeyData({}); await fetchApiKeys(); } catch (error) { - console.error("Failed to update API key:", error); toast({ title: "Error", description: error instanceof Error ? error.message : "Failed to update API key", diff --git a/frontend/src/app/api/analytics/overview/route.ts b/frontend/src/app/api/analytics/overview/route.ts index b48a21f..c21949f 100644 --- a/frontend/src/app/api/analytics/overview/route.ts +++ b/frontend/src/app/api/analytics/overview/route.ts @@ -7,7 +7,6 @@ export async function GET() { const data = await handleProxyResponse(response, 'Failed to fetch analytics overview') return NextResponse.json(data) } catch (error) { - console.error('Error fetching analytics overview:', error) return NextResponse.json( { error: 'Failed to fetch analytics overview' }, { status: 500 } diff --git a/frontend/src/app/api/analytics/route.ts b/frontend/src/app/api/analytics/route.ts index 3ed0d38..4adddf7 100644 --- a/frontend/src/app/api/analytics/route.ts +++ b/frontend/src/app/api/analytics/route.ts @@ -7,7 +7,6 @@ export async function GET() { const data = await handleProxyResponse(response, 'Failed to fetch analytics') return NextResponse.json(data) } catch (error) { - console.error('Error fetching analytics:', error) return NextResponse.json( { error: 'Failed to fetch analytics' }, { status: 500 } diff --git a/frontend/src/app/api/audit/route.ts b/frontend/src/app/api/audit/route.ts index 1219002..253236d 100644 --- a/frontend/src/app/api/audit/route.ts +++ b/frontend/src/app/api/audit/route.ts @@ -12,7 +12,6 @@ export async function GET(request: NextRequest) { const data = await handleProxyResponse(response, 'Failed to fetch audit logs') return NextResponse.json(data) } catch (error) { - console.error('Error fetching audit logs:', error) return NextResponse.json( { error: 'Failed to fetch audit logs' }, { status: 500 } diff --git a/frontend/src/app/api/auth/login/route.ts b/frontend/src/app/api/auth/login/route.ts index f78fbe4..c32f93e 100644 --- a/frontend/src/app/api/auth/login/route.ts +++ b/frontend/src/app/api/auth/login/route.ts @@ -25,7 +25,6 @@ export async function POST(request: NextRequest) { return NextResponse.json(data) } catch (error) { - console.error('Error in auth login:', error) return NextResponse.json( { error: 'Failed to process login' }, { status: 500 } diff --git a/frontend/src/app/api/auth/me/route.ts b/frontend/src/app/api/auth/me/route.ts index c95bf85..ba271dc 100644 --- a/frontend/src/app/api/auth/me/route.ts +++ b/frontend/src/app/api/auth/me/route.ts @@ -32,7 +32,6 @@ export async function GET(request: NextRequest) { return NextResponse.json(data) } catch (error) { - console.error('Error in auth me:', error) return NextResponse.json( { error: 'Failed to get user info' }, { status: 500 } diff --git a/frontend/src/app/api/auth/refresh/route.ts b/frontend/src/app/api/auth/refresh/route.ts index 9eea520..52f2308 100644 --- a/frontend/src/app/api/auth/refresh/route.ts +++ b/frontend/src/app/api/auth/refresh/route.ts @@ -25,7 +25,6 @@ export async function POST(request: NextRequest) { return NextResponse.json(data) } catch (error) { - console.error('Error in auth refresh:', error) return NextResponse.json( { error: 'Failed to refresh token' }, { status: 500 } diff --git a/frontend/src/app/api/auth/register/route.ts b/frontend/src/app/api/auth/register/route.ts index f5033c7..c5bac3f 100644 --- a/frontend/src/app/api/auth/register/route.ts +++ b/frontend/src/app/api/auth/register/route.ts @@ -25,7 +25,6 @@ export async function POST(request: NextRequest) { return NextResponse.json(data) } catch (error) { - console.error('Error in auth register:', error) return NextResponse.json( { error: 'Failed to process registration' }, { status: 500 } diff --git a/frontend/src/app/api/chatbot/chat/route.ts b/frontend/src/app/api/chatbot/chat/route.ts index b1fade1..ecdf0c5 100644 --- a/frontend/src/app/api/chatbot/chat/route.ts +++ b/frontend/src/app/api/chatbot/chat/route.ts @@ -141,7 +141,6 @@ export async function POST(request: NextRequest) { message_id: messageId }) } catch (error) { - console.error('Error in chat API route:', error) return NextResponse.json( { error: 'Internal Server Error', diff --git a/frontend/src/app/api/chatbot/create/route.ts b/frontend/src/app/api/chatbot/create/route.ts index 26e516a..d28b8be 100644 --- a/frontend/src/app/api/chatbot/create/route.ts +++ b/frontend/src/app/api/chatbot/create/route.ts @@ -32,7 +32,6 @@ export async function POST(request: NextRequest) { const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error creating chatbot:', error) return NextResponse.json( { error: 'Internal server error' }, { status: 500 } diff --git a/frontend/src/app/api/chatbot/delete/[id]/route.ts b/frontend/src/app/api/chatbot/delete/[id]/route.ts index 07c954d..fec258b 100644 --- a/frontend/src/app/api/chatbot/delete/[id]/route.ts +++ b/frontend/src/app/api/chatbot/delete/[id]/route.ts @@ -29,7 +29,6 @@ export async function DELETE( const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error deleting chatbot:', error) return NextResponse.json( { error: 'Failed to delete chatbot' }, { status: 500 } diff --git a/frontend/src/app/api/chatbot/list/route.ts b/frontend/src/app/api/chatbot/list/route.ts index 755d279..015fa4c 100644 --- a/frontend/src/app/api/chatbot/list/route.ts +++ b/frontend/src/app/api/chatbot/list/route.ts @@ -29,7 +29,6 @@ export async function GET(request: NextRequest) { const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error fetching chatbots:', error) return NextResponse.json( { error: 'Internal server error' }, { status: 500 } diff --git a/frontend/src/app/api/chatbot/types/route.ts b/frontend/src/app/api/chatbot/types/route.ts index 881e92e..7136ca2 100644 --- a/frontend/src/app/api/chatbot/types/route.ts +++ b/frontend/src/app/api/chatbot/types/route.ts @@ -22,7 +22,6 @@ export async function GET(request: NextRequest) { const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error fetching chatbot types:', error) return NextResponse.json( { error: 'Internal server error' }, { status: 500 } diff --git a/frontend/src/app/api/chatbot/update/[id]/route.ts b/frontend/src/app/api/chatbot/update/[id]/route.ts index b2fbd8c..e12278c 100644 --- a/frontend/src/app/api/chatbot/update/[id]/route.ts +++ b/frontend/src/app/api/chatbot/update/[id]/route.ts @@ -36,7 +36,6 @@ export async function PUT( const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error updating chatbot:', error) return NextResponse.json( { error: 'Internal server error' }, { status: 500 } diff --git a/frontend/src/app/api/llm/api-keys/[id]/regenerate/route.ts b/frontend/src/app/api/llm/api-keys/[id]/regenerate/route.ts index e23132d..f7d6bc1 100644 --- a/frontend/src/app/api/llm/api-keys/[id]/regenerate/route.ts +++ b/frontend/src/app/api/llm/api-keys/[id]/regenerate/route.ts @@ -32,7 +32,6 @@ export async function POST( const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error regenerating API key:', error) return NextResponse.json( { error: 'Internal server error' }, { status: 500 } diff --git a/frontend/src/app/api/llm/api-keys/[id]/route.ts b/frontend/src/app/api/llm/api-keys/[id]/route.ts index 360d6b3..2f499b9 100644 --- a/frontend/src/app/api/llm/api-keys/[id]/route.ts +++ b/frontend/src/app/api/llm/api-keys/[id]/route.ts @@ -31,7 +31,6 @@ export async function DELETE( return NextResponse.json({ success: true }) } catch (error) { - console.error('Error deleting API key:', error) return NextResponse.json( { error: 'Internal server error' }, { status: 500 } @@ -72,7 +71,6 @@ export async function PUT( const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error updating API key:', error) return NextResponse.json( { error: 'Internal server error' }, { status: 500 } diff --git a/frontend/src/app/api/llm/api-keys/route.ts b/frontend/src/app/api/llm/api-keys/route.ts index 6b7c45b..99059bc 100644 --- a/frontend/src/app/api/llm/api-keys/route.ts +++ b/frontend/src/app/api/llm/api-keys/route.ts @@ -29,7 +29,6 @@ export async function GET(request: NextRequest) { const data = await response.json() return NextResponse.json({ data: data.api_keys }) } catch (error) { - console.error('Error fetching API keys:', error) return NextResponse.json( { error: 'Internal server error' }, { status: 500 } @@ -77,7 +76,6 @@ export async function POST(request: NextRequest) { const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error creating API key:', error) return NextResponse.json( { error: 'Internal server error' }, { status: 500 } diff --git a/frontend/src/app/api/llm/budget/status/route.ts b/frontend/src/app/api/llm/budget/status/route.ts index 7e75d87..8d6acba 100644 --- a/frontend/src/app/api/llm/budget/status/route.ts +++ b/frontend/src/app/api/llm/budget/status/route.ts @@ -7,7 +7,6 @@ export async function GET() { const data = await handleProxyResponse(response, 'Failed to fetch budget status') return NextResponse.json(data) } catch (error) { - console.error('Error fetching budget status:', error) return NextResponse.json( { error: 'Failed to fetch budget status' }, { status: 500 } diff --git a/frontend/src/app/api/llm/budgets/route.ts b/frontend/src/app/api/llm/budgets/route.ts index 2d22a8c..3a74b1b 100644 --- a/frontend/src/app/api/llm/budgets/route.ts +++ b/frontend/src/app/api/llm/budgets/route.ts @@ -29,7 +29,6 @@ export async function GET(request: NextRequest) { const data = await response.json() return NextResponse.json({ data: data.budgets || [] }) } catch (error) { - console.error('Error fetching budgets:', error) return NextResponse.json( { error: 'Internal server error' }, { status: 500 } diff --git a/frontend/src/app/api/llm/chat/completions/route.ts b/frontend/src/app/api/llm/chat/completions/route.ts index b451ee3..701e156 100644 --- a/frontend/src/app/api/llm/chat/completions/route.ts +++ b/frontend/src/app/api/llm/chat/completions/route.ts @@ -19,7 +19,6 @@ export async function POST(request: NextRequest) { const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error in chat completions:', error) return NextResponse.json( { error: 'Failed to process chat completion' }, { status: 500 } diff --git a/frontend/src/app/api/llm/models/route.ts b/frontend/src/app/api/llm/models/route.ts index 8253db1..dc8bfe1 100644 --- a/frontend/src/app/api/llm/models/route.ts +++ b/frontend/src/app/api/llm/models/route.ts @@ -36,7 +36,6 @@ export async function GET(request: NextRequest) { return NextResponse.json({ data: transformedModels }) } catch (error) { - console.error("Error fetching models:", error) return NextResponse.json( { error: "Internal server error" }, { status: 500 } diff --git a/frontend/src/app/api/modules/[name]/[action]/route.ts b/frontend/src/app/api/modules/[name]/[action]/route.ts index f70c083..ad3b29e 100644 --- a/frontend/src/app/api/modules/[name]/[action]/route.ts +++ b/frontend/src/app/api/modules/[name]/[action]/route.ts @@ -26,7 +26,6 @@ export async function POST( refreshRequired: true }) } catch (error) { - console.error(`Error performing ${params.action} on module ${params.name}:`, error) return NextResponse.json( { error: `Failed to ${params.action} module` }, { status: 500 } diff --git a/frontend/src/app/api/modules/[name]/config/route.ts b/frontend/src/app/api/modules/[name]/config/route.ts index f67b938..fcd76af 100644 --- a/frontend/src/app/api/modules/[name]/config/route.ts +++ b/frontend/src/app/api/modules/[name]/config/route.ts @@ -17,7 +17,6 @@ export async function GET( const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error(`Error fetching config for module ${params.name}:`, error) return NextResponse.json( { error: 'Failed to fetch module configuration' }, { status: 500 } @@ -54,7 +53,6 @@ export async function POST( refreshRequired: true }) } catch (error) { - console.error(`Error updating config for module ${params.name}:`, error) return NextResponse.json( { error: 'Failed to update module configuration' }, { status: 500 } diff --git a/frontend/src/app/api/modules/route.ts b/frontend/src/app/api/modules/route.ts index 93f929e..f8110a1 100644 --- a/frontend/src/app/api/modules/route.ts +++ b/frontend/src/app/api/modules/route.ts @@ -25,7 +25,6 @@ export async function GET() { const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error fetching modules:', error) return NextResponse.json( { error: 'Failed to fetch modules' }, { status: 500 } diff --git a/frontend/src/app/api/modules/status/route.ts b/frontend/src/app/api/modules/status/route.ts index 8b38ad4..9979e24 100644 --- a/frontend/src/app/api/modules/status/route.ts +++ b/frontend/src/app/api/modules/status/route.ts @@ -12,7 +12,6 @@ export async function GET() { const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error fetching modules status:', error) return NextResponse.json( { error: 'Failed to fetch modules status' }, { status: 500 } diff --git a/frontend/src/app/api/prompt-templates/create/route.ts b/frontend/src/app/api/prompt-templates/create/route.ts index b36d831..b140736 100644 --- a/frontend/src/app/api/prompt-templates/create/route.ts +++ b/frontend/src/app/api/prompt-templates/create/route.ts @@ -29,7 +29,6 @@ export async function POST(request: NextRequest) { const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error creating prompt template:', error) return NextResponse.json( { error: 'Failed to create prompt template' }, { status: 500 } diff --git a/frontend/src/app/api/prompt-templates/improve/route.ts b/frontend/src/app/api/prompt-templates/improve/route.ts index d5dafc9..e143706 100644 --- a/frontend/src/app/api/prompt-templates/improve/route.ts +++ b/frontend/src/app/api/prompt-templates/improve/route.ts @@ -29,7 +29,6 @@ export async function POST(request: NextRequest) { const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error improving prompt with AI:', error) return NextResponse.json( { error: 'Failed to improve prompt' }, { status: 500 } diff --git a/frontend/src/app/api/prompt-templates/templates/[type_key]/reset/route.ts b/frontend/src/app/api/prompt-templates/templates/[type_key]/reset/route.ts index f1a1eb1..fed98e6 100644 --- a/frontend/src/app/api/prompt-templates/templates/[type_key]/reset/route.ts +++ b/frontend/src/app/api/prompt-templates/templates/[type_key]/reset/route.ts @@ -32,7 +32,6 @@ export async function POST( const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error resetting prompt template:', error) return NextResponse.json( { error: 'Failed to reset prompt template' }, { status: 500 } diff --git a/frontend/src/app/api/prompt-templates/templates/[type_key]/route.ts b/frontend/src/app/api/prompt-templates/templates/[type_key]/route.ts index 2b98086..c587b2a 100644 --- a/frontend/src/app/api/prompt-templates/templates/[type_key]/route.ts +++ b/frontend/src/app/api/prompt-templates/templates/[type_key]/route.ts @@ -35,7 +35,6 @@ export async function PUT( const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error updating prompt template:', error) return NextResponse.json( { error: 'Failed to update prompt template' }, { status: 500 } @@ -73,7 +72,6 @@ export async function GET( const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error fetching prompt template:', error) return NextResponse.json( { error: 'Failed to fetch prompt template' }, { status: 500 } diff --git a/frontend/src/app/api/prompt-templates/templates/route.ts b/frontend/src/app/api/prompt-templates/templates/route.ts index 9c21170..755ca2b 100644 --- a/frontend/src/app/api/prompt-templates/templates/route.ts +++ b/frontend/src/app/api/prompt-templates/templates/route.ts @@ -25,7 +25,6 @@ export async function GET(request: NextRequest) { const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error fetching prompt templates:', error) return NextResponse.json( { error: 'Failed to fetch prompt templates' }, { status: 500 } diff --git a/frontend/src/app/api/prompt-templates/variables/route.ts b/frontend/src/app/api/prompt-templates/variables/route.ts index 7b6647a..084f416 100644 --- a/frontend/src/app/api/prompt-templates/variables/route.ts +++ b/frontend/src/app/api/prompt-templates/variables/route.ts @@ -25,7 +25,6 @@ export async function GET(request: NextRequest) { const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error('Error fetching prompt variables:', error) return NextResponse.json( { error: 'Failed to fetch prompt variables' }, { status: 500 } diff --git a/frontend/src/app/api/rag/collections/[id]/route.ts b/frontend/src/app/api/rag/collections/[id]/route.ts index ccdea24..4393d7c 100644 --- a/frontend/src/app/api/rag/collections/[id]/route.ts +++ b/frontend/src/app/api/rag/collections/[id]/route.ts @@ -32,7 +32,6 @@ export async function DELETE( const data = await backendResponse.json() return NextResponse.json(data) } catch (error) { - console.error('Error deleting collection:', error) return NextResponse.json( { success: false, error: 'Failed to delete collection' }, { status: 500 } @@ -70,7 +69,6 @@ export async function GET( const data = await backendResponse.json() return NextResponse.json(data) } catch (error) { - console.error('Error fetching collection:', error) return NextResponse.json( { success: false, error: 'Failed to fetch collection' }, { status: 500 } diff --git a/frontend/src/app/api/rag/collections/route.ts b/frontend/src/app/api/rag/collections/route.ts index d707253..3c4a9e2 100644 --- a/frontend/src/app/api/rag/collections/route.ts +++ b/frontend/src/app/api/rag/collections/route.ts @@ -33,7 +33,6 @@ export async function GET(request: NextRequest) { const data = await backendResponse.json() return NextResponse.json(data) } catch (error) { - console.error('Error fetching collections:', error) return NextResponse.json( { success: false, error: 'Failed to fetch collections' }, { status: 500 } @@ -69,7 +68,6 @@ export async function POST(request: NextRequest) { const data = await backendResponse.json() return NextResponse.json(data) } catch (error) { - console.error('Error creating collection:', error) return NextResponse.json( { success: false, error: 'Failed to create collection' }, { status: 500 } diff --git a/frontend/src/app/api/rag/documents/[id]/download/route.ts b/frontend/src/app/api/rag/documents/[id]/download/route.ts index 3b3d4f7..c6b4fbd 100644 --- a/frontend/src/app/api/rag/documents/[id]/download/route.ts +++ b/frontend/src/app/api/rag/documents/[id]/download/route.ts @@ -49,7 +49,6 @@ export async function GET( return new NextResponse(backendResponse.body, { headers }) } catch (error) { - console.error('Error downloading document:', error) return NextResponse.json( { success: false, error: 'Failed to download document' }, { status: 500 } diff --git a/frontend/src/app/api/rag/documents/[id]/route.ts b/frontend/src/app/api/rag/documents/[id]/route.ts index 315002b..a06c9e5 100644 --- a/frontend/src/app/api/rag/documents/[id]/route.ts +++ b/frontend/src/app/api/rag/documents/[id]/route.ts @@ -32,7 +32,6 @@ export async function DELETE( const data = await backendResponse.json() return NextResponse.json(data) } catch (error) { - console.error('Error deleting document:', error) return NextResponse.json( { success: false, error: 'Failed to delete document' }, { status: 500 } @@ -70,7 +69,6 @@ export async function GET( const data = await backendResponse.json() return NextResponse.json(data) } catch (error) { - console.error('Error fetching document:', error) return NextResponse.json( { success: false, error: 'Failed to fetch document' }, { status: 500 } diff --git a/frontend/src/app/api/rag/documents/route.ts b/frontend/src/app/api/rag/documents/route.ts index 09f2acb..daf5b7b 100644 --- a/frontend/src/app/api/rag/documents/route.ts +++ b/frontend/src/app/api/rag/documents/route.ts @@ -33,7 +33,6 @@ export async function GET(request: NextRequest) { const data = await backendResponse.json() return NextResponse.json(data) } catch (error) { - console.error('Error fetching documents:', error) return NextResponse.json( { success: false, error: 'Failed to fetch documents' }, { status: 500 } @@ -69,7 +68,6 @@ export async function POST(request: NextRequest) { const data = await backendResponse.json() return NextResponse.json(data) } catch (error) { - console.error('Error uploading document:', error) return NextResponse.json( { success: false, error: 'Failed to upload document' }, { status: 500 } diff --git a/frontend/src/app/api/rag/stats/route.ts b/frontend/src/app/api/rag/stats/route.ts index ad3272a..ac4912b 100644 --- a/frontend/src/app/api/rag/stats/route.ts +++ b/frontend/src/app/api/rag/stats/route.ts @@ -27,7 +27,6 @@ export async function GET(request: NextRequest) { const data = await backendResponse.json() return NextResponse.json(data) } catch (error) { - console.error('Error fetching RAG stats:', error) return NextResponse.json( { success: false, error: 'Failed to fetch RAG stats' }, { status: 500 } diff --git a/frontend/src/app/api/v1/chatbot/list/route.ts b/frontend/src/app/api/v1/chatbot/list/route.ts index 12eee09..0983764 100644 --- a/frontend/src/app/api/v1/chatbot/list/route.ts +++ b/frontend/src/app/api/v1/chatbot/list/route.ts @@ -42,7 +42,6 @@ export async function GET(request: NextRequest) { })) }) } catch (error) { - console.error('Error fetching chatbots:', error) return NextResponse.json( { error: 'Internal server error' }, { status: 500 } diff --git a/frontend/src/app/api/v1/llm/models/route.ts b/frontend/src/app/api/v1/llm/models/route.ts index d04703a..808454f 100644 --- a/frontend/src/app/api/v1/llm/models/route.ts +++ b/frontend/src/app/api/v1/llm/models/route.ts @@ -36,7 +36,6 @@ export async function GET(request: NextRequest) { return NextResponse.json({ data: transformedModels }) } catch (error) { - console.error("Error fetching models:", error) return NextResponse.json( { error: "Internal server error" }, { status: 500 } diff --git a/frontend/src/app/api/v1/llm/providers/status/route.ts b/frontend/src/app/api/v1/llm/providers/status/route.ts index 4c1ee2f..b3bd28b 100644 --- a/frontend/src/app/api/v1/llm/providers/status/route.ts +++ b/frontend/src/app/api/v1/llm/providers/status/route.ts @@ -29,7 +29,6 @@ export async function GET(request: NextRequest) { const data = await response.json() return NextResponse.json(data) } catch (error) { - console.error("Error fetching provider status:", error) return NextResponse.json( { error: "Internal server error" }, { status: 500 } diff --git a/frontend/src/app/api/v1/plugins/[pluginId]/config/route.ts b/frontend/src/app/api/v1/plugins/[pluginId]/config/route.ts index 2db7095..2af7f1f 100644 --- a/frontend/src/app/api/v1/plugins/[pluginId]/config/route.ts +++ b/frontend/src/app/api/v1/plugins/[pluginId]/config/route.ts @@ -37,7 +37,6 @@ export async function GET( return NextResponse.json(data) } catch (error) { - console.error('Error getting plugin config:', error) return NextResponse.json( { error: 'Failed to get plugin config' }, { status: 500 } @@ -84,7 +83,6 @@ export async function POST( return NextResponse.json(data) } catch (error) { - console.error('Error saving plugin config:', error) return NextResponse.json( { error: 'Failed to save plugin config' }, { status: 500 } diff --git a/frontend/src/app/api/v1/plugins/[pluginId]/disable/route.ts b/frontend/src/app/api/v1/plugins/[pluginId]/disable/route.ts index 99526dd..15a0a6d 100644 --- a/frontend/src/app/api/v1/plugins/[pluginId]/disable/route.ts +++ b/frontend/src/app/api/v1/plugins/[pluginId]/disable/route.ts @@ -37,7 +37,6 @@ export async function POST( return NextResponse.json(data) } catch (error) { - console.error('Error disabling plugin:', error) return NextResponse.json( { error: 'Failed to disable plugin' }, { status: 500 } diff --git a/frontend/src/app/api/v1/plugins/[pluginId]/enable/route.ts b/frontend/src/app/api/v1/plugins/[pluginId]/enable/route.ts index dd44d36..e89a829 100644 --- a/frontend/src/app/api/v1/plugins/[pluginId]/enable/route.ts +++ b/frontend/src/app/api/v1/plugins/[pluginId]/enable/route.ts @@ -37,7 +37,6 @@ export async function POST( return NextResponse.json(data) } catch (error) { - console.error('Error enabling plugin:', error) return NextResponse.json( { error: 'Failed to enable plugin' }, { status: 500 } diff --git a/frontend/src/app/api/v1/plugins/[pluginId]/load/route.ts b/frontend/src/app/api/v1/plugins/[pluginId]/load/route.ts index f168b2a..68cf01f 100644 --- a/frontend/src/app/api/v1/plugins/[pluginId]/load/route.ts +++ b/frontend/src/app/api/v1/plugins/[pluginId]/load/route.ts @@ -37,7 +37,6 @@ export async function POST( return NextResponse.json(data) } catch (error) { - console.error('Error loading plugin:', error) return NextResponse.json( { error: 'Failed to load plugin' }, { status: 500 } diff --git a/frontend/src/app/api/v1/plugins/[pluginId]/route.ts b/frontend/src/app/api/v1/plugins/[pluginId]/route.ts index c3969e2..cae4db0 100644 --- a/frontend/src/app/api/v1/plugins/[pluginId]/route.ts +++ b/frontend/src/app/api/v1/plugins/[pluginId]/route.ts @@ -39,7 +39,6 @@ export async function DELETE( return NextResponse.json(data) } catch (error) { - console.error('Error uninstalling plugin:', error) return NextResponse.json( { error: 'Failed to uninstall plugin' }, { status: 500 } diff --git a/frontend/src/app/api/v1/plugins/[pluginId]/schema/route.ts b/frontend/src/app/api/v1/plugins/[pluginId]/schema/route.ts index b3fbf8b..f6df832 100644 --- a/frontend/src/app/api/v1/plugins/[pluginId]/schema/route.ts +++ b/frontend/src/app/api/v1/plugins/[pluginId]/schema/route.ts @@ -47,7 +47,6 @@ export async function GET( return nextResponse } catch (error) { - console.error('Error getting plugin schema:', error) return NextResponse.json( { error: 'Failed to get plugin schema' }, { status: 500 } diff --git a/frontend/src/app/api/v1/plugins/[pluginId]/test-credentials/route.ts b/frontend/src/app/api/v1/plugins/[pluginId]/test-credentials/route.ts index 6617ee4..b56f826 100644 --- a/frontend/src/app/api/v1/plugins/[pluginId]/test-credentials/route.ts +++ b/frontend/src/app/api/v1/plugins/[pluginId]/test-credentials/route.ts @@ -39,7 +39,6 @@ export async function POST( return NextResponse.json(data) } catch (error) { - console.error('Error testing plugin credentials:', error) return NextResponse.json( { error: 'Failed to test plugin credentials' }, { status: 500 } diff --git a/frontend/src/app/api/v1/plugins/[pluginId]/unload/route.ts b/frontend/src/app/api/v1/plugins/[pluginId]/unload/route.ts index 208c16b..6eba1c2 100644 --- a/frontend/src/app/api/v1/plugins/[pluginId]/unload/route.ts +++ b/frontend/src/app/api/v1/plugins/[pluginId]/unload/route.ts @@ -37,7 +37,6 @@ export async function POST( return NextResponse.json(data) } catch (error) { - console.error('Error unloading plugin:', error) return NextResponse.json( { error: 'Failed to unload plugin' }, { status: 500 } diff --git a/frontend/src/app/api/v1/plugins/discover/route.ts b/frontend/src/app/api/v1/plugins/discover/route.ts index c97539b..2111c23 100644 --- a/frontend/src/app/api/v1/plugins/discover/route.ts +++ b/frontend/src/app/api/v1/plugins/discover/route.ts @@ -46,7 +46,6 @@ export async function GET(request: NextRequest) { return NextResponse.json(data) } catch (error) { - console.error('Error discovering plugins:', error) return NextResponse.json( { error: 'Failed to discover plugins' }, { status: 500 } diff --git a/frontend/src/app/api/v1/plugins/install/route.ts b/frontend/src/app/api/v1/plugins/install/route.ts index 9d82ec2..0af2fce 100644 --- a/frontend/src/app/api/v1/plugins/install/route.ts +++ b/frontend/src/app/api/v1/plugins/install/route.ts @@ -35,7 +35,6 @@ export async function POST(request: NextRequest) { return NextResponse.json(data) } catch (error) { - console.error('Error installing plugin:', error) return NextResponse.json( { error: 'Failed to install plugin' }, { status: 500 } diff --git a/frontend/src/app/api/v1/plugins/installed/route.ts b/frontend/src/app/api/v1/plugins/installed/route.ts index 270a6a1..1fee337 100644 --- a/frontend/src/app/api/v1/plugins/installed/route.ts +++ b/frontend/src/app/api/v1/plugins/installed/route.ts @@ -32,7 +32,6 @@ export async function GET(request: NextRequest) { return NextResponse.json(data) } catch (error) { - console.error('Error fetching installed plugins:', error) return NextResponse.json( { error: 'Failed to fetch installed plugins' }, { status: 500 } diff --git a/frontend/src/app/api/v1/settings/[category]/route.ts b/frontend/src/app/api/v1/settings/[category]/route.ts index 12f5a92..b4ddf95 100644 --- a/frontend/src/app/api/v1/settings/[category]/route.ts +++ b/frontend/src/app/api/v1/settings/[category]/route.ts @@ -77,7 +77,6 @@ export async function PUT( } } catch (error) { - console.error(`Error updating ${params.category} settings:`, error) return NextResponse.json( { error: 'Failed to update category settings' }, { status: 500 } @@ -122,7 +121,6 @@ export async function GET( return NextResponse.json(data) } catch (error) { - console.error(`Error fetching ${params.category} settings:`, error) return NextResponse.json( { error: 'Failed to fetch category settings' }, { status: 500 } diff --git a/frontend/src/app/api/v1/settings/route.ts b/frontend/src/app/api/v1/settings/route.ts index 75a8780..0f1f13c 100644 --- a/frontend/src/app/api/v1/settings/route.ts +++ b/frontend/src/app/api/v1/settings/route.ts @@ -42,7 +42,6 @@ export async function GET(request: NextRequest) { return NextResponse.json(data) } catch (error) { - console.error('Error fetching settings:', error) return NextResponse.json( { error: 'Failed to fetch settings' }, { status: 500 } @@ -85,7 +84,6 @@ export async function PUT(request: NextRequest) { return NextResponse.json(data) } catch (error) { - console.error('Error updating settings:', error) return NextResponse.json( { error: 'Failed to update settings' }, { status: 500 } diff --git a/frontend/src/app/api/v1/zammad/chatbots/route.ts b/frontend/src/app/api/v1/zammad/chatbots/route.ts index 1ed130a..7e07451 100644 --- a/frontend/src/app/api/v1/zammad/chatbots/route.ts +++ b/frontend/src/app/api/v1/zammad/chatbots/route.ts @@ -32,7 +32,6 @@ export async function GET(request: NextRequest) { return NextResponse.json(data) } catch (error) { - console.error('Error fetching Zammad chatbots:', error) return NextResponse.json( { error: 'Failed to fetch Zammad chatbots' }, { status: 500 } diff --git a/frontend/src/app/api/v1/zammad/configurations/[id]/route.ts b/frontend/src/app/api/v1/zammad/configurations/[id]/route.ts index 36fde87..8468ff6 100644 --- a/frontend/src/app/api/v1/zammad/configurations/[id]/route.ts +++ b/frontend/src/app/api/v1/zammad/configurations/[id]/route.ts @@ -36,7 +36,6 @@ export async function PUT(request: NextRequest, { params }: { params: { id: stri return NextResponse.json(data) } catch (error) { - console.error('Error updating Zammad configuration:', error) return NextResponse.json( { error: 'Failed to update Zammad configuration' }, { status: 500 } @@ -78,7 +77,6 @@ export async function DELETE(request: NextRequest, { params }: { params: { id: s return NextResponse.json(data) } catch (error) { - console.error('Error deleting Zammad configuration:', error) return NextResponse.json( { error: 'Failed to delete Zammad configuration' }, { status: 500 } diff --git a/frontend/src/app/api/v1/zammad/configurations/route.ts b/frontend/src/app/api/v1/zammad/configurations/route.ts index 570ec95..b8d7af5 100644 --- a/frontend/src/app/api/v1/zammad/configurations/route.ts +++ b/frontend/src/app/api/v1/zammad/configurations/route.ts @@ -32,7 +32,6 @@ export async function GET(request: NextRequest) { return NextResponse.json(data) } catch (error) { - console.error('Error fetching Zammad configurations:', error) return NextResponse.json( { error: 'Failed to fetch Zammad configurations' }, { status: 500 } @@ -75,7 +74,6 @@ export async function POST(request: NextRequest) { return NextResponse.json(data) } catch (error) { - console.error('Error creating Zammad configuration:', error) return NextResponse.json( { error: 'Failed to create Zammad configuration' }, { status: 500 } diff --git a/frontend/src/app/api/v1/zammad/process/route.ts b/frontend/src/app/api/v1/zammad/process/route.ts index b2cdd59..3c34032 100644 --- a/frontend/src/app/api/v1/zammad/process/route.ts +++ b/frontend/src/app/api/v1/zammad/process/route.ts @@ -35,7 +35,6 @@ export async function POST(request: NextRequest) { return NextResponse.json(data) } catch (error) { - console.error('Error processing Zammad tickets:', error) return NextResponse.json( { error: 'Failed to process Zammad tickets' }, { status: 500 } diff --git a/frontend/src/app/api/v1/zammad/processing-logs/route.ts b/frontend/src/app/api/v1/zammad/processing-logs/route.ts index d08f297..b3bc65b 100644 --- a/frontend/src/app/api/v1/zammad/processing-logs/route.ts +++ b/frontend/src/app/api/v1/zammad/processing-logs/route.ts @@ -42,7 +42,6 @@ export async function GET(request: NextRequest) { return NextResponse.json(data) } catch (error) { - console.error('Error fetching Zammad processing logs:', error) return NextResponse.json( { error: 'Failed to fetch Zammad processing logs' }, { status: 500 } diff --git a/frontend/src/app/api/v1/zammad/status/route.ts b/frontend/src/app/api/v1/zammad/status/route.ts index 9c48aac..ed7af99 100644 --- a/frontend/src/app/api/v1/zammad/status/route.ts +++ b/frontend/src/app/api/v1/zammad/status/route.ts @@ -32,7 +32,6 @@ export async function GET(request: NextRequest) { return NextResponse.json(data) } catch (error) { - console.error('Error fetching Zammad status:', error) return NextResponse.json( { error: 'Failed to fetch Zammad status' }, { status: 500 } diff --git a/frontend/src/app/api/v1/zammad/test-connection/route.ts b/frontend/src/app/api/v1/zammad/test-connection/route.ts index d662858..fc0d589 100644 --- a/frontend/src/app/api/v1/zammad/test-connection/route.ts +++ b/frontend/src/app/api/v1/zammad/test-connection/route.ts @@ -35,7 +35,6 @@ export async function POST(request: NextRequest) { return NextResponse.json(data) } catch (error) { - console.error('Error testing Zammad connection:', error) return NextResponse.json( { error: 'Failed to test Zammad connection' }, { status: 500 } diff --git a/frontend/src/app/audit/page.tsx b/frontend/src/app/audit/page.tsx index e646f15..4f53420 100644 --- a/frontend/src/app/audit/page.tsx +++ b/frontend/src/app/audit/page.tsx @@ -113,7 +113,6 @@ export default function AuditPage() { setTotalPages(Math.ceil((logsData.total || 0) / pageSize)); setStats(statsData); } catch (error) { - console.error("Failed to fetch audit data:", error); toast({ title: "Error", description: "Failed to fetch audit logs", @@ -165,7 +164,6 @@ export default function AuditPage() { description: "Audit logs have been exported successfully", }); } catch (error) { - console.error("Failed to export audit logs:", error); toast({ title: "Export Failed", description: error instanceof Error ? error.message : "Failed to export audit logs", @@ -492,7 +490,6 @@ export default function AuditPage() { metadata: JSON.stringify(log.metadata, null, 2) }; // Would open a detail modal in a real implementation - console.log("Audit log details:", details); }} > diff --git a/frontend/src/app/budgets/page.tsx b/frontend/src/app/budgets/page.tsx index de9f8b9..7a1a538 100644 --- a/frontend/src/app/budgets/page.tsx +++ b/frontend/src/app/budgets/page.tsx @@ -119,7 +119,6 @@ export default function BudgetsPage() { setStats(statsData.value); } } catch (error) { - console.error("Failed to fetch budget data:", error); toast({ title: "Error", description: "Failed to fetch budget data", @@ -155,7 +154,6 @@ export default function BudgetsPage() { await fetchBudgetData(); } catch (error) { - console.error("Failed to create budget:", error); toast({ title: "Error", description: error instanceof Error ? error.message : "Failed to create budget", @@ -180,7 +178,6 @@ export default function BudgetsPage() { setEditingBudget(null); await fetchBudgetData(); } catch (error) { - console.error("Failed to update budget:", error); toast({ title: "Error", description: error instanceof Error ? error.message : "Failed to update budget", @@ -212,7 +209,6 @@ export default function BudgetsPage() { await fetchBudgetData(); } catch (error) { - console.error("Failed to delete budget:", error); toast({ title: "Error", description: error instanceof Error ? error.message : "Failed to delete budget", diff --git a/frontend/src/app/dashboard/page.tsx b/frontend/src/app/dashboard/page.tsx index 44511d2..2a6d409 100644 --- a/frontend/src/app/dashboard/page.tsx +++ b/frontend/src/app/dashboard/page.tsx @@ -129,7 +129,6 @@ function DashboardContent() { setRecentActivity([]) } catch (error) { - console.error('Error fetching dashboard data:', error) // Set empty states on error setStats({ activeModules: 0, diff --git a/frontend/src/app/llm/page.tsx b/frontend/src/app/llm/page.tsx index c629160..a771c9c 100644 --- a/frontend/src/app/llm/page.tsx +++ b/frontend/src/app/llm/page.tsx @@ -99,7 +99,6 @@ function LLMPageContent() { const fetchData = async () => { try { - console.log('Fetching data...') setLoading(true) const token = localStorage.getItem('token') if (!token) { @@ -109,11 +108,9 @@ function LLMPageContent() { // Fetch API keys and models using API client const [keysData, modelsData] = await Promise.all([ apiClient.get('/api-internal/v1/api-keys').catch(e => { - console.error('Failed to fetch API keys:', e) return { data: [] } }), apiClient.get('/api-internal/v1/llm/models').catch(e => { - console.error('Failed to fetch models:', e) return { data: [] } }) ]) @@ -122,7 +119,6 @@ function LLMPageContent() { setModels(modelsData.data || []) } catch (error) { - console.error('Error fetching data:', error) toast({ title: "Error", description: "Failed to load data", @@ -169,11 +165,9 @@ function LLMPageContent() { const deleteAPIKey = async (keyId: number) => { try { - console.log('Deleting API key with ID:', keyId) setLoading(true) const responseData = await apiClient.delete(`/api-internal/v1/api-keys/${keyId}`) - console.log('Delete response data:', responseData) toast({ title: "Success", @@ -182,9 +176,7 @@ function LLMPageContent() { // Force refresh data and wait for it to complete await fetchData() - console.log('Data refreshed after deletion') } catch (error) { - console.error('Error deleting API key:', error) toast({ title: "Error", description: error instanceof Error ? error.message : "Failed to delete API key", diff --git a/frontend/src/app/prompt-templates/page.tsx b/frontend/src/app/prompt-templates/page.tsx index ca9273b..c299113 100644 --- a/frontend/src/app/prompt-templates/page.tsx +++ b/frontend/src/app/prompt-templates/page.tsx @@ -120,7 +120,6 @@ export default function PromptTemplatesPage() { setTemplates(templatesResult.value) setVariables(variablesResult.value) } catch (error) { - console.error('Error loading data:', error) toast.error('Failed to load prompt templates') } finally { setLoading(false) @@ -162,7 +161,6 @@ export default function PromptTemplatesPage() { setEditingTemplate(null) } catch (error) { - console.error('Error saving template:', error) toast.error(error instanceof Error ? error.message : 'Failed to save template') } finally { setSaving(false) @@ -178,7 +176,6 @@ export default function PromptTemplatesPage() { await loadData() } catch (error) { - console.error('Error resetting template:', error) toast.error(error instanceof Error ? error.message : 'Failed to reset template') } } @@ -228,7 +225,6 @@ export default function PromptTemplatesPage() { setUseCustomType(false) } catch (error) { - console.error('Error creating template:', error) toast.error(error instanceof Error ? error.message : 'Failed to create template') } finally { setSaving(false) @@ -261,7 +257,6 @@ export default function PromptTemplatesPage() { toast.success('Prompt improved with AI successfully') } catch (error) { - console.error('Error improving prompt with AI:', error) toast.error(error instanceof Error ? error.message : 'Failed to improve prompt') } finally { setImprovingWithAI(false) diff --git a/frontend/src/app/rag/page.tsx b/frontend/src/app/rag/page.tsx index 97e682e..87616c1 100644 --- a/frontend/src/app/rag/page.tsx +++ b/frontend/src/app/rag/page.tsx @@ -77,7 +77,6 @@ function RAGPageContent() { const data = await apiClient.get('/api-internal/v1/rag/collections') setCollections(data.collections || []) } catch (error) { - console.error('Failed to load collections:', error) } finally { setLoading(false) } @@ -88,7 +87,6 @@ function RAGPageContent() { const data = await apiClient.get('/api-internal/v1/rag/stats') setStats(data.stats) } catch (error) { - console.error('Failed to load stats:', error) } } diff --git a/frontend/src/app/register/page.tsx b/frontend/src/app/register/page.tsx index bca861b..37c5b53 100644 --- a/frontend/src/app/register/page.tsx +++ b/frontend/src/app/register/page.tsx @@ -121,7 +121,6 @@ export default function RegisterPage() { // Redirect to login page router.push("/login?message=registration-success"); } catch (error) { - console.error("Registration error:", error); toast({ title: "Registration failed", description: error instanceof Error ? error.message : "An unexpected error occurred", diff --git a/frontend/src/app/settings/page.tsx b/frontend/src/app/settings/page.tsx index 9b644d4..4205e8c 100644 --- a/frontend/src/app/settings/page.tsx +++ b/frontend/src/app/settings/page.tsx @@ -198,7 +198,6 @@ function SettingsPageContent() { setSettings(transformedSettings); setIsDirty(false); } catch (error) { - console.error("Failed to fetch settings:", error); toast({ title: "Error", description: "Failed to fetch system settings", @@ -239,7 +238,6 @@ function SettingsPageContent() { setIsDirty(false); } catch (error) { - console.error("Failed to save settings:", error); toast({ title: "Save Failed", description: error instanceof Error ? error.message : "Failed to save settings", @@ -259,7 +257,6 @@ function SettingsPageContent() { description: `${type.toUpperCase()} connection is working properly`, }); } catch (error) { - console.error(`Failed to test ${type} connection:`, error); toast({ title: "Connection Test Failed", description: error instanceof Error ? error.message : `Failed to test ${type} connection`, @@ -287,7 +284,6 @@ function SettingsPageContent() { triggerModuleRefresh(); } } catch (error) { - console.error(`Failed to ${action} module:`, error); toast({ title: "Error", description: error instanceof Error ? error.message : `Failed to ${action} module`, diff --git a/frontend/src/components/chatbot/ChatInterface.tsx b/frontend/src/components/chatbot/ChatInterface.tsx index 15b23b7..0d321b1 100644 --- a/frontend/src/components/chatbot/ChatInterface.tsx +++ b/frontend/src/components/chatbot/ChatInterface.tsx @@ -100,7 +100,6 @@ export function ChatInterface({ chatbotId, chatbotName, onClose }: ChatInterface } catch (error) { const appError = error as AppError - console.error('Error sending message:', appError) // More specific error handling if (appError.code === 'UNAUTHORIZED') { @@ -127,7 +126,6 @@ export function ChatInterface({ chatbotId, chatbotName, onClose }: ChatInterface await navigator.clipboard.writeText(content) toast.success("Copied", "Message copied to clipboard") } catch (error) { - console.error('Failed to copy message:', error) toast.error("Copy Failed", "Unable to copy message to clipboard") } }, [toast]) diff --git a/frontend/src/components/chatbot/ChatbotManager.tsx b/frontend/src/components/chatbot/ChatbotManager.tsx index 73ad336..b9ac6f9 100644 --- a/frontend/src/components/chatbot/ChatbotManager.tsx +++ b/frontend/src/components/chatbot/ChatbotManager.tsx @@ -216,7 +216,6 @@ export function ChatbotManager() { const data = await apiClient.get('/api-internal/v1/chatbot/list') setChatbots(data) } catch (error) { - console.error('Failed to load chatbots:', error) toast({ title: "Error", description: "Failed to load chatbots", @@ -232,7 +231,6 @@ export function ChatbotManager() { const data = await apiClient.get('/api-internal/v1/rag/collections') setRagCollections(data.collections || []) } catch (error) { - console.error('Failed to load RAG collections:', error) } } @@ -241,7 +239,6 @@ export function ChatbotManager() { const templates = await apiClient.get('/api-internal/v1/prompt-templates/templates') setPromptTemplates(templates) } catch (error) { - console.error('Failed to load prompt templates:', error) } } @@ -345,7 +342,6 @@ export function ChatbotManager() { description: `${deletingChatbot.name} has been deleted` }) } catch (error) { - console.error('Failed to delete chatbot:', error) toast({ title: "Error", description: error instanceof Error ? error.message : "Failed to delete chatbot", diff --git a/frontend/src/components/modules/ZammadConfig.tsx b/frontend/src/components/modules/ZammadConfig.tsx index 7e09681..b9904e5 100644 --- a/frontend/src/components/modules/ZammadConfig.tsx +++ b/frontend/src/components/modules/ZammadConfig.tsx @@ -136,7 +136,6 @@ export function ZammadConfig() { fetchModuleStatus() ]) } catch (error) { - console.error("Error fetching Zammad data:", error) toast({ title: "Error", description: "Failed to load Zammad configuration", @@ -152,7 +151,7 @@ export function ZammadConfig() { const data = await apiClient.get("/api-internal/v1/zammad/configurations") setConfigurations(data.configurations || []) } catch (error) { - console.error("Error fetching configurations:", error) + // Silent failure for configuration fetching } } @@ -161,7 +160,7 @@ export function ZammadConfig() { const data = await apiClient.get("/api-internal/v1/zammad/chatbots") setChatbots(data.chatbots || []) } catch (error) { - console.error("Error fetching chatbots:", error) + // Silent failure for chatbot fetching } } @@ -170,7 +169,7 @@ export function ZammadConfig() { const data = await apiClient.get("/api-internal/v1/zammad/processing-logs?limit=5") setProcessingLogs(data.logs || []) } catch (error) { - console.error("Error fetching processing logs:", error) + // Silent failure for processing logs fetching } } @@ -179,7 +178,7 @@ export function ZammadConfig() { const data = await apiClient.get("/api-internal/v1/zammad/status") setModuleStatus(data) } catch (error) { - console.error("Error fetching module status:", error) + // Silent failure for module status fetching } } @@ -225,7 +224,6 @@ export function ZammadConfig() { await fetchConfigurations() } catch (error) { - console.error("Error saving configuration:", error) toast({ title: "Error", description: error instanceof Error ? error.message : "Failed to save configuration", @@ -253,8 +251,6 @@ export function ZammadConfig() { zammad_url: newConfig.zammad_url, api_token: newConfig.api_token }) - console.log("Test connection response:", data) - if (data.status === "success") { toast({ title: "✅ Connection Successful", @@ -270,7 +266,6 @@ export function ZammadConfig() { }) } } catch (error) { - console.error("Error testing connection:", error) toast({ title: "⚠️ Connection Test Error", description: `Failed to test connection: ${error instanceof Error ? error.message : 'Unknown error'}`, @@ -302,7 +297,6 @@ export function ZammadConfig() { fetchModuleStatus() }, 2000) } catch (error) { - console.error("Error processing tickets:", error) toast({ title: "Error", description: error instanceof Error ? error.message : "Failed to process tickets", @@ -324,7 +318,6 @@ export function ZammadConfig() { await fetchConfigurations() } catch (error) { - console.error("Error deleting configuration:", error) toast({ title: "Error", description: "Failed to delete configuration", diff --git a/frontend/src/components/plugins/PluginManager.tsx b/frontend/src/components/plugins/PluginManager.tsx index 4399045..529d2f2 100644 --- a/frontend/src/components/plugins/PluginManager.tsx +++ b/frontend/src/components/plugins/PluginManager.tsx @@ -283,7 +283,6 @@ export const PluginManager: React.FC = () => { break; } } catch (err) { - console.error(`Failed to ${action} plugin:`, err); } }; @@ -291,7 +290,6 @@ export const PluginManager: React.FC = () => { try { await installPlugin(plugin.id, plugin.version); } catch (err) { - console.error('Failed to install plugin:', err); } }; diff --git a/frontend/src/components/plugins/PluginPageRenderer.tsx b/frontend/src/components/plugins/PluginPageRenderer.tsx index 1c133f5..dedd3cb 100644 --- a/frontend/src/components/plugins/PluginPageRenderer.tsx +++ b/frontend/src/components/plugins/PluginPageRenderer.tsx @@ -53,7 +53,6 @@ const PluginIframe: React.FC = ({ ].filter(Boolean); if (!allowedOrigins.some(origin => event.origin.startsWith(origin))) { - console.warn('Rejected message from unauthorized origin:', event.origin); return; } @@ -84,7 +83,6 @@ const PluginIframe: React.FC = ({ break; } } catch (err) { - console.error('Error processing plugin message:', err); } }; diff --git a/frontend/src/components/providers/auth-provider.tsx b/frontend/src/components/providers/auth-provider.tsx index b369a47..427aef1 100644 --- a/frontend/src/components/providers/auth-provider.tsx +++ b/frontend/src/components/providers/auth-provider.tsx @@ -62,7 +62,6 @@ export function AuthProvider({ children }: { children: React.ReactNode }) { localStorage.setItem('token', previousToken) } } catch (error) { - console.error("Token validation failed:", error) localStorage.removeItem("access_token") localStorage.removeItem("refresh_token") } finally { diff --git a/frontend/src/components/rag/document-browser.tsx b/frontend/src/components/rag/document-browser.tsx index 0b04d17..c3e643f 100644 --- a/frontend/src/components/rag/document-browser.tsx +++ b/frontend/src/components/rag/document-browser.tsx @@ -88,7 +88,6 @@ export function DocumentBrowser({ collections, selectedCollection, onCollectionS const data = await apiClient.get(url) setDocuments(data.documents || []) } catch (error) { - console.error('Failed to load documents:', error) } finally { setLoading(false) } diff --git a/frontend/src/contexts/ModulesContext.tsx b/frontend/src/contexts/ModulesContext.tsx index c7a9270..cb3fca3 100644 --- a/frontend/src/contexts/ModulesContext.tsx +++ b/frontend/src/contexts/ModulesContext.tsx @@ -57,7 +57,6 @@ export function ModulesProvider({ children }: { children: ReactNode }) { setLastUpdated(new Date()) } catch (err) { - console.error("Error fetching modules:", err) setError(err instanceof Error ? err.message : "Failed to load modules") } finally { setIsLoading(false) diff --git a/frontend/src/contexts/PluginContext.tsx b/frontend/src/contexts/PluginContext.tsx index 6ca7416..39194ae 100644 --- a/frontend/src/contexts/PluginContext.tsx +++ b/frontend/src/contexts/PluginContext.tsx @@ -152,7 +152,6 @@ export const PluginProvider: React.FC = ({ children }) => { })); } } catch (e) { - console.warn(`Failed to load config for plugin ${plugin.id}:`, e); } } @@ -325,7 +324,6 @@ export const PluginProvider: React.FC = ({ children }) => { const data = await apiRequest(`/${pluginId}/config`); return data; } catch (err) { - console.error(`Failed to get configuration for plugin ${pluginId}:`, err); return null; } }; @@ -380,7 +378,6 @@ export const PluginProvider: React.FC = ({ children }) => { })); } } catch (chatbotError) { - console.warn('Failed to load chatbots for Zammad configuration:', chatbotError); } // Populate model options for AI settings @@ -405,7 +402,6 @@ export const PluginProvider: React.FC = ({ children }) => { schema.properties.draft_settings.properties.model.options = modelOptions; } } catch (modelError) { - console.warn('Failed to load models for Zammad configuration:', modelError); } } @@ -422,13 +418,11 @@ export const PluginProvider: React.FC = ({ children }) => { })); } } catch (modelError) { - console.warn('Failed to load models for Signal configuration:', modelError); } } return schema; } catch (err) { - console.error(`Failed to get schema for plugin ${pluginId}:`, err); return null; } }; @@ -460,7 +454,6 @@ export const PluginProvider: React.FC = ({ children }) => { })); } catch (err) { - console.error(`Failed to load components for plugin ${pluginId}:`, err); } }; diff --git a/frontend/src/hooks/use-chatbot-form.ts b/frontend/src/hooks/use-chatbot-form.ts index ea45c56..87d901d 100644 --- a/frontend/src/hooks/use-chatbot-form.ts +++ b/frontend/src/hooks/use-chatbot-form.ts @@ -63,7 +63,6 @@ export function useChatbotForm() { setChatbots(data) } catch (error) { const appError = error as AppError - console.error('Error loading chatbots:', appError) toast.error("Loading Failed", "Failed to load chatbots") } finally { setIsLoading(false) @@ -80,7 +79,6 @@ export function useChatbotForm() { return newChatbot } catch (error) { const appError = error as AppError - console.error('Error creating chatbot:', appError) if (appError.code === 'VALIDATION_ERROR') { toast.error("Validation Error", appError.details || "Please check your input") @@ -103,7 +101,6 @@ export function useChatbotForm() { return updatedChatbot } catch (error) { const appError = error as AppError - console.error('Error updating chatbot:', appError) toast.error("Update Failed", "Failed to update chatbot") throw error } finally { @@ -120,7 +117,6 @@ export function useChatbotForm() { toast.success("Success", "Chatbot deleted successfully") } catch (error) { const appError = error as AppError - console.error('Error deleting chatbot:', appError) toast.error("Deletion Failed", "Failed to delete chatbot") throw error } finally { diff --git a/frontend/src/hooks/useBudgetStatus.ts b/frontend/src/hooks/useBudgetStatus.ts index 56f8318..da7274c 100644 --- a/frontend/src/hooks/useBudgetStatus.ts +++ b/frontend/src/hooks/useBudgetStatus.ts @@ -47,7 +47,6 @@ export function useBudgetStatus(autoRefresh = true, refreshInterval = 30000) { } catch (err) { const errorMessage = err instanceof Error ? err.message : 'Unknown error occurred' setError(errorMessage) - console.error('Budget status fetch error:', err) } finally { setLoading(false) }