diff --git a/config/feature_flags/development/code_tasks.yml b/config/feature_flags/development/code_tasks.yml deleted file mode 100644 index fec0e8326f3d8a76d1f52de97798a140b5dcb9b2..0000000000000000000000000000000000000000 --- a/config/feature_flags/development/code_tasks.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: code_tasks -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/135717 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/430962 -milestone: '16.6' -type: development -group: group::code creation -default_enabled: false diff --git a/ee/app/graphql/mutations/ai/action.rb b/ee/app/graphql/mutations/ai/action.rb index cc5d6c94e98859e440e7c4598930f3f8e0d1ea93..413bb4336f3d6534dede2196f96df3db266b970c 100644 --- a/ee/app/graphql/mutations/ai/action.rb +++ b/ee/app/graphql/mutations/ai/action.rb @@ -85,8 +85,6 @@ def extract_method_params!(attributes) method = methods.each_key.first method_arguments = options.merge(methods[method]) - method_arguments.delete(:current_file) unless Feature.enabled?(:code_tasks, current_user) - [method_arguments.delete(:resource_id), method, method_arguments] end end diff --git a/ee/lib/gitlab/llm/chain/agents/zero_shot/executor.rb b/ee/lib/gitlab/llm/chain/agents/zero_shot/executor.rb index 906c9a7e9db88ee7c4697744d2d9606d33448034..3e081d347253a0723911739554f617fb3cba1c59 100644 --- a/ee/lib/gitlab/llm/chain/agents/zero_shot/executor.rb +++ b/ee/lib/gitlab/llm/chain/agents/zero_shot/executor.rb @@ -192,7 +192,6 @@ def current_code end def current_file_context - return unless Feature.enabled?(:code_tasks, context.current_user) return unless context.current_file return unless context.current_file[:selected_text].present? diff --git a/ee/spec/lib/gitlab/llm/chain/agents/zero_shot/executor_spec.rb b/ee/spec/lib/gitlab/llm/chain/agents/zero_shot/executor_spec.rb index 7dccdcd87864ed89d1fab52d8021e718047f164c..c3121c06cd10cd82bdcc6984471d86835e818f7d 100644 --- a/ee/spec/lib/gitlab/llm/chain/agents/zero_shot/executor_spec.rb +++ b/ee/spec/lib/gitlab/llm/chain/agents/zero_shot/executor_spec.rb @@ -249,16 +249,6 @@ expect(agent.prompt[:prompt]).to include("code selection") end - context 'when code_tasks feature flag is disabled' do - before do - stub_feature_flags(code_tasks: false) - end - - it 'does not include selected code in the prompt' do - expect(agent.prompt[:prompt]).not_to include("code selection") - end - end - context 'when selected_text is empty' do let(:selected_text) { '' } diff --git a/ee/spec/requests/api/graphql/mutations/projects/chat_spec.rb b/ee/spec/requests/api/graphql/mutations/projects/chat_spec.rb index d0cd0dcd36d75cf6fd241b9299f602b629b1afa2..af44628629eaa1766ade70a1f8bd6eacc69d1f44 100644 --- a/ee/spec/requests/api/graphql/mutations/projects/chat_spec.rb +++ b/ee/spec/requests/api/graphql/mutations/projects/chat_spec.rb @@ -108,26 +108,5 @@ expect(graphql_mutation_response(:ai_action)['errors']).to eq([]) end - - context 'when code_tasks flag is disabled' do - before do - stub_feature_flags(code_tasks: false) - end - - it 'ignores current_file param' do - expect(Llm::CompletionWorker).to receive(:perform_for).with( - an_object_having_attributes( - user: current_user, - resource: resource, - ai_action: :chat, - content: "summarize"), - hash_not_including(current_file: current_file) - ) - - post_graphql_mutation(mutation, current_user: current_user) - - expect(graphql_mutation_response(:ai_action)['errors']).to eq([]) - end - end end end