opencode-magi 0.0.0-dev-20260521013053 → 0.0.0-dev-20260521140727

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.
@@ -246,6 +246,12 @@ function duplicateReferences(text) {
246
246
  refs.add(Number(match[1]));
247
247
  return [...refs];
248
248
  }
249
+ function issueTitleSearchQuery(title, fallback) {
250
+ return (title
251
+ .replaceAll(/[^\p{L}\p{N}_]+/gu, " ")
252
+ .replaceAll(/\s+/g, " ")
253
+ .trim() || fallback);
254
+ }
249
255
  async function fetchIssueCandidate(exec, repository, number, whyCandidate) {
250
256
  const raw = await exec(`gh issue view ${number} --repo ${shellQuote(repoSpecifier(repository))} --json number,title,url,state,body,createdAt`).catch(() => undefined);
251
257
  if (!raw)
@@ -254,7 +260,7 @@ async function fetchIssueCandidate(exec, repository, number, whyCandidate) {
254
260
  return { ...data, whyCandidate };
255
261
  }
256
262
  export async function searchDuplicateIssues(exec, repository, issue, limit = 5) {
257
- const query = issue.title;
263
+ const query = issueTitleSearchQuery(issue.title, String(issue.number));
258
264
  const explicitCandidates = await Promise.all(duplicateReferences(issue.body)
259
265
  .filter((number) => number !== issue.number)
260
266
  .map((number) => fetchIssueCandidate(exec, repository, number, "Issue body explicitly references a duplicate target.")));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-magi",
3
- "version": "0.0.0-dev-20260521013053",
3
+ "version": "0.0.0-dev-20260521140727",
4
4
  "description": "Multi-agent PR review and merge orchestration plugin for OpenCode.",
5
5
  "license": "MIT",
6
6
  "author": "Hirotomo Yamada <hirotomo.yamada@avap.co.jp>",