Skip to content

Fix WarpGrep final result handling and bundle Morph SDK for OpenCode#12

Open
WDDGDA wants to merge 1 commit intomorphllm:mainfrom
WDDGDA:fix/warpgrep-nonstreaming-opencode
Open

Fix WarpGrep final result handling and bundle Morph SDK for OpenCode#12
WDDGDA wants to merge 1 commit intomorphllm:mainfrom
WDDGDA:fix/warpgrep-nonstreaming-opencode

Conversation

@WDDGDA
Copy link
Copy Markdown

@WDDGDA WDDGDA commented Apr 17, 2026

Summary

This fixes two OpenCode integration issues on Windows/local plugin installs:

  • switch Morph SDK imports to narrow entrypoints instead of the root package
  • bundle the Morph SDK compatibility layer with tsup
  • avoid WarpGrep's streaming execution path for local codebase search in OpenCode, because the final streamed result can become unusable even when a direct execute succeeds

Root cause

warpgrep_codebase_search was using the streaming WarpGrep path. In OpenCode, that path could surface as:

Search failed: search returned no error details.

even though a direct WarpGrepClient.execute() on the same query and repo returned valid contexts.

The plugin now uses the non-streaming path for local WarpGrep execution, which preserves correct final results in OpenCode.

Changes

  • replace root Morph SDK imports with narrow entrypoints
  • call applyEdit directly for morph_edit
  • change local WarpGrep execution to non-streaming
  • build with tsup and noExternal for @morphllm/morphsdk
  • add regression coverage for the import/build/runtime choices above

Verification

  • npm run typecheck
  • npm run build
  • bun test
  • verified real opencode run tool invocation for:
    • warpgrep_codebase_search
    • morph_edit

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