Using and Edge function for accessing the Google API and
return the search results (.items[]) to the client (browser).
Added all type definitions (browser<>edge, and edge<>google),
and honor environment variables. When both the new environment
variables are set at build time, the user won't be asked for
keys.
Basically this implements #98, via ReAct.
Note: this feature uses @dqbd/tiktoken which in turns uses WebAssembly
to perform re-tokenization for every single character typed (there's
no reusing/smart caching of blocks). This may be super heavy while being
super useful - we'll see what people say.
Note the usage of Async webAssembly is enabled in the 'webpack' config
within next.config.js.
With this simple change, if the key is defined _at build time_,
the user will not be prompted to enter a key, and it will be
marked as 'not required' in the Settings dialog.
Note that this verifies a build-time key (next build), not that
the same key is set at runtime (next start).
The behavior of the UI is just altered slightly, but enough to
show that the key is not required when set on the server.