Skip to content

Commit 870113d

Browse files
committed
feat(cli): surface agent prompts in expanded view
1 parent 51438fd commit 870113d

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

cli/src/components/branch-item.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import type { ChatTheme } from '../utils/theme-system'
2020
interface BranchItemProps {
2121
name: string
2222
content: ReactNode
23+
prompt?: string
2324
isCollapsed: boolean
2425
isStreaming: boolean
2526
branchChar: string
@@ -32,6 +33,7 @@ interface BranchItemProps {
3233
export const BranchItem = ({
3334
name,
3435
content,
36+
prompt,
3537
isCollapsed,
3638
isStreaming,
3739
branchChar,
@@ -194,6 +196,29 @@ export const BranchItem = ({
194196
)}
195197
{!isCollapsed && (
196198
<box style={{ flexDirection: 'column', gap: 1 }}>
199+
{prompt && (
200+
<box
201+
border
202+
borderStyle="single"
203+
customBorderChars={borderCharsWithoutVertical}
204+
style={{
205+
flexDirection: 'column',
206+
gap: 0,
207+
paddingLeft: 1,
208+
paddingRight: 1,
209+
paddingTop: 0,
210+
paddingBottom: 0,
211+
marginBottom: content ? 1 : 0,
212+
}}
213+
>
214+
<text wrap fg={theme.agentToggleHeaderText}>
215+
Prompt
216+
</text>
217+
<text wrap fg={theme.agentText}>
218+
{prompt}
219+
</text>
220+
</box>
221+
)}
197222
{content && (
198223
<box
199224
border

cli/src/components/message-block.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ export const MessageBlock = ({
230230
<BranchItem
231231
name={agentBlock.agentName}
232232
content={displayContent}
233+
prompt={agentBlock.initialPrompt}
233234
isCollapsed={isCollapsed}
234235
isStreaming={isStreaming}
235236
branchChar={branchChar}

0 commit comments

Comments
 (0)