Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/JAVA/Openclaw/extensions/feishu/src/   (KI Agentensystem Version 22©)  Datei vom 26.3.2026 mit Größe 1 kB image not shown  

Quelle  comment-target.ts

  Sprache: JAVA
 

Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

export const FEISHU_COMMENT_FILE_TYPES = ["doc", "docx", "file", "sheet", "slides"] as const;

export type CommentFileType = (typeof FEISHU_COMMENT_FILE_TYPES)[number];

export function normalizeCommentFileType(value: unknown): CommentFileType | undefined {
  return typeof value === "string" &&
    (FEISHU_COMMENT_FILE_TYPES as readonly string[]).includes(value)
    ? (value as CommentFileType)
    : undefined;
}

export type FeishuCommentTarget = {
  fileType: CommentFileType;
  fileToken: string;
  commentId: string;
};

export function buildFeishuCommentTarget(params: FeishuCommentTarget): string {
  return `comment:${params.fileType}:${params.fileToken}:${params.commentId}`;
}

export function parseFeishuCommentTarget(
  raw: string | undefined | null,
): FeishuCommentTarget | null {
  const trimmed = raw?.trim();
  if (!trimmed?.startsWith("comment:")) {
    return null;
  }
  const parts = trimmed.split(":");
  if (parts.length !== 4) {
    return null;
  }
  const fileType = normalizeCommentFileType(parts[1]);
  const fileToken = parts[2]?.trim();
  const commentId = parts[3]?.trim();
  if (!fileType || !fileToken || !commentId) {
    return null;
  }
  return {
    fileType,
    fileToken,
    commentId,
  };
}

¤ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet am  2026-04-27) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.