Skip to content

Conversation

@complyue
Copy link

@complyue complyue commented Mar 17, 2025

Context

Adding a [Data Engineer] mode here, for Roo to work on the active Notebook together with the user.

Implementation

Tool functions are added to read/edit/exec cells in the active notebook.

Update 2:

Myself roughly satisfied with what's done so far, rebased & squashed for ease of review. Now it automatically execute new/modified cells upon notebook edit.

A flaw I encounter is that even though I wrote the prompts trying to allow multiple cells inserted/replaced in a single tool call, currently the framework wouldn't allow multiple <cell_content/> args to be passed around. It works well so long as the agent does insert/modify/replace a single cell at a time.

What's your suggestions?

Update:

Sonnet MAX saved the day! Now the UI works as expected 😄

Yet I fail to make the tool usage approving UI show up correctly, tho blindly approval works, neither auto-approval works. Also added 2 new settings to truncate huge nb cell outputs, as well as config nb exec timeout, failed to make them show up in settings UI either.

Further enhancement may include allowing modify + exec the notebook in a single round, I'm not sure the best approach.

I'm open to ideas around this feature.

Please review!

Screenshots

image

How to Test

Switch to [Data Engineer] mode, ask Roo to read/edit/exec the active notebook with any goal.

Get in Touch

I prefer GH messages.


Important

Introduces Data Engineer mode for notebook interaction, with settings for output size and execution timeout, and updates localization and state management.

  • Behavior:
    • Adds Data Engineer mode to interact with active notebooks, including reading, editing, and executing cells.
    • Supports auto-approval for notebook actions in ChatView.tsx.
  • Settings:
    • Adds NotebookSettings.tsx for configuring output size limit and execution timeout.
    • Updates SettingsView.tsx to include notebook settings.
  • Context and State:
    • Updates ExtensionStateContext.tsx to manage new notebook-related states.
    • Adds tests in ExtensionStateContext.test.tsx for new state management.
  • Localization:
    • Updates localization files for new notebook-related strings in English, Chinese (Simplified and Traditional).

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

@changeset-bot
Copy link

changeset-bot bot commented Mar 17, 2025

⚠️ No Changeset found

Latest commit: 5409742

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

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request labels Mar 17, 2025
@ellipsis-dev
Copy link
Contributor

ellipsis-dev bot commented Mar 17, 2025

This pull request introduces a significant number of changes across multiple files, primarily related to notebook tool support, descriptions, and settings, as well as a new NotebookService class and various configurations for notebook operations. Given the size and scope of the changes, it might be beneficial to split the pull request into smaller, logical sections to improve reviewability.

Consider splitting the changes into:

  1. Notebook Tool Support: Changes related to adding support for notebook read, edit, and execute actions.
  2. Notebook Settings and Descriptions: Changes related to adding descriptions and settings for notebook tools.
  3. NotebookService Implementation: Changes related to the implementation of the NotebookService class and related operations.

This approach could help reviewers focus on specific aspects of the feature and ensure a more thorough review process.

Copy link
Contributor

Choose a reason for hiding this comment

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

The error message on line 332 mentions 'cell_index' rather than 'cellIndex'. For clarity and consistency, consider updating the message.

Suggested change
throw new Error("cell_index is required for executing a cell.")
throw new Error("cellIndex is required for executing a cell.")

@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap Mar 17, 2025
@complyue complyue marked this pull request as draft March 18, 2025 09:20
@samhvw8
Copy link
Contributor

samhvw8 commented Mar 18, 2025

cool

@complyue complyue force-pushed the de branch 4 times, most recently from 77bfbb0 to 89a6612 Compare March 19, 2025 14:03
@complyue
Copy link
Author

complyue commented Mar 19, 2025

thanks to Sonnet MAX! now rebased on 3.9, and UI solved 😃, with i18n (en+zh)

set to optimize some wrt workflow

@complyue
Copy link
Author

