diff --git a/web/src/components/ToolCard/views/_results.tsx b/web/src/components/ToolCard/views/_results.tsx
index 0f4630c4..26d7b15a 100644
--- a/web/src/components/ToolCard/views/_results.tsx
+++ b/web/src/components/ToolCard/views/_results.tsx
@@ -536,8 +536,7 @@ const AgentResultView: ToolViewComponent = (props: ToolViewProps) => {
|| (text.startsWith('Async agent launched successfully.') && text.includes('agentId:'))
if (isInternalMeta) {
- const label = state === 'completed' ? 'Done' : 'Agent launched'
- return
{label}
+ return Agent launched
}
return (
diff --git a/web/src/lib/remark-strip-cjk-autolink.test.ts b/web/src/lib/remark-strip-cjk-autolink.test.ts
index f6bf9ba1..7db656bb 100644
--- a/web/src/lib/remark-strip-cjk-autolink.test.ts
+++ b/web/src/lib/remark-strip-cjk-autolink.test.ts
@@ -83,6 +83,25 @@ describe('remarkStripCjkAutolink', () => {
expect(tree.children[0].children.length).toBe(2)
})
+ it('does not strip fullwidth brackets/parens that may be part of the URL', () => {
+ const tree = makeAutolink('https://example.com/路径)')
+ transform(tree)
+
+ const link = tree.children[0].children[1]
+ expect(link.url).toBe('https://example.com/路径)')
+ expect(tree.children[0].children.length).toBe(2)
+ })
+
+ it('strips sentence-ending punctuation followed by closing bracket', () => {
+ const tree = makeAutolink('https://example.com/path。)')
+ transform(tree)
+
+ const paragraph = tree.children[0]
+ const link = paragraph.children[1]
+ expect(link.url).toBe('https://example.com/path')
+ expect(paragraph.children[2].value).toBe('。)')
+ })
+
it('does not modify explicit markdown links', () => {
// Explicit markdown link: [click here](https://example.com/path))
// The link text differs from the URL, so it's not an autolink
diff --git a/web/src/lib/remark-strip-cjk-autolink.ts b/web/src/lib/remark-strip-cjk-autolink.ts
index ab4fff26..93a521dd 100644
--- a/web/src/lib/remark-strip-cjk-autolink.ts
+++ b/web/src/lib/remark-strip-cjk-autolink.ts
@@ -10,10 +10,10 @@
* node.
*/
-// Common CJK / fullwidth punctuation that should never be part of a URL.
-// Includes: fullwidth comma/period/semicolon/colon/exclamation/question/parens,
-// ideographic comma/period, CJK brackets, ideographic space, fullwidth full stop.
-const TRAILING_CJK_PUNCT = /[,。、;:!?()【】「」『』《》〈〉\u3000\uFF0E]+$/
+// CJK / fullwidth sentence-ending punctuation that should never be part of a
+// URL, optionally followed by closing brackets/parens (which on their own are
+// valid URL characters but should be stripped when they trail sentence-enders).
+const TRAILING_CJK_PUNCT = /(?:[,。、;:!?\u3000\uFF0E]+[)】」』》〉]*)$/
interface MdastNode {
type: string