From d441a7ce309919db0d55884c30d0854d61326d12 Mon Sep 17 00:00:00 2001 From: Jana Peper Date: Tue, 9 Dec 2025 09:29:33 +0100 Subject: [PATCH 1/2] fix: no last task type Signed-off-by: Jana Peper --- lib/Controller/AssistantController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Controller/AssistantController.php b/lib/Controller/AssistantController.php index abf40207..425cdc68 100644 --- a/lib/Controller/AssistantController.php +++ b/lib/Controller/AssistantController.php @@ -63,7 +63,7 @@ public function getAssistantTaskResultPage(int $taskId): TemplateResponse { public function getAssistantStandalonePage(): TemplateResponse { if ($this->userId !== null) { $task = new Task( - $this->config->getUserValue($this->userId, Application::APP_ID, 'last_task_type'), + $this->config->getUserValue($this->userId, Application::APP_ID, 'last_task_type', 'chatty-llm'), ['something' => ''], Application::APP_ID, $this->userId, From af4f02aa6b62a610740bb754d01323dbb7a349b3 Mon Sep 17 00:00:00 2001 From: Jana Peper Date: Tue, 9 Dec 2025 09:43:19 +0100 Subject: [PATCH 2/2] fix: no last task type in js Signed-off-by: Jana Peper --- src/assistant.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/assistant.js b/src/assistant.js index 45177dfa..58ccbda5 100644 --- a/src/assistant.js +++ b/src/assistant.js @@ -409,7 +409,14 @@ async function getLastSelectedTaskType() { }, } const url = generateUrl('/apps/assistant/config') - return axios.get(url, req) + return axios.get(url, req).catch(error => { + if (error.response?.status === 404) { + console.debug(t('assistant', 'No last task type available, falling back to default')) + return { data: 'chatty-llm' } + } + + console.error(error) + }) } async function saveLastTargetLanguage(targetLanguage) {