Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/components/AssistantFormInputs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default {
watch: {
selectedTaskType() {
console.debug('[assistant] watch selectedTaskType', this.selectedTaskType, this.selectedTaskTypeId)
this.setDefaultValues(true)
this.setDefaultValues(false)
},
},
mounted() {
Expand Down
15 changes: 15 additions & 0 deletions src/components/AssistantTextProcessingForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,23 @@ export default {
onTaskTypeUserChange() {
this.$emit('new-task')

const lastInput = this.myInputs?.input
|| this.myInputs?.source_input // used in context write
|| this.myInputs?.text // used in document generation

this.$refs?.translateForm?.setDefaultValues(true)
this.$refs?.assistantFormInputs?.setDefaultValues(true)

// keep last prompt if new task type has text input
if (lastInput && this.selectedTaskType?.inputShape?.input) {
this.myInputs.input = lastInput
}
if (lastInput && this.selectedTaskType?.inputShape?.source_input) {
this.myInputs.source_input = lastInput
}
if (lastInput && this.selectedTaskType?.inputShape?.text) {
this.myInputs.text = lastInput
}
},
onSyncSubmit() {
console.debug('[assistant] in form submit ---------', this.myInputs)
Expand Down
Loading