fix: quick action translate and validate apply now use tasks

This commit is contained in:
2026-06-30 22:28:05 +02:00
parent 1b0bae37bf
commit b11be9b521
6 changed files with 172 additions and 61 deletions

View File

@@ -5,7 +5,7 @@ defmodule BDS.Desktop.ShellLive.Bridges do
import Phoenix.LiveView, only: [connected?: 1, send_update: 2]
alias BDS.Desktop.ShellData
alias BDS.Desktop.ShellLive.{ChatEditor, PostEditor}
alias BDS.Desktop.ShellLive.{ChatEditor, MediaEditor, PostEditor}
alias BDS.Desktop.ShellLive.{CliSync, SessionUtil}
alias BDS.UI.Workbench
@@ -216,6 +216,26 @@ defmodule BDS.Desktop.ShellLive.Bridges do
{:noreply, socket}
end
def handle_info({:editor_translation_completed, :post, post_id, language}, socket, _callbacks) do
send_update(PostEditor,
id: "post-editor-#{post_id}",
action: :translation_completed,
language: language
)
{:noreply, socket}
end
def handle_info({:editor_translation_completed, :media, media_id, language}, socket, _callbacks) do
send_update(MediaEditor,
id: "media-editor-#{media_id}",
action: :translation_completed,
language: language
)
{:noreply, socket}
end
def handle_info({:post_editor_apply_ai_suggestions, post_id, fields}, socket, _callbacks) do
send_update(PostEditor,
id: "post-editor-#{post_id}",