MCPcopy Index your code
hub / github.com/codeaashu/claude-code / renderToolResultMessage

Function renderToolResultMessage

src/tools/ExitPlanModeTool/UI.tsx:17–67  ·  view source on GitHub ↗
(output: Output, _progressMessagesForMessage: ProgressMessage<ToolProgressData>[], {
  theme: _theme
}: {
  theme: ThemeName;
})

Source from the content-addressed store, hash-verified

15 return null;
16}
17export function renderToolResultMessage(output: Output, _progressMessagesForMessage: ProgressMessage<ToolProgressData>[], {
18 theme: _theme
19}: {
20 theme: ThemeName;
21}): React.ReactNode {
22 const {
23 plan,
24 filePath
25 } = output;
26 const isEmpty = !plan || plan.trim() === '';
27 const displayPath = filePath ? getDisplayPath(filePath) : '';
28 const awaitingLeaderApproval = output.awaitingLeaderApproval;
29
30 // Simplified message for empty plans
31 if (isEmpty) {
32 return <Box flexDirection="column" marginTop={1}>
33 <Box flexDirection="row">
34 <Text color={getModeColor('plan')}>{BLACK_CIRCLE}</Text>
35 <Text> Exited plan mode</Text>
36 </Box>
37 </Box>;
38 }
39
40 // When awaiting leader approval, show a different message
41 if (awaitingLeaderApproval) {
42 return <Box flexDirection="column" marginTop={1}>
43 <Box flexDirection="row">
44 <Text color={getModeColor('plan')}>{BLACK_CIRCLE}</Text>
45 <Text> Plan submitted for team lead approval</Text>
46 </Box>
47 <MessageResponse>
48 <Box flexDirection="column">
49 {filePath && <Text dimColor>Plan file: {displayPath}</Text>}
50 <Text dimColor>Waiting for team lead to review and approve...</Text>
51 </Box>
52 </MessageResponse>
53 </Box>;
54 }
55 return <Box flexDirection="column" marginTop={1}>
56 <Box flexDirection="row">
57 <Text color={getModeColor('plan')}>{BLACK_CIRCLE}</Text>
58 <Text> User approved Claude&apos;s plan</Text>
59 </Box>
60 <MessageResponse>
61 <Box flexDirection="column">
62 {filePath && <Text dimColor>Plan saved to: {displayPath} · /plan to edit</Text>}
63 <Markdown>{plan}</Markdown>
64 </Box>
65 </MessageResponse>
66 </Box>;
67}
68export function renderToolUseRejectedMessage({
69 plan
70}: {

Callers

nothing calls this directly

Calls 2

getDisplayPathFunction · 0.85
getModeColorFunction · 0.85

Tested by

no test coverage detected