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.
TypeScript
import type { On } from 'claude-code'
/**
* Answers every `$.ui.log` beneath the plugins and keeps each line as
* `<plugin> <text>`, the plugin as the engine pins the caller.
*
* @param on the test's `on`
* @returns the lines logged so far
*/
export function loggedBy(on: On) {
const lines: string[] = []
on('ui.log', ($, e, next) => {
lines.push(`${next.origin.plugin} ${e.text}`)
return { value: undefined }
})
return lines
}