mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
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:
@@ -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 () => {
|
||||
|
||||
@@ -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)' };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user