Compare commits

...

4 Commits

Author SHA1 Message Date
github-actions[bot]
6c16baea9a release: v0.1.10 2025-12-05 01:00:03 +00:00
YeonGyu-Kim
2ad7e193fd fix(comment-checker): support args.path for OpenCode Write/Edit tools 2025-12-05 09:57:50 +09:00
github-actions[bot]
d62f1dd207 release: v0.1.9 2025-12-05 00:45:40 +00:00
YeonGyu-Kim
aff7cad615 fix: resolve tree-sitter wasm initialization error with locateFile option 2025-12-05 09:45:04 +09:00
3 changed files with 7 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "oh-my-opencode",
"version": "0.1.8",
"version": "0.1.10",
"description": "OpenCode plugin - custom agents (oracle, librarian) and enhanced features",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -47,7 +47,11 @@ export async function detectComments(
try {
const Parser = (await import("web-tree-sitter")).default
await Parser.init()
const treeSitterWasmPath = require.resolve("web-tree-sitter/tree-sitter.wasm")
await Parser.init({
locateFile: () => treeSitterWasmPath,
})
const parser = new Parser()

View File

@@ -28,7 +28,7 @@ export function createCommentCheckerHooks() {
return
}
const filePath = (output.args.filePath ?? output.args.file_path) as string | undefined
const filePath = (output.args.filePath ?? output.args.file_path ?? output.args.path) as string | undefined
const content = output.args.content as string | undefined
if (!filePath) {