Merge pull request #267 from ente-io/release-v1.6.53

Release v1.6.53
This commit is contained in:
Abhinav Kumar 2023-11-21 13:13:50 +05:30 committed by GitHub
commit 0b0075c894
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 56 additions and 4 deletions

View file

@ -1,5 +1,15 @@
# CHANGELOG
## v1.6.53
### Bug Fixes
- Fixed watch folder disabled issue
- Fixed BF Add on related issues
- Fixed clip sync issue and added better logging
- Fixed mov file upload
- Fixed clip extraction related issue
## v1.6.52
### New Features

View file

@ -1,7 +1,7 @@
{
"name": "ente",
"productName": "ente",
"version": "1.6.52",
"version": "1.6.53",
"private": true,
"description": "Desktop client for ente.io",
"main": "app/main.js",

View file

@ -1,5 +1,7 @@
import { ipcRenderer } from 'electron';
import { writeStream } from '../services/fs';
import { isExecError } from '../utils/error';
import { parseExecError } from '../utils/error';
export async function computeImageEmbedding(
imageData: Uint8Array
@ -14,6 +16,13 @@ export async function computeImageEmbedding(
tempInputFilePath
);
return embedding;
} catch (err) {
if (isExecError(err)) {
const parsedExecError = parseExecError(err);
throw Error(parsedExecError);
} else {
throw err;
}
} finally {
if (tempInputFilePath) {
await ipcRenderer.invoke('remove-temp-file', tempInputFilePath);
@ -24,6 +33,18 @@ export async function computeImageEmbedding(
export async function computeTextEmbedding(
text: string
): Promise<Float32Array> {
const embedding = await ipcRenderer.invoke('compute-text-embedding', text);
return embedding;
try {
const embedding = await ipcRenderer.invoke(
'compute-text-embedding',
text
);
return embedding;
} catch (err) {
if (isExecError(err)) {
const parsedExecError = parseExecError(err);
throw Error(parsedExecError);
} else {
throw err;
}
}
}

View file

@ -3,4 +3,6 @@ export const CustomErrors = {
'Windows native image processing is not supported',
INVALID_OS: (os: string) => `Invalid OS - ${os}`,
WAIT_TIME_EXCEEDED: 'Wait time exceeded',
UNSUPPORTED_PLATFORM: (platform: string, arch: string) =>
`Unsupported platform - ${platform} ${arch}`,
};

View file

@ -165,6 +165,7 @@ export async function computeImageEmbedding(
return embeddingArray;
} catch (err) {
logErrorSentry(err, 'Error in computeImageEmbedding');
throw err;
}
}
@ -200,5 +201,6 @@ export async function computeTextEmbedding(
return embeddingArray;
} catch (err) {
logErrorSentry(err, 'Error in computeTextEmbedding');
throw err;
}
}

17
src/utils/error.ts Normal file
View file

@ -0,0 +1,17 @@
import { CustomErrors } from '../constants/errors';
export const isExecError = (err: any) => {
return err.message.includes('Command failed:');
};
export const parseExecError = (err: any) => {
const errMessage = err.message;
if (errMessage.includes('Bad CPU type in executable')) {
return CustomErrors.UNSUPPORTED_PLATFORM(
process.platform,
process.arch
);
} else {
return errMessage;
}
};

2
ui

@ -1 +1 @@
Subproject commit 590c4d6a7f0a1f60256ddcac1a2f025a15561b53
Subproject commit d757f7cc410cc916ae3c709827613486b83b6cb3