增加回饋提交時的空內容檢查,並新增相應的提示信息

This commit is contained in:
Minidoracat 2025-06-03 01:14:17 +08:00
parent 4f328860f6
commit 0383499ca5
4 changed files with 23 additions and 4 deletions

View File

@ -1422,8 +1422,21 @@ class FeedbackWindow(QMainWindow):
def _submit_feedback(self) -> None: def _submit_feedback(self) -> None:
"""提交回饋""" """提交回饋"""
feedback_text = self.feedback_input.toPlainText().strip()
# 檢查回饋內容是否為空
if not feedback_text:
QMessageBox.information(
self,
t('feedback.emptyTitle'),
t('feedback.emptyMessage')
)
# 將焦點設置到回饋輸入框
self.feedback_input.setFocus()
return
self.result = { self.result = {
"interactive_feedback": self.feedback_input.toPlainText(), "interactive_feedback": feedback_text,
"command_logs": self.command_output.toPlainText(), "command_logs": self.command_output.toPlainText(),
"images": self.image_upload.get_images_data() "images": self.image_upload.get_images_data()
} }

View File

@ -22,7 +22,9 @@
"feedback": { "feedback": {
"title": "Your Feedback", "title": "Your Feedback",
"description": "Please describe your thoughts, suggestions, or modifications needed for the AI's work.", "description": "Please describe your thoughts, suggestions, or modifications needed for the AI's work.",
"placeholder": "Please enter your feedback, suggestions, or questions here...\n\n💡 Tips:\n• Press Ctrl+Enter (numpad supported) to submit quickly\n• Press Ctrl+V to paste images from clipboard" "placeholder": "Please enter your feedback, suggestions, or questions here...\n\n💡 Tips:\n• Press Ctrl+Enter (numpad supported) to submit quickly\n• Press Ctrl+V to paste images from clipboard",
"emptyTitle": "Feedback Content Empty",
"emptyMessage": "Please enter feedback content before submitting. You can describe your thoughts, suggestions, or areas that need modification."
}, },
"command": { "command": {
"title": "Command Execution", "title": "Command Execution",

View File

@ -22,7 +22,9 @@
"feedback": { "feedback": {
"title": "您的反馈", "title": "您的反馈",
"description": "请描述您对 AI 工作结果的想法、建议或需要修改的地方。", "description": "请描述您对 AI 工作结果的想法、建议或需要修改的地方。",
"placeholder": "请在这里输入您的反馈、建议或问题...\n\n💡 小提示:\n• 按 Ctrl+Enter支持数字键盘可快速提交反馈\n• 按 Ctrl+V 可直接粘贴剪贴板图片" "placeholder": "请在这里输入您的反馈、建议或问题...\n\n💡 小提示:\n• 按 Ctrl+Enter支持数字键盘可快速提交反馈\n• 按 Ctrl+V 可直接粘贴剪贴板图片",
"emptyTitle": "反馈内容为空",
"emptyMessage": "请先输入反馈内容再提交。您可以描述想法、建议或需要修改的地方。"
}, },
"command": { "command": {
"title": "命令执行", "title": "命令执行",

View File

@ -22,7 +22,9 @@
"feedback": { "feedback": {
"title": "您的回饋", "title": "您的回饋",
"description": "請描述您對 AI 工作結果的想法、建議或需要修改的地方。", "description": "請描述您對 AI 工作結果的想法、建議或需要修改的地方。",
"placeholder": "請在這裡輸入您的回饋、建議或問題...\n\n💡 小提示:\n• 按 Ctrl+Enter支援數字鍵盤可快速提交回饋\n• 按 Ctrl+V 可直接貼上剪貼簿圖片" "placeholder": "請在這裡輸入您的回饋、建議或問題...\n\n💡 小提示:\n• 按 Ctrl+Enter支援數字鍵盤可快速提交回饋\n• 按 Ctrl+V 可直接貼上剪貼簿圖片",
"emptyTitle": "回饋內容為空",
"emptyMessage": "請先輸入回饋內容再提交。您可以描述想法、建議或需要修改的地方。"
}, },
"command": { "command": {
"title": "命令執行", "title": "命令執行",