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.cjs CHANGED
@@ -3636,8 +3636,11 @@ var PROJECT_ID_DESC = 'FULL project path with namespace (e.g., "gitlab-org/gitla
3636
3636
  function today() {
3637
3637
  return (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
3638
3638
  }
3639
+ function shortHash() {
3640
+ return Math.random().toString(36).slice(2, 8);
3641
+ }
3639
3642
  function slugify(text) {
3640
- return text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "").slice(0, 60);
3643
+ return text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "").slice(0, 50);
3641
3644
  }
3642
3645
  function titleFromContent(content) {
3643
3646
  const first = content.split("\n")[0].replace(/^[#*\->\s]+/, "").trim();
@@ -3725,7 +3728,7 @@ ${entries}`
3725
3728
  if (!dir) return `Unknown memory type: ${args.type}`;
3726
3729
  const date = today();
3727
3730
  const title = titleFromContent(args.content);
3728
- const slug = `${dir}/${date}-${slugify(title)}`;
3731
+ const slug = `${dir}/${date}-${slugify(title)}-${shortHash()}`;
3729
3732
  const header = `*Recorded: ${date} | Type: ${args.type}*
3730
3733
 
3731
3734
  `;
@@ -3930,7 +3933,7 @@ ${e.content}`).join("\n\n---\n\n");
3930
3933
  const auth = authAndValidate(args.project_id);
3931
3934
  const { scope, id } = resolveScope(args);
3932
3935
  const date = today();
3933
- const slug = `${PREFIX}/memory/sessions/${date}-${slugify(args.title)}`;
3936
+ const slug = `${PREFIX}/memory/sessions/${date}-${slugify(args.title)}-${shortHash()}`;
3934
3937
  try {
3935
3938
  await createWikiPage(auth.instanceUrl, auth.token, scope, id, slug, args.summary);
3936
3939
  return `Session logged: ${slug}`;