vibe-learning-opencode 0.2.2 → 0.2.4
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/dist/index.js +24 -19
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -209,12 +209,25 @@ var VibeLearningPlugin = (ctx) => {
|
|
|
209
209
|
});
|
|
210
210
|
};
|
|
211
211
|
return {
|
|
212
|
-
//
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
212
|
+
// Generic event handler for session events
|
|
213
|
+
event: async ({ event }) => {
|
|
214
|
+
if (event.type === "session.created") {
|
|
215
|
+
const sessionID = event.properties?.info?.id;
|
|
216
|
+
if (!sessionID)
|
|
217
|
+
return;
|
|
218
|
+
lastSessionID = sessionID;
|
|
219
|
+
sessionContextShown.add(sessionID);
|
|
220
|
+
try {
|
|
221
|
+
client.tui.showToast({
|
|
222
|
+
body: {
|
|
223
|
+
title: "\u{1F4DA} VibeLearning",
|
|
224
|
+
message: "Checking learning status...",
|
|
225
|
+
variant: "info",
|
|
226
|
+
duration: 2e3
|
|
227
|
+
}
|
|
228
|
+
}).catch(() => {
|
|
229
|
+
});
|
|
230
|
+
const contextPrompt = `[VibeLearning - Session Start]
|
|
218
231
|
|
|
219
232
|
Execute NOW and show results to user:
|
|
220
233
|
1. Call mcp__vibe-learning__get_unknown_unknowns with period="month", limit=5
|
|
@@ -226,19 +239,11 @@ Format as brief notification:
|
|
|
226
239
|
\u2022 Y due for review
|
|
227
240
|
|
|
228
241
|
If nothing to show, skip silently.`;
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
variant: "info",
|
|
235
|
-
duration: 2e3
|
|
236
|
-
}
|
|
237
|
-
}).catch(() => {
|
|
238
|
-
});
|
|
239
|
-
} catch (err) {
|
|
240
|
-
client.app.log({ level: "error", message: `[VibeLearning] Session start error: ${err}` }).catch(() => {
|
|
241
|
-
});
|
|
242
|
+
injectPrompt(sessionID, contextPrompt);
|
|
243
|
+
} catch (err) {
|
|
244
|
+
client.app.log({ level: "error", message: `[VibeLearning] Session start error: ${err}` }).catch(() => {
|
|
245
|
+
});
|
|
246
|
+
}
|
|
242
247
|
}
|
|
243
248
|
},
|
|
244
249
|
"tool.execute.after": async (input, output) => {
|