Skip to content

Commit

Permalink
Record elapsed time even if there are no more suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
luozhiya committed May 16, 2024
1 parent af48342 commit 0749c0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/fittencode/engines/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,11 @@ function ActionsEngine.start_action(action, opts)
Sessions.request_generate_one_stage(task_id, prompt_opts, function(_, prompt, suggestions)
-- Log.debug('Suggestions for Actions: {}', suggestions)
local lines, ms = filter_suggestions(task_id, suggestions)
elapsed_time = elapsed_time + ms
if not lines or #lines == 0 then
reject()
else
depth = depth + 1
elapsed_time = elapsed_time + ms
chat:commit(lines, true)
local solved_prefix = prompt.prefix .. table.concat(lines, '\n') .. '\n'
resolve(solved_prefix)
Expand Down

0 comments on commit 0749c0a

Please sign in to comment.