Skip to content

Commit 610ea2b

Browse files
committed
Add ReEdgeGPT menu
Add ReEdgeGPT menu
1 parent 5e26dee commit 610ea2b

6 files changed

Lines changed: 49 additions & 8 deletions

File tree

automation_editor/automation_editor_ui/menu/build_menubar.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
build_automation_install_menu
1919
from automation_editor.automation_editor_ui.menu.install_menu.tools_menu.build_tool_install_menu import \
2020
build_tool_install_menu
21+
from automation_editor.automation_editor_ui.menu.tools_menu.bing_gpt_menu.build_bing_gpt_menu import set_bing_gpt_menu
2122

2223
if TYPE_CHECKING:
2324
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
@@ -34,3 +35,4 @@ def add_menu_to_menubar(ui_we_want_to_set: AutomationEditor):
3435
set_web_runner_menu(ui_we_want_to_set)
3536
build_automation_install_menu(ui_we_want_to_set)
3637
build_tool_install_menu(ui_we_want_to_set)
38+
set_bing_gpt_menu(ui_we_want_to_set)

automation_editor/automation_editor_ui/menu/help_menu/__init__.py renamed to automation_editor/automation_editor_ui/menu/tools_menu/__init__.py

File renamed without changes.

automation_editor/automation_editor_ui/menu/tools_menu/bing_gpt_menu/__init__.py

Whitespace-only changes.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
from __future__ import annotations
2+
3+
from typing import TYPE_CHECKING
4+
5+
from PySide6.QtGui import QAction
6+
7+
from automation_editor.automation_editor_ui.menu.menu_utils import open_web_browser
8+
9+
if TYPE_CHECKING:
10+
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
11+
12+
13+
def set_bing_gpt_menu(ui_we_want_to_set: AutomationEditor):
14+
ui_we_want_to_set.bing_gpt_menu = ui_we_want_to_set.menu.addMenu("ReEdgeGPT")
15+
ui_we_want_to_set.bing_gpt_menu.help_menu = ui_we_want_to_set.bing_gpt_menu.addMenu("HELP")
16+
# Open Doc
17+
ui_we_want_to_set.bing_gpt_menu.help_menu.open_bing_gpt_menu_doc_action = QAction("Open ReEdgeGPT Doc")
18+
ui_we_want_to_set.bing_gpt_menu.help_menu.open_bing_gpt_menu_doc_action.triggered.connect(
19+
lambda: open_web_browser(
20+
ui_we_want_to_set,
21+
"https://reedgegpt.readthedocs.io/en/latest/",
22+
"ReEdgeGPT Doc"
23+
)
24+
)
25+
ui_we_want_to_set.bing_gpt_menu.help_menu.addAction(
26+
ui_we_want_to_set.bing_gpt_menu.help_menu.open_bing_gpt_menu_doc_action
27+
)
28+
# Open Github
29+
ui_we_want_to_set.bing_gpt_menu.help_menu.open_re_edge_gpt_github_action = QAction("Open ReEdgeGPT GitHub")
30+
ui_we_want_to_set.bing_gpt_menu.help_menu.open_re_edge_gpt_github_action.triggered.connect(
31+
lambda: open_web_browser(
32+
ui_we_want_to_set,
33+
"https://github.com/Integration-Automation/ReEdgeGPT",
34+
"ReEdgeGPT GitHub"
35+
)
36+
)
37+
ui_we_want_to_set.bing_gpt_menu.help_menu.addAction(
38+
ui_we_want_to_set.bing_gpt_menu.help_menu.open_re_edge_gpt_github_action
39+
)

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Rename to build stable version
2-
# This is stable version
1+
# Rename to dev version
2+
# This is dev version
33
[build-system]
44
requires = ["setuptools>=61.0"]
55
build-backend = "setuptools.build_meta"
66

77
[project]
8-
name = "automation_editor"
9-
version = "0.0.26"
8+
name = "automation_editor_dev"
9+
version = "0.0.27"
1010
authors = [
1111
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
1212
]

dev.toml renamed to stable.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Rename to dev version
2-
# This is dev version
1+
# Rename to build stable version
2+
# This is stable version
33
[build-system]
44
requires = ["setuptools>=61.0"]
55
build-backend = "setuptools.build_meta"
66

77
[project]
8-
name = "automation_editor_dev"
9-
version = "0.0.26"
8+
name = "automation_editor"
9+
version = "0.0.27"
1010
authors = [
1111
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
1212
]

0 commit comments

Comments
 (0)