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

next
ts 11 lines 466 Bytes
Raw
1 import { isDeprecationNotice } from '@composio/client/effect';
2 import { Logger } from 'effect';
3
4 /**
5 * Drops the API client's deprecation notices, which CLI users cannot act on,
6 * and passes every other record to `logger`.
7 */
8 export const withoutClientNotices = <Message, Output>(
9 logger: Logger.Logger<Message, Output>
10 ): Logger.Logger<Message, Output | undefined> =>
11 Logger.make(options => (isDeprecationNotice(options) ? undefined : logger.log(options)));