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.

Revert "refactor(cli): simplify search retry flow"

shams haroon623aee4ce93e
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 3b0dc80bd..a482f426a 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,14 +447,16 @@ const runToolsSearch = (params: {
});
const runSearchRequestWithSpinner = (forceRefresh = false) =>
- emitHuman
- ? ui.withSpinner(
- queries.length === 1
- ? `Searching tools for "${queries[0]}"...`
- : `Searching tools for ${queries.length} queries...`,
- runSearchRequest(forceRefresh)
- )
- : runSearchRequest(forceRefresh);
+ 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);
+ });
const firstSearchResult = yield* runSearchRequestWithSpinner();
const customToolkitFilters = (toolkitList ?? []).filter(isRemoteCustomToolSlug);