{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"],"owasp":"A08:2025"}},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX8","name":"Test isolation","shortDescription":{"text":"Test isolation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX8"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"ES2","name":"Immutable events","shortDescription":{"text":"Immutable events"},"helpUri":"https://codehealth.canine.dev/dimensions/ES2"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X16","name":"Unfloored truncation loop","shortDescription":{"text":"Unfloored truncation loop"},"helpUri":"https://codehealth.canine.dev/dimensions/X16"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X18","name":"Disposal-pattern correctness","shortDescription":{"text":"Disposal-pattern correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X18"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X29","name":"Per-element action decided by a fixed element","shortDescription":{"text":"Per-element action decided by a fixed element"},"helpUri":"https://codehealth.canine.dev/dimensions/X29"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"RequestBody.init (cyclomatic 54): RequestBody.init has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"d45a96be6d79d81428a455af76261edf15d93e90991668b710055fca88a223b6"}},{"ruleId":"D1","level":"warning","message":{"text":"Chat.body (cyclomatic 50): Chat.body has cyclomatic complexity 50 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/ChatGPTChatTab/Chat.swift"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"5427fed13196c6f1d01929cd7066fc30f9710e033f647c0429d0b750da3bcaa1"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatPanel.body (cyclomatic 47): ChatPanel.body has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/FeatureReducers/ChatPanel.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe740692a226f64b9ae4424477cd1fe888c3291183d2544b6c2aebb86bbe15a7"}},{"ruleId":"D1","level":"warning","message":{"text":"Widget.body (cyclomatic 38): Widget.body has cyclomatic complexity 38 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/FeatureReducers/Widget.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"25418a31f7258e053839243d708aab311b5260f637f0eca689cb63cd73c78e5f"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatModelEdit.body (cyclomatic 37): ChatModelEdit.body has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"4862b5b7437046cc6b5db06902e7c7a9965865f0f8fa4f96c2ee253903f8221e"}},{"ruleId":"D1","level":"warning","message":{"text":"ExplanationThenCodeStreamParser.yield (cyclomatic 37): ExplanationThenCodeStreamParser.yield has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/ModificationBasic/ExplanationThenCodeStreamParser.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"30c6756cfdca922a47becddfcb6e12e02492e4e7f8d58a3598505814ce7f62cc"}},{"ruleId":"D1","level":"warning","message":{"text":"PromptToCodeGroup.body (cyclomatic 33): PromptToCodeGroup.body has cyclomatic complexity 33 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/FeatureReducers/PromptToCodeGroup.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd9ba043cf207ed311998e4ad763808e1caccad20f4347930331424d675a9567"}},{"ruleId":"D1","level":"warning","message":{"text":"General.body (cyclomatic 31): General.body has cyclomatic complexity 31 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/General.swift"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"011450afee27ed461db0097f7053c952aaba4eb098e4bd2201abefeb9bba57c6"}},{"ruleId":"D1","level":"warning","message":{"text":"PromptToCodePanel.body (cyclomatic 31): PromptToCodePanel.body has cyclomatic complexity 31 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/FeatureReducers/PromptToCodePanel.swift"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"a305e7e257a1ab52e9e046c5c3c93387409709c8194b5abe4fafc0ceef35a9b6"}},{"ruleId":"D1","level":"warning","message":{"text":"EmbeddingModelEdit.body (cyclomatic 30): EmbeddingModelEdit.body has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEdit.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa3ed8a4cdff6c462be9672a21f4127f0abbde5dd252cc4d9e4bb8a5b9f3033c"}},{"ruleId":"D1","level":"warning","message":{"text":"GUI.body (cyclomatic 30): GUI.body has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/GUI/GraphicalUserInterfaceController.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc139150101d103dd18ecd08df4c196988fad3b1c3df6ccce63f0c722d4a3d5c"}},{"ruleId":"D1","level":"warning","message":{"text":"GitHubCopilotView.body (cyclomatic 25): GitHubCopilotView.body has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/GitHubCopilotView.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"648fbc4aa5372bd8a6723b7a4eb43b87de2da1db7aec3ccbe19cc31016b82a18"}},{"ruleId":"D1","level":"warning","message":{"text":"RequestBody.init (cyclomatic 25): RequestBody.init has cyclomatic complexity 25 (threshold 15). Of this number, 13 points are the body\u0027s own statements and 12 belong to 4 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c60cc0cadc961ff98213146aa997e3cf6e92bae039a90941b29c50cae6eeaea"}},{"ruleId":"D1","level":"warning","message":{"text":"WidgetWindowsController.generateWidgetLocation (cyclomatic 23): WidgetWindowsController.generateWidgetLocation has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/WidgetWindowsController.swift"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd341ac086ee936746c79c1652df4bf19e20d93a10e2e3ccbf041f4aeb0eedfc"}},{"ruleId":"D1","level":"warning","message":{"text":"XcodeInspector.restart (cyclomatic 23): XcodeInspector.restart has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/XcodeInspector/XcodeInspector.swift"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bd3c9291a62c257c14c0c9147714c482006179766722e60a7724b8337b8ba3d"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatGPTService.send (cyclomatic 22): ChatGPTService.send has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/ChatGPTService.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d7cf4143e1e619c4827903f868102e0281802dc20a7efcae7673a0fb41bf2f1"}},{"ruleId":"D1","level":"warning","message":{"text":"TabToAcceptSuggestion.handleTab (cyclomatic 21): TabToAcceptSuggestion.handleTab has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/KeyBindingManager/TabToAcceptSuggestion.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d61e477537aaacf7276776387174e8fd3ebeef590ace928b9b26368a8ac0952"}},{"ruleId":"D1","level":"warning","message":{"text":"DependencyUpdater.update (cyclomatic 21): DependencyUpdater.update has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/DependencyUpdater.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b07dc9ed7122974350683cd76319b3b718dec20734574396e1d9ca2fd2ade43"}},{"ruleId":"D1","level":"warning","message":{"text":"HighlightrThemeManager.theme (cyclomatic 21): HighlightrThemeManager.theme has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/XcodeThemeController/HighlightrThemeManager.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fbad3b4f5dc2aa3f0ba4d943b86e148a318d31dedf2883a33e59444a29a486f"}},{"ruleId":"D1","level":"warning","message":{"text":"CodeiumChatBrowser.body (cyclomatic 21): CodeiumChatBrowser.body has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/ChatTab/CodeiumChatBrowser.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"1029019b49e432f573d767719b342c166179f0f5cefb1b17ad2138d428760a9a"}},{"ruleId":"D1","level":"warning","message":{"text":"CustomCommandFeature.body (cyclomatic 20): CustomCommandFeature.body has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/CustomCommandSettings/CustomCommand.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"55561dd430597b690b38cacea73d34482a03440c1e081a0c9579133a48f51839"}},{"ruleId":"D1","level":"warning","message":{"text":"SimpleModificationAgent.modifyCode (cyclomatic 20): SimpleModificationAgent.modifyCode has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/PromptToCodeService/OpenAIPromptToCodeService.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f680e5c0d65af1017bfcccb73245f604c563fe6ead7203b46e79bbfc8641cf3"}},{"ruleId":"D1","level":"warning","message":{"text":"RealtimeSuggestionController.handleFocusElementChange (cyclomatic 20): RealtimeSuggestionController.handleFocusElementChange has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/RealtimeSuggestionController.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4c877c3f96f1fc0c7d28290e7189ae176665272a03f327864918d7126488e62"}},{"ruleId":"D1","level":"warning","message":{"text":"CodeDiff.diff (cyclomatic 20): CodeDiff.diff has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeDiff/CodeDiff.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"383ddc623b3cae3825ecd70f1a36d96513804e0bd644b9068c4a5f763f4d608b"}},{"ruleId":"D1","level":"warning","message":{"text":"MemoryTemplate.defaultTruncateRule (cyclomatic 20): MemoryTemplate.defaultTruncateRule has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/Memory/TemplateChatGPTMemory.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c4d41a7c5d0e743a15a9718d2e13389db798bd4281603b1443863996fc1c91a"}},{"ruleId":"D1","level":"warning","message":{"text":"LegacyChatPluginWrapper.send (cyclomatic 19): LegacyChatPluginWrapper.send has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/ChatService/AllPlugins.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c7f58ab8b7c7dab98e49f8a238755d5b790c36f0171236df387f7fc2f3b8312"}},{"ruleId":"D1","level":"warning","message":{"text":"WidgetWindowsController.updateWindowOpacity (cyclomatic 19): WidgetWindowsController.updateWindowOpacity has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/WidgetWindowsController.swift"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"5da1cb665f199363728c86363f9ccc31f56bd496e98860be8384fe16759a6e7d"}},{"ruleId":"D1","level":"warning","message":{"text":"WidgetPanel.body (cyclomatic 19): WidgetPanel.body has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/FeatureReducers/WidgetPanel.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e0cb9c8d651d96d4452583f5c2d338790a6ea1c3dd73454f2924f44230f21ae"}},{"ruleId":"D1","level":"warning","message":{"text":"GitHubCopilotChatService.sendMessage (cyclomatic 19): GitHubCopilotChatService.sendMessage has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/Services/GitHubCopilotChatService.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"30a4715d5dac3f5f1cdd27cd4409327c4249dcad9aae58bf394afbbe9f32c409"}},{"ruleId":"D1","level":"warning","message":{"text":"PseudoCommandHandler.openChat (cyclomatic 18): PseudoCommandHandler.openChat has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c1b85b75f94aa0df7bb492914c5ade194aa5621dcfbe9fcd60635f06b5c1206"}},{"ruleId":"D1","level":"warning","message":{"text":"ServerNotificationHandler.handleNotification (cyclomatic 18): ServerNotificationHandler.handleNotification has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/LanguageServer/CopilotLocalProcessServer.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fadc8fe0d44e1eca9d2945e746cdf4723ba7714bdcce72bb9c02ed25904d964"}},{"ruleId":"D1","level":"warning","message":{"text":"CodeHighlighting.convertToCodeLines (cyclomatic 18): CodeHighlighting.convertToCodeLines has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/SyntaxHighlighting.swift"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d2d87e67ace0b07f18ebf56ced16a61795819a1d3b3c409711fb9b5e0d8cb79"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatModelManagement.body (cyclomatic 17): ChatModelManagement.body has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"40c56d72393d05c00c30feafa193f8ba1b45e0bab339f0b90ae057b23e444988"}},{"ruleId":"D1","level":"warning","message":{"text":"EmbeddingModelManagement.body (cyclomatic 17): EmbeddingModelManagement.body has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelManagement.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"e58c426ce19d3c40bc95b1986bb20d80fd9c68ad9ae59286077e25db4765d0c7"}},{"ruleId":"D1","level":"warning","message":{"text":"XcodeThemeController.syncXcodeThemeIfNeeded (cyclomatic 17): XcodeThemeController.syncXcodeThemeIfNeeded has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/XcodeThemeController/XcodeThemeController.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"163463c3d72ecb2ca7940deee101b5c89f069e8bb6f1b8a185f166e3e46c8e01"}},{"ruleId":"D1","level":"warning","message":{"text":"AXNotificationStream.init (cyclomatic 17): AXNotificationStream.init has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXNotificationStream/AXNotificationStream.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a462579b7cf87421c37af83f0a1d4a95d2305c700a7b083ba7384283c230c92"}},{"ruleId":"D1","level":"warning","message":{"text":"ObjectiveCScopeHierarchySyntaxVisitor.visit (cyclomatic 17): ObjectiveCScopeHierarchySyntaxVisitor.visit has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/FocusedCodeFinder/ObjectiveC/ObjectiveCScopeHierarchySyntaxVisitor.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba0dee69c4a3aa3d1e1a9a2fbb4ac39511f75539f19074e30ed76a9f01b6678b"}},{"ruleId":"D1","level":"warning","message":{"text":"GitHubCopilotBaseService.init (cyclomatic 17): GitHubCopilotBaseService.init has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: GitHubCopilotError.errorDescription (cyclomatic 20) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotService.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"28fd9818bae9c9292b90c498680a6d1aa6269aaea8a4694aeda09a67be31eb47"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenAIEmbedding.getLenSafeEmbeddings (cyclomatic 17): OpenAIEmbedding.getLenSafeEmbeddings has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/Embedding/OpenAIEmbedding.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e51bc7b8aed0b8703cdbad3e7d67a7bf745262eb1ff247b8a3429829ea5e650"}},{"ruleId":"D1","level":"warning","message":{"text":"EditCustomCommand.body (cyclomatic 16): EditCustomCommand.body has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/CustomCommandSettings/EditCustomCommand.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2d0a0e78c8090aa1b4db68e3263bc30636f24a70b7c13db313668cb105a0d69"}},{"ruleId":"D1","level":"warning","message":{"text":"XcodeAppInstanceInspector.observeAXNotifications (cyclomatic 16): XcodeAppInstanceInspector.observeAXNotifications has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/XcodeInspector/Apps/XcodeAppInstanceInspector.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"19686bd3cadc919c0f3a3ad7830646fbd8a661585a8662a5b401026e7970e42e"}},{"ruleId":"D2","level":"warning","message":{"text":"RequestBody.init (cognitive 145): RequestBody.init has cognitive complexity 145 (threshold 15). Drivers by points: ternaries 16 (78 pts), if/else 23 (49 pts), boolean chains 6, loops 3 (6 pts), match/switch 3 (6 pts) (nesting depth added 94). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2fa61272d21499dc69d61599b638ea5bfbb744d93f8095ec1c34c2c89c5dbc8"}},{"ruleId":"D2","level":"warning","message":{"text":"ExplanationThenCodeStreamParser.yield (cognitive 100): ExplanationThenCodeStreamParser.yield has cognitive complexity 100 (threshold 15). Drivers by points: if/else 24 (79 pts), match/switch 4 (11 pts), boolean chains 9, loops 1 (nesting depth added 62). Of this number, 94 points are the body\u0027s own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/ModificationBasic/ExplanationThenCodeStreamParser.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"cef7b467989dd21a4182365d5fd96b1bcb290608235ee210ccffbc60690ed437"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatGPTService.send (cognitive 75): ChatGPTService.send has cognitive complexity 75 (threshold 15). Drivers by points: if/else 8 (34 pts), loops 6 (28 pts), match/switch 2 (11 pts), boolean chains 1, error handling 1 (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/ChatGPTService.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"149ab3959d4c11616d28c1ae1a85db1f7dac68bd9db1b2e784ba9ceb99eb8e0e"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatPanel.body (cognitive 53): ChatPanel.body has cognitive complexity 53 (threshold 15). Drivers by points: if/else 23 (46 pts), boolean chains 6, match/switch 1 (nesting depth added 23). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/FeatureReducers/ChatPanel.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"390f9845d0afcb10603f8d62f76647b35cf983a4aa9c89ea58a60dd26aa7d3b9"}},{"ruleId":"D2","level":"warning","message":{"text":"CodeDiff.diff (cognitive 50): CodeDiff.diff has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (40 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeDiff/CodeDiff.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"469fa1cff9086eee79452588b51a73918844d0e67ed7c1b493cdc20972837650"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatGPTMemory.streamMessage (cognitive 49): ChatGPTMemory.streamMessage has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (45 pts), loops 1 (4 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/Memory/ChatGPTMemory.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"a155d49ebc418dd74d1ea2e668591d129fb819f7ee6e31970b79bc53b5546286"}},{"ruleId":"D2","level":"warning","message":{"text":"PromptToCodePanel.body (cognitive 42): PromptToCodePanel.body has cognitive complexity 42 (threshold 15). Drivers by points: if/else 5 (15 pts), error handling 4 (12 pts), loops 2 (8 pts), match/switch 2 (5 pts), boolean chains 2 (nesting depth added 27). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/FeatureReducers/PromptToCodePanel.swift"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa7f634aee7f435601e2556fda631efd6af27b71a726eee9b37c5cbf1685be23"}},{"ruleId":"D2","level":"warning","message":{"text":"XcodeInspector.restart (cognitive 42): XcodeInspector.restart has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (35 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/XcodeInspector/XcodeInspector.swift"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"555a447ddbcb061ab8ca6b1f36b25f2b765c5324eb40b506061c02d7ac72afb5"}},{"ruleId":"D2","level":"warning","message":{"text":"Widget.body (cognitive 41): Widget.body has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (25 pts), match/switch 5 (7 pts), loops 3 (6 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 17). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/FeatureReducers/Widget.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c30bbaa55cc688bfa68087650f0e5a3fb8d6480c758e304063dd2986e9a6f03"}},{"ruleId":"D2","level":"warning","message":{"text":"Chat.body (cognitive 40): Chat.body has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 6 (12 pts), boolean chains 3, error handling 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 18). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/ChatGPTChatTab/Chat.swift"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"035d1b59489afdf806d54a011e9de0da5377d209f40f3dd7897e9e517f65c7a3"}},{"ruleId":"D2","level":"warning","message":{"text":"CodeHighlighting.convertToCodeLines (cognitive 39): CodeHighlighting.convertToCodeLines has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 5 (11 pts), error handling 1 (4 pts) (nesting depth added 22). Of this number, 36 points are the body\u0027s own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/SyntaxHighlighting.swift"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4b5398c16415e2ea8d6ca5f90d98b314dc02e9d484028df46925f42de142568"}},{"ruleId":"D2","level":"warning","message":{"text":"WidgetWindowsController.generateWidgetLocation (cognitive 37): WidgetWindowsController.generateWidgetLocation has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (13 pts), match/switch 3 (11 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/WidgetWindowsController.swift"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb5702fa99b9e60c0839cae909da45c7500f9f026d98e2c76d8caf958f3d9ec1"}},{"ruleId":"D2","level":"warning","message":{"text":"RealtimeSuggestionController.handleFocusElementChange (cognitive 36): RealtimeSuggestionController.handleFocusElementChange has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (26 pts), loops 4 (8 pts), error handling 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/RealtimeSuggestionController.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfba7363759cd70b84cdcc467c8868250be4210b7dce99d3972ae28d29bd4e2b"}},{"ruleId":"D2","level":"warning","message":{"text":"SimpleModificationAgent.modifyCode (cognitive 35): SimpleModificationAgent.modifyCode has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (21 pts), match/switch 4 (6 pts), loops 2 (4 pts), ternaries 3, error handling 1 (nesting depth added 10). Of this number, 29 points are the body\u0027s own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/PromptToCodeService/OpenAIPromptToCodeService.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dd6e7fda263c071802627565c272912eade2216eeaf9a534d65e78eade502ef"}},{"ruleId":"D2","level":"warning","message":{"text":"PromptToCodeGroup.body (cognitive 35): PromptToCodeGroup.body has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 6, loops 3 (6 pts), match/switch 2 (nesting depth added 13). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/FeatureReducers/PromptToCodeGroup.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"fea20b7efb01641a7a701d6055eef69fc9ea2b3060c0e0feb671b5549538db69"}},{"ruleId":"D2","level":"warning","message":{"text":"XcodeAppInstanceInspector.observeAXNotifications (cognitive 34): XcodeAppInstanceInspector.observeAXNotifications has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (28 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/XcodeInspector/Apps/XcodeAppInstanceInspector.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"68cc4d661e60db5f3f8b8da4f932fd71aa0d0661ddbd2289a75e7f019777d514"}},{"ruleId":"D2","level":"warning","message":{"text":"GitHubCopilotChatService.sendMessage (cognitive 33): GitHubCopilotChatService.sendMessage has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (24 pts), error handling 4 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/Services/GitHubCopilotChatService.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"41a363d763619dba671d77c02777b535e6b9063a89d40e4f90f1f06a84cbd59d"}},{"ruleId":"D2","level":"warning","message":{"text":"GUI.body (cognitive 32): GUI.body has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 5, loops 1 (2 pts), match/switch 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/GUI/GraphicalUserInterfaceController.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b140961bf86f56d89c673a69917d807bcde8b2fc1dc31083db041fcd4b2928f"}},{"ruleId":"D2","level":"warning","message":{"text":"AppDelegate.menuWillOpen (cognitive 32): AppDelegate.menuWillOpen has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (9 pts), ternaries 3 (8 pts), match/switch 1 (nesting depth added 16). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExtensionService/AppDelegate\u002BMenu.swift"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"94243f0f2f0ef211e0d39ce1c0ebdd847aa0698741a1b2c5ac95470418fd85eb"}},{"ruleId":"D2","level":"warning","message":{"text":"WidgetWindowsController.updateWindowOpacity (cognitive 31): WidgetWindowsController.updateWindowOpacity has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 5 (10 pts), boolean chains 5 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/WidgetWindowsController.swift"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"2977b69def5812e4c5fbe6e163010684fea604af87d09965e6e66be703ac7b89"}},{"ruleId":"D2","level":"warning","message":{"text":"General.body (cognitive 30): General.body has cognitive complexity 30 (threshold 15). Drivers by points: error handling 8 (17 pts), if/else 5 (10 pts), match/switch 2 (3 pts) (nesting depth added 15). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/General.swift"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"01ac274edcabdf804cd9c9c0af902053d6654bd29216309068c51cd41da91d43"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenAIEmbedding.getLenSafeEmbeddings (cognitive 30): OpenAIEmbedding.getLenSafeEmbeddings has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 6 (8 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/Embedding/OpenAIEmbedding.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"1505a2a8de4d93c3268f718eafbc6188148d10dde9326aff082834b87f085aff"}},{"ruleId":"D2","level":"warning","message":{"text":"LegacyChatPluginWrapper.send (cognitive 29): LegacyChatPluginWrapper.send has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 3 (11 pts), loops 1 (2 pts), error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/ChatService/AllPlugins.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"36d861798c7c479081c57265509e83bfb9b1c03891683547bda7a3f2d0227980"}},{"ruleId":"D2","level":"warning","message":{"text":"AppInstanceInspector.triggerMenuItem (cognitive 29): AppInstanceInspector.triggerMenuItem has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (24 pts), error handling 1 (2 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/XcodeInspector/XcodeInspector\u002BTriggerCommand.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2fef5806de92e78802f7af900f06e42eac789111277cd31e65cf4e5d57673cb"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatModelEdit.body (cognitive 28): ChatModelEdit.body has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), match/switch 3 (5 pts), error handling 1 (2 pts) (nesting depth added 13). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"0981c09019c6566b5bda527f9ed21ad894493eb9a10c5810d291368496b4e4ff"}},{"ruleId":"D2","level":"warning","message":{"text":"RequestBody.init (cognitive 28): RequestBody.init has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (12 pts), match/switch 4 (9 pts), boolean chains 4, loops 2, ternaries 1 (nesting depth added 7). Of this number, 17 points are the body\u0027s own statements and 11 belong to 4 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"cac949f49ffb369d6e5b548e52550239cad174b17e06fc163b528cac2a7b567f"}},{"ruleId":"D2","level":"warning","message":{"text":"SuggestionInjector.acceptSuggestions (cognitive 28): SuggestionInjector.acceptSuggestions has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SuggestionInjector/SuggestionInjector.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"eab9abea1e57934f8c27a0f2d86eba244cc33bf0d69fbd9da21eec4b656191d3"}},{"ruleId":"D2","level":"warning","message":{"text":"TabToAcceptSuggestion.handleTab (cognitive 27): TabToAcceptSuggestion.handleTab has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21 (24 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/KeyBindingManager/TabToAcceptSuggestion.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a93d76f9d9128a71b769b5e34818c4ff9c9d860b9e739081cf5459db7ca252d"}},{"ruleId":"D2","level":"warning","message":{"text":"PseudoCommandHandler.openChat (cognitive 27): PseudoCommandHandler.openChat has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 4, loops 1 (2 pts), match/switch 1 (nesting depth added 12). Of this number, 23 points are the body\u0027s own statements and 4 belong to one function item inside it that branches. The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebc8e6a339d22ccdc147e6c6d4fd6db76f7df27b966da71dc795535c23555bd3"}},{"ruleId":"D2","level":"warning","message":{"text":"HorizontalMovable.framesForWindows (cognitive 27): HorizontalMovable.framesForWindows has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 5 (13 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/WidgetPositionStrategy.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"f581135a1e2c0f258f34d27b1fdac7fe1c57ec1f4319b249f65d98390695c0de"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryTemplate.defaultTruncateRule (cognitive 27): MemoryTemplate.defaultTruncateRule has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 2, loops 2, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/Memory/TemplateChatGPTMemory.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"4552ebda58accca028e0ad70b7a16a640c6cbd9b954d094554904101fe411d8f"}},{"ruleId":"D2","level":"warning","message":{"text":"CustomCommandFeature.body (cognitive 25): CustomCommandFeature.body has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 2 (4 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 11). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/CustomCommandSettings/CustomCommand.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"28202797586e20773c49c6a7c621b6288f09002f0c24df8cc80ac814776fe738"}},{"ruleId":"D2","level":"warning","message":{"text":"PseudoCommandHandler.acceptModification (cognitive 24): PseudoCommandHandler.acceptModification has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), error handling 4 (8 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"95958a616b383bf9b1c18e14274b92c94ccc7bacc8bd5dfa1587359f8a0fd8e5"}},{"ruleId":"D2","level":"warning","message":{"text":"OverlayWindowController.handleOverlayStatusChange (cognitive 24): OverlayWindowController.handleOverlayStatusChange has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 5 (10 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"OverlayWindow/Sources/OverlayWindow/OverlayWindowController.swift"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"f16131fcfbaf5626b96f34d8b99ac32871fffe654473dff2cbb4add2e19c332f"}},{"ruleId":"D2","level":"warning","message":{"text":"TextSplitter.mergeSplits (cognitive 24): TextSplitter.mergeSplits has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 11). Of this number, 22 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/DocumentTransformer/TextSplitter.swift"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"c43352b0af26a4cdb5dff9858e5c7998f9a28693d9684c1739e78dfffad549f7"}},{"ruleId":"D2","level":"warning","message":{"text":"WidgetWindowsController.adjustChatPanelWindowLevel (cognitive 23): WidgetWindowsController.adjustChatPanelWindowLevel has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/WidgetWindowsController.swift"},"region":{"startLine":543}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bb0ac59c9d7e057614b1145f53b34cd816ae7037cf0de3330cfc165d1319369"}},{"ruleId":"D2","level":"warning","message":{"text":"TerminalChatPlugin.send (cognitive 22): TerminalChatPlugin.send has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), error handling 2, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/LegacyChatPlugin/TerminalChatPlugin.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"33b614dfab6c36116c82fa17da889a04226b6049ab3ee329ddc4a862ab23555b"}},{"ruleId":"D2","level":"warning","message":{"text":"RequestBody.joinMessageContent (cognitive 22): RequestBody.joinMessageContent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":1004}}}],"partialFingerprints":{"codehealthFindingId/v1":"395d927928c9b55b9cda172e47632b66c9c46f2d1e7be50a7f669c87054273fe"}},{"ruleId":"D2","level":"warning","message":{"text":"ServerNotificationHandler.handleNotification (cognitive 22): ServerNotificationHandler.handleNotification has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 1 (2 pts), boolean chains 1, loops 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/LanguageServer/CopilotLocalProcessServer.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d5ac4dc5cefc9eaa120535daf64797fbcfceb1e008c9dcfc20f28254fee87f2"}},{"ruleId":"D2","level":"warning","message":{"text":"GitHubCopilotBaseService.init (cognitive 22): GitHubCopilotBaseService.init has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 5 (8 pts), error handling 1 (3 pts), loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotService.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"075a65fa80de1221b17a800e72d614f444b1f02d79a26e464050adecd30b569c"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatGPTService.sendRequest (cognitive 22): ChatGPTService.sendRequest has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), error handling 3, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/ChatGPTService.swift"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"13a4800abfcb14b2cb6a8a3d4ade62fc105e0e092ea58a54b46e71d4d33bdcd6"}},{"ruleId":"D2","level":"warning","message":{"text":"Terminal.streamCommand (cognitive 21): Terminal.streamCommand has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/Terminal/Terminal.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b7e40759c27c8a8545fe411e98aa30f4cd0ceef6d00fda1089e0eb118e85248"}},{"ruleId":"D2","level":"warning","message":{"text":"DependencyUpdater.update (cognitive 20): DependencyUpdater.update has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 4 (10 pts), loops 2 (6 pts), error handling 2 (4 pts) (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/DependencyUpdater.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"45281c0fc0ff4a2aa0190a056fdde9c7122eae2fba9e3f523773f27f7db91070"}},{"ruleId":"D2","level":"warning","message":{"text":"GlobalShortcutManager.start (cognitive 20): GlobalShortcutManager.start has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/GlobalShortcutManager.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"31d1bb6278a43441768807efbdad65adb0286a41c464e3d8af52345e84d26600"}},{"ruleId":"D2","level":"warning","message":{"text":"PseudoCommandHandler.acceptActiveSuggestionLineInGroup (cognitive 20): PseudoCommandHandler.acceptActiveSuggestionLineInGroup has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 3 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (PseudoCommandHandler.acceptSuggestion) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d3c85c21592cc797d920aaab362c1e50b48a09e812c6665a80e7443a525e767"}},{"ruleId":"D2","level":"warning","message":{"text":"PseudoCommandHandler.acceptSuggestion (cognitive 20): PseudoCommandHandler.acceptSuggestion has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 3 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (PseudoCommandHandler.acceptActiveSuggestionLineInGroup) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"900fa052a95b43b4964e9f68bddce867c15b10104079ddb8f077e99050c22a80"}},{"ruleId":"D2","level":"warning","message":{"text":"HighlightrThemeManager.theme (cognitive 20): HighlightrThemeManager.theme has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 6, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/XcodeThemeController/HighlightrThemeManager.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab68d1b1c6966d5dc041ed203cd59b333a798fad970490799efde14e75e06db1"}},{"ruleId":"D2","level":"warning","message":{"text":"XcodeThemeController.syncXcodeThemeIfNeeded (cognitive 20): XcodeThemeController.syncXcodeThemeIfNeeded has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/XcodeThemeController/XcodeThemeController.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"e422d8ee23ed10a9a47bec7d78256dcdf14f9ee61cef5f0613bdfbe7578601d3"}},{"ruleId":"D2","level":"warning","message":{"text":"CodeiumLanguageServer.sendRequest (cognitive 20): CodeiumLanguageServer.sendRequest has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/LanguageServer/CodeiumLanguageServer.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"65f67cb735828731a07bed0986a70058858028270d70c910c41dd26c7493687a"}},{"ruleId":"D2","level":"warning","message":{"text":"GitHubCopilotChatService.convertHistory (cognitive 20): GitHubCopilotChatService.convertHistory has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/Services/GitHubCopilotChatService.swift"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"97cafa3f49c6a5b3f581bc2e2e91763948906546151e6a3ed96ccee4b3856c32"}},{"ruleId":"D2","level":"warning","message":{"text":"XcodeInspector.setActiveXcode (cognitive 20): XcodeInspector.setActiveXcode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/XcodeInspector/XcodeInspector.swift"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"e68624a6437558710d292f3e9143b5f9d89b76357f642ed742bc9bf1aaa2b6cc"}},{"ruleId":"D2","level":"warning","message":{"text":"EmbeddingModelEdit.body (cognitive 19): EmbeddingModelEdit.body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEdit.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6f0a92499d24097727b130660cf1e512fc713dad2041aebaa496f61a4cef044"}},{"ruleId":"D2","level":"warning","message":{"text":"GitHubCopilotService.getCompletions (cognitive 19): GitHubCopilotService.getCompletions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 6, match/switch 2 (4 pts) (nesting depth added 6). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to one function item inside it that branches (sendRequest). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotService.swift"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff7b02153314989483647bf7c4b029dc60cd0f7c3ed4e869f678df1b16c7cda5"}},{"ruleId":"D2","level":"warning","message":{"text":"RelevantInformationExtractionChain.callLogic (cognitive 19): RelevantInformationExtractionChain.callLogic has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 2 (6 pts), loops 3 (4 pts) (nesting depth added 10). Of this number, 10 points are the body\u0027s own statements and 9 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/Chains/RelevantInformationExtractionChain.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"8882cb272ae85e105a62f562aff0f8927b844f031b3d0d557df3855b712abbea"}},{"ruleId":"D2","level":"warning","message":{"text":"BingSearchResultParser.parse (cognitive 19): BingSearchResultParser.parse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/WebSearchService/SearchServices/HeadlessBrowserSearchService.swift"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"d44adc0d06e9e6b0a91a6f3258054c7d13aa0c36fe5e22b320c6b9297a2798d7"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkspaceXcodeWindowInspector.extractProjectURL (cognitive 19): WorkspaceXcodeWindowInspector.extractProjectURL has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/XcodeInspector/XcodeWindowInspector.swift"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ad60848d938e24a90434b96270f289362069ebd87e934113512c7ab5198e4f4"}},{"ruleId":"D2","level":"warning","message":{"text":"PseudoCommandHandler.generateRealtimeSuggestions (cognitive 18): PseudoCommandHandler.generateRealtimeSuggestions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa479dae1197f70f59a439e00abf753537845331683d4618fcc3d1fb7f8d72a9"}},{"ruleId":"D2","level":"warning","message":{"text":"NearbyTextCursor.framesForSuggestionWindow (cognitive 18): NearbyTextCursor.framesForSuggestionWindow has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, ternaries 1 (2 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/WidgetPositionStrategy.swift"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b4f8a97fba95bdf13938d3ee547e38efa43456b952267095e24e5483b35d51b"}},{"ruleId":"D2","level":"warning","message":{"text":"WidgetWindowsController.observe (cognitive 18): WidgetWindowsController.observe has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/WidgetWindowsController.swift"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"ede7e20e40e1c7a632cef2267072c882469c6160786b92de52b8ed880490eee0"}},{"ruleId":"D2","level":"warning","message":{"text":"ActiveDocumentChatContextCollector.extractSystemPrompt (cognitive 18): ActiveDocumentChatContextCollector.extractSystemPrompt has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (11 pts), boolean chains 5, if/else 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/ChatContextCollectors/ActiveDocumentChatContextCollector/ActiveDocumentChatContextCollector.swift"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b3d5d65f8196513b33d56f89bc150c456b042e7177399046b22538328e9bb69"}},{"ruleId":"D2","level":"warning","message":{"text":"CodeiumChatBrowser.body (cognitive 18): CodeiumChatBrowser.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/ChatTab/CodeiumChatBrowser.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bc141f327190df736ddbfe99c8f3bbac800d103eeca352ba666f844e15ca7c5"}},{"ruleId":"D2","level":"warning","message":{"text":"RecursiveCharacterTextSplitter.split (cognitive 18): RecursiveCharacterTextSplitter.split has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/DocumentTransformer/RecursiveCharacterTextSplitter.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"056e31874a3220816b7e0f56111250bcea9c5ea5336e7200a1ce447b70327a8a"}},{"ruleId":"D2","level":"warning","message":{"text":"GoogleAIChatCompletionsService.convertMessages (cognitive 18): GoogleAIChatCompletionsService.convertMessages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/GoogleAIChatCompletionsService.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"276759367dea645636c073778ac5bbe13ea7a76880b4ef1135124159fa9a766b"}},{"ruleId":"D2","level":"warning","message":{"text":"ShortcutChatPlugin.sendForComplicatedResponse (cognitive 17): ShortcutChatPlugin.sendForComplicatedResponse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ChatPlugins/Sources/ShortcutChatPlugin/ShortcutChatPlugin.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d2379217a4922cac041556b7e810ed3088fac6788e8c90b11588990eed97ba5"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatPluginController.handleContent (cognitive 17): ChatPluginController.handleContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/ChatService/ChatPluginController.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a68c8d8bc57a80a1b46362a164977f5c3eabc6571c9c8494344422e180d4b71"}},{"ruleId":"D2","level":"warning","message":{"text":"ScheduledCleaner.cleanUp (cognitive 17): ScheduledCleaner.cleanUp has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/ScheduledCleaner.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"67741325395e9bba692bf734f24d351603011d4afa96a49c84c81ff18b8b24a9"}},{"ruleId":"D2","level":"warning","message":{"text":"CodeiumLanguageServer.start (cognitive 17): CodeiumLanguageServer.start has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), error handling 1 (nesting depth added 9). Of this number, 10 points are the body\u0027s own statements and 7 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/LanguageServer/CodeiumLanguageServer.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeab2632fd7d7c2e344b56b65b35b84f9bfe461535e15b23fff27daea8c6c947"}},{"ruleId":"D2","level":"warning","message":{"text":"SourceEditor.observeAXNotifications (cognitive 17): SourceEditor.observeAXNotifications has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/XcodeInspector/SourceEditor.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"566718e5ce1c6abe427803fffa3a2d9f7757db158301d1ed0b9379881b1e6c46"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatModelManagement.body (cognitive 16): ChatModelManagement.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"67b9df5cbf7ec2bea18bc3d1170d040535a9659c293556b4ddf7c105cb08e20b"}},{"ruleId":"D2","level":"warning","message":{"text":"EmbeddingModelManagement.body (cognitive 16): EmbeddingModelManagement.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelManagement.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3d4c63201758b9ab8359276bfb5005f61ce951a609790f9a0ec85c30d007798"}},{"ruleId":"D2","level":"warning","message":{"text":"WidgetAnimatedCapsule.updateBreathingAnimation (cognitive 16): WidgetAnimatedCapsule.updateBreathingAnimation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/WidgetView.swift"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"f903c7100e3dab3621acb658a8d087e05694c5fbdede16b18b3d7279ef8baa21"}},{"ruleId":"D2","level":"warning","message":{"text":"CodeBlockSuggestionPanelView.body (cognitive 16): CodeBlockSuggestionPanelView.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/SuggestionPanelContent/CodeBlockSuggestionPanelView.swift"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8c0b9fb1ea19ef3e51d2a3277480f63352987fb63176c9ba1b2d3b80c0df660"}},{"ruleId":"D2","level":"warning","message":{"text":"AXUIElement.child (cognitive 16): AXUIElement.child has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"c07fa86815c1ef4f31354814d062f9952ac10c341058137324c0a7e52182abc1"}},{"ruleId":"D2","level":"warning","message":{"text":"TextSplitter.split (cognitive 16): TextSplitter.split has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/DocumentTransformer/TextSplitter.swift"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce6c2421c473a7378bfbc7c4ba246a1df9b53b1dc4212e34ebbaf05d77b0041f"}},{"ruleId":"D2","level":"warning","message":{"text":"AutoManagedChatGPTMemory.generateRetrievedContentMessage (cognitive 16): AutoManagedChatGPTMemory.generateRetrievedContentMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 2 (nesting depth added 3). None of this is in the body itself: all 16 points belong to 3 function items inside it that branch (buildMessageThatFits, buildMessage, buildMessageThatFits::checkValid). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/Memory/AutoManagedChatGPTMemory.swift"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"608aa1e06b48c52dc5dfe7697ac681a05b9456a90a25bfa146484328c310efea"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Chat.body: MethodTooLong \u2014 body runs 194 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 94 over it, 1.94\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/ChatGPTChatTab/Chat.swift"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"aae50becc55ae4b6cbeef2849f09e5eb5e583a79460a1e4710a8562c9942c317"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: SuggestionPanelContent/PromptToCodePanelView.swift: FileTooLong \u2014 907 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 407 over it, 1.81\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d3c067079bee35de735896ab2c8874f9d439fb5721af881194f7058f4d85193"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: APIs/OpenAIChatCompletionsService.swift: FileTooLong \u2014 901 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 401 over it, 1.80\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b39ab7c6c958a3c84415eff19b4acc23da26c6d94e8a4b1748faa2c97304033f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RequestBody.init: MethodTooLong \u2014 init runs 179 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 79 over it, 1.79\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f8534a6343fe92c0c854982d20b912e30c4ab8bf64f5ebe6e42e58beaaa25bc"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SwiftFocusedCodeFinder.contextContainingNode: MethodTooLong \u2014 contextContainingNode runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/FocusedCodeFinder/Swift/SwiftFocusedCodeFinder.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"0374e1d233b9fb234efc5c05caef6e8ac259c188c46b364fbcfa369751dbd504"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: General.body: MethodTooLong \u2014 body runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.67\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/General.swift"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"e621daa5930de3ddb1fc36cd59f7974c3c5a0a4abb9949543ed0452b77a4f9e1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SimpleModificationAgent.modifyCode: MethodTooLong \u2014 modifyCode runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.67\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/PromptToCodeService/OpenAIPromptToCodeService.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"98538f0b47f0d35cbde1477ada61ac2ae5f9bfbdff1e318adf0e49354acbaa57"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Widget.body: MethodTooLong \u2014 body runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/FeatureReducers/Widget.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"96bea5b632a819eb0383e57d25d431bfffeed0010bc1edf844c7feb65c57717e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: XcodeThemeParser.parseXCColorTheme: MethodTooLong \u2014 parseXCColorTheme runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/XcodeThemeController/XcodeThemeParser.swift"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad2664a47fdd2389b839f7409860d1726bc9d2f6d3f553f6d8569b4c1f34a944"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: PromptToCodePanelView.swift.top-level code: FunctionTooLong \u2014 top-level code runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift"},"region":{"startLine":1083}}}],"partialFingerprints":{"codehealthFindingId/v1":"5845a5784c5ce9950886691511d25e08e587c7b3a108266124dac1be453767c6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ChatPanel.body: MethodTooLong \u2014 body runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/FeatureReducers/ChatPanel.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab353ea0942e6284579ce0f38a49c9582bd442ab2bf66a2260b2f8be6f4c0853"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PromptToCodePanel.body: MethodTooLong \u2014 body runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/FeatureReducers/PromptToCodePanel.swift"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5e8313ea1758721cc260873ae696a3b802840abd8afbe7263fd43d022c03c45"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HorizontalMovable.framesForWindows: MethodTooLong \u2014 framesForWindows runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/WidgetPositionStrategy.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"db12258d6cc9a3ef24cca394f5f3fb25a6583001da04ead7f4ab91fb661b9098"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: GitHubCopilotView.body: MethodTooLong \u2014 body runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/GitHubCopilotView.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"61fe8f6ba916d80ae247cfb85259450d2e1258a02ff3976e633f5a6a50c453a4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodeiumSupportedLanguage.init: MethodTooLong \u2014 init runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/LanguageServer/CodeiumSupportedLanguage.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbbdf01f75a95115585c27d53e0ef64e750ac4adb1880b779226945d3870dbf2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: GitHubCopilotBaseService.init: MethodTooLong \u2014 init runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotService.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab3c7432ef6fd4e240dc3bee91b1c3a31671d5c875794b6456a17e3d5d6c21e2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ChatModelEdit.body: MethodTooLong \u2014 body runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"acbf160ed60f2a09a0f6ce95fed490d2427eaad18a66d66a4c7829b11e28fa36"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: LanguageIdentifier.fileExtensions: MethodTooLong \u2014 fileExtensions runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SuggestionBasic/LanguageIdentifierFromFilePath.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3043d1815774dfb338d8de0a31b9062959e3d98fa359e2653f3a63bfdf4849c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: GUI.body: MethodTooLong \u2014 body runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/GUI/GraphicalUserInterfaceController.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"58030570ec7b10142e20db3c79502d408fa175cef383c199f117d4d1b1c5788f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: SuggestionCommandHandler/PseudoCommandHandler.swift: FileTooLong \u2014 566 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: PseudoCommandHandler (30-588). The bar is 500 significant lines; this is 66 over it, 1.13\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a12a941357e09b74231620a947a2bf9c876512c4c2c3c2203d2630b7325f9b5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: EmbeddingModelEdit.body: MethodTooLong \u2014 body runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEdit.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5f7a234c39d20d02cf81bbab12b05f7f56f8998627741577fc39cc197b09615"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: PseudoCommandHandler: ClassTooLong \u2014 432 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 32 over it, 1.08\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"7765aaae4b40ab17207d3eb56ebd604f18491d83825030277b151582e5d4eb58"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (58 shared lines): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:11-94 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:10-70 \u2014 These two members are variants of one another: 58 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6011a3ccda8ae9b0a6af9fa7f3e3634d7207affa8951887b058c0c40ddc21c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (32 shared lines): Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift:225-290 | Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:636-697 \u2014 These two members are variants of one another: 32 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce62c98b314bb829431a70fa29fcda76afbebba3377c198892af335c7a7f3c9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift:59-80 | Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift:82-103 | Tool/Sources/GitHubCopilotService/Services/GitHubCopilotSuggestionService.swift:61-82 | Tool/Sources/GitHubCopilotService/Services/GitHubCopilotSuggestionService.swift:84-105 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"b63a810d29eb2e03f73e74d80630bf396b53821163c41c85c50a9f518d90b561"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Tool/Sources/GitHubCopilotService/GitHubCopilotExtension.swift:273-330 | Tool/Sources/OpenAIService/APIs/GitHubCopilotChatCompletionsService.swift:69-110 | Tool/Sources/OpenAIService/APIs/GitHubCopilotEmbeddingService.swift:34-70 | Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift:166-212 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/GitHubCopilotExtension.swift"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"346e4a9c9f51a9f1ab1effecb44e9141ec5f216e03d5cb8db713ec5b3e23eddc"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:232-238 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:248-254 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:300-304 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:314-320 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"69ecb0ca45e9aa64e91cebefc53390d8c68c14d80c40288ee707eff0330aef68"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:400-404 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:425-429 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:444-448 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:461-465 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"29ca4a45d932b890ae41251c12fe51d0b5f4911c5a2a71f2bd297941e301fa63"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (77 corresponding lines): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift:67-143 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelManagement.swift:59-135 \u2014 These two members are one piece of code written twice and then edited apart: 77 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3d1eb4d2bec09b589c2c2d0973ea68970cce6ea06a389ae576bb532237ee52b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (78 corresponding lines): Core/Sources/HostApp/AccountSettings/APIKeyManagement/APIKeyManagementView.swift:8-91 | Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureEnabledProjectListView.swift:20-97 \u2014 These two members are one piece of code written twice and then edited apart: 78 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/APIKeyManagement/APIKeyManagementView.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"432fc5e7c0d450967ac749d6871ff333a8b21f319a29aac934643eb7016778d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): Tool/Sources/OpenAIService/APIs/OpenAIEmbeddingService.swift:25-64 | Tool/Sources/OpenAIService/APIs/OpenAIEmbeddingService.swift:66-105 \u2014 These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIEmbeddingService.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"692c2eb6acd0939a5b7561c936643202a42422bd0003ba1d533b561126d17762"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (61 corresponding lines): Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift:208-273 | Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift:285-345 \u2014 These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9d708c262eb49250f814d6da24c3d87934e52fd76447f9049a5bad666b16593"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (46 corresponding lines): Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift:68-118 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotInstallationManager.swift:29-74 \u2014 These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"c79bcda8d5b58dc42521de9d7166b7e65ed74b80fe588f9ca68aea4ef5d455a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): Tool/Sources/CodeiumService/Services/CodeiumService.swift:165-200 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotService.swift:312-349 \u2014 These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/Services/CodeiumService.swift"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"a00af657f471551349c8dc8f72a9f96d591c2c5a2ab2479c2575c27cad985344"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): Core/Sources/SuggestionWidget/ChatWindowView.swift:314-348 | Core/Sources/SuggestionWidget/PromptToCodePanelGroupView.swift:100-139 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/ChatWindowView.swift"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e5332c6f9b2685f496b5dc2cad00915f11a66213c6f2060344ba9f6a50a896f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): Tool/Sources/WebSearchService/SearchServices/HeadlessBrowserSearchService.swift:140-170 | Tool/Sources/WebSearchService/SearchServices/HeadlessBrowserSearchService.swift:251-283 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/WebSearchService/SearchServices/HeadlessBrowserSearchService.swift"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba9051415182f13c5e2b7808ceadf2468cd17c9a705b86396136f4901087c2b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): Tool/Sources/SharedUIComponents/SyntaxHighlighting.swift:31-70 | Tool/Sources/SharedUIComponents/SyntaxHighlighting.swift:72-118 \u2014 These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/SyntaxHighlighting.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4a1761290346f363d6fbb79a22cabd46059e44055fa8727f8adffe010a9f60d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 39\u002B corresponding lines): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:327-377 | Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:531-574 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:249-287 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 39 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"84ffa96456f4702c943f4155630ce9553c05f79abed0178e2d3369144eafb4c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): Tool/Sources/WebSearchService/SearchServices/AppleDocumentationSearchService.swift:28-58 | Tool/Sources/WebSearchService/SearchServices/HeadlessBrowserSearchService.swift:57-81 \u2014 These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/WebSearchService/SearchServices/AppleDocumentationSearchService.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd7055788249e372f78227af1742281e22f9861bb56a62e92996e90a1b10da57"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (37 corresponding lines): Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:360-404 | Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:420-456 \u2014 These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"891faa8328ec2fec581fcefdfcb04b1a0cb180cb5b422e43cb5bfd079737aa34"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift:126-154 | Tool/Sources/SharedUIComponents/CodeBlock.swift:59-90 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcb7a7742a7582fcb50e907ec619836ff5d0e0c96d9b42909826e37390dae9e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (49 corresponding lines): Tool/Sources/OpenAIService/APIs/ChatCompletionsAPIBuilder.swift:23-71 | Tool/Sources/OpenAIService/APIs/ChatCompletionsAPIBuilder.swift:73-121 \u2014 These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/ChatCompletionsAPIBuilder.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7c9a180de1a3c526a1803fd5758e25f4c0b986e84ababf9a8881347b964d778"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): Core/Sources/PromptToCodeService/OpenAIPromptToCodeService.swift:9-43 | Core/Sources/PromptToCodeService/PreviewPromptToCodeService.swift:6-40 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/PromptToCodeService/OpenAIPromptToCodeService.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"c580aecfd179b5ffbd640775fe3dff9b8b238a71a5b2fb6e61266ef8ec94c92f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:404-451 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:311-348 \u2014 These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3206972a749d782c9ff68ee3d482dcb0e562690ca7eb131f00d933459273731"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (37 corresponding lines): Core/Sources/HostApp/CustomCommandSettings/CustomCommandView.swift:269-315 | Core/Sources/HostApp/CustomCommandSettings/CustomCommandView.swift:319-355 \u2014 These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/CustomCommandSettings/CustomCommandView.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"30e73b503910a9b4481cb60b1bf6aa32298e5085b46c603f51af32b9c81949a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:107-149 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:83-117 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b1ed13da803c571371f7519a9005a6466e85791c6535277ce8e50a663746036"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): Tool/Sources/CodeiumService/CodeiumExtension.swift:106-134 | Tool/Sources/GitHubCopilotService/GitHubCopilotExtension.swift:96-131 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/CodeiumExtension.swift"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"e049c3d1204aaa2ec87d575c2fc6ac89fe2007b60b073760ffea2208d068dbec"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): Tool/Sources/FocusedCodeFinder/ObjectiveC/ObjectiveCCodeFinder.swift:181-206 | Tool/Sources/FocusedCodeFinder/ObjectiveC/ObjectiveCCodeFinder.swift:212-234 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/FocusedCodeFinder/ObjectiveC/ObjectiveCCodeFinder.swift"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"f69451f888f981af94888f6638fa60257698056171b01b84cb649ef1be039252"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:499-526 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:355-388 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":499}}}],"partialFingerprints":{"codehealthFindingId/v1":"44df93d0c11fe8a88b39ccd079c3c49aa83dfe0aaaf6020519bd9578e679918f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Tool/Sources/LangChain/VectorStore/TemporaryUSearch.swift:112-128 | Tool/Sources/LangChain/VectorStore/TemporaryUSearch.swift:130-146 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/VectorStore/TemporaryUSearch.swift"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"8614336386579bd4f305cf5ea2bd8855e192d834cd917d160b64f17a751a2c70"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift:21-37 | Tool/Sources/GitHubCopilotService/Services/GitHubCopilotSuggestionService.swift:21-38 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b67963acfb67a2c364648ef8bd4ae0f7b6ed8ba5f2dd0385fd74f161057e425"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Core/Sources/SuggestionWidget/ChatWindowView.swift:148-162 | Core/Sources/SuggestionWidget/PromptToCodePanelGroupView.swift:38-50 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/ChatWindowView.swift"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d80a95ebef27626fc30d724719db5acdf056634cb516522160abaf7cc698288"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift:201-213 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotInstallationManager.swift:198-210 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c589558a8b1d8f0999ce98a1518cfbda07594e6b0187365d7a3cd7a754453cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): Tool/Sources/OpenAIService/APIs/ChatCompletionsAPIDefinition.swift:107-130 | Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:564-584 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/ChatCompletionsAPIDefinition.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bcf3c0d8daa7c09f76c40eedcefa1d33ce74ce548352ea59d41c2179449cf2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift:32-54 | Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift:30-51 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"65d968f83407aeea281e4d414d1abaaac176a7c7eef25e51c02467b8a3ac8d87"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Tool/Sources/XcodeInspector/SourceEditor.swift:36-50 | Tool/Sources/XcodeInspector/SourceEditor.swift:56-74 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/XcodeInspector/SourceEditor.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"972cefe3c44a54a5c0a4dd3df1d9f57ea0bc1f93b4dc7fd3572a43a06ec6d0fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 22\u002B corresponding lines): EditorExtension/AcceptPromptToCodeCommand.swift:9-30 | EditorExtension/AcceptSuggestionCommand.swift:10-31 | EditorExtension/AcceptSuggestionCommand.swift:37-59 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"EditorExtension/AcceptPromptToCodeCommand.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc05b0785489e8c08b56cd24e660a67bbdfcfe7a6ffc14295e59071070a8011c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Tool/Sources/SharedUIComponents/CustomTextEditor.swift:11-26 | Tool/Sources/SharedUIComponents/CustomTextEditor.swift:61-74 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/CustomTextEditor.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c1bd6243598047b0f31c611a24551bbdf242465ff25b2a41c102a46e8a39c31"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): Tool/Sources/OpenAIService/APIs/ChatCompletionsAPIDefinition.swift:175-188 | Tool/Sources/OpenAIService/APIs/EmbeddingAPIDefinitions.swift:13-26 | Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift:220-233 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/ChatCompletionsAPIDefinition.swift"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6be1e19504d17e19dfde228d3e3524ee546cc21dfe40edfd8c071c74bfe1599"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): ChatPlugins/Sources/ShortcutChatPlugin/ShortcutChatPlugin.swift:23-48 | Tool/Sources/ChatBasic/ChatPlugin.swift:38-58 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ChatPlugins/Sources/ShortcutChatPlugin/ShortcutChatPlugin.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d7a9b1cfdaaeeee0b5c57acd960eca1f09c230bd65520a964731783f6af0469"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Tool/Sources/FocusedCodeFinder/ObjectiveC/ObjectiveCCodeFinder.swift:26-45 | Tool/Sources/FocusedCodeFinder/Swift/SwiftFocusedCodeFinder.swift:21-41 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/FocusedCodeFinder/ObjectiveC/ObjectiveCCodeFinder.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"aac26cfea1b2aac0ec051563f451f5e6013270f6a2f22fb5e95237c4055978ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 17\u002B corresponding lines): Core/Sources/HostApp/CustomCommandSettings/EditCustomCommandView.swift:277-294 | Core/Sources/HostApp/CustomCommandSettings/EditCustomCommandView.swift:300-316 | Core/Sources/HostApp/CustomCommandSettings/EditCustomCommandView.swift:323-340 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/CustomCommandSettings/EditCustomCommandView.swift"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5e14d4a17cecd09699c8968f70973e464312de931b86c2da66cf38adf85aa08"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 19\u002B corresponding lines): Tool/Sources/SharedUIComponents/SyntaxHighlighting.swift:120-138 | Tool/Sources/SharedUIComponents/SyntaxHighlighting.swift:140-158 | Tool/Sources/SharedUIComponents/SyntaxHighlighting.swift:160-179 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/SyntaxHighlighting.swift"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"283d9102a5c6637939c9f34d875b13a98c73ac98c80e064103a3a68c2a0b7f34"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Tool/Sources/Workspace/OpenedFileRocoverableStorage.swift:13-21 | Tool/Sources/Workspace/OpenedFileRocoverableStorage.swift:23-31 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/Workspace/OpenedFileRocoverableStorage.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"796d51c14cf6c7cb7bed28d5ac564dd0c7b8c44d79f19d7421b0a8e060375134"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Tool/Sources/ChatContextCollectors/ActiveDocumentChatContextCollector/ActiveDocumentChatContextCollector.swift:88-104 | Tool/Sources/FocusedCodeFinder/ActiveDocumentContext.swift:84-97 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/ChatContextCollectors/ActiveDocumentChatContextCollector/ActiveDocumentChatContextCollector.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d0505f0584423bf37e8dd6193454a803588ce28b2fb3628d221ba274a8b177b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift:327-334 | Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:805-819 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef22543bf394aa9afdb185696e538acace8aa4291d48e516d26a7fbbf0cea8b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Tool/Sources/USearchIndex/UsearchIndex.swift:59-72 | Tool/Sources/USearchIndex/UsearchIndex.swift:74-87 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/USearchIndex/UsearchIndex.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"a073b4f5786d1481bfc1a8c31b8951e75413a5265a282a126ffc362b90cc685c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Core/Sources/HostApp/AccountSettings/WebSearchView.swift:150-174 | Core/Sources/HostApp/AccountSettings/WebSearchView.swift:176-193 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/WebSearchView.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"23e2d8b50dfdb2f42928dbc9d1a7b674a326177de3a3db9d305ecdde7fc3b4e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift:34-47 | Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift:49-62 | Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift:150-163 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"94fe29acecde65968d969ea069774274c8cfabaa788e65003bb255427873ee74"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Tool/Sources/CodeiumService/CodeiumWorkspacePlugin.swift:39-54 | Tool/Sources/GitHubCopilotService/GitHubCopilotWorkspacePlugin.swift:67-80 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/CodeiumWorkspacePlugin.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f1c15bc07c795b23422340f80e37091d2f4a6afe0d4ddf1c83f5b54f714bc1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:113-127 | Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:137-153 | Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:180-196 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2a781858adbb3ae4fca282bd546e87c0197f90da261ad8fd8d851fbb69549a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Core/Sources/ChatGPTChatTab/Chat.swift:488-499 | Tool/Sources/CustomAsyncAlgorithms/TimedDebounce.swift:16-28 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/ChatGPTChatTab/Chat.swift"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"eefbb1a9613e89f6b265a81c92529dfc8a7497b26a173a958906c328532f8436"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Core/Sources/ChatService/ChatService.swift:252-266 | Core/Sources/ChatService/ChatService.swift:268-281 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/ChatService/ChatService.swift"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"41af8468e5ed0e186fcba96c2366a0d375d60ef3d48fcdf5bb6f3ce0413448f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): Tool/Sources/ChatTab/ChatTab.swift:96-106 | Tool/Sources/ChatTab/ChatTab.swift:110-120 | Tool/Sources/ChatTab/ChatTab.swift:135-145 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/ChatTab/ChatTab.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed6b3a079102d7a40d5bb4907cce8612afff2b180f275b765ff075ed28799567"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Tool/Sources/SharedUIComponents/TabContainer.swift:49-63 | Tool/Sources/SharedUIComponents/TabContainer.swift:65-80 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/TabContainer.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b6194b3df153f0744e2afa4617aee2e4fc5078ad872cadd078db6a919e7b166"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Tool/Sources/DebounceFunction/ThrottleFunction.swift:22-35 | Tool/Sources/DebounceFunction/ThrottleFunction.swift:59-72 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/DebounceFunction/ThrottleFunction.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"21e1f2efaf10b85ee25ec9921d6f6e263feab228380e40d03c19696b8e180d9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:114-127 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:129-138 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5008943b736b7b789c4167cbd39d5b707e19f95f45a77e24c41d872343bdbe1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Tool/Sources/LangChain/Chains/QAInformationRetrievalChain.swift:17-29 | Tool/Sources/LangChain/Chains/QAInformationRetrievalChain.swift:31-43 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/Chains/QAInformationRetrievalChain.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"92f1b137ba382b0592ccfc449787de959ed7b1a1f052756776bc5843aa6e523a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): Core/Sources/Service/SuggestionCommandHandler/WindowBaseCommandHandler.swift:77-90 | Core/Sources/Service/SuggestionCommandHandler/WindowBaseCommandHandler.swift:103-116 | Core/Sources/Service/SuggestionCommandHandler/WindowBaseCommandHandler.swift:129-138 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/SuggestionCommandHandler/WindowBaseCommandHandler.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"03920297bbf046af48ac164f3d02d0fe9d6ed3253681d395fbcba40ccd3febe8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Tool/Sources/FocusedCodeFinder/ActiveDocumentContext.swift:37-53 | Tool/Sources/FocusedCodeFinder/FocusedCodeFinder.swift:44-60 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/FocusedCodeFinder/ActiveDocumentContext.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4417f259cd7c09f38128eb9cc1d97acd0bea2a27835db9a5bcc63ffdc298368"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Tool/Sources/WorkspaceSuggestionService/SuggestionWorkspacePlugin.swift:36-53 | Tool/Sources/WorkspaceSuggestionService/SuggestionWorkspacePlugin.swift:55-65 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/WorkspaceSuggestionService/SuggestionWorkspacePlugin.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"c07febc1bb83ba36f68c386abd658a99f9f03aee9496ebc2dcb41b66fa87e303"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Core/Sources/ChatGPTChatTab/ChatContextMenu.swift:44-52 | Core/Sources/ChatGPTChatTab/ChatContextMenu.swift:55-63 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/ChatGPTChatTab/ChatContextMenu.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"820dffff3dc41189a0ec88d01a9f089af27755b301de0d69accec0c37128df27"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Tool/Sources/AXExtension/AXUIElement.swift:417-424 | Tool/Sources/AXExtension/AXUIElement.swift:426-442 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"522c8ce000cd5698f1e35eca175ccd1e190fd114fcc506ef14b4e108356f3bfa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Core/Sources/HostApp/FeatureSettings/Chat/ChatSettingsGeneralSectionView.swift:45-59 | Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionSettingsGeneralSectionView.swift:66-80 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/FeatureSettings/Chat/ChatSettingsGeneralSectionView.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"362750e5b12cec3061d6ffbae2d2f5d9ead0c0807713b193d4ff2fe3aa692612"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 12\u002B corresponding lines): Tool/Sources/BuiltinExtension/BuiltinExtensionWorkspacePlugin.swift:35-46 | Tool/Sources/BuiltinExtension/BuiltinExtensionWorkspacePlugin.swift:48-60 | Tool/Sources/BuiltinExtension/BuiltinExtensionWorkspacePlugin.swift:62-73 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/BuiltinExtension/BuiltinExtensionWorkspacePlugin.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"152f3f965bc41c217114d06cafad2db5095f30d760ed099bd37020c814ad8ef5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 9\u002B corresponding lines): Core/Sources/ChatGPTChatTab/ChatPanel.swift:573-581 | Core/Sources/ChatGPTChatTab/ChatPanel.swift:585-593 | Core/Sources/ChatGPTChatTab/ChatPanel.swift:597-612 | Core/Sources/ChatGPTChatTab/ChatPanel.swift:616-624 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/ChatGPTChatTab/ChatPanel.swift"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d5c9b34724996fdd27276178a6ff7540317263a836c4b59dcce4af45304a0d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Tool/Sources/LangChain/DocumentTransformer/RecursiveCharacterTextSplitter.swift:21-32 | Tool/Sources/LangChain/DocumentTransformer/RecursiveCharacterTextSplitter.swift:41-52 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/DocumentTransformer/RecursiveCharacterTextSplitter.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"125578349730d16a9892809daa497f3235f7040dee81d8aae927f76a45dead1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): Tool/Sources/Preferences/UserDefaults.swift:149-156 | Tool/Sources/Preferences/UserDefaults.swift:158-166 | Tool/Sources/Preferences/UserDefaults.swift:224-232 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/Preferences/UserDefaults.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"feb1e5d2af810d3a7e357500b057e9c476e97f06e135426b47bb001ff44cb42e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotService.swift:385-394 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotService.swift:396-408 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotService.swift"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a83b0795f67350cbd6c4855be05421ac3a37f94171965c65e92e9a671486142"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:382-398 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:292-304 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"3341a29304d9203cef972d96143ed194a670208aa77d26663a5beba81c8cfaa4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Tool/Sources/LangChain/Chain.swift:71-78 | Tool/Sources/LangChain/Chain.swift:92-99 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/Chain.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"935d2a1fdab57addbc7be2197f395d0b25b3d16071d1402d98ebfff4abbf7401"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagementView.swift:8-19 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelManagementView.swift:8-19 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagementView.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"788f4e543ed90a88277d755731824f46e81c1255da0bf5604542b13626adfaa3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 11\u002B corresponding lines): Tool/Sources/CodeiumService/CodeiumExtension.swift:46-56 | Tool/Sources/CodeiumService/CodeiumExtension.swift:58-68 | Tool/Sources/CodeiumService/CodeiumExtension.swift:94-104 | Tool/Sources/GitHubCopilotService/GitHubCopilotExtension.swift:72-82 | Tool/Sources/GitHubCopilotService/GitHubCopilotExtension.swift:84-94 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/CodeiumExtension.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfb636648701ce4e39c08660d0ad3833764b558baea5b0d89abfe6471298b098"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift:69-86 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEdit.swift:58-71 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a8cdde15e77a54e262e50c69ce3ea073b0ad48086a2dc58e45c17a72e396778"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:238-250 | Tool/Sources/Workspace/Filespace.swift:37-49 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1a50cd8975e7096ca9ad9d47af25729df2ba94818e3e65111b67371557f60a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Tool/Sources/Preferences/UserDefaults.swift:134-139 | Tool/Sources/Preferences/UserDefaults.swift:281-287 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/Preferences/UserDefaults.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"580ced99810d0bf3e6b015c109083c86a8a099d904c30a54e9821bde0bc2b5b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Core/Sources/PromptToCodeService/PromptToCodeServiceType.swift:13-27 | Tool/Sources/ModificationBasic/ModificationAgent.swift:28-40 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/PromptToCodeService/PromptToCodeServiceType.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"60f7f2f0b384ed576cc5644994f0dd720d1a8b3c2aec8484bee632e15fab3d3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift:8-18 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelManagement.swift:8-16 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e43af40582b92521a9d2de2066421e75db5d944bada129aac86b95da4c4f4e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): CommunicationBridge/ServiceDelegate.swift:7-22 | ExtensionService/ServiceDelegate.swift:6-18 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CommunicationBridge/ServiceDelegate.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad5aba4b0f6d5e9047d51f268f7fea56a37d943f01bfc7e07adad3a0250dadba"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Tool/Sources/LangChain/Chains/CombineAnswersChain.swift:56-62 | Tool/Sources/LangChain/Chains/StructuredOutputChatModelChain.swift:99-105 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/Chains/CombineAnswersChain.swift"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"2afd07b8ba18af76caa03bacec3e1662e3bee8d52535c825408876b285e49d46"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift:213-223 | Tool/Sources/OpenAIService/APIs/OlamaChatCompletionsService.swift:16-26 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce990f94dae6ac36fa4897f1f855901837a77349c3263eb655bdec0ec195ad56"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Tool/Sources/OpenAIService/Configuration/EmbeddingConfiguration.swift:18-21 | Tool/Sources/RAGChatAgent/RAGChatAgentConfiguration.swift:113-116 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/Configuration/EmbeddingConfiguration.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fd1b4d33177318f5fcb31c37be2c987372308d8e78eb711a0fcd94c6cf6d132"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Tool/Sources/LangChain/DocumentLoader/WebLoader.swift:139-148 | Tool/Sources/WebScrapper/WebScrapper.swift:18-27 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/DocumentLoader/WebLoader.swift"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"558569e822e62206cc5f829eb8a4e761faa90f740a496b0f856289af0d74e5da"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift:54-57 | Tool/Sources/GitHubCopilotService/Services/GitHubCopilotSuggestionService.swift:56-59 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"d62755b990c4fa6abf96cf66bb2c3b6fbb0f97a1faf8666ccfb736a1bb492aee"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift:145-148 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelManagement.swift:137-140 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0cb01108679d0b248f6108404b4d1287271952964831c69e65e04f390f8ecee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (57 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagementView.swift:27-83 | Core/Sources/HostApp/AccountSettings/SharedModelManagement/AIModelManagementVIew.swift:195-251 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagementView.swift:27\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagementView.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb89813e4de2d502818d0d7a9b325b17e2d3f4c855e155c238e3cf2296c69aa4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (55 lines \u00D7 2): Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift:286-340 | Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift:348-402 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift:286\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"394c088169051bc37fc325a81736a3591207dd2b399ac6bd864b972220c77e1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (43 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:195-237 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:144-186 \u2014 before extracting anything, compare \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b18b583ddf0d0a8088dbded7fd87f7a0c2b736e4dde994e71bd966ed3fff1d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (43 lines \u00D7 2): Tool/Sources/OpenAIService/APIs/ChatCompletionsAPIBuilder.swift:29-71 | Tool/Sources/OpenAIService/APIs/ChatCompletionsAPIBuilder.swift:79-121 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/ChatCompletionsAPIBuilder.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eab7a1a002d1eb4d5d19355f26c064d2f56f991743b9e90a32e5704583ebb28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift:74-114 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelManagement.swift:66-106 \u2014 \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelManagement.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 68 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift:74\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"a22e7414945b664ba931a2c84c0fea7cb862200b8e9e1412d011d403f4360779"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1158-1191 | Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1213-1246 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1158\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift"},"region":{"startLine":1158}}}],"partialFingerprints":{"codehealthFindingId/v1":"393e6eb0315cb1fbd5aced983705f1146ac0e96cdc89ade6462c7ec78d1bfe4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): Tool/Sources/OpenAIService/EmbeddingService.swift:13-46 | Tool/Sources/OpenAIService/EmbeddingService.swift:85-118 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/EmbeddingService.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"9de1f2f6dc7c1b10864fac98c6d50558ae4b2f9fc3b37a3cc00c0a9b81e42149"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31\u201332 lines \u00D7 2): Core/Sources/SuggestionWidget/SuggestionPanelContent/CodeBlockSuggestionPanelView.swift:367-397 | Core/Sources/SuggestionWidget/SuggestionPanelContent/CodeBlockSuggestionPanelView.swift:400-431 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/SuggestionWidget/SuggestionPanelContent/CodeBlockSuggestionPanelView.swift:367\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/SuggestionPanelContent/CodeBlockSuggestionPanelView.swift"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"0be78a99ed42b50067070b35cc016324faebee3e49edc557942f1a5e92852bee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2): Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:765-796 | Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift:167-198 \u2014 before extracting anything, compare \u0060Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift\u0060 and \u0060Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":765}}}],"partialFingerprints":{"codehealthFindingId/v1":"9601e7934e99363fd0e07d572c868d5f81a5afbe86e18aea86bfdbdce1bdd874"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): Tool/Sources/AppActivator/AppActivator.swift:93-122 | Tool/Sources/XcodeInspector/XcodeInspector\u002BTriggerCommand.swift:144-173 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AppActivator/AppActivator.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"68b0da2a1c1b5ab9719c72f61efa372eea437cf295d20d5277372733c5642169"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:404-432 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:311-339 \u2014 before extracting anything, compare \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:404\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed9e455be18bfcd561a2c7d21452d5723d442401f2bdac9756b2c5580d2d1dba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201329 lines \u00D7 2): Core/Sources/Service/DependencyUpdater.swift:14-42 | Core/Sources/Service/DependencyUpdater.swift:47-74 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/Service/DependencyUpdater.swift:14\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/DependencyUpdater.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"fef0d99e4d7b8a4b985cfdac74b2a44c1ea2e77e1de0162075f5de14db46ce25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): Core/Sources/SuggestionWidget/ChatWindowView.swift:320-348 | Core/Sources/SuggestionWidget/PromptToCodePanelGroupView.swift:111-139 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/SuggestionWidget/ChatWindowView.swift:320\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/ChatWindowView.swift"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc5ae5fbba42528112bda759c7eb55f1cdb776436e843caf1f42213e67f86dcd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 3): Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1115-1142 | Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1182-1209 | Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1237-1264 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1115\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift"},"region":{"startLine":1115}}}],"partialFingerprints":{"codehealthFindingId/v1":"c73ab35e96d12195f07fc12f722cb62716a24d797b39a809bb5d633d2fac92d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift:98-125 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEdit.swift:83-110 \u2014 before extracting anything, compare \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEdit.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift:98\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"00e787e394e2073911d0798e1667ba8f103779a4405d83333234fe1089803010"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift:245-272 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEdit.swift:202-229 \u2014 before extracting anything, compare \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEdit.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift:245\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e756789776966a289ca33ba46d1c20638dc20393d60365494a01ce6aa9dbe32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): Core/Sources/HostApp/CustomCommandSettings/CustomCommandView.swift:269-296 | Core/Sources/HostApp/CustomCommandSettings/CustomCommandView.swift:319-346 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/CustomCommandSettings/CustomCommandView.swift:269\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/CustomCommandSettings/CustomCommandView.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4f90d8350d4d1c5f532ba29c3b3464c637db874e6c528cb5b10aa17a9a3f9fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): Tool/Sources/OpenAIService/APIs/OpenAIEmbeddingService.swift:38-64 | Tool/Sources/OpenAIService/APIs/OpenAIEmbeddingService.swift:79-105 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/OpenAIService/APIs/OpenAIEmbeddingService.swift:38\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIEmbeddingService.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2480469a0e2e53b3fe66df8d5c8bff5b7fec691500c80348e4bcd25b4704c53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift:97-123 | Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift:70-96 \u2014 before extracting anything, compare \u0060Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift\u0060 and \u0060Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift:97\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b8a85cd52fd380d3312b03f7441e47b0b89f53c02f183400e18184330661d11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25\u201326 lines \u00D7 2): Core/Sources/SuggestionWidget/WidgetPositionStrategy.swift:168-193 | Core/Sources/SuggestionWidget/WidgetPositionStrategy.swift:232-256 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/SuggestionWidget/WidgetPositionStrategy.swift:168\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/WidgetPositionStrategy.swift"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac87f3bc8f847e015b6bee79daea3e277f8de91ea034cbbbb9e614bb6fc9e809"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): Tool/Sources/OpenAIService/APIs/GitHubCopilotChatCompletionsService.swift:81-105 | Tool/Sources/OpenAIService/APIs/GitHubCopilotEmbeddingService.swift:41-65 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/OpenAIService/APIs/GitHubCopilotChatCompletionsService.swift:81\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/GitHubCopilotChatCompletionsService.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a20983a86b34ac189521bf35bb23b3039d38295313ef038b4f49ea39bea579e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:649-673 | Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift:109-133 \u2014 before extracting anything, compare \u0060Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift\u0060 and \u0060Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":649}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecf9d98c7d5654c2b1e8086082caad6700fd3d9cdce66e8b751e1caf44dc0ed6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift:90-113 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotInstallationManager.swift:45-68 \u2014 before extracting anything, compare \u0060Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift\u0060 and \u0060Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotInstallationManager.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift:90\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfd2385ca8337617df72fc2404d11b00b39d416e92a3b9f70231b4d08a93c66b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:72-94 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:48-70 \u2014 before extracting anything, compare \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:72\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"0994fedc9be61e19372076ea00d32a98fd8f2c2ec37cf082a34e2ab524170cfd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201323 lines \u00D7 2): Core/Sources/SuggestionWidget/SuggestionPanelContent/CodeBlockSuggestionPanelView.swift:61-83 | Core/Sources/SuggestionWidget/SuggestionPanelContent/CodeBlockSuggestionPanelView.swift:136-156 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/SuggestionWidget/SuggestionPanelContent/CodeBlockSuggestionPanelView.swift:61\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/SuggestionPanelContent/CodeBlockSuggestionPanelView.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"073ad8144c783645cc894427fc1b6e0295285af3cddf00bb90b738ee98a52def"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift:515-536 | Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift:429-450 \u2014 before extracting anything, compare \u0060Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift\u0060 and \u0060Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift:515\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"15b28d0f08e9f69c764528e35c64a635e14c16aa7b499387aa67e091f808828e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38\u201339 lines \u00D7 3): Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift:217-255 | Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift:290-327 | Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift:352-389 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift:217\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"2025b5076f59e01e5314cf24d305e4533e4393034e36957dd55e7cab745bc7f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/CodeiumView.swift:67-87 | Core/Sources/HostApp/AccountSettings/GitHubCopilotView.swift:55-75 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/CodeiumView.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"13343aea7c75534be848fc88e651233ab02508a8627c1e28f7551bb575910b3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:32-51 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:27-46 \u2014 before extracting anything, compare \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:32\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:31\u0060 calls \u0060ClaudeForm\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:26\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6f756311d42d2e7dad73dedd8b17aae91bd18391f42e3ccb905cb49e8de7128"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Tool/Sources/CodeDiff/CodeDiff.swift:577-596 | Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift:469-488 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/CodeDiff/CodeDiff.swift:577\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeDiff/CodeDiff.swift"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"597524d6653b489fb7f0cd916116879f8300775af3e3144c3ad2c8a007eebc87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 4): Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift:62-80 | Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift:85-103 | Tool/Sources/GitHubCopilotService/Services/GitHubCopilotSuggestionService.swift:64-82 | Tool/Sources/GitHubCopilotService/Services/GitHubCopilotSuggestionService.swift:87-105 \u2014 before extracting anything, compare \u0060Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift\u0060 and \u0060Tool/Sources/GitHubCopilotService/Services/GitHubCopilotSuggestionService.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift:62\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"99402d3b72bea475ec4f6be2578f7d9d31a0075c6539781a7d94dfcfdf9e8322"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:744-762 | Tool/Sources/OpenAIService/APIs/OpenAIEmbeddingService.swift:107-125 | Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift:146-164 \u2014 before extracting anything, compare \u0060Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift\u0060 and \u0060Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:744\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc166d186a7f992c2636b1bfa0d08066afad93f816583d6850b25b07891649d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:256-274 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:397-415 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:417\u0060 calls \u0060Button\u0060, \u0060toggle\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:276\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"7457938fb0e5ccca470beb4afa4ff28109967cd2d5677ee9f3d31e27598fe9d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201319 lines \u00D7 2): Tool/Sources/FocusedCodeFinder/ObjectiveC/ObjectiveCCodeFinder.swift:188-206 | Tool/Sources/FocusedCodeFinder/ObjectiveC/ObjectiveCCodeFinder.swift:218-234 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/FocusedCodeFinder/ObjectiveC/ObjectiveCCodeFinder.swift:188\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/FocusedCodeFinder/ObjectiveC/ObjectiveCCodeFinder.swift"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"08c72161300037cd03c4bae7a15d18c542515a782e12f50407552eb36de3bfa1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Tool/Sources/SharedUIComponents/SubSection.swift:78-95 | Tool/Sources/SharedUIComponents/SubSection.swift:97-114 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/SharedUIComponents/SubSection.swift:78\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/SubSection.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dfc5cd8ecea43c4fbfd7b4ee38590cd2418694a86145704445b38f5fdb5f771"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201317 lines \u00D7 4): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:327-339 | Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:457-473 | Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:531-544 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:249-261 \u2014 before extracting anything, compare \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:327\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f00e88283377ab02919686e2b7d534505034cb11d28658e8b7b43e234f135e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift:257-273 | Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift:329-345 | Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift:391-407 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift:257\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"c983a893363479af485ac0dbc498719eb95b748e15febd28ba744fd50f3e9983"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Core/Sources/PromptToCodeService/OpenAIPromptToCodeService.swift:134-150 | Core/Sources/PromptToCodeService/OpenAIPromptToCodeService.swift:152-168 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/PromptToCodeService/OpenAIPromptToCodeService.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c82f0c37d9e1a34dfc80577baed2a804be6d8a1127fb1a2ef1945867a1a0128"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): Tool/Sources/SharedUIComponents/SubSection.swift:78-93 | Tool/Sources/SharedUIComponents/SubSection.swift:97-112 | Tool/Sources/SharedUIComponents/SubSection.swift:116-131 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/SharedUIComponents/SubSection.swift:78\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/SubSection.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"84db5fff75931ed028567a7e0d2c1c6a71d1550440ead67553b5892fcaecafdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:359-374 | Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:597-612 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:359\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:613\u0060 calls \u0060dynamicHeightTextInFormWorkaround\u0060 and \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:375\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff0133121498fa4256cd0736b8fbbe198a5d1d3eaeb35662333d7d9e837a4a1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Core/Sources/SuggestionWidget/WidgetWindowsController.swift:90-105 | OverlayWindow/Sources/OverlayWindow/OverlayWindowController.swift:60-75 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/WidgetWindowsController.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"80d3729365c00ff0b9708e25bc1797b4718b39bb2ac159ef3c974cf31f6436c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift:159-173 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotInstallationManager.swift:115-130 \u2014 before extracting anything, compare \u0060Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift\u0060 and \u0060Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotInstallationManager.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift:159\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"8caa20030167214a4b674456a8fd2a6dd5f0a196d728c39d16b049882fcfd998"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Tool/Sources/ModificationBasic/ExplanationThenCodeStreamParser.swift:160-175 | Tool/Sources/ModificationBasic/ExplanationThenCodeStreamParser.swift:204-219 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/ModificationBasic/ExplanationThenCodeStreamParser.swift:160\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Tool/Sources/ModificationBasic/ExplanationThenCodeStreamParser.swift:156\u0060 calls \u0060flushBuffer\u0060, \u0060appendBuffer\u0060 and \u0060Tool/Sources/ModificationBasic/ExplanationThenCodeStreamParser.swift:203\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/ModificationBasic/ExplanationThenCodeStreamParser.swift"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"197dbee4f3e13f29971447386200cb5147a72ecacad529e2fd4170cce8789c8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:11-25 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:10-24 \u2014 before extracting anything, compare \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:11\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:27\u0060 calls \u0060GoogleAIForm\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:26\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"daefdfd23f7a57b3a6b909ce5689b1cff511039d00276e9434519eeddf9be3aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift:151-165 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelManagement.swift:143-157 \u2014 \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelManagement.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 68 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d3c6173a99fe839aa0bb12de4cddc3b675a39d5317dcd52db4f2ea556e02065"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureDisabledLanguageListView.swift:58-72 | Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureEnabledProjectListView.swift:65-79 \u2014 before extracting anything, compare \u0060Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureDisabledLanguageListView.swift\u0060 and \u0060Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureEnabledProjectListView.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureDisabledLanguageListView.swift:58\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureDisabledLanguageListView.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"b20d9d4781d59221d97578494da87debe509adc92ad5c984e17e1755565ab45d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201315 lines \u00D7 2): Core/Sources/Service/RealtimeSuggestionController.swift:75-86 | Core/Sources/Service/RealtimeSuggestionController.swift:94-108 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/Service/RealtimeSuggestionController.swift:75\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/RealtimeSuggestionController.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"59b3c04db46701c2b488589879582bd076269b0535a26fe42251e6f6593a5bc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Core/Sources/SuggestionWidget/WidgetView.swift:284-298 | Core/Sources/SuggestionWidget/WidgetView.swift:314-328 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/SuggestionWidget/WidgetView.swift:284\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/WidgetView.swift"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f3915af3f474d07ebc1dcd3aea7bf79d4293448b570b6f7f8582720982586c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:55-68 | Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift:56-69 \u2014 before extracting anything, compare \u0060Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift\u0060 and \u0060Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fa95dbf2922eb3ba6c2cf8405a842c9f1fa8687738740edb6634c5a24904f7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:391-404 | Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:443-456 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:391\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"07da8d16a0941c5197e1c36767e2c5f809afbbc1e7e8d4d2cafcd43915a65430"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Tool/Sources/Terminal/Terminal.swift:61-74 | Tool/Sources/Terminal/Terminal.swift:190-203 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/Terminal/Terminal.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd391cd8fd8ca9e49c2e6f4bec0307d5f0dd0fef911e78ec900b90daee3d9365"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Tool/Sources/OpenAIService/APIs/OllamaEmbeddingService.swift:38-50 | Tool/Sources/OpenAIService/APIs/OpenAIEmbeddingService.swift:48-60 | Tool/Sources/OpenAIService/APIs/OpenAIEmbeddingService.swift:89-101 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OllamaEmbeddingService.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"88d1c52d27046a8de2212204dca670a9dfed98a6783759fe968ccb4c4a10c1f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift:462-474 | Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift:477-489 | Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift:492-504 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift:462\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"865b5a3dd48d0e1b3184dc9685c849370800df69920aeb22c5e7a2067b15c045"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureDisabledLanguageListView.swift:21-33 | Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureEnabledProjectListView.swift:20-32 \u2014 before extracting anything, compare \u0060Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureDisabledLanguageListView.swift\u0060 and \u0060Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureEnabledProjectListView.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureDisabledLanguageListView.swift:21\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureDisabledLanguageListView.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d856fc52536001dbe9860ac4157d1b5757741957c231e2591fa68353be886f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Core/Sources/PromptToCodeService/OpenAIPromptToCodeService.swift:15-27 | Core/Sources/PromptToCodeService/PreviewPromptToCodeService.swift:12-24 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/PromptToCodeService/OpenAIPromptToCodeService.swift:15\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/PromptToCodeService/OpenAIPromptToCodeService.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3385873dc5e198a9898b5849cd60bf898302c1ca3065d6b11d1e711f50bda2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Core/Sources/SuggestionWidget/SharedPanelView.swift:47-59 | Core/Sources/SuggestionWidget/SuggestionPanelView.swift:31-43 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/SuggestionWidget/SharedPanelView.swift:47\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/SharedPanelView.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d2e97f25bfd60ecbc576689564a8287c47339fa040858d5f9da645c9b9d4795"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift:187-199 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotInstallationManager.swift:184-196 \u2014 before extracting anything, compare \u0060Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift\u0060 and \u0060Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotInstallationManager.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift:187\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"39a3c4e470576836c696c7ab554a8371d39bb59112c9a38897d1d9c59e48c40d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201324 lines \u00D7 2): Tool/Sources/CodeiumService/Services/CodeiumService.swift:177-200 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotService.swift:328-349 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/CodeiumService/Services/CodeiumService.swift:177\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/Services/CodeiumService.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"292391ae4edda7a81c5916fee2b1d1e80c45300a89cba0182a65f875c0cc1a06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift:79-91 | Tool/Sources/SharedUIComponents/CodeBlock.swift:75-87 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift:79\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"f04c92e5c3e6d9f223c046d0afd15e866aeae9901fd4698a502f30f535ea9391"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1083-1094 | Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1165-1176 | Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1220-1231 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1083\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1096\u0060 calls \u0060init\u0060 and \u0060Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1178\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift"},"region":{"startLine":1083}}}],"partialFingerprints":{"codehealthFindingId/v1":"efb402c68c8192ae9b3e11d3cb5691b0b138e6baa176870c7f648772d6e478a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 3): Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1097-1107 | Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1177-1188 | Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1232-1243 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1097\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift"},"region":{"startLine":1097}}}],"partialFingerprints":{"codehealthFindingId/v1":"72af1a7837d32419bbb7518f373d6365fc3ee7c5550a215bcf1b424032e9a56b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:604-615 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:421-431 \u2014 before extracting anything, compare \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:604\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:431\u0060 calls \u0060padding\u0060, \u0060sheet\u0060, \u0060CustomHeaderSettingsView\u0060 and \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:615\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e130165f43a85a61a6085dcab6457375e41b1c4436bad5ad2768e7f32de1022"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift:117-128 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelManagement.swift:109-120 \u2014 \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelManagement.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 68 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift:117\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelManagement.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"6939f8b6d6cb8af8a3c0cfb9a09fe013daf68c4525b8818ecd578235b3f3628f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Core/Sources/HostApp/CustomCommandSettings/EditCustomCommandView.swift:283-294 | Core/Sources/HostApp/CustomCommandSettings/EditCustomCommandView.swift:329-340 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/CustomCommandSettings/EditCustomCommandView.swift:283\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/CustomCommandSettings/EditCustomCommandView.swift"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"80a8458dbad78088f9954048687ccdcca4d77f5689d0224029743ec44d9cbc45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Core/Sources/SuggestionWidget/WidgetPositionStrategy.swift:406-417 | Core/Sources/SuggestionWidget/WidgetPositionStrategy.swift:424-435 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/WidgetPositionStrategy.swift"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4ba9703b408c22a42ee8c3d2546eb19e6901bda587c87f973645e96a33fc7c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Core/Sources/UserDefaultsObserver/UserDefaultsObserver.swift:8-19 | Tool/Sources/UserDefaultsObserver/UserDefaultsObserver.swift:8-19 \u2014 before extracting anything, compare \u0060Core/Sources/UserDefaultsObserver/UserDefaultsObserver.swift\u0060 and \u0060Tool/Sources/UserDefaultsObserver/UserDefaultsObserver.swift\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/UserDefaultsObserver/UserDefaultsObserver.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"23ec969b17537a32bf3a77a0184c1d6ffc18cde354bcc3bbd0e4ac968d95692b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): Tool/Sources/ChatContextCollectors/ActiveDocumentChatContextCollector/ActiveDocumentChatContextCollector.swift:90-100 | Tool/Sources/FocusedCodeFinder/ActiveDocumentContext.swift:85-96 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/ChatContextCollectors/ActiveDocumentChatContextCollector/ActiveDocumentChatContextCollector.swift:90\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/ChatContextCollectors/ActiveDocumentChatContextCollector/ActiveDocumentChatContextCollector.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd26b4f5e72a87231cc736c95d702573199072227d85bdf13d7416102fe33ca9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift:264-275 | Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:677-688 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift:264\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift:260\u0060 calls \u0060hasPrefix\u0060, \u0060init\u0060 and \u0060Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:676\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd12deb45246f7b162bb2473ede68533bcc5b91e3796eb739ab3e7b3fd6b5902"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:37-48 | Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift:38-49 \u2014 before extracting anything, compare \u0060Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift\u0060 and \u0060Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4c47fb99c6e86ab40a765034f49b4163ad702575715b9029e4ce91f23983611"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): Tool/Sources/AppActivator/AppActivator.swift:98-108 | Tool/Sources/CodeiumService/Services/CodeiumService.swift:445-454 | Tool/Sources/XcodeInspector/XcodeInspector\u002BTriggerCommand.swift:149-159 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/AppActivator/AppActivator.swift:98\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AppActivator/AppActivator.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"f409ab61aa31257653a1744fddb004cad413a5019bdfbb75ec08bdaec345dbad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Tool/Sources/OpenAIService/APIs/ChatCompletionsAPIDefinition.swift:178-188 | Tool/Sources/OpenAIService/APIs/EmbeddingAPIDefinitions.swift:16-26 | Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift:223-233 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/OpenAIService/APIs/ChatCompletionsAPIDefinition.swift:178\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/ChatCompletionsAPIDefinition.swift"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"d25fc74e41b7e33d597dff0d259c64e922a7c6526eb371d4827af456f2058e72"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift:242-252 | Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:653-663 | Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift:113-123 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift:242\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:665\u0060 calls \u0060unauthorized\u0060 and \u0060Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift:253\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"fec8e3f4deb44a494a2059aa8dd607ca84e3510e76846ab452ca745e1b4b4217"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:778-788 | Tool/Sources/OpenAIService/APIs/OpenAIEmbeddingService.swift:134-143 | Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift:180-190 \u2014 before extracting anything, compare \u0060Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift\u0060 and \u0060Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:778\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":778}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2b72aa36dc04b73761032ac096e1a190ce7d609dff26951e9c8f44ba2e6e3b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift:395-405 | Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift:409-419 | Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift:423-433 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift:395\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9809bfafea29a9e4054af106ec86d3f6b076034baaf50ec7be696de900f745e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:359-369 | Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:512-522 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:359\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:371\u0060 calls \u0060Text\u0060, \u0060Image\u0060 and \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:523\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"553ed4e33ecd04f5fa60a9b98b19fc0b7a62781c6fa21b3449d2e6e6af580a4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/CodeiumView.swift:195-205 | Core/Sources/HostApp/AccountSettings/GitHubCopilotView.swift:329-339 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/AccountSettings/CodeiumView.swift:195\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Core/Sources/HostApp/AccountSettings/GitHubCopilotView.swift:340\u0060 calls \u0060checkStatus\u0060 and \u0060Core/Sources/HostApp/AccountSettings/CodeiumView.swift:206\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/CodeiumView.swift"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f4d3a64087fabb8111f666ef1a7fa6d1f119063800e2122519e43a99502da16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift:203-213 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotInstallationManager.swift:200-210 \u2014 before extracting anything, compare \u0060Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift\u0060 and \u0060Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotInstallationManager.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift:203\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/LanguageServer/CodeiumInstallationManager.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"28603c6f24123abc775cf621fd0775f169b1949849247e3449f17f8b7097702b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Tool/Sources/LangChain/VectorStore/TemporaryUSearch.swift:118-128 | Tool/Sources/LangChain/VectorStore/TemporaryUSearch.swift:136-146 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/LangChain/VectorStore/TemporaryUSearch.swift:118\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/VectorStore/TemporaryUSearch.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"dec2af69dfa71a8dab93b9f457cdd04017c9d1c6b6821f786f68eb1e57e40e95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Tool/Sources/OpenAIService/APIs/OpenAIEmbeddingService.swift:26-36 | Tool/Sources/OpenAIService/APIs/OpenAIEmbeddingService.swift:67-77 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIEmbeddingService.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"362325b6a971f0e9a21eae22cfe772beeeb7e681c5205722a91927302806e27d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): Tool/Sources/OpenAIService/EmbeddingService.swift:13-22 | Tool/Sources/OpenAIService/EmbeddingService.swift:49-58 | Tool/Sources/OpenAIService/EmbeddingService.swift:85-94 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/OpenAIService/EmbeddingService.swift:13\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/EmbeddingService.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ae55864fd8a322da57d96fa9fa8d0be3bf11eff4f2adf8bc67515a2e0032d82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:115-124 | Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:183-192 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:115\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"07a835d8fce9320ac5e6823eb0b3cbf21f67ba21726251026a82216780d9850a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 7): Tool/Sources/FocusedCodeFinder/Swift/SwiftFocusedCodeFinder.swift:76-84 | Tool/Sources/FocusedCodeFinder/Swift/SwiftFocusedCodeFinder.swift:89-97 | Tool/Sources/FocusedCodeFinder/Swift/SwiftFocusedCodeFinder.swift:102-110 | Tool/Sources/FocusedCodeFinder/Swift/SwiftFocusedCodeFinder.swift:115-123 | Tool/Sources/FocusedCodeFinder/Swift/SwiftFocusedCodeFinder.swift:126-132 | Tool/Sources/FocusedCodeFinder/Swift/SwiftFocusedCodeFinder.swift:140-148 | Tool/Sources/FocusedCodeFinder/Swift/SwiftFocusedCodeFinder.swift:153-161 \u2014 all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/FocusedCodeFinder/Swift/SwiftFocusedCodeFinder.swift:126\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/FocusedCodeFinder/Swift/SwiftFocusedCodeFinder.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc599065116a9fae63a34bd1bc31a759f34c13e847a57ce2ded9c27189835db3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:1154-1162 | Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:1188-1196 | Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:1212-1220 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:1154\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":1154}}}],"partialFingerprints":{"codehealthFindingId/v1":"72929fbaada81caf8e750f0f757db2888456516754e4b920ba520a1e046a2637"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift:277-285 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEdit.swift:234-242 \u2014 before extracting anything, compare \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEdit.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift:277\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060state\u0060 to \u0060ChatModelEdit.State\u0060 in one and \u0060EmbeddingModelEdit.State\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdb8c734140e5ad107227ba7159811b30bff21703be303e61504e9787162bca0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Tool/Sources/LangChain/DocumentLoader/WebLoader.swift:150-158 | Tool/Sources/WebScrapper/WebScrapper.swift:143-151 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/DocumentLoader/WebLoader.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ee8a1e1adbf1ac26dcf35fde16d56c0e51f2f9674ab4e7b95ab5a11928f4c6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift:225-233 | Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:636-644 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift:225\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/ClaudeChatCompletionsService.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b134dc4b55f4509980e9f86ccc51c9544bb6239cbbd0ab40d513b057bfd6508"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift:68-76 | Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift:131-139 \u2014 before extracting anything, compare \u0060Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift\u0060 and \u0060Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift:68\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddfd505d3303e8dfff3d1d58b524ebece580600fa803ee51ef621c6c27772eda"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): Tool/Sources/XPCShared/XPCExtensionService.swift:242-249 | Tool/Sources/XPCShared/XPCExtensionService.swift:269-277 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/XPCShared/XPCExtensionService.swift:242\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/XPCShared/XPCExtensionService.swift"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"1af4d3b1dae50022bee9b8ec5b780f5a5b8e1685afc0a7eab5fb92cbbe80a119"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:265-272 | Core/Sources/HostApp/AccountSettings/CodeiumView.swift:248-255 | Core/Sources/HostApp/SharedComponents/EditableText.swift:51-58 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:265\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Core/Sources/HostApp/AccountSettings/CodeiumView.swift:258\u0060 calls \u0060Spacer\u0060 and \u0060Core/Sources/HostApp/SharedComponents/EditableText.swift:60\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"81d4dae4879e384b177d4ed2ddf13820362e9d940182f9dcb0dff948e69be087"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Core/Sources/ChatGPTChatTab/Styles.swift:7-14 | Core/Sources/ChatGPTChatTab/Styles.swift:16-23 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/ChatGPTChatTab/Styles.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbaaefc903011c1d28d576035ab8d57f83f71aa4122b8d6ce26dd107ed8e8144"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Core/Sources/SuggestionWidget/SuggestionPanelContent/CodeBlockSuggestionPanelView.swift:190-197 | Core/Sources/SuggestionWidget/SuggestionPanelContent/CodeBlockSuggestionPanelView.swift:202-209 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/SuggestionPanelContent/CodeBlockSuggestionPanelView.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9da04e1f6c9f7a710de4fc821835491a63718fbb10dfe5508665c49b75ee75a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift:21-28 | Tool/Sources/GitHubCopilotService/Services/GitHubCopilotSuggestionService.swift:21-28 \u2014 before extracting anything, compare \u0060Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift\u0060 and \u0060Tool/Sources/GitHubCopilotService/Services/GitHubCopilotSuggestionService.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift:21\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060serviceLocator\u0060 to \u0060ServiceLocator\u0060 in one and \u0060ServiceLocatorType\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"936aefb5c698de18a9da40e297bd4a222bb81c6e4dfbe8ae2777064e8bc02e92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift:491-498 | Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift:506-512 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ecba27ffc71962e2f582bd80f83de5fd8ab483aff2233ee56339e0a1ab4b956"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): Tool/Sources/GitHubCopilotService/GitHubCopilotExtension.swift:279-285 | Tool/Sources/OpenAIService/APIs/GitHubCopilotChatCompletionsService.swift:101-107 | Tool/Sources/OpenAIService/APIs/GitHubCopilotEmbeddingService.swift:61-67 | Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift:203-209 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/GitHubCopilotExtension.swift"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"40536de3a6dcd31a4ba28269df71f86be1df73a42c7f609c5e141c5b92f1e9c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1157-1163 | Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1212-1218 | Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1269-1275 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift:1157\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/SuggestionPanelContent/PromptToCodePanelView.swift"},"region":{"startLine":1157}}}],"partialFingerprints":{"codehealthFindingId/v1":"b67d795da19094c75dcc71918382b0f0e47d8b0996f9980631596b658e2f07f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotService.swift:189-195 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotService.swift:203-209 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotService.swift:189\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotService.swift"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ba4ab929b9438491ad2369ae7b73b484869d4943a230523aba798ab9a73a2fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Tool/Sources/SharedUIComponents/CustomTextEditor.swift:16-22 | Tool/Sources/SharedUIComponents/CustomTextEditor.swift:65-71 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/SharedUIComponents/CustomTextEditor.swift:16\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/CustomTextEditor.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d5e28051de18fd8b16e15ce089d4bb3cab6d759480c2234ed0a781fe70f0ded"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201315 lines \u00D7 2): Core/Sources/PromptToCodeService/OpenAIPromptToCodeService.swift:274-284 | Core/Sources/PromptToCodeService/OpenAIPromptToCodeService.swift:286-300 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/PromptToCodeService/OpenAIPromptToCodeService.swift"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"7557d31dbda012c8ef88fa3a5a8e0fc234fb4b29ae584e30bb3f444ebe2e753c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Core/Sources/SuggestionWidget/ChatWindowView.swift:154-162 | Core/Sources/SuggestionWidget/PromptToCodePanelGroupView.swift:42-50 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Core/Sources/SuggestionWidget/ChatWindowView.swift:154\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/ChatWindowView.swift"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"50a75fd90a64a19287575dc0d166d067bbd81ab1ea4692793b3574e2ce86355f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20135 lines \u00D7 4): Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:234-238 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:250-254 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:300-302 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:316-320 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:234\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:302\u0060 calls \u0060JSONDecoder\u0060, \u0060decode\u0060, \u0060hash\u0060 and \u0060Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:238\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dffa90e21ca386f0b5e1a86ab2edc2155d35a8efccf01c0d3744e045e14e183"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Core/Sources/ChatService/AllPlugins.swift:47-51 | Core/Sources/LegacyChatPlugin/TerminalChatPlugin.swift:21-25 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060delegate\u0060 to \u0060any LegacyChatPluginDelegate\u0060 in one and \u0060LegacyChatPluginDelegate\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/ChatService/AllPlugins.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"c36250aa56fe69d20c798ff301753961d0527aded23de7635ddfd777f008efbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Tool/Sources/WorkspaceSuggestionService/Workspace\u002BSuggestionService.swift:102-107 | Tool/Sources/WorkspaceSuggestionService/Workspace\u002BSuggestionService.swift:130-135 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/WorkspaceSuggestionService/Workspace\u002BSuggestionService.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"567c73e397238c9045a1bcb7aff2c6913492c129f7c76dfb671463f0dacba037"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift:89-94 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEdit.swift:74-79 \u2014 before extracting anything, compare \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEdit.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d8fb3600be36d4f4319a5e4ff364d7de72777021727e60856c12e7f5b1d4d64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:158-170 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:126-138 \u2014 before extracting anything, compare \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f0795432a5f8afd176acfed449589fd17c9ef4231b645b590ff9169532e3f35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:242-249 | Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift:236-243 \u2014 before extracting anything, compare \u0060Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift\u0060 and \u0060Core/Sources/HostApp/AccountSettings/EmbeddingModelManagement/EmbeddingModelEditView.swift\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbe19aaef3fbb5ee8769e2a10198063eee1409707a83836d84f7ea0246b52d48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): Core/Sources/HostApp/AccountSettings/CodeiumView.swift:101-114 | Core/Sources/HostApp/AccountSettings/CodeiumView.swift:116-129 | Core/Sources/HostApp/AccountSettings/GitHubCopilotView.swift:106-119 | Core/Sources/HostApp/AccountSettings/GitHubCopilotView.swift:121-134 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/CodeiumView.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"377b4e253c87496831ccc0f29d468934dec6dc83e60aa1a81eb7a86769a50449"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Core/Sources/HostApp/AccountSettings/CodeiumView.swift:131-138 | Core/Sources/HostApp/AccountSettings/GitHubCopilotView.swift:136-143 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/CodeiumView.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2fb30b721078333703a6060decd529f57165370c781604237a9b1176f0247c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Core/Sources/UserDefaultsObserver/UserDefaultsObserver.swift:27-34 | Tool/Sources/UserDefaultsObserver/UserDefaultsObserver.swift:27-34 \u2014 before extracting anything, compare \u0060Core/Sources/UserDefaultsObserver/UserDefaultsObserver.swift\u0060 and \u0060Tool/Sources/UserDefaultsObserver/UserDefaultsObserver.swift\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/UserDefaultsObserver/UserDefaultsObserver.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"276888db7bf795445d15c0274135675ab4485a54a68130401dcb2e55fcc5a5e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Tool/Sources/AIModel/ChatModel.swift:12-17 | Tool/Sources/AIModel/EmbeddingModel.swift:12-17 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AIModel/ChatModel.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"e55923ae908c6f964658e577b85dbfa25d4adc1eaa29ffd241922f529badf84e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift:39-45 | Tool/Sources/GitHubCopilotService/Services/GitHubCopilotSuggestionService.swift:40-46 \u2014 before extracting anything, compare \u0060Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift\u0060 and \u0060Tool/Sources/GitHubCopilotService/Services/GitHubCopilotSuggestionService.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060serviceLocator\u0060 to \u0060ServiceLocator\u0060 in one and \u0060ServiceLocatorType\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/Services/CodeiumSuggestionService.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"db5719c71ee4402539efd6b0206336f70039173aace3fdb203ed2439f78f46b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift:799-803 | Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift:214-218 \u2014 before extracting anything, compare \u0060Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift\u0060 and \u0060Tool/Sources/OpenAIService/APIs/OpenAIResponsesRawService.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift"},"region":{"startLine":799}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c3c42a6f254d6e26b93f397a59ef3edfff67a90601abca86ea83934a4d2c871"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift:451-455 | Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift:384-388 \u2014 before extracting anything, compare \u0060Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift\u0060 and \u0060Tool/Sources/SharedUIComponents/AsyncDiffCodeBlock.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/AsyncCodeBlock.swift"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f4817919562713677649569bdf7579a86ca29d755c4337dda3bf2dbab249e67"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Tool/Sources/WebSearchService/SearchServices/AppleDocumentationSearchService.swift:22-26 | Tool/Sources/WebSearchService/SearchServices/HeadlessBrowserSearchService.swift:51-55 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/WebSearchService/SearchServices/AppleDocumentationSearchService.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e3b3f63072b08c29535f8335d7f5240ac2091663e070780711649518c9e0e70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureDisabledLanguageListView.swift:91-100 | Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureEnabledProjectListView.swift:129-138 \u2014 before extracting anything, compare \u0060Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureDisabledLanguageListView.swift\u0060 and \u0060Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureEnabledProjectListView.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/FeatureSettings/Suggestion/SuggestionFeatureDisabledLanguageListView.swift"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1237565bbe23c1452447ac823a3846342c4a61581516dea2db1d3afede8b949"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Core/Sources/SuggestionWidget/WidgetWindowsController.swift:927-935 | OverlayWindow/Sources/OverlayWindow/OverlayPanel.swift:143-151 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/WidgetWindowsController.swift"},"region":{"startLine":927}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a0784fa56ad5c51fbb66ecb914aa71581278a99b9dbd368c86cca48a324f394"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): EditorExtension/GetSuggestionsCommand.swift:9-18 | EditorExtension/NextSuggestionCommand.swift:9-18 | EditorExtension/PreviousSuggestionCommand.swift:9-18 | EditorExtension/PromptToCodeCommand.swift:9-18 | EditorExtension/RealtimeSuggestionCommand.swift:9-18 | EditorExtension/RejectSuggestionCommand.swift:9-18 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 6 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"EditorExtension/GetSuggestionsCommand.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff828f2e233f58f54ff06d1e9a5cff2f4b989f6eb5701076b0ed8aa932215793"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Tool/Sources/CodeiumService/CodeiumExtension.swift:145-151 | Tool/Sources/GitHubCopilotService/GitHubCopilotExtension.swift:140-146 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/CodeiumExtension.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"d94103c16082290e5457dfbae64b7a067aecffab035d0ddc39adc7c7fe32a862"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Tool/Sources/CodeiumService/CodeiumExtension.swift:161-166 | Tool/Sources/GitHubCopilotService/GitHubCopilotExtension.swift:160-165 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/CodeiumService/CodeiumExtension.swift"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebdd8bd3e4e7dd996a96847fb8f48c69f03407b6d5b672bbe9ba0a0fa362944c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Tool/Sources/OpenAIService/Configuration/ChatGPTConfiguration.swift:33-39 | Tool/Sources/OpenAIService/Configuration/EmbeddingConfiguration.swift:29-35 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/Configuration/ChatGPTConfiguration.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f91e15c123d1647ceada785288b9ae7ae9c5f5eac8a464531adc4db5376d737"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:64-68 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:92-96 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e8a77b72bd30fd0a5b9969ae67d41d0baf9d3f9752e4350f3982e842932cf76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:400-404 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:425-429 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:444-448 | Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift:461-465 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"c16005eec5d24dd0b27e3975bd2ab033d4cc3a34f1313ad4d26f0fe428c19073"}},{"ruleId":"D5","level":"warning","message":{"text":"Unstable project ChatGPTChatTab: ChatGPTChatTab has instability 0.86 with 1 dependents."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"a15db44a81cc633df54f05aa5a73f86c85cf65f60e39e4d1fc969162229e59d1"}},{"ruleId":"D5","level":"warning","message":{"text":"Unstable project CodeiumService: CodeiumService has instability 0.89 with 1 dependents."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"9079327210b44e5515cf925f62486e137dfc0deff8ec0be0f4dd988878596fd7"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: AIModel: AIModel: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 4 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"93ed00d10c9ac6c8a45618eb30ac40212916ac3dc953f63cea9df5030e3ef641"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: ActiveApplicationMonitor: ActiveApplicationMonitor: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 7 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"f214da78732a320d8ebeecd44854bf9c77a15057092eb7c96e6172c483113324"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: AsyncPassthroughSubject: AsyncPassthroughSubject: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"e0bd1124ca581d81c2cb141606d5c5890fb1033ed7f5c97089203af18c101229"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: Client: Client: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 3 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"bab6577bc0aee450a07dd575951140ef4c1e750ca4c02dc26ad505e391813bd4"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: CustomAsyncAlgorithms: CustomAsyncAlgorithms: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"805c74932ed666837ef8a28fda40e0b4815c17d2f5ab540f27ac91a7cdadfd4c"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: DebounceFunction: DebounceFunction: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 2 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"2b6e64449050a04641c16d1e507b09bab7854373d05f9dbf5e92639659cf8497"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: FileChangeChecker: FileChangeChecker: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d4f187dd20625d08d0c92eb79505a6fb90b95ccf6b1688bcf73b761f2128dab6"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: JoinJSON: JoinJSON: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"82a54374f0c97f74aa9e0419f9b6da293031da3b493a5e36a5b45fbf17dee30a"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: LaunchAgentManager: LaunchAgentManager: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 2 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"f22864fe2217cefcbbf5351b06b5ce9e6c7e607ae15c8def9b0c5d728f3cdb2a"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: Logger: Logger: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 13 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"fe97daf5d7754486f7b43135f32fe30c7704e8ddc0b0deb90b7c17a8a3c3667a"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: PromptToCodeService: PromptToCodeService: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d32d6ddfef36c71c42c1ac86664fe03065769298f1d0950203e3432d90b1a2ef"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: SuggestionBasic: SuggestionBasic: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 16 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6720ce816d16af9f8ffebbf342dcd229372754187c0abf561dce6546433d6772"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: Toast: Toast: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 4 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"792c65d84b7f5ec20d1b113bea71f1c5f6b6cbc65495e4132e97909a033b1bfb"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: UserDefaultsObserver: UserDefaultsObserver: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 4 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"c6692331a7fcd8100d653d8c69c362e393192d83fc49c2487a1adc7cb7620b22"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: WebScrapper: WebScrapper: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"8915725f4519048d5035da1397f7fcc17d714fab83ff3000f509a1a9a431d0bb"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: HostApp: HostApp: abstractness 0.02, instability 0.00, distance 0.98 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"7b6d39a0662db3e75e55b332c9e6a1cfb6b34d6de2e7a0b65e590a6ca8900cc5"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: Service: Service: abstractness 0.06, instability 0.00, distance 0.94 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"4c4cf262cbaf5c6b4a3ca186fd5322f67b7fe69fd558457e10bcf674473b8b0f"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: AXExtension: AXExtension: abstractness 0.00, instability 0.11, distance 0.89 \u2014 zone of pain \u2014 concrete and depended on by 8 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"17e2e297c6b31dcc791a0a1dcbfb797430931ea78ea371be34bc551675126253"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: AppActivator: AppActivator: abstractness 0.00, instability 0.13, distance 0.88 \u2014 zone of pain \u2014 concrete and depended on by 7 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d34e44e9861e962ae2eca8fbe8caecbcb8e152a308a0727c71e7726fe9e1a355"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: AXNotificationStream: AXNotificationStream: abstractness 0.00, instability 0.20, distance 0.80 \u2014 zone of pain \u2014 concrete and depended on by 8 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"bf532771ee45caa65749fa610aa2f551a439bb0e8e31a24bef13728242d38c6b"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: ChatService: ChatService: abstractness 0.25, instability 0.00, distance 0.75 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"842824390d98c38f99aceb079e071634b693c8fdf5603592452353dd6dcbe0e4"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: String (LCOM4 13): String\u0027s methods fall into 13 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 13 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/ChatBasic/ChatGPTFunction.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"748a8e2976ab2fba5d5b0b299afd610fb2113d14006a6be378a1ad0ebe71a1e6"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: View (LCOM4 12): View\u0027s methods fall into 12 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 12 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/ChatGPTChatTab/Styles.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"df103f1d7a990f010006817bbe1dfb0e72e64c595118a25c2fed0c5f7c2a902b"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: GitHubCopilotService (LCOM4 8): GitHubCopilotService\u0027s methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotService.swift"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"69be4750cf859eb469f538b6654540a07e08c9ffcfa86e32dcbc1ac2f15262ee"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AXUIElement (LCOM4 7): AXUIElement\u0027s methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"b603933771cd24fcc0755a9ab15a07ac62b935b4f9e5d296c2fd548f050f7373"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AppDelegate (LCOM4 7): AppDelegate\u0027s methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CommunicationBridge/main.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"a233eb325811f015de135473ab3309ec2ccdbfb8b0a90ca4951777847f667087"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: UpdaterDelegate (LCOM4 5): UpdaterDelegate\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/UpdateChecker/UpdateChecker.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"207e22dfdb14738e95b51c29dc86b724fda423d650f932541c0ddbab1182e787"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: BuiltinExtensionSuggestionServiceProvider (LCOM4 4): BuiltinExtensionSuggestionServiceProvider\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/BuiltinExtension/BuiltinExtensionSuggestionServiceProvider.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"d420f0235a8724580ddf1529fb0f16a87a5ddeeb69e6ce2a317f57cc8cd3980d"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ChatAgent (LCOM4 4): ChatAgent\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/Agents/ChatAgent.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"c74b790387dd65ff0166f2742a208af40010850d98f96e689d55ecab4fcf2c2b"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AppDelegate (LCOM4 4): AppDelegate\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExtensionService/AppDelegate.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca3089d27a1151fca787e639c0dc5c0bc3b25ab72fbb22edb8d821e0b93e33a6"}},{"ruleId":"D10","level":"error","message":{"text":"No assertions (empty test): test_selecting_a_line_in_freestanding_macro_the_scope_should_be_the_macro: Test method has an empty body \u2014 it asserts nothing and exercises no code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Tests/FocusedCodeFinderTests/SwiftFocusedCodeFinderTests.swift"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"e19f595280878bfeddc34a0bca7bd928985fb000ae9c010167aead3d7236f6eb"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: test_breakLines: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Tests/SuggestionBasicTests/BreakLinePerformanceTests.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f4edfd28a82b9d60ad291a3ed80ba809eefa400686cf55ae7b37c57ba4137bf"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: test_source_editor_cache_get_content_comparison: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Tests/XcodeInspectorTests/SourceEditorCachePerformanceTests.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"0af57794b5af012e85979960770e05dcb97a671a4c5f209818bf7efafe638d0c"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: test_usearch: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Tests/LangChainTests/VectorStoreTests/TemporaryUSearchTests.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7cc3b5d61b7fc94a1c240c62440e132aa34c8c725dc98d4d828e583825d909a"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: test_setting_data: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Tests/LangChainTests/VectorStoreTests/TemporaryUSearchTests.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"40520efc83025490f7954699a616279c6c2724e6979957a0a5623cfaa1942e1d"}},{"ruleId":"D10","level":"error","message":{"text":"Assertions commented out: example: The test body contains commented-out assertion calls and no live one \u2014 it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ChatPlugins/Tests/ChatPluginsTests/ChatPluginsTests.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c253e2db4a083439b39fe97323c48cf2cdbb0c2e2bfb047f6050f4875d44fca"}},{"ruleId":"D10","level":"error","message":{"text":"Assertions commented out: example: The test body contains commented-out assertion calls and no live one \u2014 it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"OverlayWindow/Tests/OverlayWindowTests/WindowTests.swift"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3c07b51e39451aa845d212a71aa05d7d84b3680a946b64cd7a96b59e4622531"}},{"ruleId":"D10","level":"error","message":{"text":"Test project verifies nothing: ChatPluginsTests: No conventional assertion call was detected in 1 of 1 tests in \u0060ChatPluginsTests\u0060 \u2014 the project as a whole, not one method. 1 of them has its assertions commented out, so this suite did verify conventionally and was switched off \u2014 it is not an approval/verifier harness."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ChatPlugins/Tests/ChatPluginsTests/ChatPluginsTests.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"50e5bf67eac97cf773cadb59b41b6c9dc99f3156e538c6d589481b58bfa114df"}},{"ruleId":"D10","level":"error","message":{"text":"Test project verifies nothing: OverlayWindowTests: No conventional assertion call was detected in 1 of 1 tests in \u0060OverlayWindowTests\u0060 \u2014 the project as a whole, not one method. 1 of them has its assertions commented out, so this suite did verify conventionally and was switched off \u2014 it is not an approval/verifier harness."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"OverlayWindow/Tests/OverlayWindowTests/WindowTests.swift"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f89036bbae7d9c7ec1c40c59b0aecef834800dbdb807f17f707dc6f0e6394db"}},{"ruleId":"D12","level":"warning","message":{"text":"Dependency not covered by the committed resolution: keyboardshortcuts: \u0060keyboardshortcuts\u0060 is declared in Core/Package.swift but has no entry in the committed \u0060Package.resolved\u0060 beside it, so its version is resolved rather than pinned. Resolve the package and commit the updated \u0060Package.resolved\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"e2cd45d8f325d092cbf030ebdf61b3b405f8994d9314c1b90a01c48e10f5561c"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: keyboardshortcuts: Dependency \u0060keyboardshortcuts\u0060 is declared in Core/Package.swift against branch \u0060main\u0060 \u2014 the declaration pins no immutable point, so \u0060swift package update\u0060 moves this dependency to whatever that branch holds at the time, which is code nobody reviewed. Pin it to a version requirement (\u0060from:\u0060, \u0060.upToNextMajor(from:)\u0060, \u0060exact:\u0060) or to a \u0060revision:\u0060 commit SHA."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6b089cdb892d4ef30a804874083a0edc48212c15f1b449de08823aef07edec50"}},{"ruleId":"D12","level":"warning","message":{"text":"Dependency not covered by the committed resolution: cgeventoverride: \u0060cgeventoverride\u0060 is declared in Core/Package.swift but has no entry in the committed \u0060Package.resolved\u0060 beside it, so its version is resolved rather than pinned. Resolve the package and commit the updated \u0060Package.resolved\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"41b96349a318aa716884e74682be0ec5acdf6d4fb31a175d803309683e079e0e"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: highlightr: Dependency \u0060highlightr\u0060 is declared in Core/Package.swift against branch \u0060master\u0060 \u2014 the declaration pins no immutable point, so \u0060swift package update\u0060 moves this dependency to whatever that branch holds at the time, which is code nobody reviewed. Pin it to a version requirement (\u0060from:\u0060, \u0060.upToNextMajor(from:)\u0060, \u0060exact:\u0060) or to a \u0060revision:\u0060 commit SHA."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"84333b61a956558e9964f288e03c6271dc98d644f9d251727a6f9d14dc1469df"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: tiktoken: Dependency \u0060tiktoken\u0060 is declared in Tool/Package.swift against branch \u0060main\u0060 \u2014 the declaration pins no immutable point, so \u0060swift package update\u0060 moves this dependency to whatever that branch holds at the time, which is code nobody reviewed. Pin it to a version requirement (\u0060from:\u0060, \u0060.upToNextMajor(from:)\u0060, \u0060exact:\u0060) or to a \u0060revision:\u0060 commit SHA."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"857fec4ac6a5d466b0b6eb1d9ba067cf6667e43ef70b82c81c9aaabc71967d75"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: highlightr: Dependency \u0060highlightr\u0060 is declared in Tool/Package.swift against branch \u0060master\u0060 \u2014 the declaration pins no immutable point, so \u0060swift package update\u0060 moves this dependency to whatever that branch holds at the time, which is code nobody reviewed. Pin it to a version requirement (\u0060from:\u0060, \u0060.upToNextMajor(from:)\u0060, \u0060exact:\u0060) or to a \u0060revision:\u0060 commit SHA."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"aa77725f05029f69f93345de6248154aacef24459a3e90b2d6bb49538470adc2"}},{"ruleId":"D12","level":"warning","message":{"text":"Dependency not covered by the committed resolution: generative-ai-swift: \u0060generative-ai-swift\u0060 is declared in Tool/Package.swift but has no entry in the committed \u0060Package.resolved\u0060 beside it, so its version is resolved rather than pinned. Resolve the package and commit the updated \u0060Package.resolved\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"27e70c4d0fb57bf96a7157ae9b9219942a8b4d9f9aa66628fe836e3d3644d047"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: generative-ai-swift: Dependency \u0060generative-ai-swift\u0060 is declared in Tool/Package.swift against branch \u0060support-setting-base-url\u0060 \u2014 the declaration pins no immutable point, so \u0060swift package update\u0060 moves this dependency to whatever that branch holds at the time, which is code nobody reviewed. Pin it to a version requirement (\u0060from:\u0060, \u0060.upToNextMajor(from:)\u0060, \u0060exact:\u0060) or to a \u0060revision:\u0060 commit SHA."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"a6e4182578a6e47ab3b85828c95d9b2dbe6ad5c104c0aa96a354bb8233db8024"}},{"ruleId":"D12","level":"warning","message":{"text":"Dependency not covered by the committed resolution: copilotforxcodekit: \u0060copilotforxcodekit\u0060 is declared in Tool/Package.swift but has no entry in the committed \u0060Package.resolved\u0060 beside it, so its version is resolved rather than pinned. Resolve the package and commit the updated \u0060Package.resolved\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"1a7ebbc6e13999985bd704e4c709afd8eaa1194dd4abb28bc98c0f7142d502bf"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: copilotforxcodekit: Dependency \u0060copilotforxcodekit\u0060 is declared in Tool/Package.swift against branch \u0060feature/custom-chat-tab\u0060 \u2014 the declaration pins no immutable point, so \u0060swift package update\u0060 moves this dependency to whatever that branch holds at the time, which is code nobody reviewed. Pin it to a version requirement (\u0060from:\u0060, \u0060.upToNextMajor(from:)\u0060, \u0060exact:\u0060) or to a \u0060revision:\u0060 commit SHA."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"e7b64ff09b8dc123b6268a8937de31105e3399b49d8c9dec955bd3694ea2bc5f"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: swifttreesitter: Dependency \u0060swifttreesitter\u0060 is declared in Tool/Package.swift against branch \u0060main\u0060 \u2014 the declaration pins no immutable point, so \u0060swift package update\u0060 moves this dependency to whatever that branch holds at the time, which is code nobody reviewed. Pin it to a version requirement (\u0060from:\u0060, \u0060.upToNextMajor(from:)\u0060, \u0060exact:\u0060) or to a \u0060revision:\u0060 commit SHA."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"50d196b04ad21a9cb56aa1748f18e2e87672d744a04ac97cc5b1547f0568a92d"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: tree-sitter-objc: Dependency \u0060tree-sitter-objc\u0060 is declared in Tool/Package.swift against branch \u0060feature/spm\u0060 \u2014 the declaration pins no immutable point, so \u0060swift package update\u0060 moves this dependency to whatever that branch holds at the time, which is code nobody reviewed. Pin it to a version requirement (\u0060from:\u0060, \u0060.upToNextMajor(from:)\u0060, \u0060exact:\u0060) or to a \u0060revision:\u0060 commit SHA."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"192eca62cf08a869bc3b1206a0521989206a59299b53a4a1e2d4e55d981b7d2d"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: splash: Dependency \u0060splash\u0060 is resolved in Copilot for Xcode.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060master\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"45ef8b387dc6e4782793a200e1bb80eef4a55d5b44525a28fa577f3f8d4278a9"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: tiktoken: Dependency \u0060tiktoken\u0060 is resolved in Copilot for Xcode.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060main\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"f31a277d57c76dc7ca1fcfd9f43f7eeede0da27612051718d493219f9ccd6ec9"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: copilotforxcodekit: Dependency \u0060copilotforxcodekit\u0060 is resolved in Copilot for Xcode.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060feature/custom-chat-tab\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"f80789cc936ab4cc7bcbe831ec3d87914a5754b94a32ac850238e91be35e1278"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: generative-ai-swift: Dependency \u0060generative-ai-swift\u0060 is resolved in Copilot for Xcode.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060support-setting-base-url\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"529b90af9c0fda4b47b6e3a4bd368c35ac71d429432e82639f5ea7cfec8020e3"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: highlightr: Dependency \u0060highlightr\u0060 is resolved in Copilot for Xcode.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060master\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"db90e46915771794912c042cd7dde5fd5f036cb375c74c7bae781a7704d6e26f"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: indexstore-db: Dependency \u0060indexstore-db\u0060 is resolved in Copilot for Xcode.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060release/6.1\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"693b2e3ede6023cdbd978b5f69a01c8994305d95bbdd666b01410c5fa97fe929"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: keyboardshortcuts: Dependency \u0060keyboardshortcuts\u0060 is resolved in Copilot for Xcode.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060main\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"afd1e66336957f565ef8c72e2c54f7329a205b6d0253d6632c70839cca62b123"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: swifttreesitter: Dependency \u0060swifttreesitter\u0060 is resolved in Copilot for Xcode.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060main\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"2c3a6920e4a82161e4745ca627cc2736d7cb6c99e4bb155243dd14aa85f54957"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: tiktoken: Dependency \u0060tiktoken\u0060 is resolved in Copilot for Xcode.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060main\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"bf3f91e47d14bc2b29c8165806d6f9a800f9e931967eb625e3b6a614d3c1d63f"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: tree-sitter-objc: Dependency \u0060tree-sitter-objc\u0060 is resolved in Copilot for Xcode.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060feature/spm\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0e5342dbe4c255493799c4ef694d05629986175bb41428520204992457404e79"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: Update LanguageClient some day. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Package.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"a527dc0de262acfa44f74b2527cef5ad7f3df518b4e5479019e26edd89c7e99b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Tests/FocusedCodeFinderTests/SwiftFocusedCodeFinderTests.swift"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f25eae57f6d35d1df80631162a709a587f3c41d445262a36bfea38ca05952a3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// - todo: Make it not recursive. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc0b2f7e7b3928ed41b6c426a664faa3b2fd7cf8502978d02550d9cc8164ab7b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// - todo: Make it not recursive. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"58b988a393bf6c8d6de5ea8a54f9123a31166361a78568098798012b178bb251"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: What \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Tests/ServiceTests/FilespaceSuggestionInvalidationTests.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"04e00769cecb1a3c886a2cf26d41127077cd06dfc84675ec3f5e9161e986e8bd"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: A more robust way to locate the executable. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/LaunchAgentManager/LaunchAgentManager.swift"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"923f1b10e9549f832c16df7d3c9cde248e59b513bc6c16520e9a642c65efccc2"}},{"ruleId":"D17","level":"warning","message":{"text":"HackComment: // Hack to disable smart quotes and dashes in TextEditor \u2014 a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/SharedComponents/EditableText.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f9e521bb7b50ae0884338e8ccc344ebbb139dc2d365cdf4946344e7ab3433e1"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060. ADRs are expected here because \u0060Copilot for Xcode.xcodeproj/project.pbxproj\u0060 makes this repository a deployable product (line 1)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Copilot for Xcode.xcodeproj/project.pbxproj"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"490375c062e40702a8eeaf55bb81677a9de535ef5f50353f543019ed9abd9322"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060codeiumPortalUrl\u0060 spells \u0060Url\u0060 where 42 names in the project spell it \u0060URL\u0060: 42 of 44 names in project Core~ChatContextCollectors spell the token \u0060URL\u0060 (42 of 44; unit: names in project Core~ChatContextCollectors containing \u0060URL\u0060). Peers: FileChangeChecker.init(fileURL) (Core/Sources/FileChangeChecker/FileChangeChecker.swift:10); State.baseURL (Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift:23); State.isFullURL (Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift:24); State.baseURLSelection (Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift:30); Core~HostApp.BaseURLTextField (Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:152). Rename to \u0060codeiumPortalURL\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/CodeiumView.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ea6421e7467fd541dedc83e9093344448bd7cb93a62366d03d4bcae51b14d06"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060codeiumApiUrl\u0060 spells \u0060Url\u0060 where 42 names in the project spell it \u0060URL\u0060: 42 of 44 names in project Core~ChatContextCollectors spell the token \u0060URL\u0060 (42 of 44; unit: names in project Core~ChatContextCollectors containing \u0060URL\u0060). Peers: FileChangeChecker.init(fileURL) (Core/Sources/FileChangeChecker/FileChangeChecker.swift:10); State.baseURL (Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift:23); State.isFullURL (Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift:24); State.baseURLSelection (Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEdit.swift:30); Core~HostApp.BaseURLTextField (Core/Sources/HostApp/AccountSettings/ChatModelManagement/ChatModelEditView.swift:152). Rename to \u0060codeiumApiURL\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/AccountSettings/CodeiumView.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c25ee76cf76bc499fe21dfef4ddd386968c75cb88dd022c4e47c340732a3bcc"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060codeiumPortalUrl\u0060 spells \u0060Url\u0060 where 151 names in the project spell it \u0060URL\u0060: 151 of 155 names in project Tool~AIModel spell the token \u0060URL\u0060 (151 of 155; unit: names in project Tool~AIModel containing \u0060URL\u0060). Peers: Workspace.isFilespaceExpired(fileURL) (Core/Sources/Service/WorkspaceExtension/Workspace\u002BCleanup.swift:17); Info.baseURL (Tool/Sources/AIModel/ChatModel.swift:109); Info.isFullURL (Tool/Sources/AIModel/ChatModel.swift:111); Info.init(baseURL) (Tool/Sources/AIModel/ChatModel.swift:136); Info.init(isFullURL) (Tool/Sources/AIModel/ChatModel.swift:136). Rename to \u0060codeiumPortalURL\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/Preferences/Keys.swift"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9d4622ab680167890554a5b3c45397de358b82e83a04060e5c87750083bda4e"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060codeiumApiUrl\u0060 spells \u0060Url\u0060 where 151 names in the project spell it \u0060URL\u0060: 151 of 155 names in project Tool~AIModel spell the token \u0060URL\u0060 (151 of 155; unit: names in project Tool~AIModel containing \u0060URL\u0060). Peers: Workspace.isFilespaceExpired(fileURL) (Core/Sources/Service/WorkspaceExtension/Workspace\u002BCleanup.swift:17); Info.baseURL (Tool/Sources/AIModel/ChatModel.swift:109); Info.isFullURL (Tool/Sources/AIModel/ChatModel.swift:111); Info.init(baseURL) (Tool/Sources/AIModel/ChatModel.swift:136); Info.init(isFullURL) (Tool/Sources/AIModel/ChatModel.swift:136). Rename to \u0060codeiumApiURL\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/Preferences/Keys.swift"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"f090cda083fcde06fb7f838c7d5857b992dd08890fb3b2741d52d76fd360ac1a"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060webSearchUrl\u0060 spells \u0060Url\u0060 where 151 names in the project spell it \u0060URL\u0060: 151 of 155 names in project Tool~AIModel spell the token \u0060URL\u0060 (151 of 155; unit: names in project Tool~AIModel containing \u0060URL\u0060). Peers: Workspace.isFilespaceExpired(fileURL) (Core/Sources/Service/WorkspaceExtension/Workspace\u002BCleanup.swift:17); Info.baseURL (Tool/Sources/AIModel/ChatModel.swift:109); Info.isFullURL (Tool/Sources/AIModel/ChatModel.swift:111); Info.init(baseURL) (Tool/Sources/AIModel/ChatModel.swift:136); Info.init(isFullURL) (Tool/Sources/AIModel/ChatModel.swift:136). Rename to \u0060webSearchURL\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/WebSearchService/SearchServices/BingSearchService.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"81ec99861404e458e4f5f62e62ccbc9c1abd5acf132c4cbb3f31e54938af533e"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060displayUrl\u0060 spells \u0060Url\u0060 where 151 names in the project spell it \u0060URL\u0060: 151 of 155 names in project Tool~AIModel spell the token \u0060URL\u0060 (151 of 155; unit: names in project Tool~AIModel containing \u0060URL\u0060). Peers: Workspace.isFilespaceExpired(fileURL) (Core/Sources/Service/WorkspaceExtension/Workspace\u002BCleanup.swift:17); Info.baseURL (Tool/Sources/AIModel/ChatModel.swift:109); Info.isFullURL (Tool/Sources/AIModel/ChatModel.swift:111); Info.init(baseURL) (Tool/Sources/AIModel/ChatModel.swift:136); Info.init(isFullURL) (Tool/Sources/AIModel/ChatModel.swift:136). Rename to \u0060displayURL\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/WebSearchService/SearchServices/BingSearchService.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"8692b5c844cf5e3ca88e3a701862e4a8148d46ab1770614394f449f55bbd1c0e"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: 2 of 5 project(s) overshoot their size bounds, lowering Project Cohesion to 2.0/10. The most over is \u0060Tool\u0060 (29277 LoC, 864 module-visible types across 70 directories). Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d5a94650dc74886a0f1f08eb9fb6775f1fc395279ef7e901c970c9d26f767a72"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"764e7aa53e01931342f42957800430eb8a41956d9475333e8ec7ca958a5bee3d"},"properties":{"commitSha":"32c388ab285e58ae1b8eec733846f00cbc86f579"}},{"ruleId":"D28","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3cdfd7beb31b791ae18dcb425e21eb157c842e7bbcd522cc330573c1a6538db1"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c777c239845dbb5dbc98f2d209b5d93282e2c8d02487ba5845c146a68e703c0c"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling clique: SuggestionCommandHandler.swift, SourceEditorExtension.swift, XPCServiceProtocol.swift: 3 files \u2014 \u0060Core/Sources/Service/SuggestionCommandHandler/SuggestionCommandHandler.swift\u0060, \u0060EditorExtension/SourceEditorExtension.swift\u0060, \u0060Tool/Sources/XPCShared/XPCServiceProtocol.swift\u0060 \u2014 all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique\u0027s coupling clears at once \u2014 you do not need to break each pair individually."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/SuggestionCommandHandler/SuggestionCommandHandler.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"467db7132460bd5fe726e7dd251aacb0dec5002917f7c6aecd20b35d006990cb"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: DebugView.swift \u2194 Keys.swift: \u0060Core/Sources/HostApp/DebugView.swift\u0060 and \u0060Tool/Sources/Preferences/Keys.swift\u0060 change together 70% of the time (14 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are \u00604543fb2b\u0060 Add toggle to prevent automatic launch agent installation; \u0060300f1c01\u0060 Add toggle to use Cloudflare domain name for license check; \u00601ba39c71\u0060 Remove a feature flag \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/HostApp/DebugView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5294359da947660c4f2e2aa35ab3c2ba53ac9082f74c339db57d60bdb0ee2ef"}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: ChatGPTService.swift \u2192 AskChatGPT.swift, OpenAIChat.swift, GoogleAIChatCompletionsService.swift, Models.swift: \u0060Tool/Sources/OpenAIService/ChatGPTService.swift\u0060 changes together with 4 other files \u2014 \u0060Core/Sources/LegacyChatPlugin/AskChatGPT.swift\u0060, \u0060Tool/Sources/LangChain/ChatModel/OpenAIChat.swift\u0060, \u0060Tool/Sources/OpenAIService/APIs/GoogleAIChatCompletionsService.swift\u0060, \u0060Tool/Sources/OpenAIService/Models.swift\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/ChatGPTService.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1c897349671f6e8ddf6fa546523055ccac98ef9c7204a42f65690c1e89e70d5"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: ChatPanel.swift \u2194 Styles.swift: \u0060Core/Sources/ChatGPTChatTab/ChatPanel.swift\u0060 and \u0060Core/Sources/ChatGPTChatTab/Styles.swift\u0060 change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are \u0060cf9181ca\u0060 Improve code highlighting performance in chat; \u00602effc397\u0060 Improve performance of code highlighting in chat; \u0060b8433c19\u0060 Support changing code font of suggestion, chat and prompt to code \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/ChatGPTChatTab/ChatPanel.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"279735ffa735dd81c9496e1279e99df46da9298ed95ab88a9772aa23b64440f1"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: AskChatGPT.swift \u2194 OpenAIPromptToCodeService.swift: \u0060Core/Sources/LegacyChatPlugin/AskChatGPT.swift\u0060 and \u0060Core/Sources/PromptToCodeService/OpenAIPromptToCodeService.swift\u0060 change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are \u0060b29d1aa3\u0060 Fix message count (at that commit the file was still \u0060Core/Sources/ChatPlugin/AskChatGPT.swift\u0060); \u0060d4c9c242\u0060 WIP (at that commit the file was still \u0060Core/Sources/ChatPlugin/AskChatGPT.swift\u0060); \u00602e88f832\u0060 Count functions tokens (at that commit the files were still \u0060Core/Sources/ChatPlugin/AskChatGPT.swift\u0060 and \u0060Core/Sources/PromptToCodeService/OpenAIPromptToCodeAPI.swift\u0060) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/LegacyChatPlugin/AskChatGPT.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"71536e61f9fc76d89a078582ffd1372307f033804fda7a5a391258ac6b4d5700"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: DynamicContextController.swift \u2194 LegacyActiveDocumentChatContextCollector.swift: \u0060Core/Sources/ChatService/DynamicContextController.swift\u0060 and \u0060Tool/Sources/ChatContextCollectors/ActiveDocumentChatContextCollector/LegacyActiveDocumentChatContextCollector.swift\u0060 change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are \u0060956f7129\u0060 Add Scope enum to represent scopes; \u006060f4ff59\u0060 Adjust ChatContext (at that commit the file was still \u0060Core/Sources/ChatContextCollectors/ActiveDocumentChatContextCollector/LegacyActiveDocumentChatContextCollector.swift\u0060); \u006068575c2f\u0060 ChatContextCollector (at that commit the file was still \u0060Core/Sources/ChatContextCollectors/ActiveDocumentChatContextCollector/LegacyActiveDocumentChatContextCollector.swift\u0060) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/ChatService/DynamicContextController.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c18e4e7ec5e96af0fbef837eecec6739905efa20bf773ba335c70163e7e2df0b"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: PresentInWindowSuggestionPresenter.swift \u2194 SuggestionWidgetController.swift: \u0060Core/Sources/Service/SuggestionPresenter/PresentInWindowSuggestionPresenter.swift\u0060 and \u0060Core/Sources/SuggestionWidget/SuggestionWidgetController.swift\u0060 change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are \u00602a36d2e3\u0060 Tweak the behavior of activating the app on chat; \u006011a47625\u0060 Support prompt to code in widget; \u00602166af45\u0060 Isolate chat box and suggestion panel \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/SuggestionPresenter/PresentInWindowSuggestionPresenter.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"32e9f2e330511a6296a15a7678cfc26445b022796e3bee72bc212bef37374f98"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: ChatGPTMemory.swift \u2194 Models.swift: \u0060Tool/Sources/OpenAIService/Memory/ChatGPTMemory.swift\u0060 and \u0060Tool/Sources/OpenAIService/Models.swift\u0060 change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are \u006021d7ae4c\u0060 Put tool call responses into the tool call struct; \u0060a412c23f\u0060 Move tool call responses into its source assistant message; \u006042a8efb1\u0060 Support tool call \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/Memory/ChatGPTMemory.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b50a9801870f31ad8c38b17587fb401cf2525ab7556df1ec9aadf8c6dd311844"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: Widget.swift \u2194 AppActivator.swift: \u0060Core/Sources/SuggestionWidget/FeatureReducers/Widget.swift\u0060 and \u0060Tool/Sources/AppActivator/AppActivator.swift\u0060 change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are \u0060de89a060\u0060 Use new form of XcodeInspector; \u00609bee878a\u0060 Access XcodeInspector thru actor (at that commit the file was still \u0060Core/Sources/SuggestionWidget/FeatureReducers/WidgetFeature.swift\u0060); \u006084fc894d\u0060 Make runningApplication private (at that commit the file was still \u0060Core/Sources/SuggestionWidget/FeatureReducers/WidgetFeature.swift\u0060) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/SuggestionWidget/FeatureReducers/Widget.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"959f5ec06be66213f058e82674dbcf5f0043c96b8121671acbe54115045324ed"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace515990e7ee0f17b5c17e44dd168a5bdecf90804a3a3dd845cf05540978013"},"taxa":[{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"AX9","level":"error","message":{"text":"Query writes persistent state on the read path: ActiveDocumentChatContextCollector.getActiveDocumentContext: \u0060ActiveDocumentChatContextCollector.getActiveDocumentContext\u0060 is a read-named query yet it performs a durable write on the read path (a persist to a store/client). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/ChatContextCollectors/ActiveDocumentChatContextCollector/ActiveDocumentChatContextCollector.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"566ff538bdca49afb12a008c42a1c6b71e4ae466c0bb108c3c71370f521aedf1"}},{"ruleId":"ES2","level":"error","message":{"text":"Mutable domain event: UnTypedEvent: \u0060UnTypedEvent\u0060 conforms to a domain-event contract but carries mutable state (a \u0060class\u0060 event, or a \u0060struct\u0060 event with a mutable \u0060var\u0060). Events are immutable facts \u2014 model them as a \u0060struct\u0060 with \u0060let\u0060 fields so a recorded event can never be rewritten."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/Callback.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bfd878e066d534db27a2ba1bad41a075e1fd5736a4e13c746b19fce86dd38ae"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"M2","level":"note","message":{"text":"No architecture diagram/doc: No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named \u0060architecture\u0060 or \u0060design\u0060 in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape \u2014 no \u0060## Architecture\u0060 heading, no \u0022architecture overview\u0022/\u0022high-level design\u0022 phrasing, no \u0022the architecture is \u2026\u0022 introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document \u2014 not evidence that nobody wrote the shape down."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0c190e7c159d1850ee706c3ac4486e151e8a4fe169de4bf61436b9f399654f06"}},{"ruleId":"P1","level":"warning","message":{"text":"No CI gate on code changes: A workflow is configured, but the repository\u0027s only workflow is \u0060close_inactive_issues.yml\u0060, which neither runs on a code change (no \u0060push\u0060 or \u0060pull_request\u0060 trigger) nor checks the code out \u2014 so nothing here builds or tests a change before it merges. This is automation for the repository\u0027s ISSUES AND HOUSEKEEPING, not a gate on its code: a pull request can land without anything having compiled or run it. The rows about missing build and test steps are deliberately not reported beside this one, because there is no pipeline for them to be missing from \u2014 adding the gate is one action, not three."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"b0ba1c8608b43ed04d2217aa2900d0f6ba895092c5773bfba19a542bfee5943e"}},{"ruleId":"P2","level":"warning","message":{"text":"No structured logging: No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page \u2014 but when a run fails on a user\u0027s machine, neither they nor you have anything to read."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"9f10d71351c6778ebe84e761f82a90d4f9ed6c64f5e01975ede8fda7e4e2ebc5"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add CodeQL\u0027s Swift pack (Swift/Xcode) (or \u0060semgrep --config=auto\u0060, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/XPCShared/XPCService.swift"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"43178770c1111690463cd56524678648fd667c941edc2e0d47e104d638148e88"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/WebSearchService/SearchServices/HeadlessBrowserSearchService.swift"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"e64da5f8ba2eb07d63297d80b847176fd862e7a8acd1bab3bb541a5822a38626"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/SharedUIComponents/SyntaxHighlighting.swift"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"597f6443355cc536ae515e29bd4b623640d8a3c4b7986ad8dbe278aac9e8a3f3"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/VectorStore/TemporaryUSearch.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a88370e2bd533441b48f94b71516a98c9f5a5ed20b762ae7223cf7f87140df3"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/VectorStore/TemporaryUSearch.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"8203b45579a8fc5f410e871d2db5ba716724f6688d8024c52ea89eb96cd7e0f6"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/Chains/RelevantInformationExtractionChain.swift"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"5018a16f2036747a9a3104dfa1e75317ea7c6a580a5c21a8c72b2b44bb5aa03f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/Chains/RelevantInformationExtractionChain.swift"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"b897bbba6e41dbeda337ecb30d4ab0f986f715d4f7c4a9b5ca2d7e037cc3054f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/LangChain/Chains/StructuredOutputChatModelChain.swift"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"558fdd15776ffa664a28313aa797b499568b95f2ca673c040316a975e39cf72c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitIgnoreCheck/GitIgnoreCheck.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"66934394a305dd935abcba49491bea294d5df0fee14c893de995a7901297c678"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitIgnoreCheck/GitIgnoreCheck.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf12a6826472f7510183bc3340c8002c2f9af4f7db5692807311e4689271d9ce"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/Services/GitHubCopilotChatService.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2e13d7cc311486b47238ca69cc3ccadfe8bfc5c1f29cf9c05bed091d42ec2ba"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitHubCopilotService/Services/GitHubCopilotChatService.swift"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"c736f7f3b130e8f2e3775a4c040787379b74d2840f4a9d947425c6a0bc7f2878"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/FileSystem/FileSystem.swift"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2f0b0dfc7b42d9168e85d43462ec3185bd28e93b5c7d279601ab9d229859dad"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/FileSystem/FileSystem.swift"},"region":{"startLine":884}}}],"partialFingerprints":{"codehealthFindingId/v1":"2591cbaa39ff728a23590f3e0b54e1fce431338d1067102009a6a94d85c8acba"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/FileSystem/FileSystem.swift"},"region":{"startLine":897}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a9ff30fa3e46211e21df8af7fb6249c29ec09816ffeb7aa9934741298ec6150"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/FileSystem/FileSystem.swift"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"e553bb4fa4198134015323bcc8a6ccdc514c8165ea7c62aa8dbbfd2338b0cb83"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/ChatContextCollector/ChatContextCollector.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e8c6a275ed3d09d58cf1980b2715989488d954dcca1729d25efd882bb0ad813"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/XcodeThemeController/XcodeThemeController.swift"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"206482dc88bea9bb85bd130cdc10351bc6a751d834995426ca0ab6c43bbdf426"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/Service/RealtimeSuggestionController.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f3d4a510eedb5b823aff00118c15c569d259eb279e0550e2a166ebae977cf35"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Core/Sources/ChatService/ChatService.swift"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"a854629cc663381a16a5df95523b68940a1c6715fa6118274fbf84c0d2ceda70"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060identifier\u0060 turns every thrown error into \u0060\u0022\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc014360e0caaf9bc88fa2fe86f3bc1095f2bf9d5d3bf4c01fe670173ba98801"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060value\u0060 turns every thrown error into \u0060\u0022\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"13955440db33a7659b955fe76346fb1d60ad4ff14ec93e61eaee08fb3d111c8b"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060title\u0060 turns every thrown error into \u0060\u0022\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a758a898546abf3ca8584ea20028df156f901c29697ef5cff7fe2a8b297abaf"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060role\u0060 turns every thrown error into \u0060\u0022\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a6fa67a2a0839f740d7245638f978cfd567c6dbf7a4fcc2860a299734613a13"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060doubleValue\u0060 turns every thrown error into \u00600.0\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4d1adac6af3b60d629ec3a7a2b6ee6ba883a381452c53a9618d7834921494ff"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060description\u0060 turns every thrown error into \u0060\u0022\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"02eaad11d7836d6d36f7c6dd1cb817623189f8b928ca84f080a691f61e9656b2"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060roleDescription\u0060 turns every thrown error into \u0060\u0022\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"97052be1d79fd4128f6818fbbb726550062abb962904fff7379a30c8daab55fe"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060label\u0060 turns every thrown error into \u0060\u0022\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"84b897915fae519f093f4c8ef9bc65e1be0f9a999a1fda8ceb13dfe10bff9040"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060sharedFocusElements\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"5857970a43aeb7fa7b69b3d665cd7bf1900bee325840f4fee91c48ee244eeae5"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060windows\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d662ecdc45e085762d4bd8ba9920306cfcf91b39836c4657e6e1912aed5b043"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060rows\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6fd57d58b02fd3e423e0f0e12a798f7b0e82f9e9de8afbf0a03a08dafef21fd"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060children\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"dae4f8a9dcdefdda778c85160ce0f1ea1bdb724d9570161ec913f59195edac84"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060visibleChildren\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/AXExtension/AXUIElement.swift"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"c23c95ccbe627af4eb55085ae14a03fb7bce9fd8a19d38444e004876ee615ea9"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060parseScopes\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/ChatContextCollector/ChatContextCollector.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e58f2e27215f6b15f3ebf72831d55ce729e87ea583de7c6c60ebca6d22301db"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060checkIfGitIgnored\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/GitIgnoreCheck/GitIgnoreCheck.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"06bb0ed0de7c52860a7bca182585f21d1dcee231efcabb5f391a3a4c1cfa0818"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060apiKey\u0060 turns every thrown error into \u0060\u0022\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tool/Sources/OpenAIService/Configuration/ChatGPTConfiguration.swift"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"38b1a732fdb66ce05bf873f803aafe21fae363d4d24f585ae7cf1dc392ca5d41"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-3","guid":"458c83a6-ebf7-cf55-8cc3-b4d949bbf271","name":"Dependency Chain Abuse","shortDescription":{"text":"Dependency Chain Abuse"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-03-Dependency-Chain-Abuse"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":4,"secretScannerRunsExcluded":0}},"redactionTokens":["A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."]}]}