claude-code-best/src/components/messages/UserBashOutputMessage.tsx
James Feng 0c01c93e80 Phase 2a: mechanical dedup — import rewrite to canonical package
- Migrated src/tools/-only files into packages/builtin-tools/src/tools/
- Rewrote all src/tools/ imports to @claude-code-best/builtin-tools/tools/
- Deleted 121 identical duplicate files from src/tools/
- 238 drifted files preserved in src/tools/ for Phase 2b manual merge
- 359 files changed: 914 insertions, 4042 deletions

Build: 568 files bundled ✓
Test: 3340 pass / 4 fail (baseline) ✓
2026-06-03 13:54:22 +08:00

21 lines
767 B
TypeScript

import * as React from 'react'
import BashToolResultMessage from '@claude-code-best/builtin-tools/tools/BashTool/BashToolResultMessage.js'
import { extractTag } from '../../utils/messages.js'
export function UserBashOutputMessage({
content,
verbose,
}: {
content: string
verbose?: boolean
}): React.ReactNode {
const rawStdout = extractTag(content, 'bash-stdout') ?? ''
// Unwrap <persisted-output> if present — keep the inner content (file path +
// preview) for the user; the wrapper tag itself is model-facing signaling.
const stdout = extractTag(rawStdout, 'persisted-output') ?? rawStdout
const stderr = extractTag(content, 'bash-stderr') ?? ''
return (
<BashToolResultMessage content={{ stdout, stderr }} verbose={!!verbose} />
)
}