Skip to content

Commit c38c35b

Browse files
committed
fix: get-task was inapproprately reporting older tasks
1 parent 08e05e3 commit c38c35b

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

lib/agent_tasks.rb

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,7 @@ def agent_tasks_in_current_branch
5555

5656
first_file_relative_path = files_in_commit.first
5757
first_file_absolute_path = File.join(@repo.root, first_file_relative_path)
58-
agents_dir = File.dirname(first_file_absolute_path)
59-
60-
unless Dir.exist?(agents_dir)
61-
raise StandardError, <<~MSG
62-
Error: Determined task directory #{agents_dir} does not exist.
63-
(Derived from the first file '#{first_file_relative_path}' in commit '#{first_commit_hash}')
64-
MSG
65-
end
66-
67-
files = Dir.entries(agents_dir).select { |f| f != '.' && f != '..' }
68-
if files.empty?
69-
raise StandardError, <<~MSG
70-
Error: No task files found in the determined task directory #{agents_dir}.
71-
(Directory derived from the first file '#{first_file_relative_path}' in commit '#{first_commit_hash}')
72-
MSG
73-
end
74-
75-
files.sort.map { |f| File.join(agents_dir, f) }
58+
[first_file_absolute_path]
7659
end
7760

7861
def on_task_branch?; end

0 commit comments

Comments
 (0)