You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request includes significant refactoring and improvements to the codebase, focusing on updating API endpoints, improving error handling, and enhancing test coverage. The most important changes include the removal of deprecated API calls, the introduction of a new error handling mechanism, and the refactoring of service classes to use updated endpoints. ### API Refactoring: * Removed deprecated API calls in `src/api/index.ts` and updated the corresponding service classes to use new endpoints. (`[[1]](diffhunk://#diff-764761d79ed791ea154187526b088322dba3bebe94f9d38ab22120554aba77c7L1-L28)`, `[[2]](diffhunk://#diff-9dd13b51c673219aa9d6fb02c8bc1100134172df11c9c69008b0b299c0b3d53fR28-R39)`, `[[3]](diffhunk://#diff-9dd13b51c673219aa9d6fb02c8bc1100134172df11c9c69008b0b299c0b3d53fL47-R58)`, `[[4]](diffhunk://#diff-cd77df0f49406951d1fac5878b9dbaedda26efdcfdf299051c8efa5b820c22fcL10-R10)`, `[[5]](diffhunk://#diff-ebf1d939d609a4816004caf5632789818db419201d7af8b12e6123dcfd0b995dL6-R10)`) ### Error Handling: * Introduced a new error handling mechanism using `useCallback` in `ChatContainer.tsx` to centralize error notifications. (`[[1]](diffhunk://#diff-c0bfccaf03a29a5059f6a47c6dd2cdd194fcb1e06fe8e0e188d700a86204f073R27-R36)`, `[[2]](diffhunk://#diff-c0bfccaf03a29a5059f6a47c6dd2cdd194fcb1e06fe8e0e188d700a86204f073L53-R63)`, `[[3]](diffhunk://#diff-c0bfccaf03a29a5059f6a47c6dd2cdd194fcb1e06fe8e0e188d700a86204f073L71-R73)`) ### Test Coverage: * Refactored tests in `ChatContainer.test.tsx` and `ToolsModal.test.tsx` to mock the updated service classes and ensure proper test isolation. (`[[1]](diffhunk://#diff-5bc04b73d213740634c14cc7f3b8c028d08edba97c1c08197b8ed348a3112d47L29-L35)`, `[[2]](diffhunk://#diff-5bc04b73d213740634c14cc7f3b8c028d08edba97c1c08197b8ed348a3112d47L98-L103)`, `[[3]](diffhunk://#diff-5403659b7ee64a58dcfa7026e4f58e57a731ed7d0cd222e7c4391912bd6d10afL1-R79)`, `[[4]](diffhunk://#diff-5403659b7ee64a58dcfa7026e4f58e57a731ed7d0cd222e7c4391912bd6d10afL74-R93)`) ### Component Updates: * Updated `ToolsModal.tsx` and `Sidebar.tsx` components to use the refactored service classes for fetching data. (`[[1]](diffhunk://#diff-63552adfc136b5745280f1413214afb454e46b6558a54e0ac1a62d3076779256L5-R6)`, `[[2]](diffhunk://#diff-63552adfc136b5745280f1413214afb454e46b6558a54e0ac1a62d3076779256L21-R23)`, `[[3]](diffhunk://#diff-63552adfc136b5745280f1413214afb454e46b6558a54e0ac1a62d3076779256L33)`, `[[4]](diffhunk://#diff-5f3a5cc0c274c553bf7e5a260f594f138c16fd5197e1555cb608f862f0120f1cL4-R9)`, `[[5]](diffhunk://#diff-5f3a5cc0c274c553bf7e5a260f594f138c16fd5197e1555cb608f862f0120f1cL36-R38)`) These changes collectively improve the maintainability, reliability, and testability of the codebase.
0 commit comments