Myself roughly satisfied with what's done so far, rebased & squashed for ease of review. Now it automatically execute new/modified cells upon notebook edit.

A flaw I encounter is that even though I wrote the prompts trying to allow multiple cells inserted/replaced in a single tool call, currently the framework wouldn't allow multiple <cell_content/> args to be passed around. It works well so long as the agent does insert/modify/replace a single cell at a time.

What's your suggestions?

@complyue complyue marked this pull request as ready for review March 20, 2025 15:34
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo on line 5: 'unless the <noexec/> parameter presents.' should be corrected to 'unless the <noexec/> parameter is present.'

Suggested change
Description: Edit the active notebook in the editor. This tool allows you to insert new cells or replace existing cells. Note that new/modified code cells will be executed immediately, by default, unless the <noexec/> parameter presents.
Description: Edit the active notebook in the editor. This tool allows you to insert new cells or replace existing cells. Note that new/modified code cells will be executed immediately, by default, unless the <noexec/> parameter is present.

Copy link
Contributor

Choose a reason for hiding this comment

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

Naming Convention Issue: In the ClineSayTool interface, properties such as cell_content, cell_index, start_index, end_index, cell_type, and language_id are written in snake_case, whereas most other properties in the file use camelCase. Consider renaming them to cellContent, cellIndex, startIndex, endIndex, cellType, and languageId for consistency.

@ellipsis-dev
Copy link
Contributor

ellipsis-dev bot commented Mar 20, 2025

The pull request is quite large, with 29 files changed and over 1800 lines added. It includes various changes such as adding notebook functionalities, tool interfaces, descriptions, configuration options, and localization strings.

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

  1. Core Functionalities: Changes related to the core functionalities of notebook read, edit, and execute in src/core.
  2. Webview Components: Updates to webview components and settings in webview-ui/src/components.
  3. Localization: All localization-related changes in webview-ui/src/i18n.

This will help reviewers focus on specific areas and ensure a more thorough review process. Please consider splitting the pull request if these changes are not tightly coupled.

@samhvw8
Copy link
Contributor

samhvw8 commented Mar 20, 2025

@complyue cool, is it ready to review

@complyue
Copy link
Author

@samhvw8 yes, please review!

@complyue complyue changed the title [WIP] Data Engineer mode with interactions with the active Notebook Data Engineer mode with interactions with the active Notebook Mar 21, 2025
@complyue complyue force-pushed the de branch 2 times, most recently from f7d4572 to c6033fb Compare March 26, 2025 11:23
@complyue
Copy link
Author

Roo doing MATLAB!

image

teddyOOXX pushed a commit to teddyOOXX/Roo-Code that referenced this pull request Mar 28, 2025
@complyue complyue force-pushed the de branch 8 times, most recently from b96f46b to 04f5e0e Compare April 16, 2025 11:39
@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap May 20, 2025
@hannesrudolph hannesrudolph moved this from PR [Needs Review] to TEMP in Roo Code Roadmap May 26, 2025
@daniel-lxs daniel-lxs moved this from TEMP to PR [Needs Review] in Roo Code Roadmap May 26, 2025
@daniel-lxs
Copy link
Member

Hey @complyue.
Thanks for your contribution. We genuinely apologize for letting your PR go stale and not taking the proper time to review it.

This seems like a big change and we would like to have an issue opened first with an use-case for these changes to properly discuss it. We are closing this PR but feel free to create an issue to revisit this.

We've now shifted to a clearer issue-first workflow to avoid this kind of situation going forward. Please create an issue first for any future contributions, as outlined there.

We truly appreciate your patience and would be happy to have you continue contributing.

@daniel-lxs daniel-lxs closed this May 27, 2025
@github-project-automation github-project-automation bot moved this from Needs Preliminary Review to Done in Roo Code Roadmap May 27, 2025
@github-project-automation github-project-automation bot moved this from PR [Pre Approval Review] to Done in Roo Code Roadmap May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PR - Needs Preliminary Review size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants