Skip to content

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
449 B
Raw Blame
import type { SessionMessage } from 'claude-code'

/**
 * An assistant message whose Edit calls came back with the given results,
 * in order.
 *
 * @param results each call's structured result
 * @returns the message
 */
export const editsOf = (...results: unknown[]): SessionMessage => ({
  role: 'assistant',
  text: '',
  toolUses: results.map((result, at) => ({
    tool_use_id: `t${at}`,
    tool: 'Edit',
    input: {},
    result,
  })),
})