@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
22 lines • 810 B
JavaScript
import { buildNoticeBox } from "./box.js";
/**
* Adapt a NoticeSpec mapper into a MessageRenderer for custom messages
* (model-facing notices such as loop-guard detections).
*/
export function noticeMessageRenderer(map) {
return (message, options, theme) => {
const spec = map(message);
return spec === undefined ? undefined : buildNoticeBox(spec, options, theme);
};
}
/**
* Adapt a NoticeSpec mapper into an EntryRenderer for durable custom entries
* (display-only records such as ttsr injections; entries never reach the LLM).
*/
export function noticeEntryRenderer(map) {
return (entry, options, theme) => {
const spec = map(entry);
return spec === undefined ? undefined : buildNoticeBox(spec, options, theme);
};
}
//# sourceMappingURL=adapters.js.map