Skip to content

feat: add subcommand extract to slim - #716

Merged
fatelei merged 4 commits into
mainfrom
feat/slim-extract
May 7, 2026
Merged

feat: add subcommand extract to slim#716
fatelei merged 4 commits into
mainfrom
feat/slim-extract

Conversation

@41tair

@41tair 41tair commented Apr 28, 2026

Copy link
Copy Markdown
Member

Description

Add the extract as sub command for daemon, used for extract plugin schema.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Performance improvement
  • Other

Essential Checklist

Testing

  • I have tested the changes locally and confirmed they work as expected
  • I have added unit tests where necessary and they pass successfully

Bug Fix (if applicable)

  • I have used GitHub syntax to close the related issue (e.g., Fixes #123 or Closes #123)

Additional Information

Please provide any additional context that would help reviewers understand the changes.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an extract command to the slim CLI tool, enabling the extraction of plugin schemas and declarations from either local files or a remote daemon. It includes new CLI command handling, refactored configuration loading with specific defaults for extraction, and new service logic for performing the extraction. A new API endpoint /v2/invoke/extract is also added to the daemon. Review comments suggest ensuring pluginWorkingPath is properly defined or replaced with filepath.Join, closing FSPluginDecoder instances for resource management, using uuid.Nil.String() for consistency, and optimizing local plugin package reading to avoid loading large files entirely into memory.

Comment thread pkg/slim/extract_local.go Outdated
Comment thread pkg/slim/extract_local.go
Comment thread pkg/slim/extract.go Outdated
Comment thread pkg/slim/extract_local.go
@41tair
41tair marked this pull request as ready for review May 7, 2026 03:02
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request go Pull requests that update go code plugin-daemon labels May 7, 2026
41tair and others added 2 commits May 7, 2026 11:04
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Comment thread pkg/slim/extract.go
Comment thread pkg/slim/extract.go
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 7, 2026
@fatelei
fatelei merged commit ae092ca into main May 7, 2026
7 checks passed
@fatelei
fatelei deleted the feat/slim-extract branch May 7, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update go code lgtm This PR has been approved by a maintainer plugin-daemon size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants