From c5ed71c1ce2c6d7a34652511d431cb1ef67e6e76 Mon Sep 17 00:00:00 2001
From: Aakash Bakhle <48802744+aakashb95@users.noreply.github.com>
Date: Tue, 24 Mar 2026 16:58:11 +0530
Subject: [PATCH] fix: ai-assist 404 on CE (#13891)
# Pull Request Template
## Description
Relocate controller from enterprise/ to app/ and add
Api::V1::Accounts::Captain::TasksController.prepend_mod_with for EE
overrides.
Fixes: Ai assist giving 404 on CE
## Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
## How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration.
before:
after:
## Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules
Co-authored-by: Shivam Mishra
---
.../controllers/api/v1/accounts/captain/tasks_controller.rb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
rename {enterprise/app => app}/controllers/api/v1/accounts/captain/tasks_controller.rb (93%)
diff --git a/enterprise/app/controllers/api/v1/accounts/captain/tasks_controller.rb b/app/controllers/api/v1/accounts/captain/tasks_controller.rb
similarity index 93%
rename from enterprise/app/controllers/api/v1/accounts/captain/tasks_controller.rb
rename to app/controllers/api/v1/accounts/captain/tasks_controller.rb
index d7208d678..9ba197a3c 100644
--- a/enterprise/app/controllers/api/v1/accounts/captain/tasks_controller.rb
+++ b/app/controllers/api/v1/accounts/captain/tasks_controller.rb
@@ -57,7 +57,7 @@ class Api::V1::Accounts::Captain::TasksController < Api::V1::Accounts::BaseContr
if result.nil?
render json: { message: nil }
elsif result[:error]
- render json: { error: result[:error] }, status: :unprocessable_entity
+ render json: { error: result[:error] }, status: :unprocessable_content
else
response_data = { message: result[:message] }
response_data[:follow_up_context] = result[:follow_up_context] if result[:follow_up_context]
@@ -69,3 +69,5 @@ class Api::V1::Accounts::Captain::TasksController < Api::V1::Accounts::BaseContr
authorize(:'captain/tasks')
end
end
+
+Api::V1::Accounts::Captain::TasksController.prepend_mod_with('Api::V1::Accounts::Captain::TasksController')