Skip to content

Commit e5896ed

Browse files
authored
Merge pull request #139 from Integration-Automation/dev
Dev
2 parents 7df478f + 79823c2 commit e5896ed

File tree

11 files changed

+30
-7
lines changed

11 files changed

+30
-7
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,7 @@ dmypy.json
116116
# User setting
117117
**/.jeditor
118118

119+
.idea/misc.xml
120+
/.idea
121+
.idea/misc.xml
122+
/.idea

dev.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ description = "JEditor is basic but powerful editor include GPT"
1414
requires-python = ">=3.9"
1515
license = { text = "MIT" }
1616
dependencies = [
17-
"PySide6", "qt-material", "yapf", "frontengine", "pycodestyle", "jedi", "qtconsole"
17+
"PySide6", "qt-material", "yapf", "frontengine", "pycodestyle", "jedi", "qtconsole", "re-edge-gpt[gui]"
1818
]
1919
classifiers = [
2020
"Programming Language :: Python :: 3.9",

exe/a.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
print("你好")
1+
print("你好")

exe/user_setting.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"language": "Traditional_Chinese"
2+
"language": "Traditional_Chinese",
3+
"theme": "dark_amber.xml"
34
}

je_editor/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
from je_editor.utils.exception.exceptions import JEditorOpenFileException
1919
from je_editor.utils.exception.exceptions import JEditorRunOnShellException
2020
from je_editor.utils.exception.exceptions import JEditorSaveFileException
21-
from je_editor.utils.multi_language.traditional_chinese import traditional_chinese_word_dict
2221
from je_editor.utils.multi_language.english import english_word_dict
2322
from je_editor.utils.multi_language.multi_language_wrapper import language_wrapper
23+
from je_editor.utils.multi_language.traditional_chinese import traditional_chinese_word_dict
2424

2525
__all__ = [
2626
"start_editor", "EditorMain", "EDITOR_EXTEND_TAB",

je_editor/pyside_ui/code/plaintext_code_edit/code_edit_plaintext.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from pathlib import Path
44
from typing import TYPE_CHECKING
55

6-
76
if TYPE_CHECKING:
87
from je_editor.pyside_ui.main_ui.editor.editor_widget import EditorWidget
98
from je_editor.pyside_ui.main_ui.editor.editor_widget_dock import FullEditorWidget

je_editor/pyside_ui/main_ui/menu/tab_menu/build_tab_menu.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from je_editor.pyside_ui.browser.browser_widget import JEBrowser
88
from je_editor.pyside_ui.main_ui.editor.editor_widget import EditorWidget
99
from je_editor.pyside_ui.main_ui.ipython_widget.rich_jupyter import IpythonWidget
10+
from re_edge_gpt.ui.chat.main_ui import ChatMainUI
1011

1112
if TYPE_CHECKING:
1213
from je_editor.pyside_ui.main_ui.main_editor import EditorMain
@@ -53,6 +54,13 @@ def set_tab_menu(ui_we_want_to_set: EditorMain) -> None:
5354
lambda: add_ipython(ui_we_want_to_set)
5455
)
5556
ui_we_want_to_set.tab_menu.addAction(ui_we_want_to_set.tab_menu.add_ipython_action)
57+
# ReEdgeGPT
58+
ui_we_want_to_set.tab_menu.add_re_edge_gpt_action = QAction(
59+
language_wrapper.language_word_dict.get("tab_menu_re_re_edge_gpt_tab_name"))
60+
ui_we_want_to_set.tab_menu.add_re_edge_gpt_action.triggered.connect(
61+
lambda: add_re_edge_gpt(ui_we_want_to_set)
62+
)
63+
ui_we_want_to_set.tab_menu.addAction(ui_we_want_to_set.tab_menu.add_re_edge_gpt_action)
5664

5765

5866
def add_editor_tab(ui_we_want_to_set: EditorMain):
@@ -90,3 +98,10 @@ def add_ipython(ui_we_want_to_set: EditorMain):
9098
IpythonWidget(ui_we_want_to_set),
9199
f"{language_wrapper.language_word_dict.get('tab_menu_ipython_tab_name')} "
92100
f"{ui_we_want_to_set.tab_widget.count()}")
101+
102+
103+
def add_re_edge_gpt(ui_we_want_to_set: EditorMain):
104+
ui_we_want_to_set.tab_widget.addTab(
105+
ChatMainUI(),
106+
f"{language_wrapper.language_word_dict.get('tab_name_re_edge_gpt')} "
107+
f"{ui_we_want_to_set.tab_widget.count()}")

je_editor/start_editor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from je_editor.pyside_ui.main_ui.main_editor import EditorMain
88

99

10-
def start_editor(debug_mode: bool = False, ) -> None:
10+
def start_editor(debug_mode: bool = False) -> None:
1111
new_editor = QCoreApplication.instance()
1212
if new_editor is None:
1313
new_editor = QApplication(sys.argv)

je_editor/utils/multi_language/english.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"tab_name_editor": "Editor",
66
"tab_name_web_browser": "Web Browser",
77
"tab_name_frontengine": "FrontEngine",
8+
"tab_name_re_edge_gpt": "Re-EdgeGPT",
89
# Browser
910
"browser_download_detail": "Download Detail",
1011
"browser_find_text": "Find Text",
@@ -107,6 +108,7 @@
107108
"tab_menu_web_tab_name": "WEB Browser",
108109
"tab_menu_stackoverflow_tab_name": "Stackoverflow",
109110
"tab_menu_ipython_tab_name": "IPython(Jupyter)",
111+
"tab_menu_re_re_edge_gpt_tab_name": "ReEdgeGPT",
110112
# Text Menu
111113
"text_menu_label": "Text",
112114
"text_menu_label_font": "Font",

je_editor/utils/multi_language/traditional_chinese.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"tab_name_editor": "編輯器",
66
"tab_name_web_browser": "網頁瀏覽器",
77
"tab_name_frontengine": "前景引擎",
8+
"tab_name_re_edge_gpt": "Re-EdgeGPT",
89
# Browser
910
"browser_download_detail": "下載資訊",
1011
"browser_find_text": "搜尋文字",
@@ -105,6 +106,7 @@
105106
"tab_menu_web_tab_name": "瀏覽器",
106107
"tab_menu_stackoverflow_tab_name": "Stackoverflow",
107108
"tab_menu_ipython_tab_name": "IPython(Jupyter)",
109+
"tab_menu_re_re_edge_gpt_tab_name": "ReEdgeGPT",
108110
# Text Menu
109111
"text_menu_label": "文字",
110112
"text_menu_label_font": "字體",

0 commit comments

Comments
 (0)