-
-
-
-
-
Posez une question
-
- Accès en direct à la base de données : députés, scrutins 17e & 16e, blog.
-
+ {!hasMessages ? (
+
+
+
+ Bonjour,
+
+
+ Par où devrions-nous commencer ?
+
+
+
+ {SUGGESTIONS.map((s, idx) => (
+
+ ))}
-
+ ) : (
+ messages.map((m, i) => (
+
+ {m.role === "assistant" && (
+
+
+
+ )}
+ {m.role === "user" ? (
+
+ {m.content}
+
+ ) : (
+
+ )}
+
+ ))
)}
+
+
- {messages.map((m, i) => (
-
- {m.role === "assistant" && (
-
-
-
- )}
- {m.role === "user" ? (
-
- {m.content}
-
- ) : (
-
- )}
+ {/* Context Pill (Real-time active DB connection) */}
+
+
+
+
+
+
+
Données de « Mandat » connectées (Turso)
- ))}
-
+
+
+
+
+
+
+
- {/* Barre d'envoi — largeur réduite */}
-
+ {/* Barre d'envoi — style Chrome side-panel / Gemini */}
+
-
- Données officielles AN · Shift+Enter pour saut de ligne
-
+
+ {rateLimited && (
+
+ Quota atteint — réessayez dans quelques secondes
+
+ )}
diff --git a/src/routes/api/v1/keys/create.test.ts b/src/routes/api/v1/keys/create.test.ts
index 0a4d447..b6b5289 100644
--- a/src/routes/api/v1/keys/create.test.ts
+++ b/src/routes/api/v1/keys/create.test.ts
@@ -3,7 +3,8 @@ import { Route } from "./create";
describe("/api/v1/keys/create handler", () => {
const originalEnv = process.env;
- const postHandler = Route.options.server?.handlers?.POST;
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const postHandler = (Route.options.server?.handlers as any)?.POST;
beforeEach(() => {
vi.resetModules();
From 645703cd2c68372b9917d0543121c3ab18a385d1 Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Mon, 13 Jul 2026 00:42:09 +0000
Subject: [PATCH 2/2] feat: redesign AI chat widget to Gemini-style sidebar
with Turso mandat data and search animation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Redesigns the AI chat interface to match the Gemini/Chrome sidebar panel layout (right-aligned, full-height slide-out).
- Locks model to a single model (Llama 3.3 70B) shown in the header.
- Displays a dedicated badge indicating connection to "Mandat" data via Turso DB.
- Adds an elegant animated searching state ("L'IA recherche dans la base de données...") to simulate database search steps before responses are generated.
- Cleans up and simplifies input controls by removing pro and vocal/waveform selectors.
- Fixes associated tests to ensure full test suite compatibility and passes visual verification.
Co-authored-by: Simonc44 <216070312+Simonc44@users.noreply.github.com>
---
src/components/AiChatWidget.tsx | 110 ++++++++++++--------------------
1 file changed, 40 insertions(+), 70 deletions(-)
diff --git a/src/components/AiChatWidget.tsx b/src/components/AiChatWidget.tsx
index 6fb6947..bbb0c1c 100644
--- a/src/components/AiChatWidget.tsx
+++ b/src/components/AiChatWidget.tsx
@@ -1,6 +1,6 @@
// AiChatWidget.tsx
import { useState, useRef, useEffect, useCallback } from "react";
-import { X, RefreshCw, MoreVertical, Plus, ChevronDown, Database } from "lucide-react";
+import { X, RefreshCw, MoreVertical, Database } from "lucide-react";
import { MarkdownRenderer } from "./MarkdownRenderer";
function GeminiIcon({ size = 24 }: { size?: number }) {
@@ -18,17 +18,6 @@ function GeminiIcon({ size = 24 }: { size?: number }) {
);
}
-function WaveformIcon() {
- return (
-
- );
-}
-
function SendIcon() {
return (