-
Notifications
You must be signed in to change notification settings - Fork 1
Add camel tools into mcp servers and update new header #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
update camel tool and header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for Camel tools in MCP servers and updates the header component for improved layout and filtering.
- Updated JSON configuration for Camel tools under public/servers/camel.json
- Added a swipe card component in components/swipe.card.tsx and integrated it in components/header.tsx
- Introduced a new “pink” badge variant and updated filter options in app/page.tsx
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
public/servers/camel.json | Updated server configuration for Camel toolkits with new keys, args, and env |
components/swipe.card.tsx | Added a new swipe card component for blog card display and auto-rotation logic |
components/header.tsx | Refactored header layout and integrated swipe card component |
components/badge.tsx | Added a new "pink" variant for badges |
app/page.tsx | Updated filter options and added Camel-specific UI elements |
Comments suppressed due to low confidence (1)
components/header.tsx:29
- [nitpick] The default exported component in swipe.card.tsx is named 'SwipeCards', but it is imported and used as 'SwipeCard' here; consider renaming it for consistency and clarity.
<SwipeCard />
if (cards.length > 0) { | ||
setCards(prevCards => { | ||
const newCards = [...prevCards]; | ||
const lastCard = newCards.pop(); | ||
if (lastCard) { | ||
newCards.unshift(lastCard); | ||
} | ||
return newCards; | ||
}); | ||
} | ||
}, 10000); | ||
|
||
return () => clearInterval(interval); | ||
}, [cards]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The useEffect hook for auto-rotating cards depends on 'cards', which causes the interval to be recreated with every update. Consider using an empty dependency array along with a functional updater to minimize unnecessary interval resets.
if (cards.length > 0) { | |
setCards(prevCards => { | |
const newCards = [...prevCards]; | |
const lastCard = newCards.pop(); | |
if (lastCard) { | |
newCards.unshift(lastCard); | |
} | |
return newCards; | |
}); | |
} | |
}, 10000); | |
return () => clearInterval(interval); | |
}, [cards]); | |
setCards(prevCards => { | |
if (prevCards.length === 0) return prevCards; | |
const newCards = [...prevCards]; | |
const lastCard = newCards.pop(); | |
if (lastCard) { | |
newCards.unshift(lastCard); | |
} | |
return newCards; | |
}); | |
}, 10000); | |
return () => clearInterval(interval); | |
}, []); |
Copilot uses AI. Check for mistakes.
No description provided.