From de2dcfd563ebe17e09cf54d47c13f4704a341ad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Eler=20De=20Melo?= Date: Sun, 29 Dec 2024 19:40:38 +0100 Subject: [PATCH 1/2] Add support for the PyHTMX GUI client --- ovos_gui/bus.py | 2 +- ovos_gui/page.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ovos_gui/bus.py b/ovos_gui/bus.py index 3d5b78b..7d2dc8a 100644 --- a/ovos_gui/bus.py +++ b/ovos_gui/bus.py @@ -201,7 +201,7 @@ def on_message(self, message: str): default_qt_version = \ Configuration().get('gui', {}).get('default_qt_version') or 5 msg_type = parsed_message.msg_type - msg_data = parsed_message.data + msg_data = parsed_message.data['data'] framework = msg_data.get("framework") # new api if framework is None: diff --git a/ovos_gui/page.py b/ovos_gui/page.py index 3420450..021e040 100644 --- a/ovos_gui/page.py +++ b/ovos_gui/page.py @@ -30,6 +30,10 @@ def get_file_extension(framework: str) -> str: """ if framework in ("qt5", "qt6"): return "qml" + elif framework in ("py-htmx", ): + return "py" + else: + pass return "" @property From 71d0df2e85c76c6b6f4ec7b9e6a51919c1191b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Eler=20De=20Melo?= Date: Tue, 31 Dec 2024 10:30:42 +0100 Subject: [PATCH 2/2] Apply CodeRabbit suggestion --- ovos_gui/bus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovos_gui/bus.py b/ovos_gui/bus.py index 7d2dc8a..6ef77cf 100644 --- a/ovos_gui/bus.py +++ b/ovos_gui/bus.py @@ -201,7 +201,7 @@ def on_message(self, message: str): default_qt_version = \ Configuration().get('gui', {}).get('default_qt_version') or 5 msg_type = parsed_message.msg_type - msg_data = parsed_message.data['data'] + msg_data = parsed_message.data.get('data', {}) framework = msg_data.get("framework") # new api if framework is None: