fix: interface conversion panic (#2060)
This commit is contained in:
@@ -746,16 +746,18 @@ func (m *messagesComponent) renderView() tea.Cmd {
|
|||||||
} else {
|
} else {
|
||||||
for _, part := range response.Parts {
|
for _, part := range response.Parts {
|
||||||
if part.CallID == m.app.CurrentPermission.CallID {
|
if part.CallID == m.app.CurrentPermission.CallID {
|
||||||
content := renderToolDetails(
|
if toolPart, ok := part.AsUnion().(opencode.ToolPart); ok {
|
||||||
m.app,
|
content := renderToolDetails(
|
||||||
part.AsUnion().(opencode.ToolPart),
|
m.app,
|
||||||
m.app.CurrentPermission,
|
toolPart,
|
||||||
width,
|
m.app.CurrentPermission,
|
||||||
)
|
width,
|
||||||
if content != "" {
|
)
|
||||||
partCount++
|
if content != "" {
|
||||||
lineCount += lipgloss.Height(content) + 1
|
partCount++
|
||||||
blocks = append(blocks, content)
|
lineCount += lipgloss.Height(content) + 1
|
||||||
|
blocks = append(blocks, content)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user