@bunkercache/opencode-memoir 0.3.1 → 0.4.0

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.
Files changed (2) hide show
  1. package/dist/index.js +11 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -14269,6 +14269,15 @@ function tool(input) {
14269
14269
  }
14270
14270
  tool.schema = exports_external;
14271
14271
  // src/tools/memoir.ts
14272
+ async function showToast(message, variant = "info") {
14273
+ const client = getOpenCodeClient();
14274
+ if (!client?.tui?.showToast) {
14275
+ return;
14276
+ }
14277
+ try {
14278
+ await client.tui.showToast({ body: { message, variant } });
14279
+ } catch {}
14280
+ }
14272
14281
  var HELP_TEXT = `Memoir Tool - Manage project memories
14273
14282
 
14274
14283
  Modes:
@@ -14312,6 +14321,8 @@ var memoirTool = tool({
14312
14321
  return JSON.stringify({ success: false, error: "type is required for add mode" });
14313
14322
  }
14314
14323
  const memory = memoryService2.add(args.content, args.type, { source: "user" });
14324
+ const truncatedContent = memory.content.length > 50 ? `${memory.content.slice(0, 50)}...` : memory.content;
14325
+ await showToast(`Memory saved: ${truncatedContent}`, "success");
14315
14326
  return JSON.stringify({
14316
14327
  success: true,
14317
14328
  memory: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunkercache/opencode-memoir",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "A smart memory management plugin for OpenCode that supports nested aggregation of memory, summaries, and file changes that compact in layers with upstream references for lookups.",
5
5
  "author": {
6
6
  "name": "Chris Tunbridge",