-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AI Assistant: Retry or Cancel Messages with Errors (#2773)
* Add migration and update model to introduce a status field on the ai assistant's chat messages * Add functions for updating a message status * Add buttons for retrying and cancelling messages with errors * Style retry and cancel icons * Organize aliases * Fix failing tests and refactor code for readability * Filter cancelled messages * Update tests for ai_assistant.ex * Test: users can retry failed messages * Test: cancel buttons are available until only one message remainsusers can retry failed messages * Remove unnecessary check * Remove unnecessary check * Remove unreachable code * Update CL * No Multi needed, add ? to func
- Loading branch information
Showing
7 changed files
with
549 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
priv/repo/migrations/20241210004733_add_status_to_chat_messages.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
defmodule Lightning.Repo.Migrations.AddStatusToChatMessages do | ||
use Ecto.Migration | ||
|
||
def change do | ||
alter table(:ai_chat_messages) do | ||
add :status, :string, default: "success", null: false | ||
end | ||
end | ||
end |
Oops, something went wrong.