import type { AgentToolCall, BaseToolCall, PendingToolCallInfo } from "./ToolCallDisplay";
/**
 * Strip the approval-status suffixes the agent transcript appends to a tool
 * call's function name. Lives here (not in AiResponseMessage) so ApprovalCard
 * can use it without an import cycle.
 */
export declare function cleanToolFunctionName(name?: string): string;
/**
 * Return the pending approvals that belong to this message group, i.e. the
 * intersection of the session-wide pending list with the group's tool-call
 * ids, preserving `allPendingApprovals` order. The approval card renders (and
 * acts) on exactly this group-local set, so a card can never appear on a
 * historical group whose tool calls are all resolved.
 */
export declare function selectGroupPendingApprovals(toolCalls: (BaseToolCall | AgentToolCall)[] | undefined, allPendingApprovals: PendingToolCallInfo[]): PendingToolCallInfo[];
/**
 * Decide whether a message group's batch-approval bar should be shown.
 *
 * The bar's visibility MUST agree with the session-wide pending count it
 * renders. That count comes from `selectPendingApprovals`
 * (see agentSessionSelectors.ts), which excludes any tool call that has already
 * completed (`isCompleted`) or been resolved. By deriving "does this group have
 * a pending approval?" from that same `allPendingApprovals` list — instead of
 * re-inspecting local tool-call fields — the gate and the count can never
 * diverge.
 *
 * The previous heuristic (`requiresApproval` set AND name lacking
 * "(approved)"/"(rejected)") ignored completion, so a tool call that finished
 * via any path other than a local Approve click — autonomous mode, an
 * auto-approve policy, server-side/other-tab execution, or a run resync — kept
 * its sticky `requiresApproval` metadata and its un-renamed function name. That
 * made the gate fire while the count was 0, leaking an empty
 * "Approve All (0)" / "Reject All (0)" bar onto an already-finished tool call.
 */
export declare function groupHasPendingApproval(toolCalls: (BaseToolCall | AgentToolCall)[] | undefined, allPendingApprovals: PendingToolCallInfo[]): boolean;
