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

Quelle  welcome-card.ts

  Sprache: JAVA
 

/**
 * Builds an Adaptive Card for welcoming users when the bot is added to a conversation.
 */


const DEFAULT_PROMPT_STARTERS = [
  "What can you do?",
  "Summarize my last meeting",
  "Help me draft an email",
];

export type WelcomeCardOptions = {
  /** Bot display name. Falls back to "OpenClaw". */
  botName?: string;
  /** Custom prompt starters. Falls back to defaults. */
  promptStarters?: string[];
};

/**
 * Build a welcome Adaptive Card for 1:1 personal chats.
 */

export function buildWelcomeCard(options?: WelcomeCardOptions): Record<string, unknown> {
  const botName = options?.botName || "OpenClaw";
  const starters = options?.promptStarters?.length
    ? options.promptStarters
    : DEFAULT_PROMPT_STARTERS;

  return {
    type: "AdaptiveCard",
    version: "1.5",
    body: [
      {
        type: "TextBlock",
        text: `Hi! I'm ${botName}.`,
        weight: "bolder",
        size: "medium",
      },
      {
        type: "TextBlock",
        text: "I can help you with questions, tasks, and more. Here are some things to try:",
        wrap: true,
      },
    ],
    actions: starters.map((label) => ({
      type: "Action.Submit",
      title: label,
      data: { msteams: { type: "imBack", value: label } },
    })),
  };
}

/**
 * Build a brief welcome message for group chats (when the bot is @mentioned).
 */

export function buildGroupWelcomeText(botName?: string): string {
  const name = botName || "OpenClaw";
  return `Hi! I'm ${name}. Mention me with @${name} to get started.`;
}

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

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-05-26) ¤

*© 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.