fix: seleted file is nil (#1049)
This commit is contained in:
parent
6ebba1526b
commit
a3ac0b84be
@ -1326,13 +1326,15 @@ function Sidebar:render_history_content(history)
|
|||||||
goto continue
|
goto continue
|
||||||
end
|
end
|
||||||
local selected_filepaths = entry.selected_filepaths
|
local selected_filepaths = entry.selected_filepaths
|
||||||
if not selected_filepaths then selected_filepaths = { entry.selected_file.filepath } end
|
if not selected_filepaths and entry.selected_file ~= nil then
|
||||||
|
selected_filepaths = { entry.selected_file.filepath }
|
||||||
|
end
|
||||||
local prefix = render_chat_record_prefix(
|
local prefix = render_chat_record_prefix(
|
||||||
entry.timestamp,
|
entry.timestamp,
|
||||||
entry.provider,
|
entry.provider,
|
||||||
entry.model,
|
entry.model,
|
||||||
entry.request or "",
|
entry.request or "",
|
||||||
selected_filepaths,
|
selected_filepaths or {},
|
||||||
entry.selected_code
|
entry.selected_code
|
||||||
)
|
)
|
||||||
content = content .. prefix
|
content = content .. prefix
|
||||||
|
Loading…
x
Reference in New Issue
Block a user