diff --git a/code/cep-plugin/main.js b/code/cep-plugin/main.js index 3fa1874..cfd720e 100755 --- a/code/cep-plugin/main.js +++ b/code/cep-plugin/main.js @@ -170,21 +170,16 @@ function taskCopyError() { var texto = taskState.errorText; if (!texto) return; try { - if (navigator.clipboard && navigator.clipboard.writeText) { - navigator.clipboard.writeText(texto).then(function () { showToast("ok", "Erro técnico copiado."); }).catch(function () { taskCopyErrorFallback(texto); }); - return; - } - } catch (_) {} - taskCopyErrorFallback(texto); + var copia = childProcess.spawn("pbcopy"); + copia.stdin.write(texto, "utf-8"); + copia.stdin.end(); + showToast("ok", "Erro técnico copiado."); + } catch (_) { + taskCopyErrorFallback(texto); + } } function taskCopyErrorFallback(texto) { - try { - var copia = childProcess.spawn("pbcopy"); - copia.stdin.end(texto); - showToast("ok", "Erro técnico copiado."); - return; - } catch (_) {} var area = document.createElement("textarea"); area.value = texto; area.style.position = "fixed"; diff --git a/code/engine/integracoes/premiere/cliente_mcp.py b/code/engine/integracoes/premiere/cliente_mcp.py index 147a95e..c0ea21b 100644 --- a/code/engine/integracoes/premiere/cliente_mcp.py +++ b/code/engine/integracoes/premiere/cliente_mcp.py @@ -63,6 +63,7 @@ class ClienteMCPPorStdio(ClienteMCP): stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, + encoding="utf-8", bufsize=1, ) self._enviar("initialize", {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "engine", "version": "0.1.0"}})