chore: remigrate if there is no models dir (#1038)
This commit is contained in:
parent
1fa05cf9ce
commit
f62b0ca4ef
@ -41,7 +41,10 @@ export default class JanModelExtension implements ModelExtension {
|
|||||||
|
|
||||||
private async copyModelsToHomeDir() {
|
private async copyModelsToHomeDir() {
|
||||||
try {
|
try {
|
||||||
if (localStorage.getItem(`${EXTENSION_NAME}-version`) === VERSION) {
|
if (
|
||||||
|
localStorage.getItem(`${EXTENSION_NAME}-version`) === VERSION &&
|
||||||
|
(await fs.exists(JanModelExtension._homeDir))
|
||||||
|
) {
|
||||||
console.debug('Model already migrated')
|
console.debug('Model already migrated')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -63,9 +66,7 @@ export default class JanModelExtension implements ModelExtension {
|
|||||||
const reconfigureModels = (await this.getConfiguredModels()).filter((e) =>
|
const reconfigureModels = (await this.getConfiguredModels()).filter((e) =>
|
||||||
readyModels.includes(e.id)
|
readyModels.includes(e.id)
|
||||||
)
|
)
|
||||||
console.debug(
|
console.debug('Finished updating downloaded models')
|
||||||
'Finished updating downloaded models'
|
|
||||||
)
|
|
||||||
|
|
||||||
// update back the status
|
// update back the status
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user