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: work with docs/xls and simple html #1526

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

Conversation

michaelneale
Copy link
Collaborator

@michaelneale michaelneale commented Mar 5, 2025

Using small libraries to allow editing of docx/xlxs files when they are referred, in the computer controller MCP
Also includes simple html presentation capability (no library needed)

addresses issue: #1527

this does add a couple of dependencies, a few MB added to goose binary (2-3MB out of 55M) - which will only be used when using CC MCP of course.

  • docx basic support (create, edit, styles)
  • image support
  • xls/excel spreadsheet support
  • tool to prompt creating of presentations

docs and spreadsheets:

Screenshot 2025-03-06 at 10 43 40 am

presentations:

Screenshot 2025-03-07 at 9 01 25 am

Screenshot 2025-03-07 at 10 37 25 am

@michaelneale michaelneale marked this pull request as ready for review March 5, 2025 23:52
@michaelneale michaelneale changed the title feat: work with docs/xls feat: work with docs/xls and simple html Mar 6, 2025
@michaelneale michaelneale requested a review from Copilot March 7, 2025 02:50

Choose a reason for hiding this comment

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

PR Overview

This PR adds support for editing and creating simple presentations along with XLSX file processing by introducing two new tools: one for HTML-based slides and one for Excel spreadsheets.

  • Introduces a presentation tool that creates and updates HTML presentations.
  • Adds an XLSX tool for working with Excel files including worksheet listing, cell updates, and range querying.
  • Updates Cargo.toml to include new dependencies (docx-rs, image, umya-spreadsheet) required for the new features.

Reviewed Changes

File Description
crates/goose-mcp/src/computercontroller/presentation_tool.rs Implements presentation creation and slide addition functionalities using an HTML template.
crates/goose-mcp/src/computercontroller/xlsx_tool.rs Provides XLSX file processing utilities such as worksheet info fetching, cell updates, and range extraction.
crates/goose-mcp/Cargo.toml Adds new dependencies required by the presentation and XLSX tools.

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

crates/goose-mcp/src/computercontroller/presentation_tool.rs:229

  • The marker string is defined as a partial comment and may not exactly match the full marker in the HTML template, potentially leading to insertion issues. Consider defining the marker with the complete expected content from the template.
let marker = "<!-- ADD_SLIDES_HERE";

crates/goose-mcp/src/computercontroller/presentation_tool.rs:240

  • Using a string replace to update the slide count may inadvertently modify unintended parts of the HTML if similar text exists elsewhere. Consider using a more targeted approach, such as regex matching or a specific template placeholder, to ensure only the intended slide count is updated.
html = html.replace(&format!("--num-slides: {}", current_slides), &format!("--num-slides: {}", new_count));
* main:
  bugfix: refactor workdirs to be async-safe, and simpler (#1558)
  feat: split required_extensions in bench to builtin/external (#1547)
  fix: continue to use resumed session after confirmation is cancelled (#1548)
  feat: add image tool to developer mcp (#1515)
  docs: using gooseignore (#1554)
  ci: use cargo update --workspace to ensure Cargo.lock is updated (#1539)
  fix: respond to interrupted tool calls with a ToolResponseMessageContent (#1557)
  fix: get tool def back to chat mode (#1538)
  ui: add default icon (#1553)
  fix: fix summarize agent, use session_id and add provider fn (#1552)
  feat(agent): memory condensation for longer context (#1457)
  docs: goose tips blog (#1550)
  docs: update to provider view (#1546)
  docs: resuming sessions (#1543)
  feat: goose bench framework for functional and regression testing
  feat: use refresh_tokens from databricks api (#1517)
  feat: use Ctrl/Cmd + ↑/↓ to navigate message history (#1501)
  feat: remove tools from chat mode (#1533)
  feat: use dropdown for goose selection (#1531)
  docs: goosehints in desktop (#1529)
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this tests directory meant to be under src/

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

that I wasn't sure about - I didn't want it included in the binary (it isn't, I checked) but maybe doesn't matter if it is under src?

@salman1993
Copy link
Collaborator

the only awkward thing i noticed was the LLM at the end said: Let me analyze the data from ... row -> when it was actually a column (not sure if we're doing a transpose or there might be a naming issue or hallucination ofcourse)

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