remove contact company/country/location across db and ui
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user