Rename TaskSelector to TaskFactory and refactor the class
What does this MR do and why?
Renames TaskSelector to TaskFactory
The CodeSuggestions::TaskSelector
class has been growing more logic
around selecting the appropriate code suggestion task. To better match
this responsibility, we have renamed it to TaskFactory
.
TaskFactory
was chosen over TaskBuilder
because the builder pattern
implies incremental, step-by-step object creation. The current behavior
is to make a decision based on the input options and return one of
the code suggestion task objects in a single call. This aligns more
closely with the Factory pattern, where objects are produced
fully constructed based on configuration.
By renaming to TaskFactory
, the class name now better indicates that
it is encapsulating the instantiation of task objects based on
the request parameters.
Move feature flag checks inside the class.
Related to #427728 (closed)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.