diff --git a/extensions/discord/src/monitor/thread-title.generate.test.ts b/extensions/discord/src/monitor/thread-title.generate.test.ts index 2d8c5320881..6a5346116d2 100644 --- a/extensions/discord/src/monitor/thread-title.generate.test.ts +++ b/extensions/discord/src/monitor/thread-title.generate.test.ts @@ -72,7 +72,7 @@ describe("generateThreadTitle", () => { userMessage: "Channel: release-status\n\nChannel description: Deploy updates and incident notes\n\nMessage:\nSummarize deployment blockers and owner follow-ups.", prompt: - "Generate a concise Discord thread title (3-6 words). Return only the title. Use channel context when provided and avoid redundant channel-name words unless needed for clarity.", + "Generate a concise Discord thread title (3-6 words) in sentence case: capitalize only the first word and words that are always capitalized. Return only the title. Use channel context when provided and avoid redundant channel-name words unless needed for clarity.", modelRef: "openai/gpt-4.1-mini@local", timeoutMs: 60_000, maxLength: 600, diff --git a/extensions/discord/src/monitor/thread-title.ts b/extensions/discord/src/monitor/thread-title.ts index a3b7146b454..78a3b15d457 100644 --- a/extensions/discord/src/monitor/thread-title.ts +++ b/extensions/discord/src/monitor/thread-title.ts @@ -9,7 +9,7 @@ const MAX_THREAD_TITLE_SOURCE_CHARS = 600; const MAX_THREAD_TITLE_CHANNEL_NAME_CHARS = 120; const MAX_THREAD_TITLE_CHANNEL_DESCRIPTION_CHARS = 320; const DISCORD_THREAD_TITLE_SYSTEM_PROMPT = - "Generate a concise Discord thread title (3-6 words). Return only the title. Use channel context when provided and avoid redundant channel-name words unless needed for clarity."; + "Generate a concise Discord thread title (3-6 words) in sentence case: capitalize only the first word and words that are always capitalized. Return only the title. Use channel context when provided and avoid redundant channel-name words unless needed for clarity."; export async function generateThreadTitle(params: { cfg: OpenClawConfig; diff --git a/extensions/telegram/src/auto-topic-label-config.ts b/extensions/telegram/src/auto-topic-label-config.ts index 37ef18d4d86..155346a5037 100644 --- a/extensions/telegram/src/auto-topic-label-config.ts +++ b/extensions/telegram/src/auto-topic-label-config.ts @@ -5,7 +5,7 @@ import type { } from "openclaw/plugin-sdk/config-contracts"; const AUTO_TOPIC_LABEL_DEFAULT_PROMPT = - "Generate a very short topic label (2-4 words, max 25 chars) for a chat conversation based on the user's first message below. No emoji. Use the same language as the message. Be concise and descriptive. Return ONLY the topic name, nothing else."; + "Generate a very short topic label (2-4 words, max 25 chars) for a chat conversation based on the user's first message below. No emoji. Use the same language as the message, in sentence case: capitalize only the first word and words that language always capitalizes. Be concise and descriptive. Return ONLY the topic name, nothing else."; export function resolveAutoTopicLabelConfig( directConfig?: TelegramDirectConfig["autoTopicLabel"], diff --git a/extensions/telegram/src/auto-topic-label.test.ts b/extensions/telegram/src/auto-topic-label.test.ts index b0ee74d2d22..b90f01c055d 100644 --- a/extensions/telegram/src/auto-topic-label.test.ts +++ b/extensions/telegram/src/auto-topic-label.test.ts @@ -11,7 +11,7 @@ import { resolveAutoTopicLabelConfig } from "./auto-topic-label-config.js"; import { generateTelegramTopicLabel } from "./auto-topic-label.js"; const EXPECTED_DEFAULT_PROMPT = - "Generate a very short topic label (2-4 words, max 25 chars) for a chat conversation based on the user's first message below. No emoji. Use the same language as the message. Be concise and descriptive. Return ONLY the topic name, nothing else."; + "Generate a very short topic label (2-4 words, max 25 chars) for a chat conversation based on the user's first message below. No emoji. Use the same language as the message, in sentence case: capitalize only the first word and words that language always capitalizes. Be concise and descriptive. Return ONLY the topic name, nothing else."; describe("resolveAutoTopicLabelConfig", () => { it("returns enabled with default prompt when configs are undefined", () => { diff --git a/src/gateway/dashboard-session-title.test.ts b/src/gateway/dashboard-session-title.test.ts index 6be4c1f3231..d96e237cbb3 100644 --- a/src/gateway/dashboard-session-title.test.ts +++ b/src/gateway/dashboard-session-title.test.ts @@ -75,7 +75,7 @@ describe("maybeGenerateDashboardSessionTitle", () => { expect(generateConversationLabelWithFallback).toHaveBeenCalledWith({ userMessage: "Help me plan the release", prompt: - "Generate a concise session title (3-6 words, max 60 characters) from the user's first message. Use the same language as the message. No emoji. Return only the title.", + "Generate a concise session title (3-6 words, max 60 characters) from the user's first message. Use the same language as the message, in sentence case: capitalize only the first word and words that language always capitalizes. No emoji. Return only the title.", cfg, agentId: "main", utilityModelRef: "openai/gpt-5.6-luna", diff --git a/src/gateway/dashboard-session-title.ts b/src/gateway/dashboard-session-title.ts index 04721edb8ec..3aa8984091f 100644 --- a/src/gateway/dashboard-session-title.ts +++ b/src/gateway/dashboard-session-title.ts @@ -30,7 +30,7 @@ type DashboardSessionTitleModelEntry = Pick< const DASHBOARD_SESSION_TITLE_MAX_CHARS = 60; const DASHBOARD_SESSION_TITLE_SOURCE_MAX_CHARS = 1_000; const DASHBOARD_SESSION_TITLE_PROMPT = - "Generate a concise session title (3-6 words, max 60 characters) from the user's first message. Use the same language as the message. No emoji. Return only the title."; + "Generate a concise session title (3-6 words, max 60 characters) from the user's first message. Use the same language as the message, in sentence case: capitalize only the first word and words that language always capitalizes. No emoji. Return only the title."; // One title request per session generation. Concurrent triggers cannot race duplicate model // calls or metadata writes; late callers receive the in-flight promise so they