mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-09 15:02:30 +02:00
fix: update opencode-ecc plugin for SDK v1.1.53 and refresh README stats
- Fix PluginContext → PluginInput type rename in @opencode-ai/plugin - Import tool from @opencode-ai/plugin/tool subpath (fixes broken barrel export) - Update client.app.log() calls to use new options-object API signature - Stringify tool execute return values (SDK now requires Promise<string>) - Add .js extensions to relative imports for NodeNext module resolution - Update README star count (42K+) and contributor count (24)
This commit is contained in:
parent
77bb669dc5
commit
6c2e0eace8
6 changed files with 37 additions and 34 deletions
|
|
@ -5,7 +5,7 @@
|
|||
* Supports common coverage report formats.
|
||||
*/
|
||||
|
||||
import { tool } from "@opencode-ai/plugin"
|
||||
import { tool } from "@opencode-ai/plugin/tool"
|
||||
import * as path from "path"
|
||||
import * as fs from "fs"
|
||||
|
||||
|
|
@ -58,13 +58,13 @@ export default tool({
|
|||
}
|
||||
|
||||
if (!coverageData) {
|
||||
return {
|
||||
return JSON.stringify({
|
||||
success: false,
|
||||
error: "No coverage report found",
|
||||
suggestion:
|
||||
"Run tests with coverage first: npm test -- --coverage",
|
||||
searchedPaths: coveragePaths,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const passed = coverageData.total.percentage >= threshold
|
||||
|
|
@ -96,7 +96,7 @@ export default tool({
|
|||
.join("\n")}`
|
||||
}
|
||||
|
||||
return result
|
||||
return JSON.stringify(result)
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Automatically detects the package manager and test framework.
|
||||
*/
|
||||
|
||||
import { tool } from "@opencode-ai/plugin"
|
||||
import { tool } from "@opencode-ai/plugin/tool"
|
||||
import * as path from "path"
|
||||
import * as fs from "fs"
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ export default tool({
|
|||
|
||||
const command = cmd.join(" ")
|
||||
|
||||
return {
|
||||
return JSON.stringify({
|
||||
command,
|
||||
packageManager,
|
||||
testFramework,
|
||||
|
|
@ -93,7 +93,7 @@ export default tool({
|
|||
updateSnapshots: updateSnapshots || false,
|
||||
},
|
||||
instructions: `Run this command to execute tests:\n\n${command}`,
|
||||
}
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
* The regex patterns below are used to DETECT potential issues in user code.
|
||||
*/
|
||||
|
||||
import { tool } from "@opencode-ai/plugin"
|
||||
import { tool } from "@opencode-ai/plugin/tool"
|
||||
import * as path from "path"
|
||||
import * as fs from "fs"
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ export default tool({
|
|||
// Generate recommendations
|
||||
results.recommendations = generateRecommendations(results)
|
||||
|
||||
return results
|
||||
return JSON.stringify(results)
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue