mirror of
https://github.com/patriceckhart/zot.git
synced 2026-06-27 05:46:34 +02:00
fix code formatting
This commit is contained in:
parent
a4e6cde56f
commit
6bb3e9e23f
1 changed files with 9 additions and 2 deletions
|
|
@ -82,8 +82,15 @@ func (v *View) Build(width int) []string {
|
|||
}
|
||||
if v.StreamingActive {
|
||||
out = append(out, v.Theme.FG256(v.Theme.Assistant, "▍ zot"))
|
||||
for _, line := range wrapLine(v.Streaming, width, "") {
|
||||
out = append(out, line)
|
||||
// Stream the partial assistant text through the same markdown
|
||||
// renderer used for finalised messages so code fences, diffs,
|
||||
// lists, and inline styles look the same while streaming and
|
||||
// don't suddenly reflow when the turn ends.
|
||||
md := RenderMarkdown(v.Streaming, v.Theme, width)
|
||||
for _, l := range strings.Split(md, "\n") {
|
||||
for _, w := range wrapLine(l, width, "") {
|
||||
out = append(out, w)
|
||||
}
|
||||
}
|
||||
out = append(out, "")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue