surshar / claude-code
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
Built by Anthropic · github.com/anthropics
| @@ -69,9 +69,10 @@ | ||
| 69 | 69 | `telemetry.log` and `telemetry.mark`, beneath the gate: the entry is checked |
| 70 | 70 | and its row queued, the hook answering `{ value }`, or `{ deny }` with the |
| 71 | 71 | reason for an entry that breaks a rule, so the caller's promise rejects |
| 72 | -naming it. `engine.create`: the sender is built over `await next(e)`, which | |
| 73 | -is handed up as it is where it already has a `telemetry`, and as | |
| 74 | -`{ ...beneath, telemetry }` where it has none; nothing beneath is replaced. | |
| 72 | +naming it. `engine.create`: the sender is built over `await next(e)`, and | |
| 73 | +the step hands up `{ ...{ telemetry }, ...beneath }`: what is beneath is | |
| 74 | +spread last, so its own `telemetry` stands where it has one and this mod's | |
| 75 | +is added where it has none; nothing beneath is replaced. | |
| 75 | 76 | `session.start`, to learn whether a person is at the prompt; `session.end`, |
| 76 | 77 | to send what still waits. |
| 77 | 78 |
| @@ -362,9 +362,8 @@ | ||
| 362 | 362 | }) |
| 363 | 363 | |
| 364 | 364 | const telemetry: EngineInterface['telemetry'] = sender.telemetry |
| 365 | + const added = { telemetry } | |
| 365 | 366 | |
| 366 | - return Object.hasOwn(beneath, 'telemetry') | |
| 367 | - ? beneath | |
| 368 | - : { ...beneath, telemetry } | |
| 367 | + return { ...added, ...beneath } | |
| 369 | 368 | }) |
| 370 | 369 | } |