alexanderatallah / window.ai

Use your own AI models on the web
https://windowai.io
MIT License
806 stars 70 forks source link

WIP: Types library #6

Closed alexanderatallah closed 1 year ago

alexanderatallah commented 1 year ago

I don't know how to do this. I think this is the wrong approach, so I stopped but saved what i tried. open questions:

  1. How do we make this importable by others as just types on window?

  2. Should we have window.ai (the extension) export the types in public-interface.ts somehow, and people just depend on the extension but it only exports those types? If not, any way to keep it in sync with the extension, or fine to manually update this?

  3. If not, should the types library export a declaration file or a types file? (Seems like the former so far.)

  4. What should the monorepo packages be named?

  5. How do we patch the global window namespace? Doesn't seem to work from within an imported monorepo package