✨ Diagnostic Manager
还没有人认领这个 Issue。
评估
调研方向
首先定位编辑器的 Issue Navigator 和 Line Annotations 组件,然后跟踪它们当前如何接收诊断数据。围绕需求定义 DiagnosticManager 和 DiagnosticIssue,并按文件和可观察的变更对更新进行分组;完成的标准是两个组件都能使用 manager 作为共享的诊断源。
由索引模型根据 Issue 内容生成。
描述
Description
Introduce a DiagnosticManager responsible for managing and publishing diagnostics (e.g., build errors, linter warnings, language server issues) grouped by file. This manager will serve as the single source of truth for diagnostics across the editor, and its contents will drive visual components such as the Issue Navigator and Line Annotations.
Requirements
- Create a
DiagnosticManagerclass conforming toObservableObject - Store diagnostics as a flat list or grouped by file:
@Published var issues: [DiagnosticIssue] - Define a
DiagnosticIssuemodel:struct DiagnosticIssue: Identifiable, Hashable { let id: UUID = UUID() let file: URL let line: Int let column: Int? let message: String let severity: Severity let source: String? let fixItSuggestion: String? enum Severity { case error, warning, info, live } } - Add convenience accessors:
var issuesByFile: [URL: [DiagnosticIssue]] func issues(for file: URL) -> [DiagnosticIssue] - Add a way to update issues by file, e.g.:
func setIssues(_ issues: [DiagnosticIssue], for file: URL) func clearIssues(for file: URL)
Additional Context
This manager will be used by multiple parts of the app, including the Issue Navigator and Line Annotations. It should be reactive and efficient, allowing UI components to automatically update when diagnostics change.
Future extensions may include filtering, debouncing updates, or supporting different diagnostics sources (build system, LSP, etc.).
Related Issues
- 主要语言
- Swift
- 星标
- 23k
- 派生
- 1.2k
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CodeEditApp/CodeEdit 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
CodeEditApp/CodeEdit#2190 ·
-
难度 1/5 1 小时以内 新手友好度 15/100
CodeEditApp/CodeEdit#2195 · 5 个 reaction ·
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
CodeEditApp/CodeEdit#2185 ·
-
难度 5/5 一周以上 新手友好度 25/100
CodeEditApp/CodeEdit#2181 ·
-
bug
难度 4/5 3-5 天 新手友好度 35/100
CodeEditApp/CodeEdit#2180 ·
查看 CodeEditApp/CodeEdit 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
maxgoedjen/secretive#840 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
manaflow-ai/cmux#13763 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
openwallet-foundation/multipaz#2028 ·