From 19bb9d06ae27d369f26ef32f7b92d66451f98392 Mon Sep 17 00:00:00 2001 From: Jana Peper Date: Mon, 10 Mar 2025 13:54:32 +0100 Subject: [PATCH] fix: saving Chat with AI as last task type Signed-off-by: Jana Peper --- src/components/ChattyLLM/ChattyLLMInputForm.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/components/ChattyLLM/ChattyLLMInputForm.vue b/src/components/ChattyLLM/ChattyLLMInputForm.vue index 38524027..75d0e4f6 100644 --- a/src/components/ChattyLLM/ChattyLLMInputForm.vue +++ b/src/components/ChattyLLM/ChattyLLMInputForm.vue @@ -635,6 +635,7 @@ export default { if (agencyConfirm !== null) { params.agencyConfirm = agencyConfirm ? 1 : 0 } + this.saveLastSelectedTaskType('chatty-llm') const response = await axios.get(getChatURL('/generate'), { params }) console.debug('scheduleGenerationTask response:', response) const message = await this.pollGenerationTask(response.data.taskId, sessionId) @@ -750,6 +751,16 @@ export default { this.scrollToBottom() await this.newMessage(role, content, timestamp, this.active.id, false, confirm) }, + + async saveLastSelectedTaskType(taskType) { + const req = { + values: { + last_task_type: taskType, + }, + } + const url = generateUrl('/apps/assistant/config') + return axios.put(url, req) + } }, }