@@ -24,6 +24,7 @@ const {
2424 mockRateLimiterFns,
2525 mockGetCustomToolById,
2626 mockListCustomTools,
27+ mockGetCustomToolByIdOrTitle,
2728} = vi . hoisted ( ( ) => ( {
2829 mockIsHosted : { value : false } ,
2930 mockEnv : { NEXT_PUBLIC_APP_URL : 'http://localhost:3000' } as Record < string , string | undefined > ,
@@ -36,6 +37,7 @@ const {
3637 } ,
3738 mockGetCustomToolById : vi . fn ( ) ,
3839 mockListCustomTools : vi . fn ( ) ,
40+ mockGetCustomToolByIdOrTitle : vi . fn ( ) ,
3941} ) )
4042
4143// Mock feature flags
@@ -225,6 +227,7 @@ vi.mock('@/hooks/queries/utils/custom-tool-cache', () => {
225227vi . mock ( '@/lib/workflows/custom-tools/operations' , ( ) => ( {
226228 getCustomToolById : mockGetCustomToolById ,
227229 listCustomTools : mockListCustomTools ,
230+ getCustomToolByIdOrTitle : mockGetCustomToolByIdOrTitle ,
228231} ) )
229232
230233vi . mock ( '@/tools/utils.server' , async ( importOriginal ) => {
@@ -320,7 +323,7 @@ describe('Custom Tools', () => {
320323 } )
321324
322325 it ( 'resolves custom tools through the async helper' , async ( ) => {
323- mockGetCustomToolById . mockResolvedValue ( {
326+ mockGetCustomToolByIdOrTitle . mockResolvedValue ( {
324327 id : 'remote-tool-123' ,
325328 title : 'Custom Weather Tool' ,
326329 schema : {
0 commit comments