Merge branch 'docs-add-integration-lmstudio' of https://github.com/janhq/jan into docs-add-integration-lmstudio

This commit is contained in:
hieu-jan 2024-02-19 09:13:24 +07:00
commit 15f994628e

View File

@ -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)
} }