opencode-gitlab-dap 1.12.0 → 1.12.1

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 CHANGED
@@ -3467,8 +3467,11 @@ var PROJECT_ID_DESC = 'FULL project path with namespace (e.g., "gitlab-org/gitla
3467
3467
  function today() {
3468
3468
  return (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
3469
3469
  }
3470
+ function shortHash() {
3471
+ return Math.random().toString(36).slice(2, 8);
3472
+ }
3470
3473
  function slugify(text) {
3471
- return text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "").slice(0, 60);
3474
+ return text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "").slice(0, 50);
3472
3475
  }
3473
3476
  function titleFromContent(content) {
3474
3477
  const first = content.split("\n")[0].replace(/^[#*\->\s]+/, "").trim();
@@ -3556,7 +3559,7 @@ ${entries}`
3556
3559
  if (!dir) return `Unknown memory type: ${args.type}`;
3557
3560
  const date = today();
3558
3561
  const title = titleFromContent(args.content);
3559
- const slug = `${dir}/${date}-${slugify(title)}`;
3562
+ const slug = `${dir}/${date}-${slugify(title)}-${shortHash()}`;
3560
3563
  const header = `*Recorded: ${date} | Type: ${args.type}*
3561
3564
 
3562
3565
  `;
@@ -3761,7 +3764,7 @@ ${e.content}`).join("\n\n---\n\n");
3761
3764
  const auth = authAndValidate(args.project_id);
3762
3765
  const { scope, id } = resolveScope(args);
3763
3766
  const date = today();
3764
- const slug = `${PREFIX}/memory/sessions/${date}-${slugify(args.title)}`;
3767
+ const slug = `${PREFIX}/memory/sessions/${date}-${slugify(args.title)}-${shortHash()}`;
3765
3768
  try {
3766
3769
  await createWikiPage(auth.instanceUrl, auth.token, scope, id, slug, args.summary);
3767
3770
  return `Session logged: ${slug}`;