UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

13 lines • 761 B
import { currentShareRedactionContext, redactShareText } from "./share-redaction.js"; /** * The redaction for any text an extension sends off this machine (#3674). It is the `/share` redactor itself * (`redactShareText`, #3524) with this machine's identity, so there is exactly one set of rules. */ export function redactForUpload(text, options = {}) { const tally = new Map(); const context = currentShareRedactionContext(); const extra = (options.extraLiterals ?? []).filter((value) => value.trim().length > 0); const redacted = redactShareText(text, extra.length === 0 ? context : { ...context, extraLiterals: extra }, tally); return { text: redacted, counts: Object.fromEntries(tally) }; } //# sourceMappingURL=upload-redaction.js.map