diff --git a/view/src/components/Changelog/index.ts b/view/src/components/Changelog/index.ts
index 310785f..9999f61 100644
--- a/view/src/components/Changelog/index.ts
+++ b/view/src/components/Changelog/index.ts
@@ -16,16 +16,23 @@ import { commitStore, route } from "stores";
localStorage.setItem("currentCommit", currentCommit);
let reachedCurrentCommit = false;
- const newCommits = commits.filter(c => {
- if (reachedCurrentCommit) return true;
+ const newCommits = commits.filter((commit) => {
+ return (
+ commit.subject.startsWith("feat") &&
+ commit.subject.replace("feat:", "").length > 3
+ );
+ }).filter(c => {
+ if (reachedCurrentCommit) return false;
if (c.id === currentCommit) {
reachedCurrentCommit = true;
+ return false;
}
+ return true;
});
if (newCommits.length > 1) {
if (window.location.hash !== "#changelog") {
- if ((await Toast.ask(`There are ${newCommits.length} updates. Do you want to see them?`, ["yes", "no"])) === "yes") {
+ if ((await Toast.ask(`✨ There are ${newCommits.length} updates ✨.
Do you want to see them?`, ["yes", "no"])) === "yes") {
route.set("changelog")
}
}
diff --git a/view/src/workers/ai-worker.ts b/view/src/workers/ai-worker.ts
index c2d083a..249ef67 100644
--- a/view/src/workers/ai-worker.ts
+++ b/view/src/workers/ai-worker.ts
@@ -11,11 +11,16 @@ const createModel = async () => {
return new SemanticSegmentation(rawModel, base);
};
-const model = createModel();
-model.then(() => console.log(`Loaded the model successfully!`));
+let model;
+
self.addEventListener('message', async (e) => {
+ if (!model) {
+ model = await createModel();
+ console.log("[AI] loaded model")
+ }
+
const { pixels, width, height, i } = e.data;
var array = new Uint8ClampedArray(pixels);