Skip to content

Conversation

@Kitenite
Copy link
Contributor

@Kitenite Kitenite commented Aug 11, 2025

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Release
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes


Important

Integrates Mastra for memory management, refines message handling and conversion, and updates models and tests in AI and DB packages.

  • Behavior:
    • Integrates Mastra for memory and storage management in ai and db packages.
    • Updates initModel() in providers.ts to handle OPENROUTER_MODELS.CLAUDE_4_SONNET with specific provider options.
    • Refines getHydratedUserMessage() in provider.ts to handle message context and attachments.
    • Implements convertToStreamMessages() in stream/index.ts for converting ChatMessage to CoreMessage.
    • Adds countTokensWithRoles() in tokens/index.ts for token counting in messages.
  • Models:
    • Updates ChatMessage and ChatConversation interfaces in models to include metadata and context.
    • Refactors toMessage() and fromMessage() in dto/message.ts for message conversion between DB and application models.
    • Introduces MessageSnapshot type in snapshot.ts for handling message snapshots.
  • Testing:
    • Adds tests for prompt, stream, and tokens functionalities in ai package.
    • Validates message conversion and token counting logic in convert.test.ts and tokens.test.ts.

This description was created by Ellipsis for 41f8581. You can customize this summary. It will automatically update as commits are pushed.

}
});
return this.generateStreamMessages();
this.createAndAttachCommitToUserMessage(userMessage.id, content);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The call to createAndAttachCommitToUserMessage is not awaited. While this matches the previous promise‐chain approach, consider awaiting it or adding error handling to prevent silent failures.

Suggested change
this.createAndAttachCommitToUserMessage(userMessage.id, content);
await this.createAndAttachCommitToUserMessage(userMessage.id, content);

@Kitenite Kitenite merged commit 829317a into main Aug 12, 2025
6 checks passed
@Kitenite Kitenite deleted the feat/mastra-no-storage branch August 12, 2025 17:29
@Kitenite Kitenite mentioned this pull request Aug 12, 2025
zongkelong pushed a commit to zongkelong/ulook that referenced this pull request Aug 15, 2025
* 'main' of https://github.com/onlook-dev/onlook: (41 commits)
  feat: fix delete project (onlook-dev#2683)
  feat: reduce search latency (onlook-dev#2682)
  feat: revamp projects ux (onlook-dev#2672)
  Upload fix (onlook-dev#2677)
  feat: using firecrawl to screenshot (onlook-dev#2665)
  fix: file upload build error (onlook-dev#2674)
  feat: new project frames (onlook-dev#2673)
  feat: self hosting docs (onlook-dev#2671)
  fix: docs layout + troubleshoot section (onlook-dev#2670)
  fix(template): suppress hydration mismatch
  Feat/editor improvements (onlook-dev#2601)
  fix: make message content selectable (onlook-dev#2664)
  bugs: transient stream error (onlook-dev#2663)
  feat: update migration files (onlook-dev#2659)
  Start from Blank + Import buttons on the home page (onlook-dev#2653)
  fix: snapshot type conflict and mastra can't view image (onlook-dev#2656)
  fix: typecheck snapshot (onlook-dev#2655)
  feat: clean up mastra branch (onlook-dev#2654)
  feat: mastra no storage (onlook-dev#2650)
  feat: update ai packages (onlook-dev#2648)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants