remove contact company/country/location across db and ui

This commit is contained in:
Ruslan Bakiev
2026-02-23 14:52:26 +07:00
parent f6b738352b
commit 60b9bb9fd1
15 changed files with 42 additions and 135 deletions

View File

@@ -10,7 +10,6 @@ import type { ChangeSet } from "../utils/changeSet";
type ContactIndexRow = {
id: string;
name: string;
company: string | null;
lastMessageAt: string | null;
nextEventAt: string | null;
updatedAt: string;
@@ -108,9 +107,8 @@ async function readJsonl(p: string): Promise<any[]> {
}
function formatContactLine(c: ContactIndexRow) {
const company = c.company ? ` (${c.company})` : "";
const lastAt = c.lastMessageAt ? new Date(c.lastMessageAt).toLocaleString("ru-RU") : "нет";
return `- ${c.name}${company} · последнее: ${lastAt}`;
return `- ${c.name} · последнее: ${lastAt}`;
}
export async function runCrmAgent(userText: string): Promise<AgentReply> {
@@ -227,7 +225,7 @@ export async function runCrmAgentFor(
lines.push("");
lines.push("Фокус дня (если нужно добить прогресс):");
for (const c of followups) {
lines.push(`- Написать follow-up: ${c.name}${c.company ? ` (${c.company})` : ""}`);
lines.push(`- Написать follow-up: ${c.name}`);
}
return {