Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
refactor(cli): use typed error check instead of re-inspecting slug for no-connection tips
jkomyno99a3e998d0de
diff --git a/ts/packages/cli/src/commands/tools/commands/tools.execute.cmd.ts b/ts/packages/cli/src/commands/tools/commands/tools.execute.cmd.tsindex 87df8622c..ebcd238b1 100644--- a/ts/packages/cli/src/commands/tools/commands/tools.execute.cmd.ts+++ b/ts/packages/cli/src/commands/tools/commands/tools.execute.cmd.ts@@ -9,7 +9,6 @@ import { requireAuth } from 'src/effects/require-auth';import { TerminalUI } from 'src/services/terminal-ui';import {ActionExecuteConnectedAccountNotFoundError,- isNoConnectionSlug,ToolsExecutor,} from 'src/services/tools-executor';import type { ToolExecuteParams } from 'src/services/tools-executor';@@ -210,8 +209,10 @@ const handleExecutionError = (yield* ui.note(formatUnknownObject(redactRequestId(detailsObject)), 'Error details');}- // No-connection tips — show for both legacy and Tool Router error slugs- if (isNoConnectionSlug(slugValue)) {+ // No-connection tips — the executor already classifies these into+ // ActionExecuteConnectedAccountNotFoundError, so check the typed error+ // instead of re-inspecting the slug.+ if (normalized instanceof ActionExecuteConnectedAccountNotFoundError) {yield* ui.note(connectionTips(context.toolSlug, context.userId), 'Tips');}