File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import type { ChatTheme } from '../utils/theme-system'
2020interface 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 {
3233export 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
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments