import { type Spinner } from "../../runHandler.js"; import type { LocalToolApproval } from "../harness/turn.js"; /** * Greedy wrap on spaces. A word longer than the width keeps its own line * rather than being cut mid-token. * * Exported for tests. */ export declare function wrapLine(text: string, width: number): string[]; export declare function showStep(label: string, body: string): void; /** * Slash help / notes — finished step like the palette: * ◇ /help * │ … */ export declare function showCard(body: string): void; /** * Finished user turn — message on the diamond, like the palette's * `◇ ask hey --continue`. No "You" label. */ export declare function showUserTurn(body: string): void; export type LiveAssistantTurn = { buffer: string; paintedLines: number; /** * The question being typed while this reply streams, drawn under it. * * It cannot live on the spinner: the first text delta stops the spinner and * opens this block, and raw mode means the terminal is not echoing. Without * it here, the one moment type-ahead is most obviously in use — typing over * a reply as it arrives — is the one moment nothing appears on screen. */ footer: string; }; /** Rail gap, then an empty marker line ready for deltas. */ export declare function beginAssistantTurn(): LiveAssistantTurn; export declare function appendAssistantDelta(live: LiveAssistantTurn, delta: string): void; /** Show, change or remove the question being typed over this reply. */ export declare function setAssistantFooter(live: LiveAssistantTurn, footer: string): void; /** Trailing rail gap before the next user turn / ◆ prompt. */ export declare function endAssistantTurn(live: LiveAssistantTurn): void; /** * Finished assistant turn — same tree as a user step, with `■` instead of `◇`. */ export declare function showAssistantTurn(body: string): void; export declare function describeToolActivity(toolName: string, summary: string): string; /** * A tool that has finished, left in the transcript. * * The spinner shows what is running, but it is one line that is overwritten * and then cleared, so once a turn is over there is no record of what it did — * only the prose describing it. A turn that read four files and ran two * commands should say so afterwards, the way the approval prompt does for the * tools it happened to ask about. * * Written through the spinner's `log` when one is up, which wipes the spinner * line, leaves this behind, and lets the next frame redraw underneath. */ export declare function showToolRun(input: { spinner: Spinner | undefined; toolName: string; summary: string; isError: boolean; }): void; /** * A path inside the session directory reads better relative to it; anything * outside stays absolute so it is obvious the turn left the project. * * Exported for tests. */ export declare function displayPath(path: string, dir: string): string; /** * Closing step for a turn that edited the working copy, so a reply that says * "done" is backed by the list of files it touched. */ export declare function showTouchedFiles(paths: ReadonlySet, dir: string): void; /** * Side notes from a turn — a chat-history save that failed, say. They are not * part of the reply, so they land after it rather than inside it. */ export declare function showNotices(notices: string[]): void; /** * Local Claude Code runs against the user's own working copy, so anything * beyond a read is confirmed before it happens: * * ◆ Run Bash: npm test? * │ ● Yes … */ export declare function askToolApproval(approval: LocalToolApproval): Promise<"yes" | "always" | "no">; /** * Claude Code's question picker, in this session's tree. Each question is one * `selectOne` — the same prompt as a tool approval, so the rail stays intact. * * Multi-select is flattened to one pick: this terminal can only answer one * row at a time, and a comma-joined bag of labels is worse than the one the * user actually chose. */ export declare function askUserQuestions(toolInput: unknown): Promise | undefined>; //# sourceMappingURL=tree.d.ts.map