outreach: per-user voice from own emails + transparency; active-thread context (v0.1.0:70)
Voice upgrade. draft_outreach now learns the SENDER's voice: the codified rules PLUS a
few-shot of that user's own recent sent emails (_voice_examples; from_email = the
sender, de-identified in the same scrub batch as the recipient context, reference-only).
The response returns which of the sender's emails were used (subject + date + recipient),
shown in the UI as "Voice based on: …" — transparency to avoid the black-box problem.
Falls back to rules-only with a clear note when the user has no captured sent email.
Context restructured: _context groups the investor's email by thread and labels the most
recent thread as the "Active conversation (what you are replying to)" with earlier emails
as background, so replies stay on-topic instead of dredging old threads.
Sender email resolved in handle_outreach_draft (users table by user_id). Test extended
(active/background split, voice examples + meta, no-sender fallback). Fixed a UI bug the
preview caught: the manual Draft button was onClick={draft}, which passed the click event
as the investor arg after draft() gained params -> circular-JSON error; now onClick={()=>draft()}.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { VersionInfo } from '@start9labs/start-sdk'
|
||||
|
||||
// Outreach voice upgrade. Drafts now learn each sender's own voice: the codified rules
|
||||
// plus a few-shot of that user's recent sent emails (de-identified), and the result
|
||||
// lists which of their emails were used (transparency — no black box). The recipient
|
||||
// context is restructured around the active conversation (the most recent email thread
|
||||
// is what you reply to; earlier emails are background). No schema change.
|
||||
export const v_0_1_0_70 = VersionInfo.of({
|
||||
version: '0.1.0:70',
|
||||
releaseNotes: {
|
||||
en_US: [
|
||||
'Outreach drafts now sound like you: each user’s voice is learned from their own prior',
|
||||
'emails (plus the rules), and the draft shows exactly which of your emails it used. It',
|
||||
'also focuses on the most recent thread as the active conversation, with earlier emails',
|
||||
'as background.',
|
||||
].join(' '),
|
||||
},
|
||||
migrations: { up: async () => {}, down: async () => {} },
|
||||
})
|
||||
Reference in New Issue
Block a user