chore: deno fmt

This commit is contained in:
Max Richter
2025-11-02 21:58:02 +01:00
parent 21124dfe00
commit c13420c3ab
41 changed files with 324 additions and 254 deletions

View File

@@ -283,4 +283,3 @@ export default function useDebouncedCallback<
return debounced;
}

View File

@@ -52,4 +52,3 @@ const useThrottledCallback = (
};
export default useThrottledCallback;

View File

@@ -12,7 +12,7 @@ async function addImageToResource<T extends GenericResource>(
if (imageUrl) {
try {
const absoluteImageUrl = (imageUrl.startsWith("https://") ||
imageUrl.startsWith("http://"))
imageUrl.startsWith("http://"))
? imageUrl
: `${url}/${imageUrl}`;
const image = await getImage(absoluteImageUrl);

View File

@@ -35,7 +35,8 @@ export async function summarize(content: string) {
{
role: "user",
content:
`Please summarize the article in one sentence as short as possible: ${content.slice(0, 2000)
`Please summarize the article in one sentence as short as possible: ${
content.slice(0, 2000)
}`,
},
],
@@ -102,7 +103,8 @@ export async function createGenres(
{
role: "system",
content:
`you create some keywords that can be used in a recommendation system. The keywords are based on a ${type} description or title. If you do not know the title, take into account the description aswell. Create a range of keywords from very specific ones that describe the general vibe. ${title ? `The name of the ${type} is ${title}` : ""
`you create some keywords that can be used in a recommendation system. The keywords are based on a ${type} description or title. If you do not know the title, take into account the description aswell. Create a range of keywords from very specific ones that describe the general vibe. ${
title ? `The name of the ${type} is ${title}` : ""
}. Return a list of around 20 keywords seperated by commas`,
},
{
@@ -166,7 +168,8 @@ export const getMovieRecommendations = async (
${keywords}
The movies should be similar to but not include ${exclude.join(", ")
The movies should be similar to but not include ${
exclude.join(", ")
} or remakes of that.
respond with a plain unordered list each item starting with the year the movie was released and then the title of the movie seperated by a -`,

View File

@@ -48,8 +48,9 @@ export async function endTask(chatId: string): Promise<string | null> {
finalNote += "**[Voice message could not be transcribed]**\n\n";
}
} else if (entry.type === "photo") {
const photoUrl = `${task.noteName.replace(/\.md$/, "")
}/photo-${photoIndex++}.jpg`;
const photoUrl = `${
task.noteName.replace(/\.md$/, "")
}/photo-${photoIndex++}.jpg`;
finalNote += `**Photo**:\n ${photoUrl}\n\n`;
photoTasks.push({