mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
fix(web): exclude brackets from CJK autolink punctuation stripping (#486)
* fix(web): exclude brackets from CJK autolink punctuation stripping Fullwidth brackets and parentheses (()【】「」etc.) can appear in valid URL paths, so they should not be stripped. Narrow the regex to only sentence-ending punctuation: comma, period, semicolon, colon, exclamation, question mark. via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run> * fix(web): always show 'Agent launched' for internal metadata results The tool state is set to 'completed' immediately when the result arrives, so the state-based label was always showing 'Done' for internal launch metadata. Remove the state check and always show 'Agent launched'. via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run> * fix(web): handle sentence-ending punctuation followed by closing brackets The regex was missing cases like 。) where a sentence-ender is followed by a closing bracket. Use a pattern that matches sentence-ending punctuation optionally followed by trailing closing brackets/parens. A bare closing bracket without a preceding sentence-ender is still preserved as a valid URL character. via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run> --------- Co-authored-by: HAPI <noreply@hapi.run>
This commit is contained in:
@@ -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 <div className="text-sm text-[var(--app-hint)]">{label}</div>
|
||||
return <div className="text-sm text-[var(--app-hint)]">Agent launched</div>
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user