Fix Vue reactivity: use reactive() for message objects

This commit is contained in:
Adam Ladachowski
2026-02-14 06:55:46 +01:00
parent 374d3a0bee
commit 26e5b44c68
5 changed files with 9 additions and 9 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -5,8 +5,8 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tensors</title>
<script type="module" crossorigin src="/assets/index-C2fGYMRK.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BJzI3xR2.css">
<script type="module" crossorigin src="/assets/index-CFzDN2Nk.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BwgrwH8m.css">
</head>
<body>
<div id="app"></div>
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, computed } from 'vue'
import { ref, computed, reactive } from 'vue'
import { useAppStore } from '@/stores/app'
import * as api from '@/api/client'
import type { GeneratedImage } from '@/types'
@@ -58,12 +58,12 @@ async function generate() {
const { width, height } = store.resolution
const paramsStr = `${width}×${height}, ${store.steps} steps${store.batchSize > 1 ? `, batch ${store.batchSize}` : ''}${store.selectedLora ? ', +LoRA' : ''}`
const message: ChatMessage = {
const message = reactive<ChatMessage>({
prompt: currentPrompt,
params: paramsStr,
images: [],
loading: true,
}
})
messages.value.push(message)
try {