diff --git a/frontend/ops_vue_js/src/i18n/en.json b/frontend/ops_vue_js/src/i18n/en.json index 72319c3..4d78111 100644 --- a/frontend/ops_vue_js/src/i18n/en.json +++ b/frontend/ops_vue_js/src/i18n/en.json @@ -93,7 +93,12 @@ "delete_chat_failed": "Failed to delete chat", "storage_full": "Browser storage is full; the chat may not be saved", "login_to_sync": "Log in to save chats on the server", - "untitled_chat": "New chat" + "untitled_chat": "New chat", + "quick_actions": "Quick actions", + "quick_calendar_label": "Summarize this month's schedule", + "quick_calendar_prompt": "Please summarize this month's schedule entries in chronological order.", + "quick_purchase_label": "Summarize this month's purchase spending", + "quick_purchase_prompt": "Please summarize this month's total purchase spending, broken down by category or supplier." }, "aiconfig": { "title": "AI Config", diff --git a/frontend/ops_vue_js/src/i18n/zh-CN.json b/frontend/ops_vue_js/src/i18n/zh-CN.json index 5527cd0..a6f02f6 100644 --- a/frontend/ops_vue_js/src/i18n/zh-CN.json +++ b/frontend/ops_vue_js/src/i18n/zh-CN.json @@ -93,7 +93,12 @@ "delete_chat_failed": "删除聊天失败", "storage_full": "浏览器存储空间不足,聊天可能无法保存", "login_to_sync": "登录后可保存聊天到服务端", - "untitled_chat": "新对话" + "untitled_chat": "新对话", + "quick_actions": "快捷操作", + "quick_calendar_label": "统计本月日程安排", + "quick_calendar_prompt": "请帮我统计本月的日程安排,并按时间顺序汇总。", + "quick_purchase_label": "统计本月采购花费", + "quick_purchase_prompt": "请帮我统计本月的采购花费总额,并按类别或供应商分类汇总。" }, "aiconfig": { "title": "AI 配置", diff --git a/frontend/ops_vue_js/src/views/aichat/AiChatView.vue b/frontend/ops_vue_js/src/views/aichat/AiChatView.vue index 04ed079..62a2aa8 100644 --- a/frontend/ops_vue_js/src/views/aichat/AiChatView.vue +++ b/frontend/ops_vue_js/src/views/aichat/AiChatView.vue @@ -609,6 +609,12 @@ function renderMarkdown(value) { return rendered } +function sendQuickPrompt(prompt) { + if (pending.value) return + inputText.value = prompt + sendMessage() +} + async function sendMessage() { const text = inputText.value.trim() const image = selectedImage.value @@ -854,6 +860,24 @@ async function sendMessage() {
{{ t('aichat.empty_hint') }}
+