petercat-ai / petercat

A conversational Q&A agent configuration system, self-hosted deployment solutions, and a convenient all-in-one application SDK, allowing you to create intelligent Q&A bots for your GitHub repositories
https://petercat.ai
MIT License
598 stars 16 forks source link

fix(mybotdeploymodal): fix bug of incorrect useMemo dependency usage #428

Closed ch-liuzhide closed 1 month ago

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
petercat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 11, 2024 10:24am
petercat-assistant[bot] commented 1 month ago

Walkthrough

This pull request addresses a bug related to the incorrect usage of useMemo dependencies in the DeployBotModal component. The changes ensure that default values are not assigned unnecessarily, and nullish coalescing is used to handle potential undefined values. Additionally, a minor correction in the API endpoint URL is made.

Changes

File Summary
client/app/factory/edit/components/DeployBotModal/index.tsx Removed default empty array assignments and added nullish coalescing for peterCatBotRepos.
client/app/hooks/useBot.ts Removed unnecessary comma in the enabled property.
client/app/services/BotsController.ts Corrected the API endpoint URL from /repos_installed_app to /repos_installed_app1.