Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Java/Openclaw/src/plugin-sdk/   (Openclaw AI Version 22©)  Datei vom 26.3.2026 mit Größe 905 B image not shown  

Quelle  tool-send.ts

  Sprache: JAVA
 

import { readStringValue } from "../shared/string-coerce.js";

export type { ChannelToolSend } from "../channels/plugins/types.public.js";

/** Extract the canonical send target fields from tool arguments when the action matches. */
export function extractToolSend(
  args: Record<string, unknown>,
  expectedAction = "sendMessage",
): { to: string; accountId?: string; threadId?: string } | null {
  const action = readStringValue(args.action)?.trim() ?? "";
  if (action !== expectedAction) {
    return null;
  }
  const to = readStringValue(args.to);
  if (!to) {
    return null;
  }
  const accountId = readStringValue(args.accountId)?.trim();
  const threadIdRaw =
    typeof args.threadId === "number"
      ? String(args.threadId)
      : (readStringValue(args.threadId)?.trim() ?? "");
  const threadId = threadIdRaw.length > 0 ? threadIdRaw : undefined;
  return { to, accountId, threadId };
}

Messung V0.5 in Prozent
C=96 H=100 G=97

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-06-10) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.