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
import * as color from 'src/ui/colors';
import { formatCapturedError, formatTitle, interruptedMessage } from 'effect-errors/pretty-print';
import { type PrettyPrintOptions, prettyPrintOptionsDefault } from 'effect-errors/types';
import type { CapturedErrors } from './capture-errors';
export const prettyPrintFromCapturedErrors = (
{ errors, interrupted }: CapturedErrors,
options: PrettyPrintOptions = prettyPrintOptionsDefault
) => {
if (interrupted) {
return interruptedMessage;
}
const title = formatTitle(errors.length);
const formattedFailures = errors.map(formatCapturedError(errors.length, options));
const message = [...title, ...formattedFailures].join('\r\n');
return color.bgBlack(message);
};