Remove debugCaption

This commit is contained in:
Neeraj Gupta
2025-04-30 15:52:35 +05:30
parent 7489821434
commit df6e409ca1
3 changed files with 0 additions and 23 deletions

View File

@@ -339,8 +339,6 @@ class EnteFile {
return pubMagicMetadata?.caption;
}
String? debugCaption;
String get thumbnailUrl {
if (localFileServer.isNotEmpty) {
return "$localFileServer/thumb/$uploadedFileID";

View File

@@ -128,18 +128,7 @@ class SemanticSearchService {
String query, {
double? similarityThreshold,
}) async {
bool showThreshold = false;
// if the query starts with 0.xxx, the split the query to get score threshold and actual query
if (query.startsWith(RegExp(r"0\.\d+"))) {
final parts = query.split(" ");
if (parts.length > 1) {
similarityThreshold = double.parse(parts[0]);
query = parts.sublist(1).join(" ");
showThreshold = true;
}
}
final textEmbedding = await _getTextEmbedding(query);
final similarityResults = await _getSimilarities(
{query: textEmbedding},
minimumSimilarityMap: {
@@ -170,24 +159,16 @@ class SemanticSearchService {
for (final result in queryResults) {
final file = filesMap[result.id];
if (file != null && !ignoredCollections.contains(file.collectionID)) {
if (showThreshold) {
file.debugCaption =
"${fileIDToScoreMap[result.id]?.toStringAsFixed(3)}";
}
results.add(file);
}
if (file == null) {
deletedEntries.add(result.id);
}
}
_logger.info(results.length.toString() + " results");
if (deletedEntries.isNotEmpty) {
unawaited(mlDataDB.deleteClipEmbeddings(deletedEntries));
}
return results;
}

View File

@@ -229,8 +229,6 @@ class _ThumbnailWidgetState extends State<ThumbnailWidget> {
viewChildren.add(TrashedFileOverlayText(widget.file as TrashFile));
} else if (GalleryContextState.of(context)?.type == GroupType.size) {
viewChildren.add(FileSizeOverlayText(widget.file));
} else if (widget.file.debugCaption != null) {
viewChildren.add(FileOverlayText(widget.file.debugCaption!));
}
// todo: Move this icon overlay to the collection widget.
if (widget.shouldShowArchiveStatus) {