From 59402b250c44134ad4ece30920095b912d130f36 Mon Sep 17 00:00:00 2001 From: Anais Saraiva Date: Mon, 21 Sep 2026 13:05:25 +0200 Subject: [PATCH] update --- anoying_promt | 11 ++ frontend/src/App.tsx | 8 +- frontend/src/components/AdminPanel.tsx | 2 +- frontend/src/components/Chat.tsx | 32 ++-- frontend/src/components/Login.tsx | 6 +- frontend/src/components/ResetPage.tsx | 4 +- frontend/src/components/SharePage.tsx | 2 +- frontend/src/components/Sidebar.tsx | 2 +- frontend/src/components/dialogs.tsx | 211 ++++++++++++++++++++++++- frontend/src/components/ui.tsx | 117 ++++++++++++-- frontend/src/index.css | 19 ++- frontend/src/lib/accent.ts | 117 ++++++++++++++ frontend/src/lib/api.ts | 8 +- frontend/src/lib/features.ts | 80 ++++++++++ frontend/tailwind.config.js | 16 ++ src/db.ts | 28 ++++ src/index.ts | 195 ++++++++++++++++++++++- src/tools/ocr.ts | 10 +- 18 files changed, 818 insertions(+), 50 deletions(-) create mode 100644 anoying_promt create mode 100644 frontend/src/lib/accent.ts create mode 100644 frontend/src/lib/features.ts diff --git a/anoying_promt b/anoying_promt new file mode 100644 index 0000000..a492c49 --- /dev/null +++ b/anoying_promt @@ -0,0 +1,11 @@ +---- HIGH PRIORITY + +Loading screen with animation instead of just : "Loading..." +Like a flower that "loading" like circle animation, or beautiful disapearing/appearing animation +or even a beautiful flower in svgs that got built block by block +or something original but in the actual theme and Adapative to phone + +--- Settings modal. +make a better settings overview,with larger modal in screen . with categories, section for searching + +--- UPLOAD URL FOR PFP MUST BE A READ ONLY IN USER . NOW CAUSE OF THE OWN CDN. USER SHOULDNT SEE THAT VALUE /EDIT IT ANYMORe. diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index df22315..11d040a 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,5 +1,6 @@ import { useCallback, useEffect, useState } from "react"; import { api, clearToken, getToken } from "./lib/api.ts"; +import { featureEnabled, THINKING_SYSTEM_PROMPT } from "./lib/features.ts"; import type { Attachment, ChatMessage, Conversation, DriverModel, FilePreview, User } from "./lib/types.ts"; import { Login } from "./components/Login.tsx"; import { Sidebar } from "./components/Sidebar.tsx"; @@ -175,7 +176,12 @@ export function App() { setStreaming(""); let full = ""; try { - await api.chatStream({ model, messages: history, conversationId: convId! }, (t) => { + // "Thinking" feature flag: decorate the outgoing payload only — the + // system message is never shown nor persisted client-side. + const outMessages = featureEnabled("thinking") + ? [{ role: "system", content: THINKING_SYSTEM_PROMPT } as ChatMessage, ...history] + : history; + await api.chatStream({ model, messages: outMessages, conversationId: convId! }, (t) => { full += t; setStreaming(full); }); diff --git a/frontend/src/components/AdminPanel.tsx b/frontend/src/components/AdminPanel.tsx index b63f5b4..465cc95 100644 --- a/frontend/src/components/AdminPanel.tsx +++ b/frontend/src/components/AdminPanel.tsx @@ -84,7 +84,7 @@ export function AdminPanel({ open, onClose }: { open: boolean; onClose: () => vo {error &&

{error}

} {freshKey && ( -
+

Key for @{freshKey.username} — shown once, copy it now:

{freshKey.key} diff --git a/frontend/src/components/Chat.tsx b/frontend/src/components/Chat.tsx index d6303f3..d555e31 100644 --- a/frontend/src/components/Chat.tsx +++ b/frontend/src/components/Chat.tsx @@ -4,6 +4,7 @@ import type { Attachment, ChatMessage, Conversation, DriverModel, User } from ". import { Avatar, IconButton, LOGO_URL, Logo, Picker, type PickerGroup, Spinner } from "./ui.tsx"; import { Markdown } from "./Markdown.tsx"; import { cn } from "../lib/cn.ts"; +import { useFeatures } from "../lib/features.ts"; function MessageBubble({ msg, authorAvatar, authorName }: { msg: ChatMessage; authorAvatar?: string; authorName: string }) { const isUser = msg.role === "user"; @@ -16,7 +17,7 @@ function MessageBubble({ msg, authorAvatar, authorName }: { msg: ChatMessage; au {isUser ? "You" : "KisAssistant"}
{isUser ? ( -
+
{msg.content}
) : ( @@ -70,6 +71,7 @@ export function Chat({ }) { const [draft, setDraft] = useState(""); const [attachOpen, setAttachOpen] = useState(false); + const features = useFeatures(); const boxRef = useRef(null); const taRef = useRef(null); const imgRef = useRef(null); @@ -182,7 +184,7 @@ export function Chat({ {attachments.length > 0 && (
{attachments.map((a) => ( - + {a.kind === "ocr" ? : } {a.name}
- + {features.attachments && ( + + )} { const f = e.target.files?.[0]; if (f) onPickFile("ocr", f); e.target.value = ""; }} /> { const f = e.target.files?.[0]; if (f) onPickFile("text", f); e.target.value = ""; }} />