From e7a042190ee64a29faa41e4b80dcb06c4aa68cf3 Mon Sep 17 00:00:00 2001 From: Roman Romanov Date: Tue, 11 Nov 2025 22:23:50 +0100 Subject: [PATCH 1/2] fix: reinitialize inputs on New Task button click Signed-off-by: Roman Romanov --- src/components/ContextChat/ContextChatInputForm.vue | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/components/ContextChat/ContextChatInputForm.vue b/src/components/ContextChat/ContextChatInputForm.vue index bd191ed3f..238ec0823 100644 --- a/src/components/ContextChat/ContextChatInputForm.vue +++ b/src/components/ContextChat/ContextChatInputForm.vue @@ -260,6 +260,13 @@ export default { taskType(newValue) { this.onTaskTypeChange() }, + inputs: { + handler(newValue) { + if (Object.keys(newValue).length === 0) { + this.onInputsReset() + } + }, + }, }, mounted() { @@ -381,6 +388,12 @@ export default { }) }, onTaskTypeChange() { + this.reinitializeInputs() + }, + onInputsReset() { + this.reinitializeInputs() + }, + reinitializeInputs() { this.$emit('update:inputs', { prompt: this.inputs.prompt ?? '', limit: this.isSearch ? this.taskType.inputShapeDefaults?.limit : undefined, From e21b93faaa70d681ccb7a994a6be2d696d8208c8 Mon Sep 17 00:00:00 2001 From: Roman Romanov Date: Wed, 12 Nov 2025 11:31:25 +0100 Subject: [PATCH 2/2] fix: remove unnecessary handler Signed-off-by: Roman Romanov --- src/components/ContextChat/ContextChatInputForm.vue | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/ContextChat/ContextChatInputForm.vue b/src/components/ContextChat/ContextChatInputForm.vue index 238ec0823..8c06d3eb7 100644 --- a/src/components/ContextChat/ContextChatInputForm.vue +++ b/src/components/ContextChat/ContextChatInputForm.vue @@ -260,12 +260,10 @@ export default { taskType(newValue) { this.onTaskTypeChange() }, - inputs: { - handler(newValue) { - if (Object.keys(newValue).length === 0) { - this.onInputsReset() - } - }, + inputs(newValue) { + if (Object.keys(newValue).length === 0) { + this.onInputsReset() + } }, },