diff --git a/src/migrations/1765624407553-test.ts b/src/migrations/1765624407553-test.ts deleted file mode 100644 index 5c608c3..0000000 --- a/src/migrations/1765624407553-test.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { MigrationInterface, QueryRunner } from 'typeorm'; - -export class AddUserSearchVectorV21764852003108 implements MigrationInterface { - public async up(query_runner: QueryRunner): Promise { - await query_runner.query(` - ALTER TABLE "user" - ADD COLUMN search_vector tsvector - GENERATED ALWAYS AS ( - setweight(to_tsvector('simple', coalesce(username, '')), 'A') || - setweight(to_tsvector('simple', coalesce(name, '')), 'B') - ) STORED - `); - - await query_runner.query(` - CREATE INDEX user_search_vector_idx - ON "user" - USING GIN (search_vector) - `); - } - - public async down(query_runner: QueryRunner): Promise { - await query_runner.query(`DROP INDEX IF EXISTS user_search_vector_idx`); - await query_runner.query(`ALTER TABLE "user" DROP COLUMN IF EXISTS search_vector`); - } -} diff --git a/src/tweets/constants.ts b/src/tweets/constants.ts index 98cce1d..aa0a79d 100644 --- a/src/tweets/constants.ts +++ b/src/tweets/constants.ts @@ -41,11 +41,13 @@ If the tweet is already very short or simple, produce a **more concise rewrite** If the tweet contains multiple ideas, summarize in **1–2 short sentences**. Rules: +- Begin the summary with "The tweet talks about…" (use Arabic equivalent "التغريدة تتحدث عن…" if the tweet is in Arabic). - Provide a summary that is **meaningfully shorter** than the original. - Do NOT repeat the original phrasing or structure. - Do NOT add any new information. - Keep the tone neutral and simple. - Remove emojis, hashtags, and usernames. +- If the tweet is in Arabic, return the summary in Arabic. For all other languages, return the summary in English. Tweet: "${content}"