惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
J
Java Code Geeks
爱范儿
爱范儿
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 三生石上(FineUI控件)
H
Hackread – Cybersecurity News, Data Breaches, AI and More
B
Blog RSS Feed
Google DeepMind News
Google DeepMind News
Jina AI
Jina AI
The GitHub Blog
The GitHub Blog
I
InfoQ
月光博客
月光博客
博客园 - 聂微东
博客园 - Franky
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
博客园_首页
G
Google Developers Blog
Blog — PlanetScale
Blog — PlanetScale
L
LangChain Blog
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: preserve discord unicode channel labels · openclaw/o...
steipete · 2026-05-02 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -37,6 +37,7 @@ Docs: https://docs.openclaw.ai

3737

- Proxy/audio: convert standard `FormData` bodies before proxy-backed undici fetches, so audio transcription and multipart uploads no longer send `[object FormData]` when `HTTP_PROXY` or `HTTPS_PROXY` is configured. Fixes #48554. Thanks @dco5.

3838

- Discord: allow explicitly configured ack reactions in tool-only guild channels while keeping automatic lifecycle/status reactions suppressed. Fixes #74922. Thanks @samvilian and @BlueBirdBack.

3939

- Discord: preserve attachment and sticker filenames when saving inbound media, so agents can see human-readable file names instead of only UUID-based paths. Fixes #59744. Thanks @xela92 and @rockcent.

40+

- Discord: preserve non-ASCII channel names in session display labels while keeping allowlist matching on the existing ASCII slug contract. Thanks @swjeong9.

4041

- Gateway/diagnostics: include a bounded redacted startup error message in stability bundles, so crash-loop reports identify the failing plugin or contract without exposing secrets. Refs #75797. Thanks @ymebosma.

4142

- Gateway/pricing: abort in-flight model pricing catalog fetches when Gateway shutdown stops the refresh loop, and avoid post-stop cache writes or refresh timers. Fixes #72208. Thanks @rzcq.

4243

- Codex/app-server: make startup retry cleanup ownership-aware so concurrent Codex lanes cannot close another lane's freshly restarted shared app-server client. Thanks @vincentkoc.

Original file line numberDiff line numberDiff line change

@@ -8,7 +8,7 @@ import {

88

type ComponentInteractionContext,

99

type DiscordChannelContext,

1010

} from "./agent-components.types.js";

11-

import { normalizeDiscordSlug } from "./allow-list.js";

11+

import { normalizeDiscordDisplaySlug, normalizeDiscordSlug } from "./allow-list.js";

1212

import { resolveDiscordChannelInfoSafe } from "./channel-access.js";

1313
1414

function formatUsername(user: { username: string; discriminator?: string | null }): string {

@@ -72,6 +72,7 @@ export function resolveDiscordChannelContext(

7272

const channelInfo = resolveDiscordChannelInfoSafe(channel);

7373

const channelName = channelInfo.name;

7474

const channelSlug = channelName ? normalizeDiscordSlug(channelName) : "";

75+

const displayChannelSlug = channelName ? normalizeDiscordDisplaySlug(channelName) : "";

7576

const channelType = channelInfo.type;

7677

const isThread = isThreadChannelType(channelType);

7778

@@ -86,7 +87,16 @@ export function resolveDiscordChannelContext(

8687

}

8788

}

8889
89-

return { channelName, channelSlug, channelType, isThread, parentId, parentName, parentSlug };

90+

return {

91+

channelName,

92+

channelSlug,

93+

displayChannelSlug,

94+

channelType,

95+

isThread,

96+

parentId,

97+

parentName,

98+

parentSlug,

99+

};

90100

}

91101
92102

