From 9590278aeba29a8e21e27780f658f3310a55f9e5 Mon Sep 17 00:00:00 2001 From: pacoccino Date: Tue, 27 Feb 2024 16:57:36 +0100 Subject: [PATCH] remove side panel permission on prod --- packages/extension/manifest.config.ts | 5 ++++- packages/extension/src/lib/AIMaskService.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/extension/manifest.config.ts b/packages/extension/manifest.config.ts index 7385936..8d34da9 100644 --- a/packages/extension/manifest.config.ts +++ b/packages/extension/manifest.config.ts @@ -23,12 +23,16 @@ const key = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAooxazoYOiipPPhgI58FzWgy export default defineManifest(async (env) => { let connect_srcs = connect_srcs_prod + let permissions = [ + "storage", + ] let side_panel: any = undefined if (env.mode === 'development') { connect_srcs = connect_srcs.concat(connect_srcs_dev) side_panel = { default_path: "src/side_panel/page.html", } + permissions.push("sidePanel") } return { manifest_version: 3, @@ -56,7 +60,6 @@ export default defineManifest(async (env) => { }, permissions: [ "storage", - "sidePanel" ], externally_connectable: { matches: externally_connectable_urls, diff --git a/packages/extension/src/lib/AIMaskService.ts b/packages/extension/src/lib/AIMaskService.ts index 42fe1ba..be83370 100644 --- a/packages/extension/src/lib/AIMaskService.ts +++ b/packages/extension/src/lib/AIMaskService.ts @@ -80,8 +80,8 @@ export class AIMaskService { if (await database.get('status') === 'infering') throw new Error('already infering') try { - await database.set('status', 'infering') const inferer = await this.getInferer(params) + await database.set('status', 'infering') const response = await inferer.infer(params, streamhandler) return response } catch (e) {