feat: add initial implementation of Opencode client and session handling
- Created agent.ts to export necessary components from the plugin source. - Implemented index.ts to initialize Opencode client and list projects and sessions. - Added functionality to prompt a session with specific tool instructions.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { tool } from "@opencode-ai/plugin/tool";
|
||||
import type { Plugin, PluginInput } from "@opencode-ai/plugin";
|
||||
|
||||
const MyPlugin: Plugin = async (ctx: PluginInput) => {
|
||||
console.log("Plugin loaded!", ctx.project.name);
|
||||
export const MyPlugin: Plugin = async (ctx: PluginInput) => {
|
||||
console.log("Plugin loaded!", ctx.project.worktree);
|
||||
|
||||
return {
|
||||
tool: {
|
||||
@@ -19,4 +19,3 @@ const MyPlugin: Plugin = async (ctx: PluginInput) => {
|
||||
};
|
||||
};
|
||||
|
||||
export default MyPlugin;
|
||||
|
||||
Reference in New Issue
Block a user