File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -60,10 +60,11 @@ describe("Apps class tests", () => {
60
60
} ,
61
61
} ) ;
62
62
63
- langchainToolSet . getTools ( {
63
+ const tools = await langchainToolSet . getTools ( {
64
64
actions : [ "starRepositoryCustomAction" ] ,
65
65
} ) ;
66
66
67
+ await expect ( tools . length ) . toBe ( 1 ) ;
67
68
const actionOuput = await langchainToolSet . executeAction ( {
68
69
action : "starRepositoryCustomAction" ,
69
70
params : {
Original file line number Diff line number Diff line change @@ -138,19 +138,14 @@ export class ComposioToolSet {
138
138
filterByAvailableApps : parsedFilters . filterByAvailableApps ,
139
139
} ) ;
140
140
141
- const toolsWithCustomActions = (
142
- await this . userActionRegistry . getAllActions ( )
143
- ) . filter ( ( action ) => {
144
- const { name : actionName , toolName } = action . metadata || { } ;
141
+ const customActions = await this . userActionRegistry . getAllActions ( ) ;
142
+ const toolsWithCustomActions = customActions . filter ( ( action ) => {
143
+ const { name : actionName } = action || { } ;
145
144
return (
146
145
( ! filters . actions ||
147
146
filters . actions . some (
148
147
( name ) => name . toLowerCase ( ) === actionName ?. toLowerCase ( )
149
148
) ) &&
150
- ( ! filters . apps ||
151
- filters . apps . some (
152
- ( name ) => name . toLowerCase ( ) === toolName ?. toLowerCase ( )
153
- ) ) &&
154
149
( ! filters . tags ||
155
150
filters . tags . some ( ( tag ) => tag . toLowerCase ( ) === "custom" ) )
156
151
) ;
You can’t perform that action at this time.
0 commit comments