diff --git a/web/public/character-busy.gif b/web/public/character-busy.gif new file mode 100644 index 0000000..75888bb Binary files /dev/null and b/web/public/character-busy.gif differ diff --git a/web/src/App.tsx b/web/src/App.tsx index 2f31c56..e300bdb 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -7,6 +7,7 @@ import { AuthScreen } from "@/components/auth/auth-screen"; import { ChatAttachmentList } from "@/components/chat/chat-attachment-list"; import { ChatMessagesPanel } from "@/components/chat/chat-messages-panel"; import { SearchResultsPanel } from "@/components/search/search-results-panel"; +import { SybilCharacter } from "@/components/sybil-character"; import { createChat, createChatFromSearch, @@ -1999,12 +2000,9 @@ export default function App() { Sybil Web{authMode ? ` (${authMode === "open" ? "open mode" : "token mode"})` : ""}

- diff --git a/web/src/components/sybil-character.tsx b/web/src/components/sybil-character.tsx new file mode 100644 index 0000000..f5e4259 --- /dev/null +++ b/web/src/components/sybil-character.tsx @@ -0,0 +1,31 @@ +import { useEffect } from "preact/hooks"; +import { cn } from "@/lib/utils"; + +const CHARACTER_IDLE_SRC = "/character-idle.gif"; +const CHARACTER_BUSY_SRC = "/character-busy.gif"; + +type SybilCharacterProps = { + className?: string; + isBusy?: boolean; +}; + +export function SybilCharacter({ className, isBusy = false }: SybilCharacterProps) { + useEffect(() => { + const busyImage = new Image(); + busyImage.src = CHARACTER_BUSY_SRC; + }, []); + + return ( + + ); +} diff --git a/web/tsconfig.tsbuildinfo b/web/tsconfig.tsbuildinfo index 88d2ce5..409faae 100644 --- a/web/tsconfig.tsbuildinfo +++ b/web/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/app.tsx","./src/main.tsx","./src/root-router.tsx","./src/vite-env.d.ts","./src/components/auth/auth-screen.tsx","./src/components/chat/chat-attachment-list.tsx","./src/components/chat/chat-messages-panel.tsx","./src/components/markdown/markdown-content.tsx","./src/components/search/search-results-panel.tsx","./src/components/ui/button.tsx","./src/components/ui/input.tsx","./src/components/ui/scroll-area.tsx","./src/components/ui/separator.tsx","./src/components/ui/textarea.tsx","./src/hooks/use-session-auth.ts","./src/lib/api.ts","./src/lib/utils.ts","./src/pages/search-route-page.tsx"],"version":"5.9.3"} \ No newline at end of file +{"root":["./src/app.tsx","./src/main.tsx","./src/root-router.tsx","./src/vite-env.d.ts","./src/components/sybil-character.tsx","./src/components/auth/auth-screen.tsx","./src/components/chat/chat-attachment-list.tsx","./src/components/chat/chat-messages-panel.tsx","./src/components/markdown/markdown-content.tsx","./src/components/search/search-results-panel.tsx","./src/components/ui/button.tsx","./src/components/ui/input.tsx","./src/components/ui/scroll-area.tsx","./src/components/ui/separator.tsx","./src/components/ui/textarea.tsx","./src/hooks/use-session-auth.ts","./src/lib/api.ts","./src/lib/utils.ts","./src/pages/search-route-page.tsx"],"version":"5.9.3"} \ No newline at end of file