feat: add prompt suggestions and June events (#10726)

This PR adds the following two features

1. Prompt suggestions to get started with Copilot Chat
2. June events for each action

![CleanShot 2025-01-20 at 21 00
52@2x](https://github.com/user-attachments/assets/d73e7982-0f78-4d85-873e-da2c16762688)

---------

Co-authored-by: Pranav <pranavrajs@gmail.com>
This commit is contained in:
Shivam Mishra
2025-01-21 22:52:42 +05:30
committed by GitHub
parent 0021a7d8e5
commit 451c28a7a1
20 changed files with 289 additions and 185 deletions

View File

@@ -10,11 +10,11 @@ module Enterprise::Api::V1::Accounts::ConversationsController
response = Captain::Copilot::ChatService.new(
assistant,
messages: copilot_params[:previous_messages],
previous_messages: copilot_params[:previous_messages],
conversation_history: @conversation.to_llm_text
).execute(copilot_params[:message])
).generate_response(copilot_params[:message])
render json: { message: response }
render json: { message: response['response'] }
end
def permitted_update_params

View File

@@ -10,7 +10,7 @@ module Enterprise::SuperAdmin::AppConfigsController
when 'internal'
@allowed_configs = internal_config_options
when 'captain'
@allowed_configs = %w[CAPTAIN_OPEN_AI_API_KEY]
@allowed_configs = %w[CAPTAIN_OPEN_AI_API_KEY CAPTAIN_OPEN_AI_MODEL]
else
super
end