Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/components/ChattyLLM/ChattyLLMInputForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@
this.loading.initialMessages = false
this.messagesAxiosController = null
} catch (error) {
if (axios.isCancel(error)) {

Check warning on line 558 in src/components/ChattyLLM/ChattyLLMInputForm.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Caution: `axios` also has a named export `isCancel`. Check if you meant to write `import {isCancel} from '@nextcloud/axios'` instead

Check warning on line 558 in src/components/ChattyLLM/ChattyLLMInputForm.vue

View workflow job for this annotation

GitHub Actions / NPM build

Caution: `axios` also has a named export `isCancel`. Check if you meant to write `import {isCancel} from '@nextcloud/axios'` instead

Check warning on line 558 in src/components/ChattyLLM/ChattyLLMInputForm.vue

View workflow job for this annotation

GitHub Actions / NPM build

Caution: `axios` also has a named export `isCancel`. Check if you meant to write `import {isCancel} from '@nextcloud/axios'` instead
console.debug('fetchMessages cancelled')
return
}
Expand Down Expand Up @@ -635,6 +635,7 @@
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)
Expand Down Expand Up @@ -750,6 +751,16 @@
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)
}

Check warning on line 763 in src/components/ChattyLLM/ChattyLLMInputForm.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Missing trailing comma

Check warning on line 763 in src/components/ChattyLLM/ChattyLLMInputForm.vue

View workflow job for this annotation

GitHub Actions / NPM build

Missing trailing comma

Check warning on line 763 in src/components/ChattyLLM/ChattyLLMInputForm.vue

View workflow job for this annotation

GitHub Actions / NPM build

Missing trailing comma
},
}
</script>
Expand Down
Loading