Files
oc_session/package.json
T
ypshidifu a5a8c5e011 v2: 将 oc-session-all 从 v1 格式转为 v2 Plugin.define 格式
- 使用 import { Plugin } from "@opencode/plugin/tui"
- 使用 Plugin.define({ id, setup(context) }) 格式
- api.* 调用全部替换为 context.*: api.event.on → context.data.on, api.ui.toast → context.ui.toast.show, api.ui.dialog.* → context.ui.dialog.*, api.command.register + api.keymap.registerLayer 合并为 context.keymap.layer({commands, bindings})
- package.json exports 添加 ./tui 入口点,engines.opencode 升级为 >=2.0.0
- 已通过 minimal-v2-test 验证 v2 格式可正确加载
2026-09-22 15:19:14 +08:00

27 lines
505 B
JSON

{
"name": "oc-session-all",
"version": "2.1.0",
"description": "OpenCode v2 TUI plugin: browse and switch to any session across all projects",
"main": "tui.js",
"type": "module",
"exports": {
".": "./tui.js",
"./tui": "./tui.js"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"opencode",
"tui",
"plugin",
"session",
"picker"
],
"author": "",
"license": "MIT",
"engines": {
"opencode": ">=2.0.0"
}
}