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

enable change select on failure #1261

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chadgauth
Copy link

@chadgauth chadgauth commented Feb 28, 2025

Description

This pull request redesigns the chat window, updates the start screen text, fixes a chat disabling issue, and includes an HTML bug fix. Storybook stories have been added for most components to improve component documentation and development workflow.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

The changes have been tested by manually reviewing the UI changes in the chat window and verifying the fix for the chat disabling issue. Tested with the extension host, and adding images.

Checklist:

  • My code follows the patterns of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Additional context

Screenshot 2025-02-26 at 11 03 40 AM

This PR enhances the user experience and developer workflow by improving the chat interface, providing clearer guidance.

Animation:
Screen Recording 2025-02-24 at 1 32 39 AM


Important

Redesigns chat interface, updates start screen, fixes chat disabling, and adds Storybook stories for improved documentation.

  • UI Redesign:
    • Redesigns chat window and updates start screen text in ChatView.tsx.
    • Adds ChatTextArea, ChatTextAreaInput, ChatTextAreaActions, ChatTextAreaSelections, and ChatTextAreaLayout components.
    • Updates styles in ChatTextArea.module.css.
  • Functionality:
    • Fixes chat disabling issue in ChatView.tsx.
    • Adds defaultExtensionState to ExtensionMessage.ts for consistent state management.
  • Testing:
    • Adds tests for ChatTextArea and ChatView in ChatTextArea.test.tsx and ChatView.test.tsx.
    • Updates ClineProvider.test.ts to use defaultExtensionState.
  • Miscellaneous:
    • Changes icon for MCP Servers command in package.json.
    • Adds Storybook stories for components to improve documentation and workflow.

This description was created by Ellipsis for 4c50dcd. It will automatically update as commits are pushed.

cleanup chat / announcement
Copy link

changeset-bot bot commented Feb 28, 2025

🦋 Changeset detected

Latest commit: 4c50dcd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
roo-cline Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. bug Something isn't working enhancement New feature or request labels Feb 28, 2025
Copy link

ellipsis-dev bot commented Feb 28, 2025

This pull request is quite large, with 20 files changed, 1018 lines added, and 661 lines removed. It includes a mix of new features, refactoring, and fixes across various components and modules.

To improve the review process and maintainability, it might be beneficial to split this pull request into smaller, more focused ones. Here are some suggestions on how to split the changes:

  1. New Features: Consider creating a separate pull request for the new features introduced, such as the new React components (ChatTextArea, ChatTextAreaActions, ChatTextAreaLayout, etc.) and the associated CSS styling.

  2. Refactoring: The refactoring changes, such as those in ClineProvider.test.ts and ExtensionStateContext.tsx, could be grouped into another pull request.

  3. Fixes: Any bug fixes, like the update to the MCP Servers icon identifier in package.json and the key prop addition in Thumbnails.tsx, could be isolated into their own pull request.

By splitting the pull request, it will be easier to review and test each set of changes independently, ensuring a smoother integration process. Let me know if you have any questions or need further assistance!

@@ -513,7 +404,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(

highlightLayerRef.current.innerHTML = text
.replace(/\n$/, "\n\n")
.replace(/[<>&]/g, (c) => ({ "<": "&lt;", ">": "&gt;", "&": "&amp;" })[c] || c)
.replace(/[<>&]/g, (c) => ({ "<": "<", ">": ">", "&": "&amp;" })[c] || c)
Copy link

Choose a reason for hiding this comment

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

The HTML escaping in the highlight update uses replace(/[<>&]/g, ...) and currently only replaces '&' with '&' while leaving '<' and '>' unchanged. For consistency and to prevent potential HTML injection issues, consider replacing '<' with '<' and '>' with '>'.

Suggested change
.replace(/[<>&]/g, (c) => ({ "<": "<", ">": ">", "&": "&amp;" })[c] || c)
.replace(/[<>&]/g, (c) => ({ "<": "&lt;", ">": "&gt;", "&": "&amp;" })[c] || c)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant