mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-23 07:33:53 +08:00
fix: 前端优化记忆模型切换体验 - 切换无记忆模型时暂存记忆、切换恢复、保存配置后才真正清除
This commit is contained in:
@@ -385,6 +385,7 @@ export default {
|
||||
speed: 0,
|
||||
pitch: 0
|
||||
},
|
||||
tempSummaryMemory: "",
|
||||
form: {
|
||||
agentCode: "",
|
||||
agentName: "",
|
||||
@@ -596,6 +597,7 @@ export default {
|
||||
fetchAgentConfig(agentId) {
|
||||
Api.agent.getDeviceConfig(agentId, ({ data }) => {
|
||||
if (data.code === 0) {
|
||||
this.tempSummaryMemory = "";
|
||||
this.form = {
|
||||
...this.form,
|
||||
...data.data,
|
||||
@@ -818,6 +820,13 @@ export default {
|
||||
// 有记忆功能的模型,默认记录文本和语音
|
||||
this.form.chatHistoryConf = 2;
|
||||
}
|
||||
if (value === "Memory_nomem" || value === "Memory_mem_report_only") {
|
||||
this.tempSummaryMemory = this.form.summaryMemory;
|
||||
this.form.summaryMemory = "";
|
||||
} else if (this.tempSummaryMemory !== "" && this.form.summaryMemory === "") {
|
||||
this.form.summaryMemory = this.tempSummaryMemory;
|
||||
this.tempSummaryMemory = "";
|
||||
}
|
||||
}
|
||||
if (type === "LLM") {
|
||||
// 当LLM类型改变时,更新意图识别选项的可见性
|
||||
|
||||
Reference in New Issue
Block a user