From b4505171d8560990b88860ce2c5074dbd19297b2 Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Thu, 19 Sep 2024 16:49:39 +0200 Subject: [PATCH] fix: enable submit button without scope (#128) * fix(contextchat): open referenced sources in new tab * fix(contextchat): enable submit button without scope --------- Signed-off-by: Anupam Kumar --- src/components/ContextChat/ContextChatInputForm.vue | 12 +++++++----- src/components/ContextChat/ContextChatOutputForm.vue | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/ContextChat/ContextChatInputForm.vue b/src/components/ContextChat/ContextChatInputForm.vue index 6c757073..cba24bd3 100644 --- a/src/components/ContextChat/ContextChatInputForm.vue +++ b/src/components/ContextChat/ContextChatInputForm.vue @@ -249,11 +249,13 @@ export default { // initialize the inputs if necessary if (Object.keys(this.inputs).length === 0) { - this.$emit('update:inputs', { - prompt: '', - scopeType: _ScopeType.NONE, - scopeList: [], - scopeListMeta: '[]', + this.$nextTick(() => { + this.$emit('update:inputs', { + prompt: '', + scopeType: _ScopeType.NONE, + scopeList: [], + scopeListMeta: '[]', + }) }) } }, diff --git a/src/components/ContextChat/ContextChatOutputForm.vue b/src/components/ContextChat/ContextChatOutputForm.vue index 1db910b8..ded09dee 100644 --- a/src/components/ContextChat/ContextChatOutputForm.vue +++ b/src/components/ContextChat/ContextChatOutputForm.vue @@ -21,7 +21,7 @@ :append-to-body="false" :dropdown-should-open="() => false">