|
1 | | -import os |
2 | 1 | from pathlib import Path |
3 | 2 |
|
4 | 3 | from qtpy.QtCore import Qt, Signal, QSettings |
5 | 4 | from qtpy.QtWidgets import QVBoxLayout, QAction, QPushButton, QFileDialog, QToolButton, QMenu, QWidget, QHBoxLayout |
6 | 5 |
|
7 | | -from pyqt_openai.gpt_widget.commandSuggestionWidget import CommandSuggestionWidget |
8 | | -from pyqt_openai.gpt_widget.textEditPromptGroup import TextEditPromptGroup |
9 | | -from pyqt_openai.gpt_widget.uploadedImageFileWidget import UploadedImageFileWidget |
10 | 6 | from pyqt_openai import INI_FILE_NAME, READ_FILE_EXT_LIST_STR, PROMPT_BEGINNING_KEY_NAME, \ |
11 | 7 | PROMPT_END_KEY_NAME, PROMPT_JSON_KEY_NAME, DEFAULT_SHORTCUT_PROMPT_BEGINNING, DEFAULT_SHORTCUT_PROMPT_ENDING, \ |
12 | | - DEFAULT_SHORTCUT_SUPPORT_PROMPT_COMMAND, ICON_VERTICAL_THREE_DOTS, ICON_SEND, PROMPT_MAIN_KEY_NAME, IMAGE_FILE_EXT_LIST, \ |
| 8 | + DEFAULT_SHORTCUT_SUPPORT_PROMPT_COMMAND, ICON_VERTICAL_THREE_DOTS, ICON_SEND, PROMPT_MAIN_KEY_NAME, \ |
| 9 | + IMAGE_FILE_EXT_LIST, \ |
13 | 10 | TEXT_FILE_EXT_LIST, QFILEDIALOG_DEFAULT_DIRECTORY, DEFAULT_SHORTCUT_SEND |
14 | | -from pyqt_openai.pyqt_openai_data import DB |
| 11 | +from pyqt_openai.gpt_widget.commandSuggestionWidget import CommandSuggestionWidget |
| 12 | +from pyqt_openai.gpt_widget.textEditPromptGroup import TextEditPromptGroup |
| 13 | +from pyqt_openai.gpt_widget.uploadedImageFileWidget import UploadedImageFileWidget |
15 | 14 | from pyqt_openai.lang.translations import LangClass |
| 15 | +from pyqt_openai.pyqt_openai_data import DB |
16 | 16 | from pyqt_openai.util.script import get_content_of_text_file_for_send |
17 | 17 | from pyqt_openai.widgets.button import Button |
18 | 18 | from pyqt_openai.widgets.toolButton import ToolButton |
@@ -188,7 +188,7 @@ def __getEveryPromptCommands(self, get_name_only=False): |
188 | 188 | def __updateSuggestions(self): |
189 | 189 | w = self.__textEditGroup.getCurrentTextEdit() |
190 | 190 | if w and self.__commandEnabled: |
191 | | - input_text_chunk = w.getResponse().content.split() |
| 191 | + input_text_chunk = w.toPlainText().split() |
192 | 192 | input_text_chunk_exists = len(input_text_chunk) > 0 |
193 | 193 | self.__suggestionWidget.setVisible(input_text_chunk_exists) |
194 | 194 | if input_text_chunk_exists: |
|
0 commit comments