Taiga integration

This commit is contained in:
2026-06-09 12:47:13 +03:00
parent c8599b3d13
commit 1f83dcb574
30 changed files with 1543 additions and 115 deletions
+7 -4
View File
@@ -2,7 +2,7 @@ import { FormEvent, useEffect, useRef, useState } from "react";
import ReactMarkdown from "react-markdown";
import { api, ChatMessage, ChatSession } from "../api/client";
import PomodoroWidget from "../components/PomodoroWidget";
import { usePomodoro } from "../hooks/usePomodoro";
import { usePomodoro } from "../context/PomodoroContext";
import "./Chat.css";
function shouldShowMessage(msg: ChatMessage): boolean {
@@ -58,11 +58,14 @@ export default function Chat() {
useEffect(() => {
const seq = pomodoroStatus?.cycle?.chat_notify_seq ?? 0;
if (seq > lastNotifySeq && activeId) {
if (seq > lastNotifySeq) {
setLastNotifySeq(seq);
loadMessages(activeId).catch(console.error);
refreshPomodoro().catch(console.error);
if (activeId) {
loadMessages(activeId).catch(console.error);
}
}
}, [pomodoroStatus?.cycle?.chat_notify_seq, activeId, lastNotifySeq]);
}, [pomodoroStatus?.cycle?.chat_notify_seq, activeId, lastNotifySeq, refreshPomodoro]);
const handleNewChat = async () => {
const session = await api.createSession();