Skip to content

Commit 4297020

Browse files
saphidclaude
andcommitted
fix(server): thread titles use linked PR context when the URL is followed by a colon or bold markers
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 30084f0 commit 4297020

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/server/src/textGeneration/ThreadTitleLinks.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ it.effect(
2020
const result = yield* resolveThreadTitleLinks({
2121
cwd: "/tmp/project",
2222
message:
23-
"https://docs.test/guide [https://forge.test/change/1] https://forge.test/change/1#discussion https://forge.test/change/1?view=full `https://forge.test/change/2` https://forge.test/change/2. https://forge.test/change/3",
23+
"https://docs.test/guide **https://forge.test/change/1**: [https://forge.test/change/1] https://forge.test/change/1#discussion https://forge.test/change/1?view=full `https://forge.test/change/2` https://forge.test/change/2. https://forge.test/change/3",
2424
}).pipe(
2525
Effect.provide(
2626
layerRegistry({

‎apps/server/src/textGeneration/ThreadTitleLinks.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const resolveThreadTitleLinks = Effect.fn("resolveThreadTitleLinks")(func
1313
const providers = yield* SourceControlProviderRegistry.SourceControlProviderRegistry;
1414
const links = new Map<string, NonNullable<ReturnType<typeof providers.resolveLink>>>();
1515
for (const match of input.message.matchAll(/https:\/\/[^\s<>"')\]`]+/g)) {
16-
const candidate = match[0].replace(/[.,;!?]+$/, "");
16+
const candidate = match[0].replace(/[.,:;!?*]+$/, "");
1717
if (!URL.canParse(candidate)) continue;
1818
const url = new URL(candidate);
1919
url.hash = "";

0 commit comments

Comments
 (0)