jan/src-tauri/tauri.conf.json
Akarshan Biswas f59739d2b0
refactor: Improve Llama.cpp backend management and auto-update (#5845)
* refactor: Improve Llama.cpp backend management and auto-update

This commit refactors the Llama.cpp extension to enhance backend management and streamline the auto-update process.

Key changes include:

Refactored configureBackends: The logic for determining the best available backend and populating settings is now more modular, preventing duplicate executions.

Dedicated Auto-update Handling: Introduced a handleAutoUpdate method to encapsulate the auto-update logic, including downloading the latest available backend and updating the internal configuration and settings.

Robust Old Backend Cleanup: The removeOldBackends method is improved to ensure only the currently used backend version and type are kept, effectively managing disk space. A delay is added for Windows to prevent file conflicts during cleanup.

Final Installation Check: A ensureFinalBackendInstallation method is added to guarantee the selected backend is installed, acting as a final safeguard after auto-update or if auto-update is disabled.

Minor Fixes:

Added console.log for save_path during decompression for better debugging.

Ensured the output directory exists before decompression in the Rust backend.

Removed extraneous console log for session info.

Updated Cargo.toml and tauri.conf.json versions.

These changes lead to a more reliable and efficient Llama.cpp backend experience within the application, particularly for users with auto-update enabled.

* fix isBackendInstalled parameters

* Address bot's comments

* Address bot comments of using try finally block
2025-07-22 14:35:34 +05:30

89 lines
2.6 KiB
JSON

{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Jan",
"version": "0.6.599",
"identifier": "jan.ai.app",
"build": {
"frontendDist": "../web-app/dist",
"devUrl": "http://localhost:1420",
"beforeDevCommand": "cross-env IS_TAURI=true CLEAN=true yarn dev:web",
"beforeBuildCommand": "cross-env IS_TAURI=true yarn build:web"
},
"app": {
"macOSPrivateApi": true,
"windows": [
{
"zoomHotkeysEnabled": true,
"label": "main",
"title": "Jan",
"width": 1024,
"minWidth": 375,
"minHeight": 667,
"height": 800,
"resizable": true,
"fullscreen": false,
"center": true,
"hiddenTitle": true,
"transparent": true,
"trafficLightPosition": {
"x": 12,
"y": 22
},
"decorations": true,
"titleBarStyle": "Overlay",
"windowEffects": {
"effects": ["fullScreenUI", "mica", "tabbed", "blur", "acrylic"],
"state": "active",
"radius": 8
}
}
],
"security": {
"csp": {
"default-src": "'self' customprotocol: asset: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*",
"connect-src": "ipc: http://ipc.localhost http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:* https: http:",
"font-src": [
"https://fonts.gstatic.com blob: data: tauri://localhost http://tauri.localhost"
],
"img-src": "'self' asset: http://asset.localhost blob: data: https://cdn.jsdelivr.net",
"style-src": "'unsafe-inline' 'self' https://fonts.googleapis.com",
"script-src": "'self' asset: $APPDATA/**.* http://asset.localhost https://eu-assets.i.posthog.com https://posthog.com"
},
"assetProtocol": {
"enable": true,
"scope": {
"requireLiteralLeadingDot": false,
"allow": ["**/*"]
}
}
}
},
"plugins": {
"os": {
"version": "latest",
"resolve": true
},
"updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDJFNDEzMEVCMUEzNUFENDQKUldSRXJUVWE2ekJCTGc1Mm1BVXgrWmtES3huUlBFR0lCdG5qbWFvMzgyNDhGN3VTTko5Q1NtTW0K",
"endpoints": [
"https://github.com/menloresearch/jan/releases/latest/download/latest.json"
],
"windows": {
"installMode": "passive"
}
},
"deep-link": { "schemes": ["jan"] }
},
"bundle": {
"active": true,
"createUpdaterArtifacts": false,
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
}
}