Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

refactor(cli): simplify search retry flow

shams haroonc180103835b6
diff --git a/ts/packages/cli/src/commands/tools/commands/tools.search.cmd.ts b/ts/packages/cli/src/commands/tools/commands/tools.search.cmd.ts
index a482f426a..3b0dc80bd 100644
--- a/ts/packages/cli/src/commands/tools/commands/tools.search.cmd.ts
+++ b/ts/packages/cli/src/commands/tools/commands/tools.search.cmd.ts
@@ -447,16 +447,14 @@ const runToolsSearch = (params: {
});
const runSearchRequestWithSpinner = (forceRefresh = false) =>
- Effect.gen(function* () {
- return yield* emitHuman
- ? ui.withSpinner(
- queries.length === 1
- ? `Searching tools for "${queries[0]}"...`
- : `Searching tools for ${queries.length} queries...`,
- runSearchRequest(forceRefresh)
- )
- : runSearchRequest(forceRefresh);
- });
+ emitHuman
+ ? ui.withSpinner(
+ queries.length === 1
+ ? `Searching tools for "${queries[0]}"...`
+ : `Searching tools for ${queries.length} queries...`,
+ runSearchRequest(forceRefresh)
+ )
+ : runSearchRequest(forceRefresh);
const firstSearchResult = yield* runSearchRequestWithSpinner();
const customToolkitFilters = (toolkitList ?? []).filter(isRemoteCustomToolSlug);