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

feat: Cookbook Onboard (AI Assistant & Playground) integration #169

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

ClockRide
Copy link
Contributor

@ClockRide ClockRide commented Aug 7, 2024

Preview

https://evmos-docs-cookbook.vercel.app/

Ask Cookbook AI Assistant

Cookbook's Ask Cookbook AI assistant and co-pilot is trained on all existing Evmos resources (source code, docs website, etc.) and is available as a standalone modal, embeddable as a button on any page (recommended for technical docs). It answers developer questions about building on Evmos, acting as an enhanced and streamlined technical documentation search tool as well as a Solidity language coding co-pilot.

Ask Cookbook AI can also access context from thousands of data sources indexed by Cookbook.dev in addition to Evmos-specific data sources, providing the best blockchain developer-focused answers of any chatbot on the market. Cookbook will assist in the tuning and calibration of the AI assistant to ensure the highest answer quality.

image

Cookbook Onboard Playground

The Cookbook Onboard Playground embeds a Solidity IDE with smart contract templates displayed alongside the Ask Cookbook AI Assistant.

Developers can search for and deploy Cookbook’s entire smart contract library from your technical documentation.

Features:

  • Deploy smart contracts or entire protocols to Evmos without leaving Evmos's technical docs
  • Acts as a free, no-code or low-code token and NFT launchpad
  • Save source code as a Foundry, Hardhat, or Scaffold project or export it to Remix or Chain IDE in one click

image

Summary by CodeRabbit

  • New Features
    • Introduced a SearchBarWrapper component that combines search functionality with the AskCookbook feature for improved user experience.
    • Added support for the @cookbookdev/docsbot package to enhance documentation capabilities.

Copy link
Contributor

coderabbitai bot commented Aug 7, 2024

Walkthrough

The recent changes introduce a new dependency, @cookbookdev/docsbot, to enhance the project’s documentation capabilities. Additionally, a new SearchBarWrapper component has been created to integrate the AskCookbook feature with the existing SearchBar, ensuring dynamic functionality in a browser environment. This integration allows users to access enhanced search and documentation features from a unified interface.

Changes

File Change Summary
package.json Added "@cookbookdev/docsbot": "^4.21.15" to dependencies.
src/theme/SearchBar/index.js Introduced SearchBarWrapper component integrating AskCookbook with existing SearchBar.

Poem

In a world of code, where rabbits hop,
A new docsbot joins the nonstop,
With a wrapper so neat, search is a breeze,
AskCookbook shines, bringing users ease.
Let’s celebrate this blend, a joyful dance,
In the code’s embrace, we take our chance! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ClockRide ClockRide changed the title feat: Cookbook Onboard integration feat: Cookbook Onboard (AI assistant & Playground) integration Aug 7, 2024
Copy link

netlify bot commented Aug 7, 2024

Deploy Preview for dancing-hummingbird-242a98 ready!

Name Link
🔨 Latest commit 407803d
🔍 Latest deploy log https://app.netlify.com/sites/dancing-hummingbird-242a98/deploys/66c9224f451c390008bdc8bc
😎 Deploy Preview https://deploy-preview-169--dancing-hummingbird-242a98.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ClockRide ClockRide changed the title feat: Cookbook Onboard (AI assistant & Playground) integration feat: Cookbook Onboard (AI Assistant & Playground) integration Aug 7, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 21406fd and f4ef34a.

Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing (2)
  • package.json (1 hunks)
  • src/theme/SearchBar/index.js (1 hunks)
Additional context used
Gitleaks
src/theme/SearchBar/index.js

7-7: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)

Additional comments not posted (4)
src/theme/SearchBar/index.js (3)

1-5: Imports are appropriate.

The imports of React, SearchBar, AskCookbook, and BrowserOnly are necessary for the component's functionality.


9-16: Component implementation is correct.

The SearchBarWrapper correctly integrates SearchBar and AskCookbook within BrowserOnly, ensuring compatibility with browser environments.


6-7: Verify the security implications of exposing the API key.

The comment states that the API key is safe to expose, but it's important to ensure that this does not lead to any security vulnerabilities.

Tools
Gitleaks

7-7: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)

package.json (1)

17-17: New dependency added.

The addition of @cookbookdev/docsbot expands the project's functionality. Ensure compatibility with existing dependencies and test the build process.

@ClockRide
Copy link
Contributor Author

@fedekunze, could you please review this when you have a chance?

@MalteHerrmann
Copy link
Contributor

Hey @ClockRide sorry for not getting to this sooner - will review it now 👍

@MalteHerrmann
Copy link
Contributor

Looks pretty good! Thank you for integrating @ClockRide - how would updating this information work when we push new information to the docs. Would we ping you to retrain the model or is there a continuous updating process e.g. when pushing to the repo?

@ClockRide
Copy link
Contributor Author

Looks pretty good! Thank you for integrating @ClockRide - how would updating this information work when we push new information to the docs. Would we ping you to retrain the model or is there a continuous updating process e.g. when pushing to the repo?

We automatically refresh data every 24 hours, and we also have a CMS website where you can update (and refresh) data sources pretty much anytime. Happy to give you an invite to it so you could see for yourself, just lmk what's the best way to do it :)

@ClockRide
Copy link
Contributor Author

Rebased branch

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f4ef34a and 407803d.

Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing (2)
  • package.json (1 hunks)
  • src/theme/SearchBar/index.js (1 hunks)
Additional context used
Gitleaks
src/theme/SearchBar/index.js

7-7: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)

Additional comments not posted (3)
src/theme/SearchBar/index.js (2)

6-7: Evaluate the exposure of the API key.

Even though the comment states it's safe to expose this public API key, it's generally a good practice to keep API keys secure and manage them through environment variables or a secure vault.

Please confirm if this exposure is indeed safe and intended. If not, consider using environment variables to manage the API key.

Tools
Gitleaks

7-7: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


9-15: Integration of AskCookbook looks good.

The integration of AskCookbook with SearchBar using BrowserOnly is well-implemented.

package.json (1)

17-17: Addition of @cookbookdev/docsbot dependency is appropriate.

The inclusion of this dependency supports the integration of the Cookbook AI Assistant.

Copy link
Contributor

@MalteHerrmann MalteHerrmann left a comment

Choose a reason for hiding this comment

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

Great addition to our docs, thanks a lot! 🙏

@Vvaradinov Vvaradinov merged commit 3710b43 into evmos:main Aug 30, 2024
7 checks passed
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