Merge 752ba68cec into 4583f88626
This commit is contained in:
commit
b5d2b94e68
@ -58,6 +58,7 @@ Status: beta.
|
||||
- iMessage: normalize messaging targets. (#1708)
|
||||
- Signal: fix reactions and add configurable startup timeout. (#1651, #1677)
|
||||
- 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
|
||||
|
||||
@ -428,7 +428,7 @@ const FIELD_HELP: Record<string, string> = {
|
||||
"tools.message.crossContext.allowAcrossProviders":
|
||||
"Allow sends across different providers (default: false).",
|
||||
"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":
|
||||
'Text prefix for cross-context markers (supports "{channel}").',
|
||||
"tools.message.crossContext.marker.suffix":
|
||||
|
||||
@ -403,7 +403,7 @@ export type ToolsConfig = {
|
||||
allowAcrossProviders?: boolean;
|
||||
/** Cross-context marker configuration. */
|
||||
marker?: {
|
||||
/** Enable origin markers for cross-context sends (default: true). */
|
||||
/** Enable origin markers for cross-context sends (default: false). */
|
||||
enabled?: boolean;
|
||||
/** Text prefix template, supports {channel}. */
|
||||
prefix?: string;
|
||||
|
||||
@ -72,8 +72,12 @@ describe("outbound policy", () => {
|
||||
});
|
||||
|
||||
it("uses embeds when available and preferred", async () => {
|
||||
const cfg = {
|
||||
...discordConfig,
|
||||
tools: { message: { crossContext: { marker: { enabled: true } } } },
|
||||
} as MoltbotConfig;
|
||||
const decoration = await buildCrossContextDecoration({
|
||||
cfg: discordConfig,
|
||||
cfg,
|
||||
channel: "discord",
|
||||
target: "123",
|
||||
toolContext: { currentChannelId: "C12345678", currentChannelProvider: "discord" },
|
||||
|
||||
@ -124,7 +124,7 @@ export async function buildCrossContextDecoration(params: {
|
||||
if (!isCrossContextTarget(params)) return null;
|
||||
|
||||
const markerConfig = params.cfg.tools?.message?.crossContext?.marker;
|
||||
if (markerConfig?.enabled === false) return null;
|
||||
if (markerConfig?.enabled !== true) return null;
|
||||
|
||||
const currentName =
|
||||
(await lookupDirectoryDisplay({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user