MCPcopy Index your code
hub / github.com/codeaashu/claude-code / convertToolProgressMessage

Function convertToolProgressMessage

src/remote/sdkMessageAdapter.ts:111–123  ·  view source on GitHub ↗

* Convert an SDKToolProgressMessage to a SystemMessage. * We use a system message instead of ProgressMessage since the Progress type * is a complex union that requires tool-specific data we don't have from CCR.

(
  msg: SDKToolProgressMessage,
)

Source from the content-addressed store, hash-verified

109 * is a complex union that requires tool-specific data we don't have from CCR.
110 */
111function convertToolProgressMessage(
112 msg: SDKToolProgressMessage,
113): SystemMessage {
114 return {
115 type: 'system',
116 subtype: 'informational',
117 content: `Tool ${msg.tool_name} running for ${msg.elapsed_time_seconds}s…`,
118 level: 'info',
119 uuid: msg.uuid,
120 timestamp: new Date().toISOString(),
121 toolUseID: msg.tool_use_id,
122 }
123}
124
125/**
126 * Convert an SDKCompactBoundaryMessage to a SystemMessage

Callers 1

convertSDKMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected