Skip to content

armgit / pibot

Public Imported from GitHub
0

Open-source, local-first AI agent team for your desktop: multi-agent group chats, computer use, browser, MCP, routines and approvals. macOS, Windows, Linux + Android. Built on pi.

421 B
Raw Blame
/** Redact before shortening: a truncation must not cut a known credential before matching it. */
export function focusValueText(
  value: string | undefined,
  redactor: { redact(text: string): string },
) {
  if (value === undefined) return "";
  const safe = redactor.redact(value);
  return `\nUntrusted focused value / 不可信焦点值: ${JSON.stringify(safe.length > 500 ? `${safe.slice(0, 499)}…` : safe)}`;
}