- Copy complete source code packages from original CodeNomad project - Add root package.json with npm workspace configuration - Include electron-app, server, ui, tauri-app, and opencode-config packages - Fix Launch-Windows.bat and Launch-Dev-Windows.bat to work with correct npm scripts - Fix Launch-Unix.sh to work with correct npm scripts - Launchers now correctly call npm run dev:electron which launches Electron app
19 lines
442 B
JavaScript
19 lines
442 B
JavaScript
import { tool } from "@opencode-ai/plugin/tool"
|
|
|
|
export async function HelloPlugin() {
|
|
return {
|
|
tool: {
|
|
hello: tool({
|
|
description: "Return a friendly greeting",
|
|
args: {
|
|
name: tool.schema.string().optional().describe("Name to greet"),
|
|
},
|
|
async execute(args) {
|
|
const target = args.name?.trim() || "CodeNomad"
|
|
return `Hello, ${target}!`
|
|
},
|
|
}),
|
|
},
|
|
}
|
|
}
|