mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 00:50:22 +00:00
fix(slack): wrap session key in backticks to prevent emoji shortcode parsing (openclaw#30266) thanks @pushkarsingh32
Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: pushkarsingh32 <29558481+pushkarsingh32@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -1391,7 +1391,7 @@ describe("runReplyAgent response usage footer", () => {
|
||||
const res = await createRun({ responseUsage: "full", sessionKey });
|
||||
const payload = Array.isArray(res) ? res[0] : res;
|
||||
expect(String(payload?.text ?? "")).toContain("Usage:");
|
||||
expect(String(payload?.text ?? "")).toContain(`· session ${sessionKey}`);
|
||||
expect(String(payload?.text ?? "")).toContain(`· session \`${sessionKey}\``);
|
||||
});
|
||||
|
||||
it("does not append session key when responseUsage=tokens", async () => {
|
||||
|
||||
@@ -605,7 +605,7 @@ export async function runReplyAgent(params: {
|
||||
costConfig,
|
||||
});
|
||||
if (formatted && responseUsageMode === "full" && sessionKey) {
|
||||
formatted = `${formatted} · session ${sessionKey}`;
|
||||
formatted = `${formatted} · session \`${sessionKey}\``;
|
||||
}
|
||||
if (formatted) {
|
||||
responseUsageLine = formatted;
|
||||
|
||||
Reference in New Issue
Block a user