Merge branch 'docs-add-integration-lmstudio' of https://github.com/janhq/jan into docs-add-integration-lmstudio
This commit is contained in:
commit
15f994628e
@ -83,7 +83,11 @@ const DataFolder = () => {
|
|||||||
await window.core?.api?.getAppConfigurations()
|
await window.core?.api?.getAppConfigurations()
|
||||||
const currentJanDataFolder = appConfiguration.data_folder
|
const currentJanDataFolder = appConfiguration.data_folder
|
||||||
appConfiguration.data_folder = destinationPath
|
appConfiguration.data_folder = destinationPath
|
||||||
await fs.syncFile(currentJanDataFolder, destinationPath)
|
const { _, err } = await fs.syncFile(
|
||||||
|
currentJanDataFolder,
|
||||||
|
destinationPath
|
||||||
|
)
|
||||||
|
if (err) throw err
|
||||||
await window.core?.api?.updateAppConfiguration(appConfiguration)
|
await window.core?.api?.updateAppConfiguration(appConfiguration)
|
||||||
console.debug(
|
console.debug(
|
||||||
`File sync finished from ${currentJanDataFolder} to ${destinationPath}`
|
`File sync finished from ${currentJanDataFolder} to ${destinationPath}`
|
||||||
@ -94,7 +98,7 @@ const DataFolder = () => {
|
|||||||
}, 1200)
|
}, 1200)
|
||||||
await window.core?.api?.relaunch()
|
await window.core?.api?.relaunch()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(`Error: ${e}`)
|
console.error(e)
|
||||||
setShowLoader(false)
|
setShowLoader(false)
|
||||||
setShowChangeFolderError(true)
|
setShowChangeFolderError(true)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user