惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
云风的 BLOG
云风的 BLOG
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
Engineering at Meta
Engineering at Meta
Vercel News
Vercel News
Y
Y Combinator Blog
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Check Point Blog
M
MIT News - Artificial intelligence
Jina AI
Jina AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
Hugging Face - Blog
Hugging Face - Blog
阮一峰的网络日志
阮一峰的网络日志
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
F
Fortinet All Blogs
博客园 - 司徒正美
I
InfoQ
Google DeepMind News
Google DeepMind News
GbyAI
GbyAI
U
Unit 42

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(android): make chat links tappable · openclaw/opencla...
neeravmakwan · 2026-05-16 · via Recent Commits to openclaw:main

@@ -30,13 +30,16 @@ import androidx.compose.ui.Modifier

3030

import androidx.compose.ui.graphics.Color

3131

import androidx.compose.ui.layout.ContentScale

3232

import androidx.compose.ui.text.AnnotatedString

33+

import androidx.compose.ui.text.LinkAnnotation

3334

import androidx.compose.ui.text.SpanStyle

35+

import androidx.compose.ui.text.TextLinkStyles

3436

import androidx.compose.ui.text.TextStyle

3537

import androidx.compose.ui.text.buildAnnotatedString

3638

import androidx.compose.ui.text.font.FontFamily

3739

import androidx.compose.ui.text.font.FontStyle

3840

import androidx.compose.ui.text.font.FontWeight

3941

import androidx.compose.ui.text.style.TextDecoration

42+

import androidx.compose.ui.text.withLink

4043

import androidx.compose.ui.text.withStyle

4144

import androidx.compose.ui.unit.dp

4245

import androidx.compose.ui.unit.sp

@@ -499,19 +502,12 @@ private fun AnnotatedString.Builder.appendInlineNode(

499502

}

500503

}

501504

is Link -> {

502-

withStyle(

503-

SpanStyle(

504-

color = linkColor,

505-

textDecoration = TextDecoration.Underline,

506-

),

507-

) {

508-

appendInlineNode(

509-

current.firstChild,

510-

inlineCodeBg = inlineCodeBg,

511-

inlineCodeColor = inlineCodeColor,

512-

linkColor = linkColor,

513-

)

514-

}

505+

appendLinkNode(

506+

link = current,

507+

inlineCodeBg = inlineCodeBg,

508+

inlineCodeColor = inlineCodeColor,

509+

linkColor = linkColor,

510+

)

515511

}

516512

is MarkdownImage -> {

517513

val alt = buildPlainText(current.firstChild)

@@ -527,13 +523,69 @@ private fun AnnotatedString.Builder.appendInlineNode(

527523

}

528524

}

529525

else -> {

530-

appendInlineNode(current.firstChild, inlineCodeBg = inlineCodeBg, inlineCodeColor = inlineCodeColor, linkColor = linkColor)

526+

appendInlineNode(

527+

current.firstChild,

528+

inlineCodeBg = inlineCodeBg,

529+

inlineCodeColor = inlineCodeColor,

530+

linkColor = linkColor,

531+

)

531532

}

532533

}

533534

current = current.next

534535

}

535536

}

536537538+

private fun AnnotatedString.Builder.appendLinkNode(

539+

link: Link,

540+

inlineCodeBg: Color,

541+

inlineCodeColor: Color,

542+

linkColor: Color,

543+

) {

544+

val destination = link.destination?.trim().orEmpty()

545+

val linkStyle =

546+

SpanStyle(

547+

color = linkColor,

548+

textDecoration = TextDecoration.Underline,

549+

)

550+

if (destination.isEmpty()) {

551+

withStyle(linkStyle) {

552+

appendInlineNode(

553+

link.firstChild,

554+

inlineCodeBg = inlineCodeBg,

555+

inlineCodeColor = inlineCodeColor,

556+

linkColor = linkColor,

557+

)

558+

}

559+

return

560+

}

561+562+

withLink(LinkAnnotation.Url(url = destination, styles = TextLinkStyles(style = linkStyle))) {

563+

appendInlineNode(

564+

link.firstChild,

565+

inlineCodeBg = inlineCodeBg,

566+

inlineCodeColor = inlineCodeColor,

567+

linkColor = linkColor,

568+

)

569+

}

570+

}

571+572+

internal fun buildChatInlineMarkdown(

573+

text: String,

574+

linkColor: Color = Color.Blue,

575+

): AnnotatedString {

576+

val document = markdownParser.parse(text) as Document

577+

val paragraph = document.firstChild as? Paragraph ?: return AnnotatedString("")

578+

return buildInlineMarkdown(

579+

paragraph.firstChild,

580+

InlineStyles(

581+

inlineCodeBg = Color.Transparent,

582+

inlineCodeColor = Color.Unspecified,

583+

linkColor = linkColor,

584+

baseCallout = TextStyle.Default,

585+

),

586+

)

587+

}

588+537589

private fun buildPlainText(start: Node?): String {

538590

val sb = StringBuilder()

539591

var node = start