Skip to content

Commit c93e855

Browse files
committed
Refactor and update dev version
Refactor and update dev version
1 parent 127990d commit c93e855

File tree

4 files changed

+20
-31
lines changed

4 files changed

+20
-31
lines changed

je_editor/pyside_ui/dialog/ai_dialog/set_ai_dialog.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ def __init__(self):
1313
self.base_url_input = QLineEdit()
1414
self.api_key_input = QLineEdit()
1515
self.chat_model_input = QLineEdit()
16-
self.search_next_button = QPushButton()
17-
self.search_next_button.setText(language_wrapper.language_word_dict.get("add_ai_model_pushbutton"))
16+
self.add_ai_info_button = QPushButton()
17+
self.add_ai_info_button.setText(language_wrapper.language_word_dict.get("add_ai_model_pushbutton"))
18+
self.add_ai_info_button.clicked.connect(self.update_ai_config)
1819
self.box_h_layout = QHBoxLayout()
19-
self.box_h_layout.addWidget(self.search_next_button)
20+
self.box_h_layout.addWidget(self.add_ai_info_button)
2021
self.box_layout.addWidget(self.base_url_input)
2122
self.box_layout.addWidget(self.api_key_input)
2223
self.box_layout.addWidget(self.chat_model_input)
2324
self.box_layout.addLayout(self.box_h_layout)
2425
self.setWindowTitle(language_wrapper.language_word_dict.get("add_ai_model_title"))
2526
self.setLayout(self.box_layout)
27+
28+
def update_ai_config(self):
29+
pass

je_editor/pyside_ui/main_ui/ai_widget/ai_config.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,3 @@ def __init__(self):
1111
"AI_model": {"ai_base_url": "", "ai_api_key": "", "chat_model": ""}
1212
}
1313

14-
15-
if __name__ == "__main__":
16-
ai_config = AIConfig()
17-
ai_config_file = Path(str(Path.cwd()) + "/" + ".jeditor/ai_config.json")
18-
if ai_config_file.exists():
19-
with open(ai_config_file, "r", encoding="utf-8") as file:
20-
json_data: dict = read_json(str(ai_config_file))
21-
if json_data:
22-
if json_data.get("AI_model") and len(json_data.get("AI_model")) == 3:
23-
ai_info: dict = json_data.get("AI_model")
24-
if ai_info.get("ai_base_url") and ai_info.get("chat_model"):
25-
ai_config.choosable_ai.update(json_data)
26-
print(ai_config.choosable_ai)
27-
else:
28-
print("OOO")

pyproject.toml

Lines changed: 6 additions & 7 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 build dev version
2+
# This is dev version
33
[build-system]
4-
requires = ["setuptools>=61.0"]
4+
requires = ["setuptools"]
55
build-backend = "setuptools.build_meta"
66

77
[project]
8-
name = "je_editor"
9-
version = "0.0.204"
8+
name = "je_editor_dev"
9+
version = "0.0.225"
1010
authors = [
1111
{ name = "JE-Chen", email = "[email protected]" },
1212
]
@@ -23,11 +23,9 @@ classifiers = [
2323
"Environment :: Win32 (MS Windows)",
2424
"Environment :: MacOS X",
2525
"Environment :: X11 Applications",
26-
"License :: OSI Approved :: MIT License",
2726
"Operating System :: OS Independent"
2827
]
2928

30-
3129
[project.urls]
3230
Homepage = "https://github.com/JE-Chen/je_editor"
3331
Documentation = "https://je-editor.readthedocs.io/en/latest/"
@@ -37,5 +35,6 @@ Code = "https://github.com/JE-Chen/je_editor"
3735
file = "README.md"
3836
content-type = "text/markdown"
3937

38+
4039
[tool.setuptools.packages]
4140
find = { namespaces = false }

dev.toml renamed to stable.toml

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

77
[project]
8-
name = "je_editor_dev"
9-
version = "0.0.224"
8+
name = "je_editor"
9+
version = "0.0.204"
1010
authors = [
1111
{ name = "JE-Chen", email = "[email protected]" },
1212
]
@@ -23,9 +23,11 @@ classifiers = [
2323
"Environment :: Win32 (MS Windows)",
2424
"Environment :: MacOS X",
2525
"Environment :: X11 Applications",
26+
"License :: OSI Approved :: MIT License",
2627
"Operating System :: OS Independent"
2728
]
2829

30+
2931
[project.urls]
3032
Homepage = "https://github.com/JE-Chen/je_editor"
3133
Documentation = "https://je-editor.readthedocs.io/en/latest/"
@@ -35,6 +37,5 @@ Code = "https://github.com/JE-Chen/je_editor"
3537
file = "README.md"
3638
content-type = "text/markdown"
3739

38-
3940
[tool.setuptools.packages]
4041
find = { namespaces = false }

0 commit comments

Comments
 (0)