export function formatOutgoingText(text, kind = 'system') {
    const normalized = text.trim();
    if (kind === 'assistant') {
        return `𝕏: ${normalized}`;
    }
    if (kind === 'approval') {
        return `𝕏 Shorty Needs You: ${normalized}`;
    }
    return `𝕏 Shorty Status: ${normalized}`;
}
export function extractAssistantTextFromEvent(event) {
    if (event.type !== 'session_event') {
        return undefined;
    }
    if (event.event.type !== 'message_end' || event.event.message.role !== 'assistant') {
        return undefined;
    }
    const assistantMessage = event.event.message;
    const text = assistantMessage.content
        .filter((content) => content.type === 'text')
        .map((content) => content.text)
        .join('\n')
        .trim();
    return text || undefined;
}
//# sourceMappingURL=formatting.js.map