feat: store conversation to independent page (#120, #138)

This commit is contained in:
josc146
2023-04-02 23:24:48 +08:00
parent d112d43b8f
commit 9d1a2a1360
4 changed files with 49 additions and 6 deletions
+4
View File
@@ -26,6 +26,7 @@ import { isSafari } from '../utils/is-safari'
import { config as menuConfig } from '../content-script/menu-tools'
import { t, changeLanguage } from 'i18next'
import '../_locales/i18n'
import { openUrl } from '../utils/open-url'
const KEY_ACCESS_TOKEN = 'accessToken'
const cache = new ExpiryMap(10 * 1000)
@@ -146,6 +147,9 @@ Browser.runtime.onMessage.addListener(async (message) => {
const token = await getChatGptAccessToken()
const data = message.data
await deleteConversation(token, data.conversationId)
} else if (message.type === 'OPEN_URL') {
const data = message.data
openUrl(data.url)
}
})