Add a basic news view page.

This commit is contained in:
yuanhau 2025-05-25 00:13:49 +08:00
parent 4b7934552c
commit f34da9f5c1
9 changed files with 90 additions and 25 deletions

View file

@ -56,7 +56,6 @@ onMounted(async () => {
} = useFetch(`/api/ai/chat/${chatId.value}`);*/
});
const sendMessage = async (newMessage: any) => {
if (!newMessage.trim() || !newsId.value.trim() || isStreaming.value) {
return;
@ -68,7 +67,7 @@ const sendMessage = async (newMessage: any) => {
user: true,
timestamp: new Date(),
});
messageIndex.value += 1
messageIndex.value += 1;
try {
isStreaming.value = true;
@ -183,9 +182,7 @@ const formatTime = (timestamp: any) => {
</div>
</div>
<div v-if="isStreaming" class="">
<div>
</div>
<div></div>
</div>
</div>
<div class="h-[75px]"></div>