File links with a line range (file.py:67-69) are either not linked or open a missing file
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 68/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- desktop
调研方向
从 packages/shared/src/markdownLinks.ts 中的 inlineCodeFilePathCandidate 开始,这里的相对路径检查会拒绝 :67-69;然后阅读 packages/shared/src/fileLinks.ts 中的 splitFilePathPosition 及其模式,该模式不会为绝对路径去除范围。扩展两个位置后缀模式,使其接受 :N-M 并在第 N 行打开。完成标准是:path:1-3 链接对相对路径和绝对路径都有效,并打开该文件,而不是打开一个名称中包含范围的不存在文件。
由索引模型根据 Issue 内容生成。
描述
What happened
Agents often write line ranges. In v0.1.5 a range never opens the file:
src/foo.py:67-69andfoo.py:1-3(relative): rendered as plain code, no link./abs/path/foo.py:67-69(absolute): rendered as a file link, but the click targets a file literally namedfoo.py:67-69, which does not exist.
Diagnosis
Confirmed by a click in the desktop app (v0.1.5): an absolute <root>/pyproject.toml:1-3 link opens the panel with "The file could not be accessed or read", attempted path <root>/pyproject.toml:1-3. Source:
inlineCodeFilePathCandidate(packages/shared/src/markdownLinks.ts:173): POSITION_SUFFIX_PATTERN/:\d+(?::\d+)?$/does not match:67-69, so a relative candidate without/returns null (line 179), and with/its basenamefoo.py:67-69fails FILE_EXTENSION_PATTERN (line 198).- Absolute paths skip those checks;
splitFilePathPosition(packages/shared/src/fileLinks.ts:37, pattern line 8) does not strip:67-69, so the range stays in the path.
Steps to reproduce
- Message containing
`<absolute path of an existing file>:1-3`. - Click it: panel says "The file could not be accessed or read", attempted path ends in
:1-3. - A relative
`<dir>/file.py:1-3`renders as plain code (from source; not clicked).
Version
0.1.5 (desktop, t3code-bin). Link code unchanged on main as of 2026-11-01. Triage CLI: 0.1.6.
Environment
Linux x64 (Arch, Hyprland), desktop app against local server, Claude provider.
Evidence
Click result above (screenshot available). Shipped bundle (app.asar, version 0.1.5) has only `/:(\d+)(?::(\d+))?$/` as its position parser (fileLinks-*.js). An agent emitted an absolute `locomo.py:67-69` link in practice.
Related issues
Companion to the issue about relative links in worktrees (filed alongside).
Fix applied or workaround
Local Stop hook rejects ranges and asks for :N. Suggested fix: accept :N-M in POSITION_SUFFIX_PATTERN and POSITION_SUFFIX_CAPTURE_PATTERN (open at N, optionally highlight to M).
Filed by
Claude Opus 5.5 (claude-opus-5-5) via Claude Code, t3 triage.
- 主要语言
- TypeScript
- 星标
- 24.8k
- 派生
- 6.4k
- 平均合并
- 13 小时 49 分钟
- 30 天内合并 PR
- 179
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pingdotgg/t3code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 62/100
维护者通常 1 天内回复
-
via-triage
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
[Bug]: Dragging a sidebar thread from the lower part of the list auto-scrolls the sidebar to the bottom可能已有人在做 @juliusmarminge 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
pingdotgg/t3code#27146 · 1 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
Remove unused dependencies可能已有人在做 @alastair-smith 今天认领。 未关闭chore other
难度 2/5 1-3 小时 新手友好度 78/100
alastair-smith/card-games#384 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
code-yeongyu/senpi#5571 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
nexu-io/open-design#9262 · 1 条评论 ·
维护者通常 1 天内回复
-
friction
难度 2/5 1-3 小时 新手友好度 72/100
kentcdodds/kody#4753 ·
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 62/100
lingdojo/kana-dojo#33508 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复