@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
20 lines • 1.19 kB
TypeScript
import type { ImageContent, TextContent } from "@earendil-works/pi-ai";
import type { ToolResultUserWord } from "../../../tool-result-user-words.ts";
/**
* Where an answer's own words go (senpi#2920): inline for people (hooks, the transcript card), or
* out of the model-facing text behind a reference that names the label block they follow, so they
* reach the model as a user turn and never inside a tool result or beside a harness label.
*/
export interface WordPlacement {
comment(text: string): string;
typed(header: string, text: string): string;
}
export declare const INLINE_WORDS: WordPlacement;
export declare function separatedWords(requestId: string): WordPlacement & {
readonly words: ToolResultUserWord[];
};
/** Puts each word back where its reference stands, for display. */
export declare function resolveUserWordReferences(text: string, words: readonly ToolResultUserWord[]): string;
/** The label and word blocks after a later answer's frame block, as `userWordBlocks` wrote them. */
export declare function readUserWordBlocks(content: readonly (TextContent | ImageContent)[]): ToolResultUserWord[] | undefined;
//# sourceMappingURL=user-words.d.ts.map