Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
eeca5ef
Skeleton for email assistant
elie222 Jan 18, 2025
5c6c34f
implement more steps for ai assistant fix for forwarded emails
elie222 Jan 18, 2025
2946e41
Merge branch 'main' into email-assistant
elie222 Jan 19, 2025
406dec6
delete old code
elie222 Jan 19, 2025
04ef1d5
Fix assistant check
elie222 Jan 19, 2025
041aede
Extract email on verify
elie222 Jan 19, 2025
8dbb84b
more secure extract email
elie222 Jan 19, 2025
89f64b9
Skip sent emails not intended for assistant
elie222 Jan 19, 2025
b77bf18
Basic version of ai assitant email now working and fixing rules
elie222 Jan 21, 2025
4854df8
Implement AI assistant reply to emails
elie222 Jan 21, 2025
35c3412
Merge branch 'main' into email-assistant
elie222 Jan 22, 2025
108c627
Add ai agent to fix rules for user
elie222 Jan 22, 2025
e2b3320
allow create rule with categories
elie222 Jan 22, 2025
2f1868f
Pass in category to assistant
elie222 Jan 22, 2025
9a65813
adjust how groupitems are passed
elie222 Jan 22, 2025
b68b5ba
Assistant reply
elie222 Jan 22, 2025
50c4e52
Implement ai add/remove from group
elie222 Jan 22, 2025
7c6e1ca
Merge branch 'main' into email-assistant
elie222 Jan 23, 2025
c141335
create group from assistant
elie222 Jan 23, 2025
cca32d2
add update rule
elie222 Jan 23, 2025
dfae9e0
Refactor create/update rule logic
elie222 Jan 23, 2025
313a6b9
Add comment
elie222 Jan 23, 2025
bffe0f8
refactor updateLastSyncedHistoryId
elie222 Jan 23, 2025
d94a94d
assistant categorize
elie222 Jan 23, 2025
6797154
don't process emails from our assistant back to us
elie222 Jan 23, 2025
3dbb7a2
Allow partial update rule
elie222 Jan 23, 2025
b268d8c
Simplify fix tool usage to be more precise
elie222 Jan 23, 2025
2b55094
Remove general fix rules command
elie222 Jan 23, 2025
af7f0fc
Update prompt for new tools
elie222 Jan 23, 2025
76dd5ec
Create rule with categories via assistant
elie222 Jan 23, 2025
15e6c0b
Don't use groups with ai create
elie222 Jan 23, 2025
51b832f
implement rule updates
elie222 Jan 23, 2025
ac4525f
Fix missing sender category
elie222 Jan 23, 2025
a126933
fix sender category
elie222 Jan 23, 2025
bc3f8f4
Improve replies by quoting text
elie222 Jan 23, 2025
aec078e
remove bad code to get forwarded email
elie222 Jan 23, 2025
2c2e517
Fix new line in replies
elie222 Jan 23, 2025
8ecc973
Fix disallowed exports from action file as well as tests
elie222 Jan 23, 2025
3190131
allow variants of assistant email if we get blocked
elie222 Jan 23, 2025
417ed4f
adjust search for newsletter
elie222 Jan 23, 2025
e3ff1bf
Upsert non existant emails
elie222 Jan 23, 2025
01edaf2
Handle follow up messages better
elie222 Jan 23, 2025
c982196
Extract replies in assistant convo
elie222 Jan 23, 2025
e8e85ad
fix ts
elie222 Jan 23, 2025
c1669a9
fix ts
elie222 Jan 23, 2025
6da3fa1
better reply formatting. fixed reply extraction
elie222 Jan 23, 2025
ba1d0bb
Allow emailing the ai assistant without forwarding a message
elie222 Jan 24, 2025
454fc65
pass email subject/from for original message
elie222 Jan 24, 2025
55818a1
Use subject line in first message to assistant
elie222 Jan 24, 2025
68ca6d8
be more explicity with action create
elie222 Jan 24, 2025
a751416
fix create
elie222 Jan 24, 2025
06e5826
Change file name
elie222 Jan 24, 2025
b4ee6d5
Merge branch 'main' into email-assistant
elie222 Jan 24, 2025
69c4e16
Merge branch 'main' into email-assistant
elie222 Jan 25, 2025
cb7f128
Update prompt file after assistant makes changes
elie222 Jan 26, 2025
ba36db5
Merge branch 'main' into email-assistant
elie222 Jan 26, 2025
0258a80
dont include drafts in the conversation for the ai
elie222 Jan 26, 2025
8f0af8a
add note not to randomly create new rules
elie222 Jan 26, 2025
cd381bc
Handle exception better
elie222 Jan 26, 2025
ea0ce31
handle duplicate group items better
elie222 Jan 26, 2025
57f60de
Rule fix fix
elie222 Jan 26, 2025
8b4305e
Fix test
elie222 Jan 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,16 @@ const logger = createScopedLogger("Rules");

logger.log("Created rule", { userId });
```

- This is how we import Prisma:

```ts
import prisma from "@/utils/prisma";
```

- If an import is a type then use `type` to import it:

```ts
import type { Action } from "@prisma/client";
import { type Action, GroupItemType } from "@prisma/client";
```
3 changes: 1 addition & 2 deletions apps/web/__tests__/ai-find-snippets.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { describe, expect, test, vi } from "vitest";
import { aiFindSnippets } from "@/utils/ai/snippets/find-snippets";
import type { EmailForLLM } from "@/utils/ai/choose-rule/stringify-email";

import type { EmailForLLM } from "@/utils/types";
// pnpm test-ai ai-find-snippets

const isAiTest = process.env.RUN_AI_TESTS === "true";
Expand Down
Loading