Closed Mimikkk closed 1 month ago
This is great 👍 Hope it gets merged soon.
You may also want to remove the old fullCoverage.test.js
in this PR
hey @EvanZhouDev can you merge this? I would love to have full typescript support on the official package.
I might be dumb but how do you build and publish the package @Mimikkk? I've tried with npm publish and vite build but they don't seem to work.
Hello @yoroshikun @kcoderhtml @Mimikkk, sorry for the super late response.
I know most likely you're not using this package anymore, but I thought I'd still update you on what's going on. I've been extremely busy for the past few months on work and other projects, so I haven't been able to catch up with gemini-ai
recently. Furthermore, I have not decided to merge this branch because of a few refactors I've been doing, as well as the fact that it has seemed to stray a bit too far from the original.
However, seeing as Google has released Gemini 1.5 Flash today, I will be coming back to this project. Expect a relatively large update in the next few weeks, featuring types, updated streaming support, as well as better support by default for the new models.
As for this,
I might be dumb but how do you build and publish the package @Mimikkk? I've tried with npm publish and vite build but they don't seem to work.
only the original publisher can update the package to NPM 😅
Thanks! Looking forward to trying the updated package!
only the original publisher can update the package to NPM 😅
I believe I was trying to rebuild the package and deploy to my NPM account, but I can't remember at this point what I was trying to do :)
I have finished the initial rewrite in TypeScript, which is now available on the v2
branch. It supports a bunch of improvements and some new features, which I will have to document 😅... it is still completely backward compatible, but I thought a ground-up rewrite deserves a major version bump.
Edit: PR now available at #9
Thank you!!! Looking forward to trying it out!
Full TypeScript support, along with a bunch of great new features are now available on NPM. Will be closing this for now. Feel free to continue on this thread (or start a new issue) if anything needs to be fixed!
I've been working for a couple of hours to add typescript support to the project. It encompasses tests, utils and so on. Bumped vitest to 1.1.1 and did a few minor tweaks due to typing.
Changes:
typescript 5.3.3
support.vite
for building minified solution in both commonjs and esmodules formats.prettier
for code formatting.concurrently/rimraf/copyfiles
for support building on linux/windows/macos.vite
allowed me to split files intoutils
/types
andindex
for ease of developmentAdded scripts:
build
: builds the package into the build directory using vite. It clears thebuild/
directory, then it runs build process,build:clear
: clears thebuild/
directorybuild:types
: emits the typescript definitions into thebuild/
directorybuild:lib
: build and minifies the package into thebuild/
directoryI moved the dynamically created class
Chat
outside theGemini
class and added exported createGemini function for the ease of creation multiple instances.