Skip to content

Commit

Permalink
"Add subscription to update modelRef based on chatStore changes"
Browse files Browse the repository at this point in the history
  • Loading branch information
swuecho committed Jun 28, 2024
1 parent 2175c9d commit b15bb49
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web/src/views/chat/components/ModelSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ watch(modelRef, async (modelValue: any) => {
}, { deep: true })
chatStore.$subscribe((mutation, state) => {
const session = chatStore.getChatSessionByUuid(props.uuid)
if (modelRef.value.model != session?.model) {
modelRef.value.model = session?.model
}
})
</script>

Expand Down

0 comments on commit b15bb49

Please sign in to comment.