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: add next step suggestions and XML utilities #1084

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

samhvw8
Copy link

@samhvw8 samhvw8 commented Feb 20, 2025

  • Add NextStepSuggest component for displaying suggested next steps
  • Add XML utilities for improved XML parsing
  • Update ChatView and ChatRow to handle next step suggestions
  • Add fast-xml-parser dependency
  • Update package dependencies

Description

This feature suggest for user next step and make user use new_task tool more easy, can help user control task (and cost indirectly way) more efficient

image image image image

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?

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

Related Issues

Reviewers


Important

This PR adds a feature for suggesting next steps using a new component and XML utilities, updating several components and files to integrate these features.

  • Behavior:
    • Adds NextStepSuggest component in NextStepSuggest.tsx for displaying suggested next steps.
    • Updates ChatView.tsx and ChatRow.tsx to handle next_step_suggest messages.
    • Introduces fast-xml-parser dependency in package.json for XML parsing.
  • Utilities:
    • Adds parseXml() function in xml.ts for XML parsing with error handling.
  • Prompts and Tools:
    • Updates getObjectiveSection() in objective.ts and getRulesSection() in rules.ts to include next step suggestions.
    • Modifies getAttemptCompletionDescription() in attempt-completion.ts to describe next_step parameter.
    • Updates ToolArgs in types.ts to include experiments parameter.
  • Experiments:
    • Adds NEXT_STEP_SUGGEST to EXPERIMENT_IDS in experiments.ts.
  • Messages:
    • Adds next_step_suggest to ClineAsk and ClineSay in ExtensionMessage.ts.

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

Copy link

changeset-bot bot commented Feb 20, 2025

⚠️ No Changeset found

Latest commit: 9738c02

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

parsedSuggest = parseXml(next_step, ["next_step.suggest"]) as {
suggest: Suggest[] | Suggest
}
console.log("next_step", next_step)
Copy link
Author

Choose a reason for hiding this comment

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

this will remove before merge

<span
className="codicon codicon-question" // TODO: change icon
style={{ color: normalColor, marginBottom: "-1.5px" }}></span>,
<span style={{ color: normalColor, fontWeight: "bold" }}>Roo has suggest prompt:</span>,
Copy link

Choose a reason for hiding this comment

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

Typo: The text 'Roo has suggest prompt:' seems off. Consider updating it to a more grammatically correct phrase such as 'Roo has a suggestion prompt:' or 'Roo suggests a prompt:' to improve clarity.

Suggested change
<span style={{ color: normalColor, fontWeight: "bold" }}>Roo has suggest prompt:</span>,
<span style={{ color: normalColor, fontWeight: "bold" }}>Roo has a suggestion prompt:</span>,

@samhvw8
Copy link
Author

samhvw8 commented Feb 20, 2025

image
image
image

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Feb 21, 2025
@samhvw8 samhvw8 force-pushed the feat/next-step-attempt-complete branch 2 times, most recently from ec14df6 to 7716989 Compare February 21, 2025 09:18
- Add NextStepSuggest component for displaying suggested next steps
- Add XML utilities for improved XML parsing
- Update ChatView and ChatRow to handle next step suggestions
- Add fast-xml-parser dependency
- Update package dependencies

update snapshoot

feat(ui): enhance next step suggestions UX and documentation

- Improve next step UI with collapsible view and show more/less toggle
- Add type validation and error handling for suggestion parsing
- Update documentation with clearer formatting guidelines and examples
- Enhance button styling and accessibility for better user interaction

update snapshot

refactor: move next step suggestions into chat row for better UX

feat: enhance next step suggestions with mode selection

- Make next_step parameter required in attempt_completion tool
- Update suggestion format to include task and mode fields
- Enhance UI to display mode alongside task description
- Update parsing logic to handle new suggestion format
- Improve error handling for missing or invalid suggestions

refactor(NextStepSuggest): improve component with shadcn UI and better styling

- Replace native buttons with shadcn Button component
- Increase button dimensions for better readability
- Add proper text wrapping and overflow handling
- Style mode text as VSCode badge
- Improve hover and active states
- Maintain VSCode theming integration
- Show 3 suggestions in non-expanded mode
- Remove next_step_suggest from experiments
- Make next step suggestions a required parameter in attempt_completion
- Update documentation to reflect next step suggestions as core functionality
- Remove experimental conditionals from objective and rules sections
@samhvw8 samhvw8 force-pushed the feat/next-step-attempt-complete branch from 7716989 to e58f27f Compare February 22, 2025 15:10
…e isolation

- Add expand/collapse functionality to show more/less suggestions
- Implement instance-specific state management via instanceId prop
- Add Show More/Less button with suggestion count
- Improve accessibility with ARIA labels
- Add Lucide icons for visual indicators
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant