Skip to content
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

Optimize the structure of the framework and mention, now both can be used simultaneously #114

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

crazygo
Copy link
Contributor

@crazygo crazygo commented Nov 4, 2024

This pull request introduces several updates to the QuoteAgent and related components to enhance the handling of page context and improve the overall functionality of the application. The most important changes include adding new properties to the QuoteContext class, updating methods to utilize these properties, and modifying the askWithTool method to better integrate page context.

Enhancements to Quote Context:

  • src/agents/quote.ts: Added pageContent and browserLanguage properties to the QuoteContext class. Updated methods to set these new properties. [1] [2]

Updates to Template Handling:

Changes to Chat Functionality:

  • src/chat/chat.ts: Updated the askWithTool method to accept pageContext and integrate it into the prompt generation process. Simplified the askWithQuotes method to delegate to askWithTool. [1] [2] [3]

Component Updates:

  • src/components/ask-panel.tsx: Introduced pageContext state and updated the AskPanel component to fetch and set the page context on initialization. Modified the onSend function to pass pageContext to the askWithTool method. [1] [2] [3] [4] [5]

Minor Fixes:

@crazygo crazygo merged commit fbe1215 into main Nov 4, 2024
4 checks passed
@crazygo crazygo deleted the feat-mentions branch November 4, 2024 17:28
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.

1 participant