Skip to content

Commit

Permalink
Merge pull request #58 from nextcloud/fix/no-selective-context
Browse files Browse the repository at this point in the history
fix(ContextChat): update inputs on selective context checkbox change
  • Loading branch information
julien-nc authored Apr 10, 2024
2 parents 6f81783 + 9471089 commit 68795e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/AssistantFormInputs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
</div>
<div v-else class="assistant-inputs">
<div v-if="selectedTaskTypeId === 'OCA\\ContextChat\\TextProcessing\\ContextChatTaskType'" class="assistant-inputs">
<NcCheckboxRadioSwitch :checked.sync="sccEnabled">
<NcCheckboxRadioSwitch :checked.sync="sccEnabled" @update:checked="onUpdateContextChat">
{{ t('assistant', 'Selective context') }}
</NcCheckboxRadioSwitch>
<ContextChatInputForm v-if="sccEnabled" :scc-data.sync="sccData" />
<ContextChatInputForm v-if="sccEnabled" :scc-data.sync="sccData" @update:scc-data="onUpdateContextChat" />
</div>
<div class="input-container">
<div class="label-row">
Expand Down Expand Up @@ -179,6 +179,8 @@ export default {
this.onUpdateStt()
} else if (this.selectedTaskTypeId === 'OCP\\TextToImage\\Task') {
this.onUpdateTti()
} else if (this.selectedTaskTypeId === 'OCA\\ContextChat\\TextProcessing\\ContextChatTaskType') {
this.onUpdateContextChat()
} else {
this.onUpdate()
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/ContextChat/ContextChatInputForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ export default {
},
},
emits: ['update:sccData'],
data() {
return {
ScopeType: _ScopeType,
Expand Down

0 comments on commit 68795e4

Please sign in to comment.