diff --git a/src/api/system/instruction.js b/src/api/system/instruction.js
index 889994b..3f6b43e 100644
--- a/src/api/system/instruction.js
+++ b/src/api/system/instruction.js
@@ -19,11 +19,21 @@ export function executeInstructionWithForce(data) {
})
}
-export function getHistory(type, limit) {
+/**
+ * 获取历史消息记录
+ * @param type request | response
+ * @param limit 条数上限
+ * @param keyword 可选,搜索关键词;传则后端在全部数据中过滤后返回
+ */
+export function getHistory(type, limit, keyword) {
+ const params = { type, limit }
+ if (keyword != null && String(keyword).trim() !== '') {
+ params.keyword = String(keyword).trim()
+ }
return request({
url: '/jarvis/instruction/history',
method: 'get',
- params: { type, limit }
+ params
})
}
diff --git a/src/views/system/jd-instruction/index.vue b/src/views/system/jd-instruction/index.vue
index 3ffdee4..6566ed6 100644
--- a/src/views/system/jd-instruction/index.vue
+++ b/src/views/system/jd-instruction/index.vue
@@ -70,20 +70,34 @@