Skip to content

Added tool for the brand config files #1831

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
wants to merge 3 commits into from

Conversation

SoloDevAbu
Copy link
Contributor

@SoloDevAbu SoloDevAbu commented May 7, 2025

Description

Added a tool to the Agent to find the brand config files and return globals.css and tailwind.config.js|ts|mjs

Related Issues

related #1696

Type of Change

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

Testing

Tested by writing test scripts

Screenshots (if applicable)

Screenshot from 2025-05-08 01-10-30


Important

Added a tool to locate brand config files (globals.css and tailwind.config) in a project directory, with tests to verify functionality.

  • New Feature:
    • Added getBrandConfigFiles function in helpers.ts to locate globals.css and tailwind.config files in a directory.
    • Introduced getBrandConfigTool in index.ts to expose the functionality as a tool.
  • Testing:
    • Added brand-config-file.test.ts to test getBrandConfigFiles for various scenarios, including file discovery and exclusion of node_modules.

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

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed everything up to c504373 in 4 minutes and 42 seconds. Click for details.
  • Reviewed 158 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/ai/src/tools/helpers.ts:44
  • Draft comment:
    Consider renaming 'getbrandConfigFiles' to 'getBrandConfigFiles' for consistent camelCase naming.
  • Reason this comment was not posted:
    Marked as duplicate.
2. packages/ai/src/tools/index.ts:133
  • Draft comment:
    The tool 'getBrandConfigTool' calls 'getbrandConfigFiles'. If you rename the function for consistency, update its call here as well.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
3. packages/ai/src/tools/helpers.ts:44
  • Draft comment:
    Consider renaming 'getbrandConfigFiles' to 'getBrandConfigFiles' to follow camelCase conventions.
  • Reason this comment was not posted:
    Marked as duplicate.
4. packages/ai/test/tools/brand-config-file.test.ts:28
  • Draft comment:
    Consider adding a test case for a non-existent directory to validate proper error handling.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 30% vs. threshold = 50% Error handling tests are generally good practice. However, this is a new file being added, and the basic functionality is well tested. The comment is suggesting a hypothetical improvement rather than pointing out a clear issue. We don't know if error handling is even important for this utility function's use case. Error handling tests could catch real bugs and improve reliability. The function might behave unexpectedly with invalid inputs. While error testing is good practice, this comment is more of a nice-to-have suggestion rather than identifying a clear problem. The tests already cover the main functionality well. Delete the comment as it's a speculative suggestion rather than pointing out a clear issue that needs to be fixed.
5. packages/ai/src/tools/index.ts:57
  • Draft comment:
    Typo found in the comment at line 57. Consider changing "doens't" to "doesn't" for clarity.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. packages/ai/test/tools/brand-config-file.test.ts:1
  • Draft comment:
    Minor naming issue: The function 'getbrandConfigFiles' might be intended to be named 'getBrandConfigFiles' to follow camelCase conventions. Please check if this is an oversight.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_bewNAR8mjhaYiXMK

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed everything up to 0041a99 in 3 minutes and 33 seconds. Click for details.
  • Reviewed 158 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/ai/test/tools/brand-config-file.test.ts:1
  • Draft comment:
    Function name typo: should import 'getBrandConfigFiles' (camelCase) from helpers instead of 'getbrandConfigFiles'.
  • Reason this comment was not posted:
    Marked as duplicate.
2. packages/ai/src/tools/index.ts:57
  • Draft comment:
    Typo: The comment in line 57 says 'doens't' which should be 'doesn't'. Please update it for correctness.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. packages/ai/test/tools/brand-config-file.test.ts:1
  • Draft comment:
    The imported function name 'getbrandConfigFiles' uses a lowercase 'b' in 'brand'. For consistency with camelCase naming conventions, consider renaming it to 'getBrandConfigFiles'. This is a trivial issue but worth standardizing.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_TKNABmoSQDh21zA5

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@Kitenite
Copy link
Contributor

Hello, I am migrating the desktop app to a new repository. This repository will now focus on the web version. This PR has been migrated to the new repository: onlook-dev#3. Sorry for the inconvenience, rest assure your work here will also be adapted for the web version (if it hasn't already).

@Kitenite Kitenite closed this May 14, 2025
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.

2 participants