move test fns outside of top level index to fix filter and slice errors#10
Open
harryalbert wants to merge 1 commit intomainfrom
Open
move test fns outside of top level index to fix filter and slice errors#10harryalbert wants to merge 1 commit intomainfrom
harryalbert wants to merge 1 commit intomainfrom
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
xiaogaozi
added a commit
to xiaogaozi/opencode-warp
that referenced
this pull request
Apr 15, 2026
Move utility functions to dedicated src/utils.ts module for better code organization and reusability across the codebase. Closes: warpdotdev#10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

A user reported that "/opencode-warp@0.1.1 crashes on startup hooks with errors like "parts.filter is not a function" and "str.slice is not a function"."
Both of these errors seem to be coming from test helper functions that are exported from the top level index.ts fn in our plugin module. In older versions of opencode, each function exported out of a module is automatically called as a plugin builder, so it makes sense that these functions would cause compilation errors because they are not meant to be called as plugin builders.
The fix is just to move the helper functions to their own util file.