oc-tweaks 0.11.1 → 0.11.2

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/cli/init.js CHANGED
@@ -169,6 +169,8 @@ function scanDir(dir, scope) {
169
169
  continue;
170
170
  }
171
171
  const { meta, body } = parseFrontmatter(partial);
172
+ if (meta.disabled === true)
173
+ continue;
172
174
  const summary = extractSummary(meta, body);
173
175
  const tokenEstimate = Math.ceil((summary.length + JSON.stringify(meta).length) / 4);
174
176
  const entry = {
package/dist/index.js CHANGED
@@ -931,7 +931,8 @@ async function recallMemory(query, registry, opts = {}) {
931
931
  if (query.length === 0) {
932
932
  return [{ id: NO_MATCH_SENTINEL_ID, content: NO_MATCH_SENTINEL_CONTENT }];
933
933
  }
934
- const typeCandidates = opts.filterType ? registry.filter((e) => e.meta.type === opts.filterType) : registry;
934
+ const enabledEntries = registry.filter((entry) => entry.meta.disabled !== true);
935
+ const typeCandidates = opts.filterType ? enabledEntries.filter((e) => e.meta.type === opts.filterType) : enabledEntries;
935
936
  const candidates = opts.filterTags?.length ? typeCandidates.filter((entry) => {
936
937
  const tags = entry.meta.tags;
937
938
  return !tags || tags.some((tag) => opts.filterTags?.includes(tag));
@@ -1028,6 +1029,8 @@ function scanDir(dir, scope) {
1028
1029
  continue;
1029
1030
  }
1030
1031
  const { meta, body } = parseFrontmatter(partial);
1032
+ if (meta.disabled === true)
1033
+ continue;
1031
1034
  const summary = extractSummary(meta, body);
1032
1035
  const tokenEstimate = Math.ceil((summary.length + JSON.stringify(meta).length) / 4);
1033
1036
  const entry = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oc-tweaks",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dist/index.js"