Phase 1C: Frontend unified contact UI

This commit is contained in:
Agent Zero
2026-07-23 17:17:32 +02:00
parent a8331fbc2b
commit 879106c4eb
62 changed files with 552 additions and 1276 deletions
+2 -4
View File
@@ -122,7 +122,7 @@ async def index_contact(ctx: dict[str, Any], contact_id: str) -> None:
async def index_company(ctx: dict[str, Any], company_id: str) -> None:
"""Index a company: generate and store embedding."""
"""Index a company (contact with type='company'): generate and store embedding."""
from sqlalchemy import text
from app.plugins.builtins.unified_search.embedding import index_entity
@@ -137,7 +137,7 @@ async def index_company(ctx: dict[str, Any], company_id: str) -> None:
row = result.mappings().first()
if not row:
return
await index_entity("company", eid, row["tenant_id"], db)
await index_entity("contact", eid, row["tenant_id"], db)
except Exception:
logger.exception("Failed to index company %s", company_id)
@@ -170,7 +170,6 @@ async def reindex(ctx: dict[str, Any], entity_type: str) -> None:
table_map = {
"contact": "contacts",
"company": "contacts",
"mail": "mails",
"file": "files",
"event": "calendar_entries",
@@ -216,7 +215,6 @@ async def embedding_batch(ctx: dict[str, Any]) -> None:
table_map = {
"contact": "contacts",
"company": "contacts",
"mail": "mails",
"file": "files",
"event": "calendar_entries",