Skip to content

Commit

Permalink
chore: stylelua fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gsuuon committed May 22, 2024
1 parent 05bbd07 commit f623d61
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lua/model/core/chat.lua
Original file line number Diff line number Diff line change
@@ -296,7 +296,7 @@ function M.run_chat(opts)
seg = segment.create_segment_at(#buf_lines, 0)
seg.add(starter_separator)
else
seg = segment.create_segment_at(#buf_lines-1, #buf_lines[#buf_lines])
seg = segment.create_segment_at(#buf_lines - 1, #buf_lines[#buf_lines])
end

local sayer = juice.sayer()
@@ -311,7 +311,10 @@ function M.run_chat(opts)
sayer.finish()

if text then
seg.set_text((last_msg.role == 'user' and (starter_separator .. text) or text) .. '\n======\n')
seg.set_text(
(last_msg.role == 'user' and (starter_separator .. text) or text)
.. '\n======\n'
)
else
seg.add('\n======\n')
end

0 comments on commit f623d61

Please sign in to comment.