Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

No bindings for Firebase AI Logic

Offen
#801 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
38/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
firebase, react, typescript
Bereich
ai, frontend

Rechercherichtung

Beginne mit den Provider-, Hook- und Initializer-Deklarationen in src/sdk.tsx und vergleiche dann die ReactFire-Rezeptdemo aus #798 mit ihrer direkten Verwendung von Firebase AI Logic. Prüfe die vorhandenen Verweise auf FirebaseAppProvider und die im Issue beschriebene @firebase/ai-Oberfläche. Als abgeschlossen gilt eine überprüfte Bindung für die stabilen Fälle generateContent, generateContentStream und ChatSession, während LiveSession und startAudioConversation ausdrücklich nicht zum Umfang gehören.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

ReactFire ships a provider and hook set for nine Firebase products and none for Firebase AI Logic (@firebase/ai). An app that uses it initializes it by hand, outside the FirebaseAppProvider tree the rest of the app runs through.

src/sdk.tsx declares AppCheckProvider, AuthProvider, AnalyticsProvider, DatabaseProvider, FirestoreProvider, FunctionsProvider, PerformanceProvider, StorageProvider and RemoteConfigProvider, each with a matching useX and useInitX. A search of src/ for getAI, firebase/ai or @firebase/ai returns nothing (control: FirebaseAppProvider appears in two files, so the search can return hits).

Why this surface wants hooks more than most

AI Logic is stream and session shaped, which is exactly the async state a hook is good at and the raw SDK leaves to the caller:

  • generateContentStream returns an async iterable plus an aggregated response promise. Consuming it in React means accumulating tokens into state, and cancelling the in-flight request when the component unmounts. Neither has an obvious idiom today.
  • ChatSession.sendMessage / sendMessageStream hold conversation history that is naturally component state, currently kept by hand alongside the session object.
  • One-shot generateContent is the trivial case and falls out of the same binding.
What it looks like in practice

Both demo apps in this repository hit it. In the ReactFire recipe demo (#798) the AI page is byte-identical to the plain SDK version, because there is no binding to differ: the page calls the SDK directly, taking the FirebaseApp from useFirebaseApp(). That is a fair outcome rather than a bug, but it is the only page in the comparison where ReactFire has nothing to offer, and a reader notices that the app reaches around the provider tree for one product and through it for the others.

Scope

Out of scope for now: LiveSession and startAudioConversation, which are Public Preview. The connect and teardown lifecycle there is a strong hook candidate and worth revisiting once the API is stable, but filing against a preview surface is premature.

Notes

No existing issue covers this: searches for "AI Logic", "gemini", "vertex" and "genai" in issue titles return nothing across open and closed, with a control search returning results.

Filed at @jhuleatt's request from the 2026-08-24 sync: file AI Logic features that ReactFire does not support as issues so they can be reviewed and prioritized.

Vorherrschende Sprache
TypeScript
Sterne
3.6k
Forks
403
Ø Merge
5 T. 1 Std.
Gemergte PRs (30 T.)
10

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus FirebaseExtended/reactfire

Alle Issues in FirebaseExtended/reactfire

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.