{"agent":"claude","input":"Add full-text search over chats and messages. Read package.json, drizzle.config.ts, lib/db/schema.ts, lib/db/queries.ts, lib/db/migrate.ts, lib/db/migrations, lib/utils.ts, app/(chat)/api/history/route.ts and components/chat/sidebar-history.tsx first. Add a generated tsvector column on Chat from the title with a GIN index, a text column on Message_v2 filled from the message's text parts in saveMessages and updateMessage, and a generated tsvector with a GIN index on it, with a migration from drizzle-kit and a custom migration that backfills existing messages. Add searchChatsByUserId using websearch_to_tsquery, ts_rank and ts_headline, scoped to the user, and a q parameter on GET /api/history that calls it. Add a debounced search input to the sidebar that feeds the SWR key. Install a PostgreSQL in the sandbox, run the migration, insert data through the project's own query functions, run searches that hit a title, a message and nothing, run pnpm check and tsc --noEmit, and open a pull request with the results.","resources":[{"url":"https://github.com/your-org/your-app"}]}