MCPcopy
hub / github.com/claude-code-best/claude-code / convertToolProgressMessage

Function convertToolProgressMessage

src/remote/sdkMessageAdapter.ts:112–124  ·  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

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

Callers 1

convertSDKMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected