diff --git a/annexual_promot b/annexual_promot new file mode 100644 index 0000000..4b7490b --- /dev/null +++ b/annexual_promot @@ -0,0 +1,6 @@ +--- HIGH PRIORITY +Being abble to : +Disable features / Enable it: +ie : thinking, deep search, etc... + +Downloading models throught a catalog : ollama only diff --git a/another_prompt b/another_prompt index 9ea12a9..77deb2f 100644 --- a/another_prompt +++ b/another_prompt @@ -1,3 +1,4 @@ +--- VERY HIGH PRIORITY fait en sorte de pouvoir upload un avatar (Servir un cdn en local via fichier upload sur le serveur dans un dossier à côté de la codebase) cdn comme sa @@ -21,3 +22,13 @@ Rate-limit per change / per account de: file length maxi: 5MB SYSTEM DE CHANGEMENT DE MDP: +Donc avoir une upload box, propre, adapative etc + +---- MEDIUM PRIORITY +ADAPTATION MOBILE: +GÉRER LES MODALS, LES BOXES, LES BOARDING, LES CHAT BOXES AUSSI POUR PETIT ÉCRAN, ADAPTER LEUR WEBVIEW PORTAGE, DIALOG BOX, CONFIRMATON, TRAY CHANNELS SIDE LIST... +DRAG AND SNAP LIKE PHONES, SCROLLING FOR OPENGING/EXITING ETC.. + +--- LOW PRIORITY +Système de service mails aussi pour les comptes (optionel) pour recovery passwords, dans le page de login: + - Recover password with emails. smtp server, diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index cf24599..7e0d2c0 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -22,7 +22,20 @@ browser ──► Bun.serve (src/index.ts) are auto-titled from it. 4. Non-streaming → `driver.chat()` → JSON. Streaming → `driver.chatStream()` → SSE events `token` / `done` / `error`. The full reply is persisted after a - successful stream (partial text + `[interrupted]` marker on failure). + successful stream; on error the partial text is kept as-is (no internal + markers). Server logs each stream open/done/abort per driver when + `DRIVER_DEBUG=true`. + +Streaming guarantees (ChatGPT-style, no buffering): + +- Tokens are forwarded via `controller.enqueue` the moment they arrive from the + LLM; disconnects are detected (`req.signal`, guarded `enqueue`, + stream `cancel()`) and propagated upstream via an `AbortController` passed as + `opts.signal`, so the model stops generating when the tab closes. +- `Bun.serve` runs with `idleTimeout: 0` — the default 10 s would kill slow + streams (cold model load, thinking pauses) mid-generation. +- Responses carry `X-Accel-Buffering: no` and the NixOS nginx vhost sets + `proxy_buffering off`, otherwise the proxy would buffer the whole reply. ## Database schema diff --git a/src/index.ts b/src/index.ts index c0b3902..4efe29f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -114,6 +114,10 @@ async function readJson(req: Request): Promise<{ ok: boolean; body: Record