Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

kevalmahajan
Copy link
Member

@kevalmahajan kevalmahajan commented Aug 1, 2025

πŸ› Bug-fix PR


πŸ“Œ Summary

The test tool panel did not support multiline input. As a result, cases requiring multiline input such as code with newlines/indentations were passed as a single line, causing the tool to fail.

πŸ” Reproduction Steps

  1. Pass code with more than one line to a tool in the test tool panel.
  2. Observe the tool failure due to incorrect formatting.

🐞 Root Cause

The test tool panel lacked support for multiline or properly formatted input, resulting in broken inputs for formats that rely on structure, such as Python or Mermaid.

πŸ’‘ Fix Description

Enabled support for multiline input in the test tool panel ensuring that text blocks with indentation, new lines are passed and interpreted correctly.

Example Input for Mermaid tool:

graph TD
  A[Start] --> B{Is it working?}
  B -- Yes --> C[Great!]
  B -- No --> D[Check the config]
  D --> B

Earlier Behaviour:
The input passed to the tool would be :

graph TD  A[Start] --> B{Is it working?}  B -- Yes --> C[Great!]  B -- No --> D[Check the config] D --> B

Causing tool call failure because of invalid code.

Current behaviour:
The string entered in the text box is passed exactly with new lines:

graph TD
  A[Start] --> B{Is it working?}
  B -- Yes --> C[Great!]
  B -- No --> D[Check the config]
  D --> B

πŸ§ͺ Verification

Check Command Status
Lint suite make lint
Unit tests make test
Coverage β‰₯ 90 % make coverage
Manual regression no longer fails steps / screenshots

πŸ“ MCP Compliance (if relevant)

  • Matches current MCP spec
  • No breaking change to MCP clients

βœ… Checklist

  • Code formatted (make black isort pre-commit)
  • No secrets/credentials committed

Copy link
Member

@crivetimihai crivetimihai left a comment

Choose a reason for hiding this comment

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

PR Summary: support multiline text input in test tool panel

  • Purpose: This PR fixes a bug where the test tool panel did not support multiline input. Previously, when users needed to input code with newlines or indentation (e.g., Python or Mermaid diagrams), the input was flattened into a single line, which broke the tool's functionality.

  • What changed:

    • The PR modifies the admin.js UI logic to use a <textarea> for text input fields, allowing for multiline input.
    • The input is now passed to tools exactly as entered, preserving newlines and formatting. Boolean and number fields are handled as before.
  • Example: Previously, Mermaid diagrams were passed as one long line, causing failures. Now, multiline and indented text is preserved and processed correctly.

  • Verification: The PR lists linting, unit test, and regression test checks to verify the fix.

  • Impact: This improves usability for tools requiring formatted/multiline input and resolves issues with tools that failed due to broken formatting.

No breaking changes are introduced. The change is limited to the test tool panel's input handling in the admin UI.

Passed make lint-web doctest test

@crivetimihai crivetimihai merged commit 182cde8 into main Aug 1, 2025
37 checks passed
@crivetimihai crivetimihai deleted the multiline_input_testtool branch August 1, 2025 07:37
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