chore: minor refactor
This commit is contained in:
parent
82ae26930b
commit
97add456a7
|
@ -13,7 +13,7 @@ interface PlatformIdentity {
|
|||
export interface UserConfig {
|
||||
name: string;
|
||||
identities: PlatformIdentity[];
|
||||
relatives?: {
|
||||
friends?: {
|
||||
related_as: string[];
|
||||
user: UserConfig;
|
||||
}[];
|
||||
|
@ -30,7 +30,7 @@ const UserConfigSchema: z.ZodType<UserConfig> = z.lazy(() =>
|
|||
z.object({
|
||||
name: z.string(),
|
||||
identities: z.array(PlatformIdentitySchema),
|
||||
relatives: z
|
||||
friends: z
|
||||
.array(
|
||||
z.object({
|
||||
related_as: z.array(z.string()),
|
||||
|
|
|
@ -31,6 +31,7 @@ export async function send_email({ to, subject, html }: ResendParams) {
|
|||
from: "anya@tri.raj.how",
|
||||
to,
|
||||
subject,
|
||||
replyTo: "anya@raj.how",
|
||||
html:
|
||||
(await formatToHtml({
|
||||
to,
|
||||
|
@ -211,7 +212,7 @@ async function formatToHtml({
|
|||
1. Vercel Invite Template:
|
||||
${vercel_invite_template}
|
||||
|
||||
2. Stripe Welcome Template:
|
||||
2. Stripe Welcome Template (use this for most simple messages):
|
||||
${stripe_welcome_template}
|
||||
|
||||
3. Linear Login Code Template:
|
||||
|
@ -219,6 +220,7 @@ async function formatToHtml({
|
|||
|
||||
Pick a template and put the data in it to create the final HTML string.
|
||||
Do not Make up false data, use only the given data.
|
||||
Make sure to replace all the example data in the template with data relavent to the context.
|
||||
|
||||
RETURN ONLY HTML STRING
|
||||
`,
|
||||
|
|
|
@ -20,6 +20,7 @@ export async function search_user(
|
|||
context_message: Message
|
||||
) {
|
||||
try {
|
||||
console.log(JSON.stringify(userConfigs));
|
||||
const res = await ask({
|
||||
prompt: `You are a Search Tool that takes in a name and platform and returns the user's details. You are searching for ${name} on ${platform}.
|
||||
|
||||
|
|
Loading…
Reference in New Issue