Skip to content

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

Merged
merged 2 commits into from
May 16, 2025
Merged

Conversation

Douglasymlai
Copy link
Collaborator

No description provided.

@Douglasymlai Douglasymlai requested a review from Copilot May 16, 2025 12:30
Copy link

@Copilot Copilot AI left a 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 />

Comment on lines +58 to +71
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]);
Copy link
Preview

Copilot AI May 16, 2025

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.

Suggested change
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.

@Douglasymlai Douglasymlai merged commit ae843c8 into main May 16, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant