Added an event-bus library, meant to be consumed by endpoints that need lightweight, port-based event management
Adjusted OpenAI to always use chatml under the hood (no more "prompt" requests to davinci)
Model-changed events
Clarified request typing and naming for permissions requests, made them more consistent
To listen to events emitted by the extension, such as "model_changed", here's what you do:
window.ai.addEventListener((event: EventType, data: unknown) => {
// You can check `event` to see if it's the EventType you care about, e.g. "model_changed"
console.log("EVENT received", event, data)
})
To listen to events emitted by the extension, such as
"model_changed"
, here's what you do: