spacehub

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

claude-code / mods / diff / tests / fixtures / turn-diffs-of / prompt-of.ts
13 lines · 274 BRaw
1import type { SessionMessage } from 'claude-code'
2
3/**
4 * A prompt the person typed, as the transcript holds it.
5 *
6 * @param text the prompt
7 * @returns the message
8 */
9export const promptOf = (text: string): SessionMessage => ({
10 role: 'user',
11 text,
12 toolUses: [],
13})