File tree 2 files changed +8
-4
lines changed
app/components/app/configuration
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -625,13 +625,14 @@ const Configuration: FC = () => {
625
625
tools : modelConfig . agent_mode ?. tools . filter ( ( tool : any ) => {
626
626
return ! tool . dataset
627
627
} ) . map ( ( tool : any ) => {
628
+ const toolInCollectionList = collectionList . find ( c => tool . provider_id === c . id )
628
629
return {
629
630
...tool ,
630
631
isDeleted : res . deleted_tools ?. some ( ( deletedTool : any ) => deletedTool . id === tool . id && deletedTool . tool_name === tool . tool_name ) ,
631
- notAuthor : collectionList . find ( c => tool . provider_id === c . id ) ?. is_team_authorization === false ,
632
+ notAuthor : toolInCollectionList ?. is_team_authorization === false ,
632
633
...( tool . provider_type === 'builtin' ? {
633
- provider_id : correctToolProvider ( tool . provider_name ) ,
634
- provider_name : correctToolProvider ( tool . provider_name ) ,
634
+ provider_id : correctToolProvider ( tool . provider_name , ! ! toolInCollectionList ) ,
635
+ provider_name : correctToolProvider ( tool . provider_name , ! ! toolInCollectionList ) ,
635
636
} : { } ) ,
636
637
}
637
638
} ) ,
Original file line number Diff line number Diff line change @@ -69,10 +69,13 @@ export const correctModelProvider = (provider: string) => {
69
69
return `langgenius/${ provider } /${ provider } `
70
70
}
71
71
72
- export const correctToolProvider = ( provider : string ) => {
72
+ export const correctToolProvider = ( provider : string , toolInCollectionList ?: boolean ) => {
73
73
if ( ! provider )
74
74
return ''
75
75
76
+ if ( toolInCollectionList )
77
+ return provider
78
+
76
79
if ( provider . includes ( '/' ) )
77
80
return provider
78
81
You can’t perform that action at this time.
0 commit comments