Skip to content

Conversation

@f
Copy link
Owner

@f f commented Mar 27, 2025

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • 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?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Checklist:

  • My code follows the style guidelines 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
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@f f requested a review from Copilot March 27, 2025 22:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request introduces a better table view along with improved terminal width handling and text wrapping for various output formats. Key changes include:

  • Addition of tests for text wrapping, terminal width detection, and tools list formatting.
  • Enhancement of table formatting for tools, prompts, and resources with dynamic column widths and proper text wrapping.
  • Updates to command help messages in the CLI to use simplified example paths.

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
pkg/jsonutils/jsonutils_test.go Added tests for wrapText, getTermWidth, and tools list formatting.
pkg/jsonutils/jsonutils.go Improved table formatting with dynamic widths and added helper functions.
cmd/mcptools/main.go Updated example command output to use a simplified path.
Files not reviewed (1)
  • go.mod: Language not supported
Comments suppressed due to low confidence (2)

pkg/jsonutils/jsonutils_test.go:176

  • In TestParseFormat, the ordering of test case values appears reversed relative to the field definitions (input string and expected OutputFormat). Verify that the first field indeed represents the input and the second field the expected output for clarity and consistency.
{FormatJSON, "json"},

cmd/mcptools/main.go:538

  • [nitpick] Ensure that the command naming in help messages is consistent across the application; consider verifying that 'mcp tools shell' aligns with the naming conventions used in other commands.
fmt.Println("mcp tools shell")

f and others added 2 commits March 28, 2025 01:33
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@f f merged commit 3b2fcd8 into master Mar 27, 2025
2 checks passed
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