moshi-opencode-hooks 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.ts +8 -0
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -127,6 +127,9 @@ function formatModelName(model: string | undefined): string | undefined {
|
|
|
127
127
|
return model.replace(/^claude-/, "")
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
const pkg = await import("./package.json", { assert: { type: "json" } })
|
|
131
|
+
const VERSION = pkg.default.version
|
|
132
|
+
|
|
130
133
|
export const MoshiHooks: Plugin = async ({ client, directory }) => {
|
|
131
134
|
const setupEventSubscription = async () => {
|
|
132
135
|
try {
|
|
@@ -190,6 +193,11 @@ export const MoshiHooks: Plugin = async ({ client, directory }) => {
|
|
|
190
193
|
}
|
|
191
194
|
|
|
192
195
|
return {
|
|
196
|
+
"tui.toast.show": async (_input: unknown, output: any) => {
|
|
197
|
+
output.message = `moshi-opencode-hooks v${VERSION} is active`
|
|
198
|
+
output.type = "info"
|
|
199
|
+
},
|
|
200
|
+
|
|
193
201
|
"tool.execute.before": async (input, output) => {
|
|
194
202
|
const token = await loadToken()
|
|
195
203
|
if (!token) return
|