diff --git a/src/channels/status-reactions.slack-lifecycle.test.ts b/src/channels/status-reactions.slack-lifecycle.test.ts index 954ec1b31ee..fbae5b2a631 100644 --- a/src/channels/status-reactions.slack-lifecycle.test.ts +++ b/src/channels/status-reactions.slack-lifecycle.test.ts @@ -5,6 +5,9 @@ import { type StatusReactionAdapter, } from "./status-reactions.js"; +const EXEC_TOOL_EMOJI = "🛠️"; +const WEB_SEARCH_TOOL_EMOJI = "🔎"; + function createSlackMockAdapter() { const active = new Set(); const log: string[] = []; @@ -60,12 +63,12 @@ describe("Slack status reaction lifecycle", () => { void ctrl.setTool("web_search"); await vi.advanceTimersByTimeAsync(10); - expect(active.has(DEFAULT_EMOJIS.web)).toBe(true); + expect(active.has(WEB_SEARCH_TOOL_EMOJI)).toBe(true); expect(active.has(DEFAULT_EMOJIS.thinking)).toBe(true); await ctrl.setDone(); expect(active.has(DEFAULT_EMOJIS.done)).toBe(true); - expect(active.has(DEFAULT_EMOJIS.web)).toBe(false); + expect(active.has(WEB_SEARCH_TOOL_EMOJI)).toBe(false); expect(active.has(DEFAULT_EMOJIS.thinking)).toBe(false); await ctrl.clear(); @@ -179,14 +182,14 @@ describe("Slack status reaction lifecycle", () => { void ctrl.setTool("web_search"); await vi.advanceTimersByTimeAsync(25); - expect(active.has(DEFAULT_EMOJIS.web)).toBe(true); + expect(active.has(WEB_SEARCH_TOOL_EMOJI)).toBe(true); expect(active.has("eyes")).toBe(true); void ctrl.setThinking(); await ctrl.restoreInitial(); expect(active.has("eyes")).toBe(true); - expect(active.has(DEFAULT_EMOJIS.web)).toBe(false); + expect(active.has(WEB_SEARCH_TOOL_EMOJI)).toBe(false); expect(adapter.setReaction).toHaveBeenCalledTimes(2); }); @@ -257,7 +260,7 @@ describe("Slack status reaction lifecycle", () => { void ctrl.setTool("exec"); await vi.advanceTimersByTimeAsync(10); - expect(active.has(DEFAULT_EMOJIS.coding)).toBe(true); + expect(active.has(EXEC_TOOL_EMOJI)).toBe(true); expect(active.has("eyes")).toBe(true); }); }); diff --git a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/codex-dynamic-tools.discord-group.json b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/codex-dynamic-tools.discord-group.json index 2f2e19a5460..ad497cc8692 100644 --- a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/codex-dynamic-tools.discord-group.json +++ b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/codex-dynamic-tools.discord-group.json @@ -1034,6 +1034,14 @@ "topic": { "type": "string" }, + "track_tool_calls": { + "description": "snake_case alias of trackToolCalls.", + "type": "boolean" + }, + "trackToolCalls": { + "description": "When true for a reaction to the current inbound message, use that reacted message as the status-reaction target for subsequent tool progress when the channel supports it.", + "type": "boolean" + }, "type": { "type": "number" }, diff --git a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/codex-dynamic-tools.heartbeat-turn.json b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/codex-dynamic-tools.heartbeat-turn.json index 384d18c8260..70ad7313edb 100644 --- a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/codex-dynamic-tools.heartbeat-turn.json +++ b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/codex-dynamic-tools.heartbeat-turn.json @@ -1034,6 +1034,14 @@ "topic": { "type": "string" }, + "track_tool_calls": { + "description": "snake_case alias of trackToolCalls.", + "type": "boolean" + }, + "trackToolCalls": { + "description": "When true for a reaction to the current inbound message, use that reacted message as the status-reaction target for subsequent tool progress when the channel supports it.", + "type": "boolean" + }, "type": { "type": "number" }, diff --git a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/codex-dynamic-tools.telegram-direct.json b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/codex-dynamic-tools.telegram-direct.json index 712c93cd4ee..3b7c945c779 100644 --- a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/codex-dynamic-tools.telegram-direct.json +++ b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/codex-dynamic-tools.telegram-direct.json @@ -1034,6 +1034,14 @@ "topic": { "type": "string" }, + "track_tool_calls": { + "description": "snake_case alias of trackToolCalls.", + "type": "boolean" + }, + "trackToolCalls": { + "description": "When true for a reaction to the current inbound message, use that reacted message as the status-reaction target for subsequent tool progress when the channel supports it.", + "type": "boolean" + }, "type": { "type": "number" }, diff --git a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/discord-group-codex-message-tool.md b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/discord-group-codex-message-tool.md index 52532a75ab4..6c72bc4042a 100644 --- a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/discord-group-codex-message-tool.md +++ b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/discord-group-codex-message-tool.md @@ -201,8 +201,8 @@ This is the deterministic model-bound layer stack OpenClaw can snapshot for the "roughTokens": 158 }, "dynamicToolsJson": { - "chars": 50058, - "roughTokens": 12515 + "chars": 50457, + "roughTokens": 12615 }, "openClawDeveloperInstructions": { "chars": 8604, @@ -213,8 +213,8 @@ This is the deterministic model-bound layer stack OpenClaw can snapshot for the "roughTokens": 7939 }, "totalWithDynamicToolsJson": { - "chars": 81816, - "roughTokens": 20454 + "chars": 82215, + "roughTokens": 20554 }, "userInputText": { "chars": 870, @@ -963,6 +963,14 @@ Full JSON: `codex-dynamic-tools.discord-group.json` "topic": { "type": "string" }, + "track_tool_calls": { + "description": "snake_case alias of trackToolCalls.", + "type": "boolean" + }, + "trackToolCalls": { + "description": "When true for a reaction to the current inbound message, use that reacted message as the status-reaction target for subsequent tool progress when the channel supports it.", + "type": "boolean" + }, "type": { "type": "number" }, diff --git a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-direct-codex-message-tool.md b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-direct-codex-message-tool.md index 3acad33f8fd..db1bc9c2256 100644 --- a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-direct-codex-message-tool.md +++ b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-direct-codex-message-tool.md @@ -201,8 +201,8 @@ This is the deterministic model-bound layer stack OpenClaw can snapshot for the "roughTokens": 158 }, "dynamicToolsJson": { - "chars": 49749, - "roughTokens": 12438 + "chars": 50148, + "roughTokens": 12537 }, "openClawDeveloperInstructions": { "chars": 7733, @@ -213,8 +213,8 @@ This is the deterministic model-bound layer stack OpenClaw can snapshot for the "roughTokens": 7597 }, "totalWithDynamicToolsJson": { - "chars": 80136, - "roughTokens": 20034 + "chars": 80535, + "roughTokens": 20134 }, "userInputText": { "chars": 370, @@ -940,6 +940,14 @@ Full JSON: `codex-dynamic-tools.telegram-direct.json` "topic": { "type": "string" }, + "track_tool_calls": { + "description": "snake_case alias of trackToolCalls.", + "type": "boolean" + }, + "trackToolCalls": { + "description": "When true for a reaction to the current inbound message, use that reacted message as the status-reaction target for subsequent tool progress when the channel supports it.", + "type": "boolean" + }, "type": { "type": "number" }, diff --git a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-heartbeat-codex-tool.md b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-heartbeat-codex-tool.md index d8989fc26d6..7187ae93be5 100644 --- a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-heartbeat-codex-tool.md +++ b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-heartbeat-codex-tool.md @@ -202,8 +202,8 @@ This is the deterministic model-bound layer stack OpenClaw can snapshot for the "roughTokens": 158 }, "dynamicToolsJson": { - "chars": 50872, - "roughTokens": 12718 + "chars": 51271, + "roughTokens": 12818 }, "openClawDeveloperInstructions": { "chars": 7733, @@ -214,8 +214,8 @@ This is the deterministic model-bound layer stack OpenClaw can snapshot for the "roughTokens": 7656 }, "totalWithDynamicToolsJson": { - "chars": 81497, - "roughTokens": 20375 + "chars": 81896, + "roughTokens": 20474 }, "userInputText": { "chars": 608, @@ -942,6 +942,14 @@ Full JSON: `codex-dynamic-tools.heartbeat-turn.json` "topic": { "type": "string" }, + "track_tool_calls": { + "description": "snake_case alias of trackToolCalls.", + "type": "boolean" + }, + "trackToolCalls": { + "description": "When true for a reaction to the current inbound message, use that reacted message as the status-reaction target for subsequent tool progress when the channel supports it.", + "type": "boolean" + }, "type": { "type": "number" },