fix(cli): extract duplicate error formatting and add tests for /btw command

Extract repeated error formatting into formatBtwError helper, remove
no-op marginTop={0}, and add comprehensive test coverage for all three
execution modes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Shaojin Wen 2026-03-14 16:20:21 +08:00
parent fda065314f
commit d285c4409a
3 changed files with 386 additions and 10 deletions

View file

@ -29,7 +29,7 @@ export const BtwMessage: React.FC<BtwDisplayProps> = ({ btw }) => (
{btw.question}
</Text>
</Box>
<Box flexDirection="row" marginTop={0}>
<Box flexDirection="row">
{btw.isPending ? (
<Box>
<Box marginRight={1}>