An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
chore: drop tool_related_questions columns from database
Yoshiki Miura12e92877429f
diff --git a/drizzle/meta/0001_snapshot.json b/drizzle/meta/0000_snapshot.jsonsimilarity index 95%rename from drizzle/meta/0001_snapshot.jsonrename to drizzle/meta/0000_snapshot.jsonindex 38cda8ce..97295329 100644--- a/drizzle/meta/0001_snapshot.json+++ b/drizzle/meta/0000_snapshot.json@@ -1,5 +1,5 @@{- "id": "c17090d9-fd3a-47e3-8fff-c4cee21d0506",+ "id": "1a87e5a3-280e-4953-ac53-2221e33657b2","prevId": "00000000-0000-0000-0000-000000000000","version": "7","dialect": "postgresql",@@ -122,8 +122,12 @@"name": "messages_chat_id_chats_id_fk","tableFrom": "messages","tableTo": "chats",- "columnsFrom": ["chat_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "chat_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -300,18 +304,6 @@"primaryKey": false,"notNull": false},- "tool_related_questions_input": {- "name": "tool_related_questions_input",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_related_questions_output": {- "name": "tool_related_questions_output",- "type": "json",- "primaryKey": false,- "notNull": false- },"tool_dynamic_input": {"name": "tool_dynamic_input","type": "json",@@ -411,8 +403,12 @@"name": "parts_message_id_messages_id_fk","tableFrom": "parts","tableTo": "messages",- "columnsFrom": ["message_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "message_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -456,4 +452,4 @@"schemas": {},"tables": {}}-}+}\ No newline at end of filediff --git a/drizzle/meta/0003_snapshot.json b/drizzle/meta/0003_snapshot.jsondeleted file mode 100644index 38cda8ce..00000000--- a/drizzle/meta/0003_snapshot.json+++ /dev/null@@ -1,459 +0,0 @@-{- "id": "c17090d9-fd3a-47e3-8fff-c4cee21d0506",- "prevId": "00000000-0000-0000-0000-000000000000",- "version": "7",- "dialect": "postgresql",- "tables": {- "public.chats": {- "name": "chats",- "schema": "",- "columns": {- "id": {- "name": "id",- "type": "varchar(191)",- "primaryKey": true,- "notNull": true- },- "created_at": {- "name": "created_at",- "type": "timestamp",- "primaryKey": false,- "notNull": true,- "default": "now()"- },- "title": {- "name": "title",- "type": "text",- "primaryKey": false,- "notNull": true- },- "user_id": {- "name": "user_id",- "type": "varchar(255)",- "primaryKey": false,- "notNull": true- },- "visibility": {- "name": "visibility",- "type": "varchar(256)",- "primaryKey": false,- "notNull": true,- "default": "'private'"- }- },- "indexes": {},- "foreignKeys": {},- "compositePrimaryKeys": {},- "uniqueConstraints": {},- "policies": {},- "checkConstraints": {},- "isRLSEnabled": false- },- "public.messages": {- "name": "messages",- "schema": "",- "columns": {- "id": {- "name": "id",- "type": "varchar(191)",- "primaryKey": true,- "notNull": true- },- "chat_id": {- "name": "chat_id",- "type": "varchar(191)",- "primaryKey": false,- "notNull": true- },- "role": {- "name": "role",- "type": "varchar(256)",- "primaryKey": false,- "notNull": true- },- "created_at": {- "name": "created_at",- "type": "timestamp",- "primaryKey": false,- "notNull": true,- "default": "now()"- }- },- "indexes": {- "messages_chat_id_idx": {- "name": "messages_chat_id_idx",- "columns": [- {- "expression": "chat_id",- "isExpression": false,- "asc": true,- "nulls": "last"- }- ],- "isUnique": false,- "concurrently": false,- "method": "btree",- "with": {}- },- "messages_chat_id_created_at_idx": {- "name": "messages_chat_id_created_at_idx",- "columns": [- {- "expression": "chat_id",- "isExpression": false,- "asc": true,- "nulls": "last"- },- {- "expression": "created_at",- "isExpression": false,- "asc": true,- "nulls": "last"- }- ],- "isUnique": false,- "concurrently": false,- "method": "btree",- "with": {}- }- },- "foreignKeys": {- "messages_chat_id_chats_id_fk": {- "name": "messages_chat_id_chats_id_fk",- "tableFrom": "messages",- "tableTo": "chats",- "columnsFrom": ["chat_id"],- "columnsTo": ["id"],- "onDelete": "cascade",- "onUpdate": "no action"- }- },- "compositePrimaryKeys": {},- "uniqueConstraints": {},- "policies": {},- "checkConstraints": {},- "isRLSEnabled": false- },- "public.parts": {- "name": "parts",- "schema": "",- "columns": {- "id": {- "name": "id",- "type": "varchar(191)",- "primaryKey": true,- "notNull": true- },- "message_id": {- "name": "message_id",- "type": "varchar(191)",- "primaryKey": false,- "notNull": true- },- "order": {- "name": "order",- "type": "integer",- "primaryKey": false,- "notNull": true- },- "type": {- "name": "type",- "type": "varchar(256)",- "primaryKey": false,- "notNull": true- },- "text_text": {- "name": "text_text",- "type": "text",- "primaryKey": false,- "notNull": false- },- "reasoning_text": {- "name": "reasoning_text",- "type": "text",- "primaryKey": false,- "notNull": false- },- "file_media_type": {- "name": "file_media_type",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "file_filename": {- "name": "file_filename",- "type": "varchar(1024)",- "primaryKey": false,- "notNull": false- },- "file_url": {- "name": "file_url",- "type": "text",- "primaryKey": false,- "notNull": false- },- "source_url_source_id": {- "name": "source_url_source_id",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "source_url_url": {- "name": "source_url_url",- "type": "text",- "primaryKey": false,- "notNull": false- },- "source_url_title": {- "name": "source_url_title",- "type": "text",- "primaryKey": false,- "notNull": false- },- "source_document_source_id": {- "name": "source_document_source_id",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "source_document_media_type": {- "name": "source_document_media_type",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "source_document_title": {- "name": "source_document_title",- "type": "text",- "primaryKey": false,- "notNull": false- },- "source_document_filename": {- "name": "source_document_filename",- "type": "varchar(1024)",- "primaryKey": false,- "notNull": false- },- "source_document_url": {- "name": "source_document_url",- "type": "text",- "primaryKey": false,- "notNull": false- },- "source_document_snippet": {- "name": "source_document_snippet",- "type": "text",- "primaryKey": false,- "notNull": false- },- "tool_tool_call_id": {- "name": "tool_tool_call_id",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "tool_state": {- "name": "tool_state",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "tool_error_text": {- "name": "tool_error_text",- "type": "text",- "primaryKey": false,- "notNull": false- },- "tool_search_input": {- "name": "tool_search_input",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_search_output": {- "name": "tool_search_output",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_fetch_input": {- "name": "tool_fetch_input",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_fetch_output": {- "name": "tool_fetch_output",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_question_input": {- "name": "tool_question_input",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_question_output": {- "name": "tool_question_output",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_related_questions_input": {- "name": "tool_related_questions_input",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_related_questions_output": {- "name": "tool_related_questions_output",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_dynamic_input": {- "name": "tool_dynamic_input",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_dynamic_output": {- "name": "tool_dynamic_output",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_dynamic_name": {- "name": "tool_dynamic_name",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "tool_dynamic_type": {- "name": "tool_dynamic_type",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "data_prefix": {- "name": "data_prefix",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "data_content": {- "name": "data_content",- "type": "json",- "primaryKey": false,- "notNull": false- },- "data_id": {- "name": "data_id",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "provider_metadata": {- "name": "provider_metadata",- "type": "json",- "primaryKey": false,- "notNull": false- },- "created_at": {- "name": "created_at",- "type": "timestamp",- "primaryKey": false,- "notNull": true,- "default": "now()"- }- },- "indexes": {- "parts_message_id_idx": {- "name": "parts_message_id_idx",- "columns": [- {- "expression": "message_id",- "isExpression": false,- "asc": true,- "nulls": "last"- }- ],- "isUnique": false,- "concurrently": false,- "method": "btree",- "with": {}- },- "parts_message_id_order_idx": {- "name": "parts_message_id_order_idx",- "columns": [- {- "expression": "message_id",- "isExpression": false,- "asc": true,- "nulls": "last"- },- {- "expression": "order",- "isExpression": false,- "asc": true,- "nulls": "last"- }- ],- "isUnique": false,- "concurrently": false,- "method": "btree",- "with": {}- }- },- "foreignKeys": {- "parts_message_id_messages_id_fk": {- "name": "parts_message_id_messages_id_fk",- "tableFrom": "parts",- "tableTo": "messages",- "columnsFrom": ["message_id"],- "columnsTo": ["id"],- "onDelete": "cascade",- "onUpdate": "no action"- }- },- "compositePrimaryKeys": {},- "uniqueConstraints": {},- "policies": {},- "checkConstraints": {- "text_text_required": {- "name": "text_text_required",- "value": "(type != 'text' OR text_text IS NOT NULL)"- },- "reasoning_text_required": {- "name": "reasoning_text_required",- "value": "(type != 'reasoning' OR reasoning_text IS NOT NULL)"- },- "file_fields_required": {- "name": "file_fields_required",- "value": "(type != 'file' OR (file_media_type IS NOT NULL AND file_filename IS NOT NULL AND file_url IS NOT NULL))"- },- "tool_state_valid": {- "name": "tool_state_valid",- "value": "(tool_state IS NULL OR tool_state IN ('input-streaming', 'input-available', 'output-available', 'output-error'))"- },- "tool_fields_required": {- "name": "tool_fields_required",- "value": "(type NOT LIKE 'tool-%' OR (tool_tool_call_id IS NOT NULL AND tool_state IS NOT NULL))"- }- },- "isRLSEnabled": false- }- },- "enums": {},- "schemas": {},- "sequences": {},- "roles": {},- "policies": {},- "views": {},- "_meta": {- "columns": {},- "schemas": {},- "tables": {}- }-}diff --git a/drizzle/meta/0005_snapshot.json b/drizzle/meta/0005_snapshot.jsondeleted file mode 100644index 38cda8ce..00000000--- a/drizzle/meta/0005_snapshot.json+++ /dev/null@@ -1,459 +0,0 @@-{- "id": "c17090d9-fd3a-47e3-8fff-c4cee21d0506",- "prevId": "00000000-0000-0000-0000-000000000000",- "version": "7",- "dialect": "postgresql",- "tables": {- "public.chats": {- "name": "chats",- "schema": "",- "columns": {- "id": {- "name": "id",- "type": "varchar(191)",- "primaryKey": true,- "notNull": true- },- "created_at": {- "name": "created_at",- "type": "timestamp",- "primaryKey": false,- "notNull": true,- "default": "now()"- },- "title": {- "name": "title",- "type": "text",- "primaryKey": false,- "notNull": true- },- "user_id": {- "name": "user_id",- "type": "varchar(255)",- "primaryKey": false,- "notNull": true- },- "visibility": {- "name": "visibility",- "type": "varchar(256)",- "primaryKey": false,- "notNull": true,- "default": "'private'"- }- },- "indexes": {},- "foreignKeys": {},- "compositePrimaryKeys": {},- "uniqueConstraints": {},- "policies": {},- "checkConstraints": {},- "isRLSEnabled": false- },- "public.messages": {- "name": "messages",- "schema": "",- "columns": {- "id": {- "name": "id",- "type": "varchar(191)",- "primaryKey": true,- "notNull": true- },- "chat_id": {- "name": "chat_id",- "type": "varchar(191)",- "primaryKey": false,- "notNull": true- },- "role": {- "name": "role",- "type": "varchar(256)",- "primaryKey": false,- "notNull": true- },- "created_at": {- "name": "created_at",- "type": "timestamp",- "primaryKey": false,- "notNull": true,- "default": "now()"- }- },- "indexes": {- "messages_chat_id_idx": {- "name": "messages_chat_id_idx",- "columns": [- {- "expression": "chat_id",- "isExpression": false,- "asc": true,- "nulls": "last"- }- ],- "isUnique": false,- "concurrently": false,- "method": "btree",- "with": {}- },- "messages_chat_id_created_at_idx": {- "name": "messages_chat_id_created_at_idx",- "columns": [- {- "expression": "chat_id",- "isExpression": false,- "asc": true,- "nulls": "last"- },- {- "expression": "created_at",- "isExpression": false,- "asc": true,- "nulls": "last"- }- ],- "isUnique": false,- "concurrently": false,- "method": "btree",- "with": {}- }- },- "foreignKeys": {- "messages_chat_id_chats_id_fk": {- "name": "messages_chat_id_chats_id_fk",- "tableFrom": "messages",- "tableTo": "chats",- "columnsFrom": ["chat_id"],- "columnsTo": ["id"],- "onDelete": "cascade",- "onUpdate": "no action"- }- },- "compositePrimaryKeys": {},- "uniqueConstraints": {},- "policies": {},- "checkConstraints": {},- "isRLSEnabled": false- },- "public.parts": {- "name": "parts",- "schema": "",- "columns": {- "id": {- "name": "id",- "type": "varchar(191)",- "primaryKey": true,- "notNull": true- },- "message_id": {- "name": "message_id",- "type": "varchar(191)",- "primaryKey": false,- "notNull": true- },- "order": {- "name": "order",- "type": "integer",- "primaryKey": false,- "notNull": true- },- "type": {- "name": "type",- "type": "varchar(256)",- "primaryKey": false,- "notNull": true- },- "text_text": {- "name": "text_text",- "type": "text",- "primaryKey": false,- "notNull": false- },- "reasoning_text": {- "name": "reasoning_text",- "type": "text",- "primaryKey": false,- "notNull": false- },- "file_media_type": {- "name": "file_media_type",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "file_filename": {- "name": "file_filename",- "type": "varchar(1024)",- "primaryKey": false,- "notNull": false- },- "file_url": {- "name": "file_url",- "type": "text",- "primaryKey": false,- "notNull": false- },- "source_url_source_id": {- "name": "source_url_source_id",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "source_url_url": {- "name": "source_url_url",- "type": "text",- "primaryKey": false,- "notNull": false- },- "source_url_title": {- "name": "source_url_title",- "type": "text",- "primaryKey": false,- "notNull": false- },- "source_document_source_id": {- "name": "source_document_source_id",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "source_document_media_type": {- "name": "source_document_media_type",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "source_document_title": {- "name": "source_document_title",- "type": "text",- "primaryKey": false,- "notNull": false- },- "source_document_filename": {- "name": "source_document_filename",- "type": "varchar(1024)",- "primaryKey": false,- "notNull": false- },- "source_document_url": {- "name": "source_document_url",- "type": "text",- "primaryKey": false,- "notNull": false- },- "source_document_snippet": {- "name": "source_document_snippet",- "type": "text",- "primaryKey": false,- "notNull": false- },- "tool_tool_call_id": {- "name": "tool_tool_call_id",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "tool_state": {- "name": "tool_state",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "tool_error_text": {- "name": "tool_error_text",- "type": "text",- "primaryKey": false,- "notNull": false- },- "tool_search_input": {- "name": "tool_search_input",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_search_output": {- "name": "tool_search_output",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_fetch_input": {- "name": "tool_fetch_input",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_fetch_output": {- "name": "tool_fetch_output",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_question_input": {- "name": "tool_question_input",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_question_output": {- "name": "tool_question_output",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_related_questions_input": {- "name": "tool_related_questions_input",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_related_questions_output": {- "name": "tool_related_questions_output",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_dynamic_input": {- "name": "tool_dynamic_input",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_dynamic_output": {- "name": "tool_dynamic_output",- "type": "json",- "primaryKey": false,- "notNull": false- },- "tool_dynamic_name": {- "name": "tool_dynamic_name",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "tool_dynamic_type": {- "name": "tool_dynamic_type",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "data_prefix": {- "name": "data_prefix",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "data_content": {- "name": "data_content",- "type": "json",- "primaryKey": false,- "notNull": false- },- "data_id": {- "name": "data_id",- "type": "varchar(256)",- "primaryKey": false,- "notNull": false- },- "provider_metadata": {- "name": "provider_metadata",- "type": "json",- "primaryKey": false,- "notNull": false- },- "created_at": {- "name": "created_at",- "type": "timestamp",- "primaryKey": false,- "notNull": true,- "default": "now()"- }- },- "indexes": {- "parts_message_id_idx": {- "name": "parts_message_id_idx",- "columns": [- {- "expression": "message_id",- "isExpression": false,- "asc": true,- "nulls": "last"- }- ],- "isUnique": false,- "concurrently": false,- "method": "btree",- "with": {}- },- "parts_message_id_order_idx": {- "name": "parts_message_id_order_idx",- "columns": [- {- "expression": "message_id",- "isExpression": false,- "asc": true,- "nulls": "last"- },- {- "expression": "order",- "isExpression": false,- "asc": true,- "nulls": "last"- }- ],- "isUnique": false,- "concurrently": false,- "method": "btree",- "with": {}- }- },- "foreignKeys": {- "parts_message_id_messages_id_fk": {- "name": "parts_message_id_messages_id_fk",- "tableFrom": "parts",- "tableTo": "messages",- "columnsFrom": ["message_id"],- "columnsTo": ["id"],- "onDelete": "cascade",- "onUpdate": "no action"- }- },- "compositePrimaryKeys": {},- "uniqueConstraints": {},- "policies": {},- "checkConstraints": {- "text_text_required": {- "name": "text_text_required",- "value": "(type != 'text' OR text_text IS NOT NULL)"- },- "reasoning_text_required": {- "name": "reasoning_text_required",- "value": "(type != 'reasoning' OR reasoning_text IS NOT NULL)"- },- "file_fields_required": {- "name": "file_fields_required",- "value": "(type != 'file' OR (file_media_type IS NOT NULL AND file_filename IS NOT NULL AND file_url IS NOT NULL))"- },- "tool_state_valid": {- "name": "tool_state_valid",- "value": "(tool_state IS NULL OR tool_state IN ('input-streaming', 'input-available', 'output-available', 'output-error'))"- },- "tool_fields_required": {- "name": "tool_fields_required",- "value": "(type NOT LIKE 'tool-%' OR (tool_tool_call_id IS NOT NULL AND tool_state IS NOT NULL))"- }- },- "isRLSEnabled": false- }- },- "enums": {},- "schemas": {},- "sequences": {},- "roles": {},- "policies": {},- "views": {},- "_meta": {- "columns": {},- "schemas": {},- "tables": {}- }-}diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.jsonindex d46f3fc9..63d0122e 100644--- a/drizzle/meta/_journal.json+++ b/drizzle/meta/_journal.json@@ -5,30 +5,9 @@{"idx": 0,"version": "7",- "when": 1733333000000,- "tag": "0001_persistence_v5",- "breakpoints": true- },- {- "idx": 1,- "version": "7",- "when": 1733333001000,- "tag": "0003_rename_mcp_to_dynamic",- "breakpoints": true- },- {- "idx": 2,- "version": "7",- "when": 1733333002000,- "tag": "0004_rename_retrieve_to_fetch",- "breakpoints": true- },- {- "idx": 3,- "version": "7",- "when": 1733333003000,- "tag": "0005_remove_video_search",+ "when": 1754133183597,+ "tag": "0000_rich_ravenous","breakpoints": true}]-}+}\ No newline at end of file