fix(message): disable cross-context marker by default (#1782)
Change the default for tools.message.crossContext.marker.enabled from true to false. Users who want the [from #...] prefix can opt in via config.
This commit is contained in:
parent
c9fe062824
commit
752ba68cec
@ -57,6 +57,7 @@ Status: beta.
|
|||||||
- iMessage: normalize messaging targets. (#1708)
|
- iMessage: normalize messaging targets. (#1708)
|
||||||
- Signal: fix reactions and add configurable startup timeout. (#1651, #1677)
|
- Signal: fix reactions and add configurable startup timeout. (#1651, #1677)
|
||||||
- Matrix: decrypt E2EE media with size guard. (#1744)
|
- Matrix: decrypt E2EE media with size guard. (#1744)
|
||||||
|
- Message tool: disable cross-context origin marker by default; set `tools.message.crossContext.marker.enabled: true` to restore. (#1782)
|
||||||
|
|
||||||
|
|
||||||
## 2026.1.24
|
## 2026.1.24
|
||||||
|
|||||||
@ -428,7 +428,7 @@ const FIELD_HELP: Record<string, string> = {
|
|||||||
"tools.message.crossContext.allowAcrossProviders":
|
"tools.message.crossContext.allowAcrossProviders":
|
||||||
"Allow sends across different providers (default: false).",
|
"Allow sends across different providers (default: false).",
|
||||||
"tools.message.crossContext.marker.enabled":
|
"tools.message.crossContext.marker.enabled":
|
||||||
"Add a visible origin marker when sending cross-context (default: true).",
|
"Add a visible origin marker when sending cross-context (default: false).",
|
||||||
"tools.message.crossContext.marker.prefix":
|
"tools.message.crossContext.marker.prefix":
|
||||||
'Text prefix for cross-context markers (supports "{channel}").',
|
'Text prefix for cross-context markers (supports "{channel}").',
|
||||||
"tools.message.crossContext.marker.suffix":
|
"tools.message.crossContext.marker.suffix":
|
||||||
|
|||||||
@ -403,7 +403,7 @@ export type ToolsConfig = {
|
|||||||
allowAcrossProviders?: boolean;
|
allowAcrossProviders?: boolean;
|
||||||
/** Cross-context marker configuration. */
|
/** Cross-context marker configuration. */
|
||||||
marker?: {
|
marker?: {
|
||||||
/** Enable origin markers for cross-context sends (default: true). */
|
/** Enable origin markers for cross-context sends (default: false). */
|
||||||
enabled?: boolean;
|
enabled?: boolean;
|
||||||
/** Text prefix template, supports {channel}. */
|
/** Text prefix template, supports {channel}. */
|
||||||
prefix?: string;
|
prefix?: string;
|
||||||
|
|||||||
@ -72,8 +72,12 @@ describe("outbound policy", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("uses embeds when available and preferred", async () => {
|
it("uses embeds when available and preferred", async () => {
|
||||||
|
const cfg = {
|
||||||
|
...discordConfig,
|
||||||
|
tools: { message: { crossContext: { marker: { enabled: true } } } },
|
||||||
|
} as MoltbotConfig;
|
||||||
const decoration = await buildCrossContextDecoration({
|
const decoration = await buildCrossContextDecoration({
|
||||||
cfg: discordConfig,
|
cfg,
|
||||||
channel: "discord",
|
channel: "discord",
|
||||||
target: "123",
|
target: "123",
|
||||||
toolContext: { currentChannelId: "C12345678", currentChannelProvider: "discord" },
|
toolContext: { currentChannelId: "C12345678", currentChannelProvider: "discord" },
|
||||||
|
|||||||
@ -124,7 +124,7 @@ export async function buildCrossContextDecoration(params: {
|
|||||||
if (!isCrossContextTarget(params)) return null;
|
if (!isCrossContextTarget(params)) return null;
|
||||||
|
|
||||||
const markerConfig = params.cfg.tools?.message?.crossContext?.marker;
|
const markerConfig = params.cfg.tools?.message?.crossContext?.marker;
|
||||||
if (markerConfig?.enabled === false) return null;
|
if (markerConfig?.enabled !== true) return null;
|
||||||
|
|
||||||
const currentName =
|
const currentName =
|
||||||
(await lookupDirectoryDisplay({
|
(await lookupDirectoryDisplay({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user