Repository navigation
feat(output-links): 运行控制台里的网址可点击 - #84
Merged
Merged
Conversation
outputLinks.match 在插件链接之后识别 http/https 网址,返回 {line,start,length,url},
宿主在浏览器中打开。网址止于空白、引号、尖括号,去掉句末标点和未配对的右括号;
与插件链接重叠时插件链接优先。一行内的链接按起点排序。(1lck/Lithe-IDEA#1822)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue
类型
feat:
outputLinkMatchers0 内的补充,outputLinks.match额外返回网址链接改动
Spring Boot、Vite 等服务启动后把访问地址打印在控制台里,IDEA 里可以直接点开;Lithe 的控制台链接只来自插件声明的匹配器,网址点不了。网址格式与工具无关,所以由 Core 统一识别,所有宿主行为一致。
rust/crates/plugin-output-links/src/lib.rs:match_lines跑完插件匹配器后,用web_addresses找http/https网址,链接形如{line, start, length, url},不带pluginID/matcherID。.,;:!?和没有配对的)、]、}(https://example.org/a_(b)保留括号);只有协议没有主机的不算。rust/contracts/rust-core-api.md写明新链接形状和规则。fixtures/run/output-link-matchers.json新增一例:网址、括号内网址、和插件链接同一行的网址。清单格式、能力版本不变,插件无需改动;旧宿主遇到
url链接时,只认location/resolve,不会打开它。没有新增宿主方法或通知。验证
cargo test -p lithe-plugin-output-links(新增 2 个单测)cargo test -p lithe-core output_link(fixture 回放)cargo clippy -p lithe-plugin-output-links --all-targets -- -D warningsnode shared/plugins/scripts/verify-docs.mjs🤖 Generated with Claude Code