"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.emitThinkingEvents = emitThinkingEvents;
exports.emitSayingEvents = emitSayingEvents;
async function emitThinkingEvents(dlg, content, reasoning, providerData) {
    const hasContent = content.trim().length > 0;
    if (!hasContent && reasoning === undefined && providerData === undefined)
        return;
    await dlg.thinkingStart();
    if (hasContent) {
        await dlg.thinkingChunk(content);
    }
    await dlg.thinkingFinish(reasoning, providerData);
}
async function emitSayingEvents(dlg, content) {
    if (!content.trim())
        return;
    await dlg.markdownStart();
    await dlg.markdownChunk(content);
    await dlg.markdownFinish();
}