export async function resolveComponentInteractionContext(params: {

Original file line numberDiff line numberDiff line change

@@ -129,8 +129,8 @@ export async function dispatchDiscordComponentEvent(params: {

129129

const senderUsername = interactionCtx.user.username;

130130

const senderTag = formatDiscordUserTag(interactionCtx.user);

131131

const groupChannel =

132-

!interactionCtx.isDirectMessage && channelCtx.channelSlug

133-

? `#${channelCtx.channelSlug}`

132+

!interactionCtx.isDirectMessage && channelCtx.displayChannelSlug

133+

? `#${channelCtx.displayChannelSlug}`

134134

: undefined;

135135

const groupSubject = interactionCtx.isDirectMessage ? undefined : groupChannel;

136136

const channelConfig = resolveDiscordChannelConfigWithFallback({

Original file line numberDiff line numberDiff line change

@@ -26,6 +26,7 @@ export type AgentComponentInteraction = AgentComponentMessageInteraction | Modal

2626

export type DiscordChannelContext = {

2727

channelName: string | undefined;

2828

channelSlug: string;

29+

displayChannelSlug: string;

2930

channelType: number | undefined;

3031

isThread: boolean;

3132

parentId: string | undefined;

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,14 @@

1+

import { describe, expect, it } from "vitest";

2+

import { normalizeDiscordDisplaySlug, normalizeDiscordSlug } from "./allow-list.js";

3+
4+

describe("discord slug normalization", () => {

5+

it("keeps config slugs ASCII-only", () => {

6+

expect(normalizeDiscordSlug("\uC2E4\uD5D8")).toBe("");

7+

expect(normalizeDiscordSlug("baseline-\uAC80\uC99D")).toBe("baseline");

8+

});

9+
10+

it("preserves Unicode in display slugs", () => {

11+

expect(normalizeDiscordDisplaySlug("\uC2E4\uD5D8")).toBe("\uC2E4\uD5D8");

12+

expect(normalizeDiscordDisplaySlug("baseline-\uAC80\uC99D")).toBe("baseline-\uAC80\uC99D");

13+

});

14+

});

Original file line numberDiff line numberDiff line change

@@ -94,6 +94,16 @@ export function normalizeDiscordSlug(value: string) {

9494

.replace(/^-+|-+$/g, "");

9595

}

9696
97+

export function normalizeDiscordDisplaySlug(value: string) {

98+

return normalizeLowercaseStringOrEmpty(value)

99+

.normalize("NFC")

100+

.replace(/^#/, "")

101+

.replace(/[\s_]+/g, "-")

102+

.replace(/[^\p{L}\p{M}\p{N}-]+/gu, "-")

103+

.replace(/-{2,}/g, "-")

104+

.replace(/^-+|-+$/g, "");

105+

}

106+
97107

function resolveDiscordAllowListNameMatch(

98108

list: DiscordAllowList,

99109

candidate: { name?: string; tag?: string },

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,18 @@

1+

import { describe, expect, it } from "vitest";

2+

import { resolveDiscordPreflightChannelContext } from "./message-handler.preflight-channel-context.js";

3+
4+

describe("resolveDiscordPreflightChannelContext", () => {

5+

it("uses Unicode channel names for display without changing config matching slugs", () => {

6+

const context = resolveDiscordPreflightChannelContext({

7+

isGuildMessage: true,

8+

messageChannelId: "channel-1",

9+

channelName: "\uC2E4\uD5D8",

10+

guildName: "Guild",

11+

guildInfo: null,

12+

threadChannel: undefined,

13+

});

14+
15+

expect(context.configChannelSlug).toBe("");

16+

expect(context.displayChannelSlug).toBe("\uC2E4\uD5D8");

17+

});

18+

});

Original file line numberDiff line numberDiff line change

@@ -1,4 +1,5 @@

11

import {

2+

normalizeDiscordDisplaySlug,

23

normalizeDiscordSlug,

34

resolveDiscordChannelConfigWithFallback,

45

type DiscordGuildEntryResolved,

@@ -19,7 +20,9 @@ export function resolveDiscordPreflightChannelContext(params: {

1920

const configChannelName = params.threadParentName ?? params.channelName;

2021

const configChannelSlug = configChannelName ? normalizeDiscordSlug(configChannelName) : "";

2122

const displayChannelName = threadName ?? params.channelName;

22-

const displayChannelSlug = displayChannelName ? normalizeDiscordSlug(displayChannelName) : "";

23+

const displayChannelSlug = displayChannelName

24+

? normalizeDiscordDisplaySlug(displayChannelName)

25+

: "";

2326

const guildSlug =

2427

params.guildInfo?.slug || (params.guildName ? normalizeDiscordSlug(params.guildName) : "");

2528