Persist mesh provider ID across remounts, reject download on Intel Macs

- Store meshProviderId in localStorage so reopening Settings finds the
  previously created provider instead of creating duplicates
- Gate auto-download on process.arch === 'arm64' in addition to darwin
  check, since the bundled binaries are Apple Silicon only

Signed-off-by: jh-block <jhugo@block.xyz>
This commit is contained in:
jh-block
2026-03-31 11:11:10 +02:00
parent 822f3f25e7
commit 88ee7f69ef
2 changed files with 8 additions and 2 deletions
@@ -61,7 +61,13 @@ export const MeshSettings = () => {
const [saving, setSaving] = useState(false);
const [error, setError] = useState<string | null>(null);
const [activeModel, setActiveModel] = useState<string | null>(null);
const [meshProviderId, setMeshProviderId] = useState<string>('mesh');
const [meshProviderId, setMeshProviderIdState] = useState<string>(
() => localStorage.getItem('mesh-provider-id') ?? 'mesh'
);
const setMeshProviderId = (id: string) => {
setMeshProviderIdState(id);
localStorage.setItem('mesh-provider-id', id);
};
const [checking, setChecking] = useState(false);
const checkStatus = useCallback(async () => {
+1 -1
View File
@@ -1744,7 +1744,7 @@ ipcMain.handle('stop-mesh', async () => {
});
ipcMain.handle('download-mesh', async () => {
if (process.platform !== 'darwin') {
if (process.platform !== 'darwin' || process.arch !== 'arm64') {
return { downloaded: false, error: 'Auto-download is only available on macOS (Apple Silicon)' };
}