MCPcopy
hub / github.com/codeaashu/claude-code / hasProgressMessage

Function hasProgressMessage

src/tools/AgentTool/UI.tsx:40–46  ·  view source on GitHub ↗

* Guard: checks if progress data has a `message` field (agent_progress or * skill_progress). Other progress types (e.g. bash_progress forwarded from * sub-agents) lack this field and must be skipped by UI helpers.

(data: Progress)

Source from the content-addressed store, hash-verified

38 * sub-agents) lack this field and must be skipped by UI helpers.
39 */
40function hasProgressMessage(data: Progress): data is AgentToolProgress {
41 if (!('message' in data)) {
42 return false;
43 }
44 const msg = (data as AgentToolProgress).message;
45 return msg != null && typeof msg === 'object' && 'type' in msg;
46}
47
48/**
49 * Check if a progress message is a search/read/REPL operation (tool use or result).

Callers 9

getSearchOrReadInfoFunction · 0.85
processProgressMessagesFunction · 0.85
_temp4Function · 0.85
_temp2Function · 0.85
getProgressStatsFunction · 0.85
calculateAgentStatsFunction · 0.85
extractLastToolInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected