Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 22:15 UTC
refactor(cli): drop unused generic from resolveConnectedAccountSelection
`resolveConnectedAccountSelection<T extends SelectableConnectedAccount>` returned `T | undefined` to preserve the input narrowing, but no caller relies on the narrowed type — `listen.cmd.ts:141` and `tools.execute.cmd.ts:947` both feed the result through generic Pick shapes. Drop the type parameter and take/return the wider type directly. Addresses code-simplicity review of PR #3344 (P2#3).
jkomyno committed
May 7, 2026 at 10:48 UTC
c1a5cdef0ce96d215f08d42c60a99f9b9b13f231
1 file changed
+3
-3
ts/packages/cli/src/services/connected-account-selection.ts
+3
-3
@@ -104,10 +104,10 @@ export const resolveDefaultConnectedAccountsByToolkit = (
104
);
105
};
106
107
-export const resolveConnectedAccountSelection = <T extends SelectableConnectedAccount>(
108
- items: ReadonlyArray<T>,
107
+export const resolveConnectedAccountSelection = (
108
+ items: ReadonlyArray<SelectableConnectedAccount>,
109
selector?: string
110
-): T | undefined => {
110
+): SelectableConnectedAccount | undefined => {
111
const usable = items.filter(isUsableConnectedAccount).sort(compareNewestFirst);
112
if (usable.length === 0) return undefined;
113