mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-09 15:02:30 +02:00
fix: stabilize opencode declarations across package managers
This commit is contained in:
parent
0f4f95b3de
commit
05acc27530
8 changed files with 31 additions and 15 deletions
|
|
@ -4,10 +4,10 @@
|
|||
* Returns branch/status/log/diff details for the active repository.
|
||||
*/
|
||||
|
||||
import { tool } from "@opencode-ai/plugin/tool"
|
||||
import { tool, type ToolDefinition } from "@opencode-ai/plugin/tool"
|
||||
import { execSync } from "child_process"
|
||||
|
||||
export default tool({
|
||||
const gitSummaryTool: ToolDefinition = tool({
|
||||
description:
|
||||
"Generate git summary with branch, status, recent commits, and optional diff stats.",
|
||||
args: {
|
||||
|
|
@ -45,6 +45,8 @@ export default tool({
|
|||
},
|
||||
})
|
||||
|
||||
export default gitSummaryTool
|
||||
|
||||
function run(command: string, cwd: string): string {
|
||||
try {
|
||||
return execSync(command, { cwd, encoding: "utf-8", stdio: ["ignore", "pipe", "pipe"] }).trim()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue