close
Skip to content

feat: update specification schema to mark optional fields with '-' in…#134

Merged
divyeshio merged 6 commits intomainfrom
more-cleanup
Apr 18, 2026
Merged

feat: update specification schema to mark optional fields with '-' in…#134
divyeshio merged 6 commits intomainfrom
more-cleanup

Conversation

@divyeshio
Copy link
Copy Markdown
Owner

fix: improve tool loading logic to handle local storage correctly
This pull request refactors and extends the command generation logic for the Commandly UI, making the code more modular, maintainable, and feature-rich. The main improvements are the extraction of command generation into a reusable utility function, the introduction of a context-based compound component API for the GeneratedCommand component, and the addition of a user preference for long or short flags in generated commands. The changes also include utility and cleanup improvements for handling tool definitions.

Component refactor and new features:

  • Refactored GeneratedCommand into a compound component with context, splitting out UI elements (header, toolbar, output, actions, flag preference switch, etc.) and enabling more flexible composition and extension.
  • Added support for user preference between long and short flags in generated commands via a toggle, and made this preference available throughout the component tree.
  • The actual command string generation logic was moved out of the component and into a new utility function, generateCommand, which supports the long/short flag preference and is now used in the component. [1] [2]

Utility and codebase improvements:

  • Added the generateCommand utility function to utils/flat.ts, supporting options for long/short flags and selected commands, and improved parameter handling.
  • Improved and extended tool cleanup utilities, including new functions for cleaning parameters, commands, and exclusion groups, and a new fixTool function for normalizing tool definitions.feat: add description and URL fields to new tool creation dialog

divyeshio and others added 6 commits April 17, 2026 22:41
…stead of '—'

fix: adjust tool-renderer prop types to use '-' for optional fields

feat: enhance UI integration by wrapping GeneratedCommand in Card component

refactor: simplify command generation logic using generateCommand utility

fix: improve tool loading logic to handle local storage correctly

feat: add description and URL fields to new tool creation dialog

test: add defaultTool utility for consistent tool object creation in tests

test: enhance command-tree tests for rendering behavior with commands

test: update command-dialog tests to use defaultTool utility

test: improve parameter-details-dialog tests for parameter validation

test: add tests for saved-commands-dialog to check long command rendering

test: enhance help-menu tests to verify tool preview generation

test: update parameter-list tests to use defaultTool utility

test: improve preview-tabs tests for long flag toggle visibility

test: enhance tool-editor tests for clipboard functionality and separator cleanup

test: update tools test to use defaultTool utility for consistency

Co-authored-by: Copilot <copilot@github.com>
…ad of 'name'

Co-authored-by: Copilot <copilot@github.com>
@divyeshio divyeshio merged commit 5f7ea32 into main Apr 18, 2026
6 checks passed
@divyeshio divyeshio deleted the more-cleanup branch April 18, 2026 14:23
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.

1 participant