export const COPILOT_CONTEXT_WINDOW_SELECTION_OPTIONS = {
    allowCopilotLongContextFallback: true,
};
export function drainAgentMessageQueue(queue) {
    if (!queue)
        return [];
    const drained = [];
    while (queue.hasItems()) {
        drained.push(...queue.drain());
    }
    return drained;
}
export function normalizeInterruptAbortMessage(value) {
    const trimmed = value?.trim();
    return trimmed && trimmed.length > 0 ? trimmed : undefined;
}
export function isGenericAbortText(value) {
    const normalized = value.trim().toLowerCase().replace(/[.!]+$/, "");
    return (normalized === "operation aborted" ||
        normalized === "the operation was aborted" ||
        normalized === "request was aborted" ||
        normalized === "this operation was aborted" ||
        normalized === "extension custom ui aborted");
}
export function isSingleGenericAbortTextContent(content) {
    return (Array.isArray(content) &&
        content.length === 1 &&
        typeof content[0] === "object" &&
        content[0] !== null &&
        content[0].type === "text" &&
        typeof content[0].text === "string" &&
        isGenericAbortText(content[0].text));
}
export function replacementAbortContent(text) {
    return [{ type: "text", text }];
}
export const THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
export function customMessageExcludesContext(message) {
    return message.excludeFromContext === true;
}
//# sourceMappingURL=agent-session-types.js.map