-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
18 lines (17 loc) · 736 Bytes
/
Copy pathindex.ts
File metadata and controls
18 lines (17 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { setupMeta } from "./plugins/opencode-meta/lib.ts"
import { setupRecall } from "./plugins/opencode-recall-lite/lib.ts"
// npm entry: both plugins as one, sharing a single session index in this plugin's storage. recall-lite
// maintains the index; opencode-meta's tools read the same one.
// Plain object rather than `Plugin.define`: a plugin outside the OpenCode repository cannot resolve
// "@opencode/plugin" at runtime, and `define` only returns its argument.
export default {
id: "opencode-session-tools",
async setup(ctx: any) {
const stopRecall = await setupRecall(ctx)
const stopMeta = await setupMeta(ctx, { indexing: false })
return async () => {
await stopMeta()
stopRecall()
}
},
}