-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: Compose User Tone #764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
9f72f9b
Remove bun.lock file
dakdevs c8e6b1b
Refactor AI email body generation to use `generateEmailBodyV2`.
dakdevs fa67c73
Merge branch 'main' into dakdevs/ai-compose
dakdevs 07ab62f
Remove redundant files and update npm configuration
dakdevs 5bd5a10
Refactor AI module and clean up unused dependencies
dakdevs 009afbd
Handle errors during writing style matrix update
dakdevs 4f51f31
Rename API key check to use OpenAI key instead of Groq.
dakdevs 4ee6198
Refactor email body generation to simplify function structure
dakdevs 748b46f
Remove conversation history handling from AI prompt generation
dakdevs 7e7e355
Escape user prompt content in XML message
dakdevs e96953e
Fix incorrect totals in writing style initialization
dakdevs 7a76316
Remove unused conversationId and signatureHash handling
dakdevs f7df688
Enhance email style analysis with new metrics and refinements.
dakdevs feab9c4
Refactor writing style metrics to use Welford's algorithm.
dakdevs db7be1d
Refactor writing style matrix to streamline key handling
dakdevs 67af3d1
Remove unused conversationHistory parameter from function
dakdevs 097bbe2
Remove unused conversationHistories object.
dakdevs beafd43
**Fix HTML markup and standardize prompt instructions**
dakdevs a5c5761
THIS IS A CHECKPOINT COMMIT
dakdevs ad4a0b7
Refactor email generation prompt for clarity and precision.
dakdevs 1915f68
Merge branch 'main' into dakdevs/ai-compose
dakdevs d708c74
Add style matrix seeder and update email summary handling
dakdevs 48b7710
Merge branch 'main' into dakdevs/ai-compose
dakdevs 8e01f01
Update AI model, increase retries, and adjust dependencies
dakdevs 812857d
Remove unnecessary blank line in prompts.ts
dakdevs 29804af
Refactor AI body generation and improve seeder robustness
dakdevs 6377275
Refactor seed-style-matrix to seed-style and improve docs
dakdevs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| # don't show warnings if package versions don't match | ||
| strict-peer-dependencies=false | ||
| auto-install-peers=true | ||
| save-exact=true | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| save-exact=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,8 @@ | |
| import { createDriver } from '@/app/api/driver'; | ||
| import { getActiveConnection } from './utils'; | ||
| import { Sender } from '@/types'; | ||
| import { after } from 'next/server'; | ||
| import { updateWritingStyleMatrix } from '@/services/writing-style-service'; | ||
|
|
||
dakdevs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| export async function sendEmail({ | ||
| to, | ||
|
|
@@ -63,5 +65,16 @@ export async function sendEmail({ | |
| await driver.create(emailData); | ||
| } | ||
|
|
||
| after(async () => { | ||
| try { | ||
| console.warn('Saving writing style matrix...') | ||
| await updateWritingStyleMatrix(connection.id, message) | ||
| console.warn('Saved writing style matrix.') | ||
| } catch (error) { | ||
| console.error('Failed to save writing style matrix', error) | ||
| } | ||
| }) | ||
|
Comment on lines
+68
to
+76
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This way once the email sends, the user gets feedback immediately while the style matrix gets update in the background. |
||
|
|
||
| return { success: true }; | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this to auto-pin dependencies.