{"$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":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D9","name":"Test Distribution","shortDescription":{"text":"Test Distribution"},"helpUri":"https://codehealth.canine.dev/dimensions/D9"},{"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":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"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":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"AXB1","name":"Runtime evidence locked \u2014 no reproducible boot","shortDescription":{"text":"Runtime evidence locked \u2014 no reproducible boot"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB1"},{"id":"C2","name":"Access Controls","shortDescription":{"text":"Access Controls"},"helpUri":"https://codehealth.canine.dev/dimensions/C2"},{"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":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P5","name":"DR \u0026 Backup","shortDescription":{"text":"DR \u0026 Backup"},"helpUri":"https://codehealth.canine.dev/dimensions/P5"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"P7","name":"Outbound HTTP resilience","shortDescription":{"text":"Outbound HTTP resilience"},"helpUri":"https://codehealth.canine.dev/dimensions/P7"},{"id":"PF1","name":"Benchmark discipline","shortDescription":{"text":"Benchmark discipline"},"helpUri":"https://codehealth.canine.dev/dimensions/PF1"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"S1","name":"Web-Security Posture","shortDescription":{"text":"Web-Security Posture"},"helpUri":"https://codehealth.canine.dev/dimensions/S1"},{"id":"X1","name":"Async correctness","shortDescription":{"text":"Async correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X12","name":"Unreachable branch","shortDescription":{"text":"Unreachable branch"},"helpUri":"https://codehealth.canine.dev/dimensions/X12"},{"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":"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":"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":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"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":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"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":"cc_switch::cli::tui::runtime_actions::handle_action (cyclomatic 164): cc_switch::cli::tui::runtime_actions::handle_action has cyclomatic complexity 164 (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":"src-tauri/src/cli/tui/runtime_actions/mod.rs"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d3de60753dcfa190f2077dba2ffb2ce2eb2b5763fd2bc0453261ddc525b2e6e"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::ui::forms::provider::provider_field_label_and_value (cyclomatic 120): cc_switch::cli::tui::ui::forms::provider::provider_field_label_and_value has cyclomatic complexity 120 (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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":1916}}}],"partialFingerprints":{"codehealthFindingId/v1":"640a98983765e94d7f5dd58c6fc4b164fe92949d0617184c6c66d8158513e71e"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::run (cyclomatic 110): cc_switch::cli::tui::run has cyclomatic complexity 110 (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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":3051}}}],"partialFingerprints":{"codehealthFindingId/v1":"4578aa1e068a77c280ea57e7058d94de2690b1ed71f696dcb615dea02bd84462"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_provider_field_activate (cyclomatic 94): App::handle_provider_field_activate has cyclomatic complexity 94 (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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"d917859f5fd886cbbcc1fd1afbe67a25bc9c8284404bef932a2ef4a187c41299"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::handlers::handle_session_msg (cyclomatic 87): cc_switch::cli::tui::runtime_systems::handlers::handle_session_msg has cyclomatic complexity 87 (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":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"300f73dd04692c9723c92c60fd9be6e424788b8d9dde0f1232488f299c2bef1a"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::streaming_responses::create_anthropic_sse_stream_from_responses (cyclomatic 84): cc_switch::proxy::providers::streaming_responses::create_anthropic_sse_stream_from_responses has cyclomatic complexity 84 (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":"src-tauri/src/proxy/providers/streaming_responses.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"0690a09d45cbce5d0e60f4178c9854a239f4a91c4e637f9bac98aded6d391034"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderAddFormState::to_provider_json_value (cyclomatic 81): ProviderAddFormState::to_provider_json_value has cyclomatic complexity 81 (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":"src-tauri/src/cli/tui/form/provider_json.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"58104e74319f281a6bcd2e8be2124493b35aedff74b1b0e49a852bd90bfaeebc"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_confirm_overlay_key (cyclomatic 70): App::handle_confirm_overlay_key has cyclomatic complexity 70 (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":"src-tauri/src/cli/tui/app/overlay_handlers/dialogs.rs"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fd5fb55250c5029b6ab8ca37bdfe7751f13f05a68d0ab45f691449868aba76d"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::help::current_help_target (cyclomatic 62): cc_switch::cli::tui::help::current_help_target has cyclomatic complexity 62 (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":"src-tauri/src/cli/tui/help.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"720dcc7c59b8f959ef19bd2a709abc1f1d1d6e07912381d2bff415ace94a1951"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::streaming::create_anthropic_sse_stream (cyclomatic 60): cc_switch::proxy::providers::streaming::create_anthropic_sse_stream has cyclomatic complexity 60 (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":"src-tauri/src/proxy/providers/streaming.rs"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"83fd335e546b4ad1e6c866c6e27ca525b33ed8564880cf0eb59c684bf35b6e2a"}},{"ruleId":"D1","level":"warning","message":{"text":"App::on_sessions_key (cyclomatic 57): App::on_sessions_key has cyclomatic complexity 57 (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":"src-tauri/src/cli/tui/app/content_entities.rs"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce2bfa07e9b11ac9d1ef10f04c0dbe636a56a2682c3f7743565ace6ca432217f"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::mcp::import_from_codex (cyclomatic 52): cc_switch::mcp::import_from_codex has cyclomatic complexity 52 (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":"src-tauri/src/mcp.rs"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"a82b87eafb4599dd9d2e2873de686f04f16e57d21c80ef8636d9860eb2ab9736"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::session_manager::transcript::scan_named_json_array (cyclomatic 52): cc_switch::session_manager::transcript::scan_named_json_array has cyclomatic complexity 52 (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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":2436}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fd169b0da457134e644d90238223cf3da2e5ba0b10b9f4b67a5e8b7b077f3dc"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_form_tab_key (cyclomatic 51): App::handle_form_tab_key has cyclomatic complexity 51 (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":"src-tauri/src/cli/tui/app/form_handlers/tab.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b02143e13a2fe7c7c26f20bae7f214fb3b665b2fb8b3a13e7cfbea8057c48f1"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::daemon::migration::quiesce_for_database_migration (cyclomatic 51): cc_switch::daemon::migration::quiesce_for_database_migration has cyclomatic complexity 51 (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":"src-tauri/src/daemon/migration.rs"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"d90f4727af7b912cda52c5b9392091db2e7cf3edd15e84555050f410238a6102"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderAddFormState::update_provider_meta (cyclomatic 49): ProviderAddFormState::update_provider_meta has cyclomatic complexity 49 (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":"src-tauri/src/cli/tui/form/provider_json.rs"},"region":{"startLine":844}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd62a9b19740e95f7915fa1045546dc844b7b5c2ae806d0aa0d80b7885078a26"}},{"ruleId":"D1","level":"warning","message":{"text":"SkillService::migrate_storage (cyclomatic 48): SkillService::migrate_storage has cyclomatic complexity 48 (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":"src-tauri/src/services/skill.rs"},"region":{"startLine":2025}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfb4a1b106315844a37067dd4061997fa826f3fb20e7dd9f6cfa70c73ecbcf4a"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::commands::provider_input::display_provider_summary (cyclomatic 45): cc_switch::cli::commands::provider_input::display_provider_summary has cyclomatic complexity 45 (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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":4509}}}],"partialFingerprints":{"codehealthFindingId/v1":"427d27f6431a61977a9f12f3409e711bab0e7670e3d88d5eaf4c8b7770a682a5"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::forwarder::request_builder::build_request (cyclomatic 44): cc_switch::proxy::forwarder::request_builder::build_request has cyclomatic complexity 44 (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":"src-tauri/src/proxy/forwarder/request_builder.rs"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"63744670093ab8c4688a8a003a68695537f7c0c557d5f98fc97c1c124f150e1f"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::services::session_usage_codex::sync_single_codex_file (cyclomatic 44): cc_switch::services::session_usage_codex::sync_single_codex_file has cyclomatic complexity 44 (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":"src-tauri/src/services/session_usage_codex.rs"},"region":{"startLine":1530}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5bc23ec9bfdf747546c0865d7a34d883aad920d24da18520b55b4d59af5e454"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_text_input_submit (cyclomatic 43): App::handle_text_input_submit has cyclomatic complexity 43 (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":"src-tauri/src/cli/tui/app/overlay_handlers/dialogs.rs"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0ef55dd0487f5f4c06362ff01303ccfc0e93e97681e0cd9bce1ee4183cefa90"}},{"ruleId":"D1","level":"warning","message":{"text":"RequestForwarder::prepare_request_with_client (cyclomatic 43): RequestForwarder::prepare_request_with_client has cyclomatic complexity 43 (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":"src-tauri/src/proxy/forwarder/request_builder.rs"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"0592962fd1e008a826c118f79b4d4516306ecfd2e23f55588d5aa80c1d20fa06"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_anthropic::responses_request_to_anthropic (cyclomatic 43): cc_switch::proxy::providers::transform_codex_anthropic::responses_request_to_anthropic has cyclomatic complexity 43 (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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"09a31313886535177616006b8981457dd6317b74165636ce5381ccc4d74f317a"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::handlers::handle_webdav_msg (cyclomatic 41): cc_switch::cli::tui::runtime_systems::handlers::handle_webdav_msg has cyclomatic complexity 41 (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":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":1513}}}],"partialFingerprints":{"codehealthFindingId/v1":"933d9a85c39998143b5202622503aa505a1c14c832d71cdf2ff402444f8f4ab8"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::handle_usage_pricing_msg (cyclomatic 40): cc_switch::cli::tui::handle_usage_pricing_msg has cyclomatic complexity 40 (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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":1237}}}],"partialFingerprints":{"codehealthFindingId/v1":"66f523ed67bd43dcee6535121257984fff86106b95c63829ecb6a3dc29840459"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_anthropic::anthropic_sse_to_message_value (cyclomatic 39): cc_switch::proxy::providers::transform_codex_anthropic::anthropic_sse_to_message_value has cyclomatic complexity 39 (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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":1385}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f37ad192155e5599c2bb1670f3120958405488d235b5b33908237f3dac3806f"}},{"ruleId":"D1","level":"warning","message":{"text":"App::on_key_after_clamp (cyclomatic 38): App::on_key_after_clamp has cyclomatic complexity 38 (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":"src-tauri/src/cli/tui/app/menu.rs"},"region":{"startLine":738}}}],"partialFingerprints":{"codehealthFindingId/v1":"946042ca0981671f80a17305afb9b875d0fa2279e5cc7ced055986570b229bb1"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::streaming_gemini::create_anthropic_sse_stream_from_gemini (cyclomatic 37): cc_switch::proxy::providers::streaming_gemini::create_anthropic_sse_stream_from_gemini has cyclomatic complexity 37 (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":"src-tauri/src/proxy/providers/streaming_gemini.rs"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5cdd6b4cdba5137e772c3a326222d3af9110385eb0029b0726d74fc92d13573"}},{"ruleId":"D1","level":"warning","message":{"text":"App::on_providers_key (cyclomatic 36): App::on_providers_key has cyclomatic complexity 36 (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":"src-tauri/src/cli/tui/app/content_entities.rs"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"e18c4c2419638558cd5ace43f6cc3062417dbf5990bd3a5cdb0c93413cfbd0a2"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderService::refresh_provider_snapshot (cyclomatic 36): ProviderService::refresh_provider_snapshot has cyclomatic complexity 36 (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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":1358}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f97a407b727aa02acbb273f825c9fcbce033cd6641a8aa4169699911bf6a026"}},{"ruleId":"D1","level":"warning","message":{"text":"benchmark_cc_switch.benchmark_cli (cyclomatic 36): benchmark_cc_switch.benchmark_cli has cyclomatic complexity 36 (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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":1458}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2636aa5907e9ef1899111dbdcd524bfad3f5ea5c15f355358c4f66250d8c81b"}},{"ruleId":"D1","level":"warning","message":{"text":"App::on_settings_key (cyclomatic 33): App::on_settings_key has cyclomatic complexity 33 (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":"src-tauri/src/cli/tui/app/content_config.rs"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"157b7cb93229f36fda57aa0d8fec77d61587df7661af049fb284e32ea161176f"}},{"ruleId":"D1","level":"warning","message":{"text":"Database::apply_schema_migrations_on_conn (cyclomatic 33): Database::apply_schema_migrations_on_conn has cyclomatic complexity 33 (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":"src-tauri/src/database/schema.rs"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf7e913d17a3c0220abd44114164ec59cb7cddd703e51148d2e1b8abc4baeeac"}},{"ruleId":"D1","level":"warning","message":{"text":"App::build_provider_form_save_action (cyclomatic 32): App::build_provider_form_save_action has cyclomatic complexity 32 (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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"af282950676fb34051cecc6103b3ed4576c8d2d15965bd77fbc0f0876861b6b2"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform::openai_to_anthropic (cyclomatic 32): cc_switch::proxy::providers::transform::openai_to_anthropic has cyclomatic complexity 32 (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":"src-tauri/src/proxy/providers/transform.rs"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a45aacd5bb2715f7462ef727b2918f446e174853f3d01de08bf803540a577f0"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::services::session_usage::sync_single_file (cyclomatic 32): cc_switch::services::session_usage::sync_single_file has cyclomatic complexity 32 (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":"src-tauri/src/services/session_usage.rs"},"region":{"startLine":859}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b5b40656eab2a68e365822b7482078e1a5eb287c001f3fa132dde701663387e"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::ui::render_content (cyclomatic 31): cc_switch::cli::tui::ui::render_content has cyclomatic complexity 31 (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":"src-tauri/src/cli/tui/ui.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"a99edab8f5e2d12c1e464e408b153516b704dbc196633ad4660beb10fa990417"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::session_manager::providers::utils::build_snippet_cancellable (cyclomatic 31): cc_switch::session_manager::providers::utils::build_snippet_cancellable has cyclomatic complexity 31 (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":"src-tauri/src/session_manager/providers/utils.rs"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0eca265c6963575c4669114eaab870c65e3cf4c2cf2cd4135e75345ba3bafc7"}},{"ruleId":"D1","level":"warning","message":{"text":"TuiScreen._handle_csi (cyclomatic 31): TuiScreen._handle_csi has cyclomatic complexity 31 (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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":1075}}}],"partialFingerprints":{"codehealthFindingId/v1":"5776671b0cb59df73003c1823121d845cb4ec8c60592abb953e3ece4e1bc5921"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::ui::forms::mcp::mcp_field_label_and_value (cyclomatic 30): cc_switch::cli::tui::ui::forms::mcp::mcp_field_label_and_value 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"fac6a631d88ca6a2ee65da3e0be1c388e42adfe7b787e81c0944f3e9558071b8"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_anthropic::convert_input_to_messages (cyclomatic 30): cc_switch::proxy::providers::transform_codex_anthropic::convert_input_to_messages 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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":505}}}],"partialFingerprints":{"codehealthFindingId/v1":"6979e32b76f5f9e379652b8a9766ecf2afe0d5a26b837a68c951e431c6a66bdc"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderService::delete (cyclomatic 29): ProviderService::delete has cyclomatic complexity 29 (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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":3973}}}],"partialFingerprints":{"codehealthFindingId/v1":"3294d95a3d35e33cadc6a786b9b25c03628130f13c20218d3162d98b18ba3aa8"}},{"ruleId":"D1","level":"warning","message":{"text":"SkillService::migrate_ssot_if_pending (cyclomatic 29): SkillService::migrate_ssot_if_pending has cyclomatic complexity 29 (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":"src-tauri/src/services/skill.rs"},"region":{"startLine":893}}}],"partialFingerprints":{"codehealthFindingId/v1":"75211a5240305fe9a989ce51a18e169a9965acd89a3497dc90d62691df732eb7"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::session_manager::cache::process_stream_batch (cyclomatic 29): cc_switch::session_manager::cache::process_stream_batch has cyclomatic complexity 29 (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":"src-tauri/src/session_manager/cache.rs"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"47afa5367a892917c79a0aef2a9af1402407a3767b20c13cc206f441929f87da"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::session_manager::providers::codex::parse_session_lines (cyclomatic 29): cc_switch::session_manager::providers::codex::parse_session_lines has cyclomatic complexity 29 (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":"src-tauri/src/session_manager/providers/codex.rs"},"region":{"startLine":866}}}],"partialFingerprints":{"codehealthFindingId/v1":"5383cf7bec96071b4ead64fb4961251670dac6580df890a9f36e99d38bd2950e"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_claude_model_picker_select_key (cyclomatic 28): App::handle_claude_model_picker_select_key has cyclomatic complexity 28 (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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":982}}}],"partialFingerprints":{"codehealthFindingId/v1":"24b5ea878406a6aa9357ac735b615b64e616b2c32ef01d7c4e23905608f83ee7"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderAddFormState::apply_sponsor_preset (cyclomatic 28): ProviderAddFormState::apply_sponsor_preset has cyclomatic complexity 28 (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":"src-tauri/src/cli/tui/form/provider_templates.rs"},"region":{"startLine":739}}}],"partialFingerprints":{"codehealthFindingId/v1":"105189d6f42d124f0300a7bbf841cae3fa610d363105fbe6106736bfd033ad85"}},{"ruleId":"D1","level":"warning","message":{"text":"ProxyService::sync_live_config_to_current_provider (cyclomatic 28): ProxyService::sync_live_config_to_current_provider has cyclomatic complexity 28 (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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":3053}}}],"partialFingerprints":{"codehealthFindingId/v1":"a880b90bbc674b95ff25dfdf1ba46482dc8960622f22377db13da65ff8d8d527"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::data::load_providers_with_mode (cyclomatic 28): cc_switch::cli::tui::data::load_providers_with_mode has cyclomatic complexity 28 (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":"src-tauri/src/cli/tui/data.rs"},"region":{"startLine":1482}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7cdd03ffd9f6a1252363a3d36a71c12e38025fc9193cbfda8b12bf275973756"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_model_fetch_picker_key (cyclomatic 27): App::handle_model_fetch_picker_key has cyclomatic complexity 27 (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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":1119}}}],"partialFingerprints":{"codehealthFindingId/v1":"e47a1768fe69b3497b7470176ded7748a3c176243cb2b258f2a8c1858af69a73"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform::convert_message_to_openai (cyclomatic 27): cc_switch::proxy::providers::transform::convert_message_to_openai has cyclomatic complexity 27 (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":"src-tauri/src/proxy/providers/transform.rs"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"61a32982912f6bc2a7eb93dd3bfb258d3c7ed3f47bea015eafe439de45c5c701"}},{"ruleId":"D1","level":"warning","message":{"text":"App::commit_active_text_edit (cyclomatic 26): App::commit_active_text_edit has cyclomatic complexity 26 (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":"src-tauri/src/cli/tui/app/form_handlers/mod.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"2209ede3be65668323c4f5ccdddea673115f78c7acfbfcdd9ee396f13de426da"}},{"ruleId":"D1","level":"warning","message":{"text":"RequestForwarder::send_buffered_request (cyclomatic 26): RequestForwarder::send_buffered_request has cyclomatic complexity 26 (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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":903}}}],"partialFingerprints":{"codehealthFindingId/v1":"640b970cf7c55b84e2489b050f4112fa80e4c768369079a3a53fa7e19135f80b"}},{"ruleId":"D1","level":"warning","message":{"text":"TokenUsage::from_claude_stream_events (cyclomatic 26): TokenUsage::from_claude_stream_events has cyclomatic complexity 26 (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":"src-tauri/src/proxy/usage/parser.rs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbfd39a2ede887262953e34f8dd89e75bfaa197552c473dfb68ef99d86eea0b3"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::workers::handle_session_req (cyclomatic 26): cc_switch::cli::tui::runtime_systems::workers::handle_session_req has cyclomatic complexity 26 (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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":1524}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ea85aee65611122781994bd8dcb09381b5701681f86cd93c656308f7d41bb4e"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_mcp_key_value_entry_editor_key (cyclomatic 25): App::handle_mcp_key_value_entry_editor_key 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":"src-tauri/src/cli/tui/app/overlay_handlers/mcp_key_value.rs"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"4acdb725bd65945f0b4119c3f23c1fdbd9f3c1df75b1d340d29580d3f10c7a86"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_picker_overlay_key (cyclomatic 25): App::handle_picker_overlay_key has cyclomatic complexity 25 (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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c9c6983e639a7088e3f26112e21000da8690005e3d8095a9556db21ec27751b"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderService::apply_prepared_post_commit_action (cyclomatic 25): ProviderService::apply_prepared_post_commit_action has cyclomatic complexity 25 (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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":1188}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b25046d2c222a975148f8694d32a502e95f84a12bb78d5486898dc2b4173682"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::ui::config::render_settings (cyclomatic 25): cc_switch::cli::tui::ui::config::render_settings 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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":3426}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9df0a35c1c368a9054326d2cea4427bfe545b8c3ea6d0892c90b1626a9adb5a"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::handlers::handle_passthrough_request (cyclomatic 25): cc_switch::proxy::handlers::handle_passthrough_request has cyclomatic complexity 25 (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":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b5b8146a6cb1c478cadaa74bd7be9b5c6f09dccbe661692befbaf2621c852d9"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::session_manager::providers::claude::parse_session_lines (cyclomatic 25): cc_switch::session_manager::providers::claude::parse_session_lines has cyclomatic complexity 25 (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":"src-tauri/src/session_manager/providers/claude.rs"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9b14ad25a0b9df87bcf03ba58ac9ba273fc96ea05057e96fde950a5f1a0e7f6"}},{"ruleId":"D1","level":"warning","message":{"text":"benchmark_cc_switch.benchmark_tui (cyclomatic 25): benchmark_cc_switch.benchmark_tui has cyclomatic complexity 25 (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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":1751}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0e0378f7a189a38391261167f6c9dc950ee92b75c83621643cd73e86d4aa424"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_session_project_picker_key (cyclomatic 24): App::handle_session_project_picker_key has cyclomatic complexity 24 (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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":1256}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b688e74ff055510649c0714a4caab2dfdf239f0d6713b1297311572f9398546"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexConfigPatch::write_route (cyclomatic 24): CodexConfigPatch::write_route has cyclomatic complexity 24 (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":"src-tauri/src/live/project/codex.rs"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"067b2980a80939dcf23af15a9fa58df5f89032516af143c87be7f813f95464d7"}},{"ruleId":"D1","level":"warning","message":{"text":"RequestForwarder::forward_response_detailed (cyclomatic 24): RequestForwarder::forward_response_detailed has cyclomatic complexity 24 (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 shape REPEATS in the file: one other method here (RequestForwarder::forward_buffered_response_detailed) 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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"e12089f8f9d2701b70c9079a622c026fe9e647d704d0b994b42969d36ff40b68"}},{"ruleId":"D1","level":"warning","message":{"text":"RequestForwarder::forward_buffered_response_detailed (cyclomatic 24): RequestForwarder::forward_buffered_response_detailed has cyclomatic complexity 24 (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 shape REPEATS in the file: one other method here (RequestForwarder::forward_response_detailed) 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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b5c2273e2b5db0e8471b2553d39ef16aa5c62582e91345b96848f7077aa295e"}},{"ruleId":"D1","level":"warning","message":{"text":"RequestForwarder::send_streaming_request (cyclomatic 24): RequestForwarder::send_streaming_request has cyclomatic complexity 24 (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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f450d670050945a1ec76335aa15625616c059b357e8638abdae0ef4742e6f1e"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::handlers::handle_skills_msg (cyclomatic 24): cc_switch::cli::tui::runtime_systems::handlers::handle_skills_msg has cyclomatic complexity 24 (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":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":1278}}}],"partialFingerprints":{"codehealthFindingId/v1":"8665626ffaee2d272f02da477778691229c3de9fdaea6205122e519a7a56bf61"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::cache_injector::inject (cyclomatic 24): cc_switch::proxy::cache_injector::inject has cyclomatic complexity 24 (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":"src-tauri/src/proxy/cache_injector.rs"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"04a6d017e91e049491260e9b5c39e45106c7b8152109f9f3419765a2e4e99a7f"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::streaming_codex_anthropic::create_responses_sse_stream_from_anthropic_with_context (cyclomatic 24): cc_switch::proxy::providers::streaming_codex_anthropic::create_responses_sse_stream_from_anthropic_with_context has cyclomatic complexity 24 (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":"src-tauri/src/proxy/providers/streaming_codex_anthropic.rs"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"2920b76abbd19cb7b3e3d767af78f5e46007588dd79d375463b80201b4869c5a"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_gemini::convert_message_content_to_parts (cyclomatic 24): cc_switch::proxy::providers::transform_gemini::convert_message_content_to_parts has cyclomatic complexity 24 (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":"src-tauri/src/proxy/providers/transform_gemini.rs"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d3298578d99d2a0a100b669fe1522df13589c97cfe5fa0a5556ecf01faf539b"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::services::session_usage_driver::scan_jsonl_incremental (cyclomatic 24): cc_switch::services::session_usage_driver::scan_jsonl_incremental has cyclomatic complexity 24 (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":"src-tauri/src/services/session_usage_driver.rs"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eeac347b5fb4dd4bfe9251739e6414872c2034768bc37cfd400f2fe673d8a46"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::services::subscription::get_subscription_quota (cyclomatic 24): cc_switch::services::subscription::get_subscription_quota has cyclomatic complexity 24 (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":"src-tauri/src/services/subscription.rs"},"region":{"startLine":1436}}}],"partialFingerprints":{"codehealthFindingId/v1":"5748b69942ea46bbe458a8e2050f29a96e022d9510eeb938cf5e3ebda2fc6ee0"}},{"ruleId":"D1","level":"warning","message":{"text":"App::on_filter_key (cyclomatic 23): App::on_filter_key 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. This is NOT this file\u0027s highest cyclomatic complexity: App::on_content_key (cyclomatic 31) 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 function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/menu.rs"},"region":{"startLine":944}}}],"partialFingerprints":{"codehealthFindingId/v1":"613a453ce7aac8f01945a31d3cdd5e3c12ef0b621f4b3641e5880b931a21e878"}},{"ruleId":"D1","level":"warning","message":{"text":"App::clamp_selections (cyclomatic 23): App::clamp_selections has cyclomatic complexity 23 (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. This is NOT this file\u0027s highest cyclomatic complexity: App::on_content_key (cyclomatic 31) 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 function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/menu.rs"},"region":{"startLine":1174}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f0d227067c6a2e74cd7e5a08a082b4196d68b7fcb19dc893bbd0105281c3945"}},{"ruleId":"D1","level":"warning","message":{"text":"LiveSnapshot::restore (cyclomatic 23): LiveSnapshot::restore 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":"src-tauri/src/services/provider/live.rs"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"871ba57a8875aeff4b0b8713a8eedce703f4f268742bb342e355afeef71cf8cb"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderService::update (cyclomatic 23): ProviderService::update has cyclomatic complexity 23 (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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":2494}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a4036a1736cacdaf9bc9883c25baebdef47c82d1ae12965be1e40a608a20be9"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::queue_sessions_refresh_if_needed (cyclomatic 23): cc_switch::cli::tui::queue_sessions_refresh_if_needed 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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":2739}}}],"partialFingerprints":{"codehealthFindingId/v1":"4267ec54bdf3e5f0ed5bfe6e837d323570dfe0f94c3116a519d8473ca62a7f57"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::ui::shared::quota_compact_line (cyclomatic 23): cc_switch::cli::tui::ui::shared::quota_compact_line 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":"src-tauri/src/cli/tui/ui/shared.rs"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"49b1902022f4520dca31d9e7ba1df45e3ee9faa6a8ab084bc8c29693d9471a7f"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::mcp::json_server_to_toml_table (cyclomatic 23): cc_switch::mcp::json_server_to_toml_table 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":"src-tauri/src/mcp.rs"},"region":{"startLine":1111}}}],"partialFingerprints":{"codehealthFindingId/v1":"a97c74dd57d4a523ed0294b5195c4d4a3243116d2b6604036d73258d521ce7ac"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform::anthropic_to_openai_with_reasoning_content (cyclomatic 23): cc_switch::proxy::providers::transform::anthropic_to_openai_with_reasoning_content 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":"src-tauri/src/proxy/providers/transform.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"1960c3f71ade0d0c5764a99edebef6eaf099df7e4a0ae9a49403002e040e7d5d"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderAddFormState::fields (cyclomatic 22): ProviderAddFormState::fields 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. This is NOT this file\u0027s highest cyclomatic complexity: ProviderAddFormState::input (cyclomatic 26) 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 function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/form/provider_state.rs"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b77ac2bb436d154e8e13194f9229d84bc7b7098088c231db6340adc70be3db1"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::handle_tui_action (cyclomatic 22): cc_switch::cli::tui::handle_tui_action 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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":2495}}}],"partialFingerprints":{"codehealthFindingId/v1":"00a65bd6a73acce3e0955faf4d468babe06f42ea46bce24b0c404abc6728f9a3"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::ui::config::render_openclaw_agents_route (cyclomatic 22): cc_switch::cli::tui::ui::config::render_openclaw_agents_route has cyclomatic complexity 22 (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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":2294}}}],"partialFingerprints":{"codehealthFindingId/v1":"320df27c16dffa636cc84407fbdd8abdde1241f3f6769b60103c6f6eb3c0f15e"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::ui::sessions::render_session_list (cyclomatic 22): cc_switch::cli::tui::ui::sessions::render_session_list has cyclomatic complexity 22 (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":"src-tauri/src/cli/tui/ui/sessions.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"6381d972a70b17a03adbcba6d3578249d0e16cb46ccd3c21c69afc27080dc8f4"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_responses::anthropic_to_responses (cyclomatic 22): cc_switch::proxy::providers::transform_responses::anthropic_to_responses 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":"src-tauri/src/proxy/providers/transform_responses.rs"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"669738152d298aaa1fa78e9e3929f4e3191f9e3dfa07dbc96662b3be54a8daa4"}},{"ruleId":"D1","level":"warning","message":{"text":"check_benchmark_thresholds.check_thresholds (cyclomatic 22): check_benchmark_thresholds.check_thresholds 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":"scripts/check_benchmark_thresholds.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"a68e27455a0e1dff93e8c8eb45aba79136e7b4d3d830dcffa754ef3352cbc4e1"}},{"ruleId":"D1","level":"warning","message":{"text":"App::on_config_key (cyclomatic 21): App::on_config_key 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":"src-tauri/src/cli/tui/app/content_config.rs"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b2b596de1e37cc209a687a64b4d7e24272c2a3133b914bdadf8b46fe2278855"}},{"ruleId":"D1","level":"warning","message":{"text":"App::nav_item_for_route (cyclomatic 21): App::nav_item_for_route 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. This is NOT this file\u0027s highest cyclomatic complexity: App::on_content_key (cyclomatic 31) 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 function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/menu.rs"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d541e809f16916a24c031419e69b0f0209eb0061c7b15d13877397812a369fa"}},{"ruleId":"D1","level":"warning","message":{"text":"Database::dump_sql (cyclomatic 21): Database::dump_sql 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":"src-tauri/src/database/backup.rs"},"region":{"startLine":1221}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6c14ff60129a99dd849e41856ff08181d48ef9b588eff83b87df2d06d3893e6"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderService::fetch_provider_models (cyclomatic 21): ProviderService::fetch_provider_models 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":"src-tauri/src/services/provider/models.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"298aaa6e78b792017179c4377bf41509af07b064dc61cceaea33a59efe665760"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::commands::provider_inspect::quota_provider (cyclomatic 21): cc_switch::cli::commands::provider_inspect::quota_provider 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":"src-tauri/src/cli/commands/provider_inspect.rs"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"e574743fd89f4fedccfda9ece082d171fa237d4686d7ec33fcb240b3e5cf712a"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::commands::provider_inspect::push_subscription_quota_lines (cyclomatic 21): cc_switch::cli::commands::provider_inspect::push_subscription_quota_lines 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":"src-tauri/src/cli/commands/provider_inspect.rs"},"region":{"startLine":770}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea1831b156997610abe8f458abf9539f09b6944522843fc3b61628ab033b4a08"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::workers::run_session_scan (cyclomatic 21): cc_switch::cli::tui::runtime_systems::workers::run_session_scan 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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":1956}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfabc5f10c85f754a12ea670ae2fc60e3dcb4d0ed4a295414206ff4f74b35908"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::workers::skills_worker_loop (cyclomatic 21): cc_switch::cli::tui::runtime_systems::workers::skills_worker_loop 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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":3768}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a1b33b84726811f2d670dc3c63e9d9ba22df283170c13b3b3ed4e5af3545ab1"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::ui::main_page::render_main (cyclomatic 21): cc_switch::cli::tui::ui::main_page::render_main 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":"src-tauri/src/cli/tui/ui/main_page.rs"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4bbfe36fb6fdae6fd63e3ad110f7704d4b88c1b9b61d0b6b760154b76c2fa4f"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::ui::overlay::pickers::render_claude_model_picker_overlay (cyclomatic 21): cc_switch::cli::tui::ui::overlay::pickers::render_claude_model_picker_overlay 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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"45936a0712e79dcbbbcdcb133aca49935b97cce12f3426b51fbee775bdba9a73"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::ui::overlay::pickers::project_path_window (cyclomatic 21): cc_switch::cli::tui::ui::overlay::pickers::project_path_window 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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":1725}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9da01d455b6d29772f99e854cc99e05e1f0986015c38e55691a05456120bb0f"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_chat::append_responses_item_as_chat_message (cyclomatic 21): cc_switch::proxy::providers::transform_codex_chat::append_responses_item_as_chat_message 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":"src-tauri/src/proxy/providers/transform_codex_chat.rs"},"region":{"startLine":652}}}],"partialFingerprints":{"codehealthFindingId/v1":"791705a069f03037a73a40404d74e3b480724fcfc2f4799e046fea01eb06a9d4"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_gemini::rectify_tool_call_args (cyclomatic 21): cc_switch::proxy::providers::transform_gemini::rectify_tool_call_args 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":"src-tauri/src/proxy/providers/transform_gemini.rs"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c7567be0f7fc0ed741a233d3543477d1d7dc501609743a24c6a387de0cb2a01"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::services::session_usage_codex::parse_codex_file (cyclomatic 21): cc_switch::services::session_usage_codex::parse_codex_file 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":"src-tauri/src/services/session_usage_codex.rs"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1f5a8bcbeecb329f4e293a02ecb1d51607defc266def0de4d215172c3c4e3b6"}},{"ruleId":"D1","level":"warning","message":{"text":"App::on_skills_installed_key (cyclomatic 20): App::on_skills_installed_key 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":"src-tauri/src/cli/tui/app/content_skills.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1ca43a4b71ebad42c8daff70f7e74b3c377df2ede113b2c6ea44b0454533654"}},{"ruleId":"D1","level":"warning","message":{"text":"App::on_usage_logs_key (cyclomatic 20): App::on_usage_logs_key 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":"src-tauri/src/cli/tui/app/content_usage.rs"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"938a5a14687d3c06b399d41530a469cbd713021e3e4ae4736d9daba9a0541902"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_mcp_field_navigation (cyclomatic 20): App::handle_mcp_field_navigation 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":"src-tauri/src/cli/tui/app/form_handlers/mcp.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d77ac3d1ebeab3b334aa4e4c749e1a92603225dad8cdb2be5d6e3b01edd6ac0"}},{"ruleId":"D1","level":"warning","message":{"text":"App::on_s3_sync_form_key (cyclomatic 20): App::on_s3_sync_form_key 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":"src-tauri/src/cli/tui/app/form_handlers/s3.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"71e27bbae0bdebf148fc6a0f8a993f06ff7a1ccd9faeb34347d74d811b487ed0"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderAddFormState::apply_template_fields (cyclomatic 20): ProviderAddFormState::apply_template_fields 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":"src-tauri/src/cli/tui/form/provider_templates.rs"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cb876fd687b1b82b313f7d7d24b2ccd449c03e83db78b1e58ac424e308eabcb"}},{"ruleId":"D1","level":"warning","message":{"text":"Database::init_impl_inner (cyclomatic 20): Database::init_impl_inner has cyclomatic complexity 20 (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":"src-tauri/src/database/mod.rs"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e9b684b2b38075fc1e89bdbe7191f930a195afd9e87cef4a9e40e1c3baeb60c"}},{"ruleId":"D1","level":"warning","message":{"text":"Database::get_daily_trends (cyclomatic 20): Database::get_daily_trends 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":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":758}}}],"partialFingerprints":{"codehealthFindingId/v1":"0034844166e0244cb6bb87e9ad9d41678cb733631e2e9485972c41fa36caf749"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderType::from_app_type_and_config (cyclomatic 20): ProviderType::from_app_type_and_config 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":"src-tauri/src/proxy/providers/mod.rs"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"7092e5516cbedf5c7def2d3783a98a32fdc1a83ea5ce3e87b1b1e187e2d422b7"}},{"ruleId":"D1","level":"warning","message":{"text":"ProxyService::proxy_status_from_daemon_response_for_app (cyclomatic 20): ProxyService::proxy_status_from_daemon_response_for_app 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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":1156}}}],"partialFingerprints":{"codehealthFindingId/v1":"67dd60465a3df110a5965f030bbf3b3796c2aef1050951d7b09ea0f4528e57bd"}},{"ruleId":"D1","level":"warning","message":{"text":"TranscriptIndexStore::enforce_cache_budget_with_limits (cyclomatic 20): TranscriptIndexStore::enforce_cache_budget_with_limits 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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":1059}}}],"partialFingerprints":{"codehealthFindingId/v1":"669bb73e4c62b600ff6bf11135f2ed6dff3f37d607278d7580faa3478cd2ddef"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::types::fetch_provider_models_for_tui (cyclomatic 20): cc_switch::cli::tui::runtime_systems::types::fetch_provider_models_for_tui 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":"src-tauri/src/cli/tui/runtime_systems/types.rs"},"region":{"startLine":967}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c0b26733de9e784b68da7aed6c8bc7c44705219df40d0a1efdf816533e867e0"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::workers::session_dispatcher_loop_with (cyclomatic 20): cc_switch::cli::tui::runtime_systems::workers::session_dispatcher_loop_with 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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":1245}}}],"partialFingerprints":{"codehealthFindingId/v1":"83cdf2817252646a0f1abe5e92ac8b88653af3e0072ecd5cb9e2fae907ebd456"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::ui::config::render_openclaw_tools_route (cyclomatic 20): cc_switch::cli::tui::ui::config::render_openclaw_tools_route has cyclomatic complexity 20 (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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":1400}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bf0394987d6d4e2e95a7541c79c4ca9ecad23fcce8ab369725f7e669caa7f1d"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::services::session_usage_pi::parse_pi_file (cyclomatic 20): cc_switch::services::session_usage_pi::parse_pi_file 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":"src-tauri/src/services/session_usage_pi.rs"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"604fe69cb3b193e7d9644c8a2902336e4fc5777fd9c1c57793c374b6dcfc4a3d"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::session_manager::cache::parse_targets_completed_cancellable (cyclomatic 20): cc_switch::session_manager::cache::parse_targets_completed_cancellable 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":"src-tauri/src/session_manager/cache.rs"},"region":{"startLine":715}}}],"partialFingerprints":{"codehealthFindingId/v1":"df537d74652496f61a7eaa41469d36748899721cc14243daa80988af3bdb8fb5"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::session_manager::providers::opencode::search_session_sqlite (cyclomatic 20): cc_switch::session_manager::providers::opencode::search_session_sqlite 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":"src-tauri/src/session_manager/providers/opencode.rs"},"region":{"startLine":1292}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8ba85fbc3d5b2bd1bb2d943f9e1c2644d78935e74a4f42ee82ae4010db7683c"}},{"ruleId":"D1","level":"warning","message":{"text":"benchmark_cc_switch.main (cyclomatic 20): benchmark_cc_switch.main has cyclomatic complexity 20 (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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":2153}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9d68aea602694ea71ddbc2784271fd809d6c58ea53621485c181623a321caee"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_codex_inline_catalog_key (cyclomatic 19): App::handle_codex_inline_catalog_key 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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":994}}}],"partialFingerprints":{"codehealthFindingId/v1":"53cd0d4c3208775c1c9513214d54d6201d2dc867d0be37a0605f25bb8807bc64"}},{"ruleId":"D1","level":"warning","message":{"text":"App::on_webdav_sync_form_key (cyclomatic 19): App::on_webdav_sync_form_key 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":"src-tauri/src/cli/tui/app/form_handlers/webdav.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9059ac1c22575b91cf5b073f398231a3babe323c6b25ec0b55efc3c086befbf"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_failover_queue_manager_key (cyclomatic 19): App::handle_failover_queue_manager_key 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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":1795}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0e4caf407a1e9b7181737c43fbfd9b840c823dea1bf9822e80614b4d400f8be"}},{"ruleId":"D1","level":"warning","message":{"text":"EditorState::push_visible_line_segments (cyclomatic 19): EditorState::push_visible_line_segments 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":"src-tauri/src/cli/tui/app/editor_state.rs"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef7926774383b05710c43c44a691c9ddfeacdd404c955c9f5da16a9fa261c0a6"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexConfigPatch::apply_to (cyclomatic 19): CodexConfigPatch::apply_to 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":"src-tauri/src/live/project/codex.rs"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d538185ec3961f9b1d899593d7538f28f88c5de0fee94731ee2a125f4ebbafa"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexOAuthManager::add_account_internal (cyclomatic 19): CodexOAuthManager::add_account_internal has cyclomatic complexity 19 (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":"src-tauri/src/proxy/providers/codex_oauth_auth.rs"},"region":{"startLine":1157}}}],"partialFingerprints":{"codehealthFindingId/v1":"c49816e055794dfddbe0bef09a6be6359e5c0a8cf679fefdaa64922b12679eea"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderService::build_effective_live_snapshot (cyclomatic 19): ProviderService::build_effective_live_snapshot 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":3632}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3f04e38a286e85483fcf104eb05eb5985938dd6d8024ad7126dadb954fa19a6"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderService::validate_provider_settings (cyclomatic 19): ProviderService::validate_provider_settings 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":3763}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fa95c8535ebc0cb53c876d7c711d1b4c361153b833099a6954ddbd4779cf368"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_actions::editor::submit_config_common_snippet (cyclomatic 19): cc_switch::cli::tui::runtime_actions::editor::submit_config_common_snippet 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. This is NOT this file\u0027s highest cyclomatic complexity: cc_switch::cli::tui::runtime_actions::editor::submit (cyclomatic 23) 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 function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":1350}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fcd4a67dda3d4c56fcc3f5d73ba11c38577f9059bd52fde1be2ba467e08832c"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::workers::resolve_session_manifest_selection (cyclomatic 19): cc_switch::cli::tui::runtime_systems::workers::resolve_session_manifest_selection 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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":2152}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cdde7ba11a3166a81ff4de64f014fe817768fb41e6738b782a2936389bc5e84"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::mcp::json_value_to_toml_item (cyclomatic 19): cc_switch::mcp::json_value_to_toml_item 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":"src-tauri/src/mcp.rs"},"region":{"startLine":1030}}}],"partialFingerprints":{"codehealthFindingId/v1":"2086950e7ba3f89c5e74e068a0839946d53c4090e75a6ad395bab9805d3fa9c8"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_chat::map_reasoning_effort (cyclomatic 19): cc_switch::proxy::providers::transform_codex_chat::map_reasoning_effort has cyclomatic complexity 19 (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":"src-tauri/src/proxy/providers/transform_codex_chat.rs"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3784a9566cb767cd1d63a3977d0c0a3a880c46e14aaf836e21679c2d316eaa3"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_responses::anthropic_tool_result_to_responses_output (cyclomatic 19): cc_switch::proxy::providers::transform_responses::anthropic_tool_result_to_responses_output 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":"src-tauri/src/proxy/providers/transform_responses.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"8542ad94425119f54151f94220479c8d26469c3746e99a22657d85e4318c5396"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_responses::convert_messages_to_input (cyclomatic 19): cc_switch::proxy::providers::transform_responses::convert_messages_to_input 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":"src-tauri/src/proxy/providers/transform_responses.rs"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c1084c7dde33176fc436da8dd658a5e26b5aeef0c9fd12d96c4d53d36c64dd5"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::services::provider::codex_live::prepare (cyclomatic 19): cc_switch::services::provider::codex_live::prepare has cyclomatic complexity 19 (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":"src-tauri/src/services/provider/codex_live.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"a073fa8afae7721ea601dd1fc327bfd1a8376dfe7fabec625e512e9bfc3c50fd"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::services::provider::codex_login::plan (cyclomatic 19): cc_switch::services::provider::codex_login::plan has cyclomatic complexity 19 (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":"src-tauri/src/services/provider/codex_login.rs"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"714488d388538c349a9f93e6f969c0c6f117218ebfb3fccc5123e8adb18529cd"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::services::subscription::query_gemini_quota (cyclomatic 19): cc_switch::services::subscription::query_gemini_quota has cyclomatic complexity 19 (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":"src-tauri/src/services/subscription.rs"},"region":{"startLine":1266}}}],"partialFingerprints":{"codehealthFindingId/v1":"d91368a096c38c9299a0ccc532915d752ce8dafae161b9e8f513a9525da32491"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::session_manager::providers::gemini::search_session_cancellable (cyclomatic 19): cc_switch::session_manager::providers::gemini::search_session_cancellable 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":"src-tauri/src/session_manager/providers/gemini.rs"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b3ef3f1ceb14692077b3fff4d084dd1d5035eb4bbc2217422a9d261fbbf22ba"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::session_manager::providers::openclaw::parse_session_lines (cyclomatic 19): cc_switch::session_manager::providers::openclaw::parse_session_lines 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":"src-tauri/src/session_manager/providers/openclaw.rs"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"20e087a0e1c716a460860271f94a16c8c13b3038bdfc807cf9658a7a7ac823e7"}},{"ruleId":"D1","level":"warning","message":{"text":"App::on_config_webdav_key (cyclomatic 18): App::on_config_webdav_key has cyclomatic complexity 18 (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":"src-tauri/src/cli/tui/app/content_config.rs"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee98c81a5f8521251a4bbdd55d959a296854d148b32de162a944b9890dec3d02"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_codex_model_catalog_page_key (cyclomatic 18): App::handle_codex_model_catalog_page_key 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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":1142}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0d3fa276dff73fcc46b3ead9ddc784c53ba9f6be419007bb8bf67bb49b6ffd5"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_provider_model_fetch (cyclomatic 18): App::handle_provider_model_fetch has cyclomatic complexity 18 (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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":1578}}}],"partialFingerprints":{"codehealthFindingId/v1":"d701034c24fec4ee1e7bc812043cdcf9a553c99742dd039b40fbe8305358be3e"}},{"ruleId":"D1","level":"warning","message":{"text":"DotenvPatch::apply (cyclomatic 18): DotenvPatch::apply 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":"src-tauri/src/live/patch/dotenv.rs"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"409b7ae0c5f6bc89bd53af3f3c4c83aee718728e4a9fe8a3b0511929d6cbedd6"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexChatHistoryStore::enrich_request (cyclomatic 18): CodexChatHistoryStore::enrich_request 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":"src-tauri/src/proxy/providers/codex_chat_history.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"434a43d1226b0319e02c4b262153e1603e27788289d65b15a5d239f587161936"}},{"ruleId":"D1","level":"warning","message":{"text":"StreamingOutcomeRecorder::finish (cyclomatic 18): StreamingOutcomeRecorder::finish 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":"src-tauri/src/proxy/response_handler.rs"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"78bdb1a51ef8df1856fd7ca7493da4bf21144f24eba7e99c128656f721e63335"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderService::save_claude_from_editor (cyclomatic 18): ProviderService::save_claude_from_editor has cyclomatic complexity 18 (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":"src-tauri/src/services/provider/claude_editor_service.rs"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0d92dcd08e95a271cb52a02856526222c64c231209de63096aa5823b5104d96"}},{"ruleId":"D1","level":"warning","message":{"text":"ProxyService::get_status_with_cleanup_for_app (cyclomatic 18): ProxyService::get_status_with_cleanup_for_app 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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":948}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbd0af8ef89334768bd685f0f4d04a8b62e50b7fdc02458de168814e37385358"}},{"ruleId":"D1","level":"warning","message":{"text":"SkillService::update_skill (cyclomatic 18): SkillService::update_skill 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":"src-tauri/src/services/skill.rs"},"region":{"startLine":2679}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e7a364d75ca6f8fee1807c9d9864e9314f64475909962c6ded5df7b764486d1"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::mode::operation::run (cyclomatic 18): cc_switch::mode::operation::run 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":"src-tauri/src/mode/operation.rs"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2d7b4e457bcdbf77c516a2c4010b334c1ea247a28112b11c32d34c525b90a4e"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::copilot_optimizer::merge_tool_results (cyclomatic 18): cc_switch::proxy::copilot_optimizer::merge_tool_results 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":"src-tauri/src/proxy/copilot_optimizer.rs"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"17a85248c5185c0fb5298de84b527c600bbf601d9cee581f38c96889c30bca0e"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::handlers::handle_claude_request (cyclomatic 18): cc_switch::proxy::handlers::handle_claude_request 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":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"340adf335f94378e30636ac57537b210f3f3baa34670949db7473b571277e567"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::streaming_codex_chat::create_responses_sse_stream_from_chat_with_context (cyclomatic 18): cc_switch::proxy::providers::streaming_codex_chat::create_responses_sse_stream_from_chat_with_context 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":"src-tauri/src/proxy/providers/streaming_codex_chat.rs"},"region":{"startLine":927}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b60f01ab102210aaa8b8978ed5c7acace521239dc646bbc81cb1346a9990121"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::thinking_rectifier::should_rectify_thinking_signature (cyclomatic 18): cc_switch::proxy::thinking_rectifier::should_rectify_thinking_signature has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/thinking_rectifier.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"42c999781e9742b176e9d0cca166ec4d21abb66e996574eb03e5c5be47d4aaef"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::session_manager::providers::hermes::parse_jsonl_session_lines (cyclomatic 18): cc_switch::session_manager::providers::hermes::parse_jsonl_session_lines 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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"896f9c181b9954ba9005872abc93917d70a6877ba3bfdf9321dfa6d7f26bea43"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::session_manager::providers::opencode::load_messages_cancellable (cyclomatic 18): cc_switch::session_manager::providers::opencode::load_messages_cancellable has cyclomatic complexity 18 (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":"src-tauri/src/session_manager/providers/opencode.rs"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"cba7f0ff6a2200f7cbf4859a2883ee9478b7ea2554bc53eddfd6198c34005e7c"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::session_manager::providers::pi::visit_active_messages_cancellable (cyclomatic 18): cc_switch::session_manager::providers::pi::visit_active_messages_cancellable 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":"src-tauri/src/session_manager/providers/pi.rs"},"region":{"startLine":791}}}],"partialFingerprints":{"codehealthFindingId/v1":"f91d641bd9804fc9ea2f7ebc41ce5cb5c03c711e0d413a862289c903d7d95fdc"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::session_manager::transcript::probe_oversized_json_message (cyclomatic 18): cc_switch::session_manager::transcript::probe_oversized_json_message has cyclomatic complexity 18 (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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":2048}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4bcf0fd81da11736046e542ba97564c39defc7bea18acc408f2f76a8d2da2af"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_provider_field_navigation (cyclomatic 17): App::handle_provider_field_navigation has cyclomatic complexity 17 (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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"188dc723da7c1fcecdab58ff62d2dfffa549f678cb72ce8312e203d1d6aa2bca"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderService::prepare_post_commit_action (cyclomatic 17): ProviderService::prepare_post_commit_action 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd79cce7228f4c614d44669d28c9e3e0bab5111900dffcdeedb0cead4ef0ad27"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderService::import_default_config (cyclomatic 17): ProviderService::import_default_config 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":2673}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb3d4f501ed344d7fa8ded30e4ef3a04a1331476da03016511b1989cf15333ba"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::data::build_usage_daily_chart_series (cyclomatic 17): cc_switch::cli::tui::data::build_usage_daily_chart_series 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":"src-tauri/src/cli/tui/data.rs"},"region":{"startLine":2842}}}],"partialFingerprints":{"codehealthFindingId/v1":"0447ca1212da96c1739f9b6919bd86bffe1915138b590db33b0db5227663d0cf"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::handlers::handle_managed_auth_msg (cyclomatic 17): cc_switch::cli::tui::runtime_systems::handlers::handle_managed_auth_msg 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":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad9fc32c362ea24718a1794f287a7bf92dd5c919f3a92c5f2c70a8079c97a4bb"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::workers::local_env_worker_loop_with (cyclomatic 17): cc_switch::cli::tui::runtime_systems::workers::local_env_worker_loop_with 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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":2308}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbcf5228dea3322f79a10e36ab5295cd56a5053db5dbd933301ae27e14ab8202"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::ui::forms::mcp::mcp_preview_value (cyclomatic 17): cc_switch::cli::tui::ui::forms::mcp::mcp_preview_value 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fb9e13779dbcc461fe24473fe3775273b98e8ca04b9ca1f24b197567e08f84b"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::ui::forms::provider::usage_query_field_label_and_value (cyclomatic 17): cc_switch::cli::tui::ui::forms::provider::usage_query_field_label_and_value has cyclomatic complexity 17 (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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":1839}}}],"partialFingerprints":{"codehealthFindingId/v1":"b74adaa6c812fe284cc0a5a26a3f15f3a7645f71c305891ccd8d41b48df27d0d"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::deeplink::provider::import_provider_from_deeplink (cyclomatic 17): cc_switch::deeplink::provider::import_provider_from_deeplink 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":"src-tauri/src/deeplink/provider.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"3336f7b8fa3e511217c096ad2f4d106dcc84a84285372b72ac26f84d254f0a06"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::claude::get_claude_api_format (cyclomatic 17): cc_switch::proxy::providers::claude::get_claude_api_format has cyclomatic complexity 17 (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":"src-tauri/src/proxy/providers/claude.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"53fc26fc2ba134065d8276398380123b7fc16d709a2c9e4e1bcd47a3aede35ab"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_chat::responses_to_chat_completions_with_reasoning (cyclomatic 17): cc_switch::proxy::providers::transform_codex_chat::responses_to_chat_completions_with_reasoning 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":"src-tauri/src/proxy/providers/transform_codex_chat.rs"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e2c384bdec6067559e626fb80803330b03b46bcd037a6cc373e7c32425f627e"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_chat::apply_reasoning_options (cyclomatic 17): cc_switch::proxy::providers::transform_codex_chat::apply_reasoning_options 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":"src-tauri/src/proxy/providers/transform_codex_chat.rs"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"929b42eefa3ee1367a10098dc07be7b425c73c24e0d1f67988498ba0b59f231b"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::services::provider::common_config::scrub_leaked_gemini_common_config_if_needed (cyclomatic 17): cc_switch::services::provider::common_config::scrub_leaked_gemini_common_config_if_needed 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":"src-tauri/src/services/provider/common_config.rs"},"region":{"startLine":912}}}],"partialFingerprints":{"codehealthFindingId/v1":"05c890d52bc49dc13c08f241a2861a14b1c7148209e1c638a09268016d1da157"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::session_manager::providers::hermes::stream_sessions_cancellable (cyclomatic 17): cc_switch::session_manager::providers::hermes::stream_sessions_cancellable 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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"24e26475920de9ae7eb7cfceceabb625b2ebdc0ea039440e94d1cca2781a1981"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::usage_script::validate_single_usage (cyclomatic 17): cc_switch::usage_script::validate_single_usage has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/usage_script.rs"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"13a3b1112c68255328a334f335069b1ee10ecfb8fe3239ecf5059484c10ab067"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiAppConfig::load (cyclomatic 16): MultiAppConfig::load has cyclomatic complexity 16 (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":"src-tauri/src/app_config.rs"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"5946a17c7216ff00ecfd3a778d38c1ce8cbc6dd875c44a5aebba5223cf868154"}},{"ruleId":"D1","level":"warning","message":{"text":"App::on_usage_key (cyclomatic 16): App::on_usage_key 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":"src-tauri/src/cli/tui/app/content_usage.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"551f1c44a4f1f12675ccc11d47d1645e49f16bfabfd68499886a60a469703888"}},{"ruleId":"D1","level":"warning","message":{"text":"App::build_mcp_form_save_action (cyclomatic 16): App::build_mcp_form_save_action 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":"src-tauri/src/cli/tui/app/form_handlers/mcp.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"15d54bd2f762a55f8676205120d8728ee34d689630725feb3177b06a4b15db63"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_codex_reasoning_picker_key (cyclomatic 16): App::handle_codex_reasoning_picker_key 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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"21004e868f43673814c320620837b8b464fac07a1d657683dc81694c8b7d9a2d"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_hermes_models_picker_navigation_key (cyclomatic 16): App::handle_hermes_models_picker_navigation_key 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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"23bb848558e5669f5aaca6e26583d6ec7214ed263a8062e1d08087e63156b46f"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_managed_account_picker_key (cyclomatic 16): App::handle_managed_account_picker_key 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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":728}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a61d7bdcfc568326c132731819b460eba577c8711c1ef337145017ea4a00e7a"}},{"ruleId":"D1","level":"warning","message":{"text":"TranscriptRemotePager::refresh_source_if_pending (cyclomatic 16): TranscriptRemotePager::refresh_source_if_pending 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":"src-tauri/src/cli/tui/app/types.rs"},"region":{"startLine":1535}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2360a079a8e3d988c5b97ac7a3d34dc056b336574c2304aa3e6eb15860e9b18"}},{"ruleId":"D1","level":"warning","message":{"text":"Supervisor::ensure_worker_locked (cyclomatic 16): Supervisor::ensure_worker_locked 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":"src-tauri/src/daemon/supervisor.rs"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e37c76e9164f0a738c913dbc57b7d277f5c77eb20437b89cd4e3438f96cdcb6"}},{"ruleId":"D1","level":"warning","message":{"text":"Supervisor::watch_worker (cyclomatic 16): Supervisor::watch_worker 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":"src-tauri/src/daemon/supervisor.rs"},"region":{"startLine":927}}}],"partialFingerprints":{"codehealthFindingId/v1":"b80f6511ff6b06980094a67335bbb706a9b07eae513276ffe369980b8f6c0d27"}},{"ruleId":"D1","level":"warning","message":{"text":"JsonPatch::apply_to (cyclomatic 16): JsonPatch::apply_to 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":"src-tauri/src/live/patch/json.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"e42994c5819e2f51bf2588da60bf32128f7d1a579498d2f9eaab6926005708e2"}},{"ruleId":"D1","level":"warning","message":{"text":"TomlPatch::apply_to (cyclomatic 16): TomlPatch::apply_to 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":"src-tauri/src/live/patch/toml.rs"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"25f09523b0cdd5c187996e087875ef46b342f4cf55b2d667997bc0c0c9bf768a"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderService::sync_current_to_live (cyclomatic 16): ProviderService::sync_current_to_live 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":3132}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab20e73654490683ec1ab3133caac0ef70f0a0c7517c1a5d28ecd525c384fe9e"}},{"ruleId":"D1","level":"warning","message":{"text":"ProxyService::enable_takeover_for_app_unlocked_with_options (cyclomatic 16): ProxyService::enable_takeover_for_app_unlocked_with_options has cyclomatic complexity 16 (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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":2719}}}],"partialFingerprints":{"codehealthFindingId/v1":"91d39a88722f0aa4459283b9c2a924db549c9a1422d619f0a3adbb94d3ca8007"}},{"ruleId":"D1","level":"warning","message":{"text":"TranscriptIndexStore::open_current (cyclomatic 16): TranscriptIndexStore::open_current has cyclomatic complexity 16 (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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eebd07d33ed325880f9d22356970580cfa76336b73b7b2d256bd9c5c2a41c53"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::claude_mcp::upsert_mcp_server (cyclomatic 16): cc_switch::claude_mcp::upsert_mcp_server has cyclomatic complexity 16 (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":"src-tauri/src/claude_mcp.rs"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"6554890cb4080f2e749b96ef86639d513be8cf61897291bfb584c7d3a9af4753"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::commands::prompts::manage_pi_system_prompt (cyclomatic 16): cc_switch::cli::commands::prompts::manage_pi_system_prompt 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":"src-tauri/src/cli/commands/prompts.rs"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"e90b2d6c42478bf8c2a4b0661488d005854165b36449c5a1ecc3194a0e0b8c52"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::commands::provider_input::build_sponsor_template_settings_config (cyclomatic 16): cc_switch::cli::commands::provider_input::build_sponsor_template_settings_config 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. This is NOT this file\u0027s highest cyclomatic complexity: ProviderAddTemplate::cli_name (cyclomatic 18) 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 function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":567}}}],"partialFingerprints":{"codehealthFindingId/v1":"94824328fc0a1b00938044c59736de9a09a4ebd0c702f9a0c071b8eac4ca53be"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::types::build_model_fetch_candidate_urls (cyclomatic 16): cc_switch::cli::tui::runtime_systems::types::build_model_fetch_candidate_urls 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":"src-tauri/src/cli/tui/runtime_systems/types.rs"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"10ca8e11fb6bfbe9cde7bb23a557d576bb7ee3b44e6ac8467089545d800ceedd"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::ui::forms::provider::provider_json_preview_source_fits (cyclomatic 16): cc_switch::cli::tui::ui::forms::provider::provider_json_preview_source_fits 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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f143243be0852ebec42cd36ae203609b077f8f597519b155d95ab7a7193773b"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::ui::overlay::layout::wrap_segment (cyclomatic 16): cc_switch::cli::tui::ui::overlay::layout::wrap_segment 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":"src-tauri/src/cli/tui/ui/overlay/layout.rs"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9d6d04b19b771b1466d19bb9134a49b4523a3ec700be5e00d62d5fa86c7da1d"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::cli::tui::ui::overlay::pickers::bounded_openclaw_agents_model_label (cyclomatic 16): cc_switch::cli::tui::ui::overlay::pickers::bounded_openclaw_agents_model_label 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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":1969}}}],"partialFingerprints":{"codehealthFindingId/v1":"22c7a905612154fc81b86be16513142cb9250f3a3fb711b69b803ea8153ae007"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::config::create_secure_config_dir_all_no_symlink (cyclomatic 16): cc_switch::config::create_secure_config_dir_all_no_symlink 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":"src-tauri/src/config.rs"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"15c82d5a853a81538b1a853c06149ee31c47d156850b063d423932428f9df786"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::mcp::normalize_server_keys (cyclomatic 16): cc_switch::mcp::normalize_server_keys 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":"src-tauri/src/mcp.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbbb322752a393aadd2b5a37a28a30d57e4d8e61efca8eddc1c040068bd0e6ae"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_gemini::convert_messages_to_contents (cyclomatic 16): cc_switch::proxy::providers::transform_gemini::convert_messages_to_contents 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":"src-tauri/src/proxy/providers/transform_gemini.rs"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c758c67205da8c430ddb9da46bb38aa353a1739970df7804641b8cef1abafa5"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_responses::responses_to_anthropic (cyclomatic 16): cc_switch::proxy::providers::transform_responses::responses_to_anthropic 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":"src-tauri/src/proxy/providers/transform_responses.rs"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"6023a39e0556ef79833eeed883f22cb1c749b8bde488d4ea2e59de51f106e2d2"}},{"ruleId":"D1","level":"warning","message":{"text":"cc_switch::services::subscription::query_claude_quota (cyclomatic 16): cc_switch::services::subscription::query_claude_quota 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":"src-tauri/src/services/subscription.rs"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9e00f9e3218924f1fbbafdefc38af54f718e1c0cac8694c3473a44ec9a5b7ff"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::streaming_responses::create_anthropic_sse_stream_from_responses (cognitive 387): cc_switch::proxy::providers::streaming_responses::create_anthropic_sse_stream_from_responses has cognitive complexity 387 (threshold 15). Drivers by points: if/else 70 (355 pts), match/switch 4 (15 pts), loops 4 (14 pts), boolean chains 3 (nesting depth added 306). 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":"src-tauri/src/proxy/providers/streaming_responses.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"0457a23a65bc4051b36e7cbec75079bb748b985a35f5cc8cb902fcb1f9940ef2"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::streaming::create_anthropic_sse_stream (cognitive 333): cc_switch::proxy::providers::streaming::create_anthropic_sse_stream has cognitive complexity 333 (threshold 15). Drivers by points: if/else 51 (292 pts), loops 7 (34 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 269). 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":"src-tauri/src/proxy/providers/streaming.rs"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"0eb069208b19704baa007b43d4238355152ccdc678e0ad3d5635ae6a2216f7c6"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::run (cognitive 282): cc_switch::cli::tui::run has cognitive complexity 282 (threshold 15). Drivers by points: if/else 68 (194 pts), loops 17 (48 pts), match/switch 21 (39 pts), boolean chains 1 (nesting depth added 175). 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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":3051}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bdb0a267dd44ba6e80be5362a5796041aef09441f5c7dfcb0c9def284807dfd"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderAddFormState::to_provider_json_value (cognitive 219): ProviderAddFormState::to_provider_json_value has cognitive complexity 219 (threshold 15). Drivers by points: if/else 77 (188 pts), match/switch 8 (20 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 125). 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":"src-tauri/src/cli/tui/form/provider_json.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"d953909657bcaa8c0d00fc26d675a0079b34d6ca4c15ad773ee15912b38fc54c"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::handlers::handle_session_msg (cognitive 175): cc_switch::cli::tui::runtime_systems::handlers::handle_session_msg has cognitive complexity 175 (threshold 15). Drivers by points: if/else 51 (137 pts), match/switch 11 (21 pts), boolean chains 12, loops 2 (5 pts) (nesting depth added 99). 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":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ed5b43aae6de340a296b8ef6757e8794f5802bf5dca8b2ab0951d2b8c053d49"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_provider_field_activate (cognitive 129): App::handle_provider_field_activate has cognitive complexity 129 (threshold 15). Drivers by points: if/else 55 (118 pts), match/switch 5 (10 pts), boolean chains 1 (nesting depth added 68). 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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8a3465441c4a2e809d619adc43e9c2586bffc1b4bb6e02e0b30f2e06df5d2be"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::streaming_gemini::create_anthropic_sse_stream_from_gemini (cognitive 129): cc_switch::proxy::providers::streaming_gemini::create_anthropic_sse_stream_from_gemini has cognitive complexity 129 (threshold 15). Drivers by points: if/else 33 (114 pts), loops 4 (9 pts), match/switch 2 (6 pts) (nesting depth added 90). 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":"src-tauri/src/proxy/providers/streaming_gemini.rs"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"0116b4ddbb4a7c02cebee2f561d235dd2d692e8ac0867f778ee99e83de839ee9"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::transcript::scan_named_json_array (cognitive 129): cc_switch::session_manager::transcript::scan_named_json_array has cognitive complexity 129 (threshold 15). Drivers by points: if/else 34 (109 pts), boolean chains 9, match/switch 2 (8 pts), loops 2 (3 pts) (nesting depth added 82). 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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":2436}}}],"partialFingerprints":{"codehealthFindingId/v1":"c83e3c077abc86a92a8d482c11adb7402b0b073db5e65801546163088e34b473"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::daemon::migration::quiesce_for_database_migration (cognitive 118): cc_switch::daemon::migration::quiesce_for_database_migration has cognitive complexity 118 (threshold 15). Drivers by points: if/else 26 (84 pts), match/switch 10 (30 pts), loops 2 (4 pts) (nesting depth added 80). 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":"src-tauri/src/daemon/migration.rs"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed738213f778c34e148e3d4b1f47a097c22d4bc4ea129cab429bfd2be381060e"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::mcp::import_from_codex (cognitive 117): cc_switch::mcp::import_from_codex has cognitive complexity 117 (threshold 15). Drivers by points: if/else 37 (94 pts), loops 5 (14 pts), match/switch 4 (9 pts) (nesting depth added 71). 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":"src-tauri/src/mcp.rs"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"1343e48956d4e523c3ec30b617dff1409e36af2328313b86ac5427ffa7c996a1"}},{"ruleId":"D2","level":"warning","message":{"text":"TokenUsage::from_claude_stream_events (cognitive 102): TokenUsage::from_claude_stream_events has cognitive complexity 102 (threshold 15). Drivers by points: if/else 20 (95 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (nesting depth added 77). 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":"src-tauri/src/proxy/usage/parser.rs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"c618c35342f1a8a66a29b806607468908682761476678ff168ba62634d5210b5"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderService::fetch_provider_models (cognitive 96): ProviderService::fetch_provider_models has cognitive complexity 96 (threshold 15). Drivers by points: if/else 17 (72 pts), loops 4 (21 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 73). 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":"src-tauri/src/services/provider/models.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"862c8f9a2b15b77f3d4f597732e59e9d4966d4d52acc25af1f97bd57b810d299"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderAddFormState::update_provider_meta (cognitive 95): ProviderAddFormState::update_provider_meta has cognitive complexity 95 (threshold 15). Drivers by points: if/else 47 (80 pts), boolean chains 10, match/switch 2 (5 pts) (nesting depth added 36). 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":"src-tauri/src/cli/tui/form/provider_json.rs"},"region":{"startLine":844}}}],"partialFingerprints":{"codehealthFindingId/v1":"40120b8035094fe5f27b3eb53b2aa7b8c0180dbcc706b10e17d5c7c2aed5a537"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillService::migrate_storage (cognitive 92): SkillService::migrate_storage has cognitive complexity 92 (threshold 15). Drivers by points: if/else 24 (59 pts), match/switch 5 (14 pts), loops 7 (11 pts), boolean chains 8 (nesting depth added 48). 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":"src-tauri/src/services/skill.rs"},"region":{"startLine":2025}}}],"partialFingerprints":{"codehealthFindingId/v1":"0af45d14a74b60fc13545dcf54bf05446026eb0b63e2f4a0dd4c8001b93809de"}},{"ruleId":"D2","level":"warning","message":{"text":"App::on_sessions_key (cognitive 89): App::on_sessions_key has cognitive complexity 89 (threshold 15). Drivers by points: if/else 32 (69 pts), match/switch 8 (13 pts), boolean chains 7 (nesting depth added 42). 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":"src-tauri/src/cli/tui/app/content_entities.rs"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"458faf1976d3a090f3dc82ff5b10f1e59a86b82fbe6fa2a6bbdc8accbe0da6a8"}},{"ruleId":"D2","level":"warning","message":{"text":"benchmark_cc_switch.benchmark_cli (cognitive 88): benchmark_cc_switch.benchmark_cli has cognitive complexity 88 (threshold 15). Drivers by points: if/else 17 (55 pts), ternaries 4 (14 pts), boolean chains 13, loops 3 (6 pts) (nesting depth added 51). 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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":1458}}}],"partialFingerprints":{"codehealthFindingId/v1":"be381f92646448b9ffb60a8957b7c466d5cb28e293346577a26ecebec53c8a00"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::handlers::handle_webdav_msg (cognitive 87): cc_switch::cli::tui::runtime_systems::handlers::handle_webdav_msg has cognitive complexity 87 (threshold 15). Drivers by points: match/switch 17 (52 pts), if/else 12 (33 pts), boolean chains 2 (nesting depth added 56). 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":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":1513}}}],"partialFingerprints":{"codehealthFindingId/v1":"4915067b45162e1f6880cd8375b58d2134cb1e29a076bad465cd76a010110218"}},{"ruleId":"D2","level":"warning","message":{"text":"RequestForwarder::send_streaming_request (cognitive 84): RequestForwarder::send_streaming_request has cognitive complexity 84 (threshold 15). Drivers by points: if/else 20 (69 pts), match/switch 3 (9 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 56). 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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"cde676a55594a7f72864e1fa859d6ecf5e6233e2fd9fd4c9a49c3e34ac688281"}},{"ruleId":"D2","level":"warning","message":{"text":"RequestForwarder::send_buffered_request (cognitive 83): RequestForwarder::send_buffered_request has cognitive complexity 83 (threshold 15). Drivers by points: if/else 20 (63 pts), match/switch 4 (13 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 53). 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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":903}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9dd11782e1ba60654721daf33cb6af8669e593aae83576b306ce1707c5ca3e6"}},{"ruleId":"D2","level":"warning","message":{"text":"benchmark_cc_switch.benchmark_tui (cognitive 80): benchmark_cc_switch.benchmark_tui has cognitive complexity 80 (threshold 15). Drivers by points: if/else 16 (58 pts), error handling 4 (14 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 56). 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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":1751}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d60ca9c9ab3744d27a2023f57e76a6f9c39accd56ded531b8237d9960757b84"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillService::migrate_ssot_if_pending (cognitive 79): SkillService::migrate_ssot_if_pending has cognitive complexity 79 (threshold 15). Drivers by points: if/else 17 (53 pts), match/switch 6 (16 pts), loops 5 (9 pts), boolean chains 1 (nesting depth added 50). 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":"src-tauri/src/services/skill.rs"},"region":{"startLine":893}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d8e83006caf1e98d1d5e1f7d5e9d1c41f022880d9a7bee4589fb954fc842015"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::commands::provider_input::display_provider_summary (cognitive 76): cc_switch::cli::commands::provider_input::display_provider_summary has cognitive complexity 76 (threshold 15). Drivers by points: if/else 37 (73 pts), boolean chains 2, match/switch 1 (nesting depth added 36). 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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":4509}}}],"partialFingerprints":{"codehealthFindingId/v1":"273552c85b5b1ecbd4aefa492a23fed354db679774edba9c0f11e6e8a561cadd"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::forwarder::request_builder::build_request (cognitive 74): cc_switch::proxy::forwarder::request_builder::build_request has cognitive complexity 74 (threshold 15). Drivers by points: if/else 32 (48 pts), match/switch 4 (12 pts), boolean chains 8, loops 2 (6 pts) (nesting depth added 28). 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":"src-tauri/src/proxy/forwarder/request_builder.rs"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"241a071720fd84c405909063d5269fe5818af39258f14988e109143152b1f373"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::session_usage_codex::sync_single_codex_file (cognitive 69): cc_switch::services::session_usage_codex::sync_single_codex_file has cognitive complexity 69 (threshold 15). Drivers by points: if/else 26 (46 pts), match/switch 11 (18 pts), boolean chains 5 (nesting depth added 27). 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":"src-tauri/src/services/session_usage_codex.rs"},"region":{"startLine":1530}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f2f8979b633e4b30b05d5207cfd873eb8e8d75bae13b53c641f8ffbb1ad80bb"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderService::refresh_provider_snapshot (cognitive 68): ProviderService::refresh_provider_snapshot has cognitive complexity 68 (threshold 15). Drivers by points: if/else 31 (65 pts), boolean chains 2, match/switch 1 (nesting depth added 34). 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":1358}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdeb27ba36876e7cf1861ed79cdcacc590b1b0d6ed0d7444a1d500fc91a4cb88"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_anthropic::responses_request_to_anthropic (cognitive 68): cc_switch::proxy::providers::transform_codex_anthropic::responses_request_to_anthropic has cognitive complexity 68 (threshold 15). Drivers by points: if/else 32 (58 pts), boolean chains 7, loops 1 (2 pts), match/switch 1 (nesting depth added 27). 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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd2af8812e13ae26d3b2a089d93d47175261591ae83934d712bc54bf14f0666"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_anthropic::convert_input_to_messages (cognitive 68): cc_switch::proxy::providers::transform_codex_anthropic::convert_input_to_messages has cognitive complexity 68 (threshold 15). Drivers by points: if/else 15 (52 pts), match/switch 3 (10 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 47). 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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":505}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbef3b9bf6ddb31ef6ee8ca67b2133e65d20a4a6f9348b785eb82c5f9429fd26"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::handle_usage_pricing_msg (cognitive 65): cc_switch::cli::tui::handle_usage_pricing_msg has cognitive complexity 65 (threshold 15). Drivers by points: if/else 19 (48 pts), boolean chains 10, match/switch 4 (7 pts) (nesting depth added 32). 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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":1237}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cdf74c218b49942704c7bab1c6e238cedcd7f8d5f86453cb38d46b2d2851f9c"}},{"ruleId":"D2","level":"warning","message":{"text":"RequestForwarder::prepare_request_with_client (cognitive 64): RequestForwarder::prepare_request_with_client has cognitive complexity 64 (threshold 15). Drivers by points: if/else 33 (50 pts), boolean chains 11, match/switch 2 (3 pts) (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":"src-tauri/src/proxy/forwarder/request_builder.rs"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"127aec652caee98090ddc3db59f76291e6373d08c00c39c85c50a58401b9d6bb"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_actions::handle_action (cognitive 64): cc_switch::cli::tui::runtime_actions::handle_action has cognitive complexity 64 (threshold 15). Drivers by points: if/else 26 (52 pts), match/switch 4 (7 pts), boolean chains 5 (nesting depth added 29). 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":"src-tauri/src/cli/tui/runtime_actions/mod.rs"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba2ae6396e6df4bee3dd59a91d4dfdef0b4fbc77a11562c26f755a896dfc9814"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::cache_injector::inject (cognitive 63): cc_switch::proxy::cache_injector::inject has cognitive complexity 63 (threshold 15). Drivers by points: if/else 19 (54 pts), loops 2 (7 pts), boolean chains 2 (nesting depth added 40). 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":"src-tauri/src/proxy/cache_injector.rs"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"55f9d27edc9116f39e7e22a24e15b7d6cda706ed39144cbb1fc263427d7ee9a6"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_anthropic::anthropic_sse_to_message_value (cognitive 63): cc_switch::proxy::providers::transform_codex_anthropic::anthropic_sse_to_message_value has cognitive complexity 63 (threshold 15). Drivers by points: if/else 22 (54 pts), match/switch 3 (5 pts), boolean chains 2, loops 2 (nesting depth added 34). 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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":1385}}}],"partialFingerprints":{"codehealthFindingId/v1":"62e260f3af6f0c415ec3b328990342fddecc16c642067bc127e625e7783b54f1"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_form_tab_key (cognitive 62): App::handle_form_tab_key has cognitive complexity 62 (threshold 15). Drivers by points: if/else 20 (42 pts), match/switch 6 (14 pts), boolean chains 6 (nesting depth added 30). 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":"src-tauri/src/cli/tui/app/form_handlers/tab.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"946fcdc8fa18758e6aebb6c68093f443232c40311a345ce666d69b367dfa34d6"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::streaming_codex_anthropic::create_responses_sse_stream_from_anthropic_with_context (cognitive 62): cc_switch::proxy::providers::streaming_codex_anthropic::create_responses_sse_stream_from_anthropic_with_context has cognitive complexity 62 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 7 (24 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 38). 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":"src-tauri/src/proxy/providers/streaming_codex_anthropic.rs"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7dff0b5bc68c85c060d211c0af7dc48e553dad35f4961bb8e42c3ecce1d48c9"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform::openai_to_anthropic (cognitive 62): cc_switch::proxy::providers::transform::openai_to_anthropic has cognitive complexity 62 (threshold 15). Drivers by points: if/else 20 (47 pts), match/switch 3 (8 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 35). 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":"src-tauri/src/proxy/providers/transform.rs"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"13254bf2f427fcbce155766421fb1c7d0f9759e7d827aebc2ced7a957ad93204"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform::convert_message_to_openai (cognitive 60): cc_switch::proxy::providers::transform::convert_message_to_openai has cognitive complexity 60 (threshold 15). Drivers by points: if/else 18 (47 pts), match/switch 3 (9 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 36). 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":"src-tauri/src/proxy/providers/transform.rs"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"9326c9d993b0b9b4ae7b1d0c002b34932940d2381450ab707075b26bcd73f85c"}},{"ruleId":"D2","level":"warning","message":{"text":"RequestForwarder::forward_response_detailed (cognitive 59): RequestForwarder::forward_response_detailed has cognitive complexity 59 (threshold 15). Drivers by points: if/else 18 (47 pts), match/switch 3 (8 pts), boolean chains 3, loops 1 (nesting depth added 34). 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 (RequestForwarder::forward_buffered_response_detailed) 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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"75029068118e5d9e6fd169ed1d30fd62270bef887406f8be4c4574e6c56eabaf"}},{"ruleId":"D2","level":"warning","message":{"text":"RequestForwarder::forward_buffered_response_detailed (cognitive 59): RequestForwarder::forward_buffered_response_detailed has cognitive complexity 59 (threshold 15). Drivers by points: if/else 18 (47 pts), match/switch 3 (8 pts), boolean chains 3, loops 1 (nesting depth added 34). 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 (RequestForwarder::forward_response_detailed) 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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a6a88c8b25c4996cafc46253d67c336e580ccf4339066f25c3457782ad0d0f5"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::codex::parse_session_lines (cognitive 59): cc_switch::session_manager::providers::codex::parse_session_lines has cognitive complexity 59 (threshold 15). Drivers by points: if/else 18 (48 pts), boolean chains 6, match/switch 2 (3 pts), loops 2 (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":"src-tauri/src/session_manager/providers/codex.rs"},"region":{"startLine":866}}}],"partialFingerprints":{"codehealthFindingId/v1":"117cc1fb9c2f7dda14cee8c99f6872454e5f2171cb7ee4acf35b605050676e37"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::handlers::handle_skills_msg (cognitive 58): cc_switch::cli::tui::runtime_systems::handlers::handle_skills_msg has cognitive complexity 58 (threshold 15). Drivers by points: if/else 13 (35 pts), match/switch 6 (11 pts), loops 3 (10 pts), boolean chains 2 (nesting depth added 34). 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":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":1278}}}],"partialFingerprints":{"codehealthFindingId/v1":"390772b60db246b5379fb6b5d8167c778e92e504aa662b2da6d5570b6a59c8af"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::forms::provider::provider_field_label_and_value (cognitive 58): cc_switch::cli::tui::ui::forms::provider::provider_field_label_and_value has cognitive complexity 58 (threshold 15). Drivers by points: if/else 36 (53 pts), match/switch 4 (5 pts) (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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":1916}}}],"partialFingerprints":{"codehealthFindingId/v1":"3727b92d4175ab3cd2faa374a8eaed45ff780ed8a442f21c95f29bc9ad95be9c"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::streaming_codex_chat::create_responses_sse_stream_from_chat_with_context (cognitive 56): cc_switch::proxy::providers::streaming_codex_chat::create_responses_sse_stream_from_chat_with_context has cognitive complexity 56 (threshold 15). Drivers by points: if/else 8 (30 pts), loops 6 (19 pts), match/switch 2 (6 pts), boolean chains 1 (nesting depth added 39). 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":"src-tauri/src/proxy/providers/streaming_codex_chat.rs"},"region":{"startLine":927}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea24263ad6e6bb418402b3d5fb53c77b20f6a446c90c876df2422bfcabbfec4d"}},{"ruleId":"D2","level":"warning","message":{"text":"Database::dump_sql (cognitive 54): Database::dump_sql has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (45 pts), loops 5 (8 pts), boolean chains 1 (nesting depth added 32). 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":"src-tauri/src/database/backup.rs"},"region":{"startLine":1221}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e292c166e8dd6ac4702cce0a03f97a03abf9d03e3d7512a9b59315be2faa82d"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_responses::responses_to_anthropic (cognitive 54): cc_switch::proxy::providers::transform_responses::responses_to_anthropic has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (47 pts), loops 2 (5 pts), match/switch 1 (2 pts) (nesting depth added 40). 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":"src-tauri/src/proxy/providers/transform_responses.rs"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"71c92073709955486a102f36cd6a1458435863f964eba9edff1172ceb8421386"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::utils::build_snippet_cancellable (cognitive 54): cc_switch::session_manager::providers::utils::build_snippet_cancellable has cognitive complexity 54 (threshold 15). Drivers by points: if/else 21 (41 pts), loops 6 (10 pts), boolean chains 3 (nesting depth added 24). 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":"src-tauri/src/session_manager/providers/utils.rs"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"36db9231325eed89427419833ecc8f0a8e6a2ea6f3d709eedf762f38d71fda24"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::workers::local_env_worker_loop_with (cognitive 53): cc_switch::cli::tui::runtime_systems::workers::local_env_worker_loop_with has cognitive complexity 53 (threshold 15). Drivers by points: if/else 11 (38 pts), match/switch 3 (10 pts), loops 2 (5 pts) (nesting depth added 37). 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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":2308}}}],"partialFingerprints":{"codehealthFindingId/v1":"a076f3bf7d41fc50bae745bfa5dfdd29a330cbf21b1c323b7bcfa99de0cfc9db"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::mcp::json_server_to_toml_table (cognitive 53): cc_switch::mcp::json_server_to_toml_table has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (40 pts), loops 4 (11 pts), match/switch 2 (nesting depth added 32). 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":"src-tauri/src/mcp.rs"},"region":{"startLine":1111}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a68d42f0a0f0b299b2937f4741aa3bca672a21594f58699b3c20cf61073a925"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_confirm_overlay_key (cognitive 52): App::handle_confirm_overlay_key has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (36 pts), match/switch 7 (16 pts) (nesting depth added 29). 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":"src-tauri/src/cli/tui/app/overlay_handlers/dialogs.rs"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"4af2f197f02fc69557a73b42d36b646af13b0f455c40b5d00f7e19fb073c6cb7"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::commands::provider_inspect::quota_provider (cognitive 52): cc_switch::cli::commands::provider_inspect::quota_provider has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (42 pts), match/switch 3 (8 pts), boolean chains 1, loops 1 (nesting depth added 32). 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":"src-tauri/src/cli/commands/provider_inspect.rs"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"43a380f1749105b19d9472540aa8e166a1dfe2d37ebd67f636ffae03c17eafda"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_responses::convert_messages_to_input (cognitive 51): cc_switch::proxy::providers::transform_responses::convert_messages_to_input has cognitive complexity 51 (threshold 15). Drivers by points: if/else 12 (41 pts), match/switch 2 (6 pts), loops 2 (4 pts) (nesting depth added 35). 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":"src-tauri/src/proxy/providers/transform_responses.rs"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"198ff1fd7b89394bef3735508113af8702b2920c3ec022e84f34995a8000b346"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_text_input_submit (cognitive 50): App::handle_text_input_submit has cognitive complexity 50 (threshold 15). Drivers by points: if/else 25 (46 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 22). 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":"src-tauri/src/cli/tui/app/overlay_handlers/dialogs.rs"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"bef9ba554c41b6d3caf64cbd272bae3de2a3c631c628f55c60563b85866c7603"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_model_fetch_picker_key (cognitive 48): App::handle_model_fetch_picker_key has cognitive complexity 48 (threshold 15). Drivers by points: if/else 23 (45 pts), boolean chains 2, match/switch 1 (nesting depth added 22). 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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":1119}}}],"partialFingerprints":{"codehealthFindingId/v1":"107424209ad9c3bca098dbd9e13097cbe7bc53eae36f7b098e0f7ac8328e3eb2"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::help::current_help_target (cognitive 48): cc_switch::cli::tui::help::current_help_target has cognitive complexity 48 (threshold 15). Drivers by points: match/switch 15 (28 pts), if/else 16 (18 pts), boolean chains 2 (nesting depth added 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. 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":"src-tauri/src/cli/tui/help.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dc00fd68f44a37ef2e802bd3ed1e5b9757454bb32cf9e47f396a12d0b027e4e"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::claude::parse_session_lines (cognitive 48): cc_switch::session_manager::providers::claude::parse_session_lines has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (38 pts), boolean chains 5, match/switch 2 (3 pts), loops 2 (nesting depth added 24). 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":"src-tauri/src/session_manager/providers/claude.rs"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a368d07e5cd85e79c88a55b844725dd85bc696fc2a1fbcd9cace1acbb614f6d"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderService::build_effective_live_snapshot (cognitive 46): ProviderService::build_effective_live_snapshot has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (40 pts), loops 1 (5 pts), match/switch 1 (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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":3632}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbe9d6092a4c04fdef3ff3b69daf2cdfe163ccbf456f1c2bb30dc8cac64ba7a0"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::cache::process_stream_batch (cognitive 46): cc_switch::session_manager::cache::process_stream_batch has cognitive complexity 46 (threshold 15). Drivers by points: if/else 24 (39 pts), match/switch 3 (5 pts), boolean chains 1, loops 1 (nesting depth added 17). 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":"src-tauri/src/session_manager/cache.rs"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"59b524f4bb1a7e038e6aa5d525ae3d286f675f5b931a04c8aa0fcfd31c95b44b"}},{"ruleId":"D2","level":"warning","message":{"text":"App::commit_active_text_edit (cognitive 45): App::commit_active_text_edit has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (36 pts), match/switch 7 (8 pts), boolean chains 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":"src-tauri/src/cli/tui/app/form_handlers/mod.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccff1afa4e78fadc3697b106524a9229624d27cb777ff6b882c5a4daa1c4fb77"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::workers::resolve_session_manifest_selection (cognitive 45): cc_switch::cli::tui::runtime_systems::workers::resolve_session_manifest_selection has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (41 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 27). 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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":2152}}}],"partialFingerprints":{"codehealthFindingId/v1":"6194d3b654d7f9bb4b68c7953dd5902b85d87f4fc0ae15351fec406e52b08704"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::mode::operation::run (cognitive 45): cc_switch::mode::operation::run has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (35 pts), loops 4 (5 pts), match/switch 2 (5 pts) (nesting depth added 28). 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":"src-tauri/src/mode/operation.rs"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"e786442f94c08a9824f79857d58ebb2c28b8d00239b6e871d9b45ebf25916ca1"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::opencode::search_session_sqlite (cognitive 45): cc_switch::session_manager::providers::opencode::search_session_sqlite has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 3 (7 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 26). 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":"src-tauri/src/session_manager/providers/opencode.rs"},"region":{"startLine":1292}}}],"partialFingerprints":{"codehealthFindingId/v1":"35a0499bae7bfeba432f200441c1ecaf2fdfdd4265340c04e1625c3673aba5c0"}},{"ruleId":"D2","level":"warning","message":{"text":"App::on_providers_key (cognitive 44): App::on_providers_key has cognitive complexity 44 (threshold 15). Drivers by points: if/else 21 (40 pts), boolean chains 2, match/switch 2 (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":"src-tauri/src/cli/tui/app/content_entities.rs"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb5162434ed9855578886f121f4e79b785f7d2e1f69ca5e47ce50577deea77ca"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::session_usage_codex::parse_codex_file (cognitive 44): cc_switch::services::session_usage_codex::parse_codex_file has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (35 pts), match/switch 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 23). 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":"src-tauri/src/services/session_usage_codex.rs"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dd593cebd509f44dc44810fb592dd25e36f6c7df623bc44d66056e23ee4621a"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::subscription::get_subscription_quota (cognitive 44): cc_switch::services::subscription::get_subscription_quota has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (37 pts), match/switch 4 (7 pts) (nesting depth added 29). 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":"src-tauri/src/services/subscription.rs"},"region":{"startLine":1436}}}],"partialFingerprints":{"codehealthFindingId/v1":"088def44515570aa6dca753d9888d966887e0dbedc823632717e9df9396073b9"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderType::from_app_type_and_config (cognitive 42): ProviderType::from_app_type_and_config has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (37 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 25). 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":"src-tauri/src/proxy/providers/mod.rs"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"57b227ffb0db7efbf38d4d1639c01cfa5c982e918d8b8adc3e90ce7d0384f4ac"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::mcp::normalize_server_keys (cognitive 42): cc_switch::mcp::normalize_server_keys has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (35 pts), match/switch 2 (5 pts), loops 2 (nesting depth added 26). 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":"src-tauri/src/mcp.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"8746ce3f661af34016e038903f60631494e5aab0b1372a67f7d5eea6bcb94702"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderService::apply_prepared_post_commit_action (cognitive 41): ProviderService::apply_prepared_post_commit_action has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (27 pts), match/switch 4 (11 pts), boolean chains 3 (nesting depth added 17). 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":1188}}}],"partialFingerprints":{"codehealthFindingId/v1":"1501d927bc8883131aae396354695bcc743ec93a93978f792f158e247a8eee0a"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::session_usage::sync_single_file (cognitive 41): cc_switch::services::session_usage::sync_single_file has cognitive complexity 41 (threshold 15). Drivers by points: if/else 21 (30 pts), boolean chains 5, match/switch 4 (5 pts), loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/session_usage.rs"},"region":{"startLine":859}}}],"partialFingerprints":{"codehealthFindingId/v1":"942d3a764f454cff04f8aaefa6ba9c5a1dd3a3129cc930090448f02aa6d840fc"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_claude_model_picker_select_key (cognitive 40): App::handle_claude_model_picker_select_key has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (33 pts), match/switch 3 (4 pts), boolean chains 3 (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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":982}}}],"partialFingerprints":{"codehealthFindingId/v1":"b06bd08421c6e03505078a3fdb015e97878279c95b05b02f0666ee0490146a2e"}},{"ruleId":"D2","level":"warning","message":{"text":"Database::get_daily_trends (cognitive 40): Database::get_daily_trends has cognitive complexity 40 (threshold 15). Drivers by points: if/else 22 (33 pts), loops 5 (7 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":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":758}}}],"partialFingerprints":{"codehealthFindingId/v1":"541b8bb8e1c40557f9dca0f053911d634db9e20c2a5cadc6467845ed013dc9b1"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexChatHistoryStore::enrich_request (cognitive 40): CodexChatHistoryStore::enrich_request has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 2 (5 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 24). 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":"src-tauri/src/proxy/providers/codex_chat_history.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6d6dd03421e4bd6f1a4c612acac75bfdedb8f030516d9afa3d1b885a6fa5b7b"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::handle_app_data_msg (cognitive 40): cc_switch::cli::tui::handle_app_data_msg has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (35 pts), match/switch 3 (5 pts) (nesting depth added 25). 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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":2008}}}],"partialFingerprints":{"codehealthFindingId/v1":"d58298d2991e23e9c2555c92a02eb2ba14d1e56259194c10c6ab675a664d69be"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::session_usage::collect_jsonl_files (cognitive 40): cc_switch::services::session_usage::collect_jsonl_files has cognitive complexity 40 (threshold 15). Drivers by points: if/else 7 (28 pts), loops 3 (11 pts), match/switch 1 (nesting depth added 29). 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":"src-tauri/src/services/session_usage.rs"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"02dfe0c63a2084ee46dc8724e372a5f121b985704537d3cfd0a81e6dc60062f7"}},{"ruleId":"D2","level":"warning","message":{"text":"App::build_provider_form_save_action (cognitive 39): App::build_provider_form_save_action has cognitive complexity 39 (threshold 15). Drivers by points: if/else 24 (27 pts), boolean chains 7, match/switch 3 (5 pts) (nesting depth added 5). 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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2925c7c1b584d05d097b34e595a4d549c4a2cc3de3d1e90966ef248f83a7734"}},{"ruleId":"D2","level":"warning","message":{"text":"App::on_filter_key (cognitive 39): App::on_filter_key has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (31 pts), boolean chains 7, 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":"src-tauri/src/cli/tui/app/menu.rs"},"region":{"startLine":944}}}],"partialFingerprints":{"codehealthFindingId/v1":"090895b14a625d310345aff59f17ac4ab92a04b8a4d008e40b6f25f5258da171"}},{"ruleId":"D2","level":"warning","message":{"text":"App::clamp_selections (cognitive 39): App::clamp_selections has cognitive complexity 39 (threshold 15). Drivers by points: if/else 35 (36 pts), boolean chains 3 (nesting depth added 1). 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":"src-tauri/src/cli/tui/app/menu.rs"},"region":{"startLine":1174}}}],"partialFingerprints":{"codehealthFindingId/v1":"1298b264ffd066d2a13eb0c5493c98fbb281c528d7403a1d49416faab3ae755b"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillService::check_updates (cognitive 39): SkillService::check_updates has cognitive complexity 39 (threshold 15). Drivers by points: match/switch 6 (20 pts), if/else 5 (15 pts), loops 3 (4 pts) (nesting depth added 25). 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":"src-tauri/src/services/skill.rs"},"region":{"startLine":2539}}}],"partialFingerprints":{"codehealthFindingId/v1":"18b907db633b05fa2ef8fde55123bec6eb4345ff07afbd6518f0e0de5e3f1e17"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::types::fetch_provider_models_for_tui (cognitive 39): cc_switch::cli::tui::runtime_systems::types::fetch_provider_models_for_tui has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (24 pts), match/switch 3 (8 pts), loops 2 (4 pts), boolean chains 3 (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":"src-tauri/src/cli/tui/runtime_systems/types.rs"},"region":{"startLine":967}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5245433edd6d8bc653ceb7167943103a917a75c2d28df4cf21839dbf5f3bbfc"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::overlay::pickers::render_claude_model_picker_overlay (cognitive 39): cc_switch::cli::tui::ui::overlay::pickers::render_claude_model_picker_overlay has cognitive complexity 39 (threshold 15). Drivers by points: if/else 24 (35 pts), boolean chains 2, match/switch 1 (2 pts) (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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b27ac368a3ee405eb3fc30b3052d7da18019c90ab1f85aa0adb4479acff0a4d"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform::anthropic_to_openai_with_reasoning_content (cognitive 39): cc_switch::proxy::providers::transform::anthropic_to_openai_with_reasoning_content has cognitive complexity 39 (threshold 15). Drivers by points: if/else 21 (34 pts), loops 2 (5 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":"src-tauri/src/proxy/providers/transform.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"b31d6e749db5e0f52b27ab592e5e762ff7ce39a1fd6d005e6b896ef235865985"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_gemini::convert_messages_to_contents (cognitive 39): cc_switch::proxy::providers::transform_gemini::convert_messages_to_contents has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (33 pts), loops 3 (5 pts), boolean chains 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":"src-tauri/src/proxy/providers/transform_gemini.rs"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"3df3663670c8cc3abe8d8a5474cd160a29491ec71d7e0af4a39ed04eff71bb93"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_gemini::convert_message_content_to_parts (cognitive 39): cc_switch::proxy::providers::transform_gemini::convert_message_content_to_parts has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (33 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 21). 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":"src-tauri/src/proxy/providers/transform_gemini.rs"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"99aa273c8a59e2190b348f36c71fdddb16354b50ee63731c6d1098888456869c"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_responses::anthropic_tool_result_to_responses_output (cognitive 39): cc_switch::proxy::providers::transform_responses::anthropic_tool_result_to_responses_output has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (33 pts), match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 20). 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":"src-tauri/src/proxy/providers/transform_responses.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"b47431d5e2791d1cc27a03cc6fd5e4476a5dd746103a570b1df1d9e2fb69d690"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::openclaw::parse_session_lines (cognitive 39): cc_switch::session_manager::providers::openclaw::parse_session_lines has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (32 pts), match/switch 2 (3 pts), boolean chains 2, loops 2 (nesting depth added 21). 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":"src-tauri/src/session_manager/providers/openclaw.rs"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fad6d20e3c60788f2910f8791bf16c1e92a394c2b77584903ced48eb3b2c445"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::session_usage_pi::parse_pi_file (cognitive 38): cc_switch::services::session_usage_pi::parse_pi_file has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (32 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":"src-tauri/src/services/session_usage_pi.rs"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae24efc6d3e3446b5eaf8b5972ec89aed0eba25465cc64792cec9bfd85801ae9"}},{"ruleId":"D2","level":"warning","message":{"text":"ProxyService::sync_live_config_to_current_provider (cognitive 37): ProxyService::sync_live_config_to_current_provider has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 4, match/switch 3 (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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":3053}}}],"partialFingerprints":{"codehealthFindingId/v1":"736a183df25834d3604186dfd46a157ed2bff02bf9f17d36c768c8805352d564"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::overlay::pickers::project_path_window (cognitive 37): cc_switch::cli::tui::ui::overlay::pickers::project_path_window has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (26 pts), loops 5 (8 pts), boolean chains 3 (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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":1725}}}],"partialFingerprints":{"codehealthFindingId/v1":"39fd5b8042f210ae5d23e51da173878efbed58b1622b7ef5c10644f4f2350d3a"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::handlers::handle_claude_request (cognitive 37): cc_switch::proxy::handlers::handle_claude_request has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (29 pts), match/switch 5 (7 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":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a62ac73bc8f6b78b87a459980d545266c33e9a3b96eb7121e512c1b0c871b31"}},{"ruleId":"D2","level":"warning","message":{"text":"App::on_key_after_clamp (cognitive 36): App::on_key_after_clamp has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 7, match/switch 3 (6 pts) (nesting depth added 8). 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":"src-tauri/src/cli/tui/app/menu.rs"},"region":{"startLine":738}}}],"partialFingerprints":{"codehealthFindingId/v1":"18e531df60bcc5ef56f482b9ae561827c3af6a521b0b6a29e17c45faac1b0b37"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_mcp_key_value_entry_editor_key (cognitive 36): App::handle_mcp_key_value_entry_editor_key has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 10 (16 pts), boolean chains 3 (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":"src-tauri/src/cli/tui/app/overlay_handlers/mcp_key_value.rs"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"e23d9bc3aa9a9c91b1d4f30a6a1a4212f41389bcf4427e37499efa3ec58a00ab"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::workers::session_dispatcher_loop_with (cognitive 36): cc_switch::cli::tui::runtime_systems::workers::session_dispatcher_loop_with has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (33 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 24). 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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":1245}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3b49c970b5e60de12e60599a09fb13692672e7bf3320397d5b4e05c2a67b0aa"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_anthropic::tool_result_content_from_responses_item (cognitive 36): cc_switch::proxy::providers::transform_codex_anthropic::tool_result_content_from_responses_item has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (25 pts), match/switch 3 (9 pts), loops 1 (2 pts) (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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":727}}}],"partialFingerprints":{"codehealthFindingId/v1":"18bf87c489c3d62b94f604decb5d7bd96909888689d1fb383a72d36ba74b2a75"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::provider::live_merge::merge_json_value_with_base (cognitive 36): cc_switch::services::provider::live_merge::merge_json_value_with_base has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 2 (5 pts), match/switch 2 (4 pts) (nesting depth added 23). 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":"src-tauri/src/services/provider/live_merge.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"16ba6b0753c217a28eb8f5ad4ab8ced1e1c6705f0737e3d261356d8fde5dc73f"}},{"ruleId":"D2","level":"warning","message":{"text":"App::on_s3_sync_form_key (cognitive 35): App::on_s3_sync_form_key has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (31 pts), match/switch 3 (4 pts) (nesting depth added 19). 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":"src-tauri/src/cli/tui/app/form_handlers/s3.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7674e23b0f586d94da4c2d8c6c4f66202dc6ced73916ee9a9f20768a4004165"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::hermes::parse_jsonl_session_lines (cognitive 35): cc_switch::session_manager::providers::hermes::parse_jsonl_session_lines has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (29 pts), match/switch 2 (3 pts), loops 2, boolean chains 1 (nesting depth added 18). 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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f879bf7ef6ed89bebdbc0393e62879834e80f9b9f452412a0b0ef7ec96edd97"}},{"ruleId":"D2","level":"warning","message":{"text":"EditorState::push_visible_line_segments (cognitive 34): EditorState::push_visible_line_segments has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (29 pts), loops 2 (3 pts), boolean chains 2 (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":"src-tauri/src/cli/tui/app/editor_state.rs"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"e735cf60b4f287158af9376cfd0319b7f8637f1e3e3fe645bea219d60ab8ec26"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderAddFormState::apply_sponsor_preset (cognitive 34): ProviderAddFormState::apply_sponsor_preset has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (25 pts), match/switch 5 (8 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":"src-tauri/src/cli/tui/form/provider_templates.rs"},"region":{"startLine":739}}}],"partialFingerprints":{"codehealthFindingId/v1":"7793cb199103d041b86becc104c4ce3af4053bcd381fe3d33b4a319cfae40d22"}},{"ruleId":"D2","level":"warning","message":{"text":"ProxyService::proxy_status_from_daemon_response_for_app (cognitive 34): ProxyService::proxy_status_from_daemon_response_for_app has cognitive complexity 34 (threshold 15). Drivers by points: if/else 23 (32 pts), boolean chains 1, loops 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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":1156}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a49f70823e2caf6127295656f861f3087bbccbbfcca90f90044758f629b3ea8"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::workers::handle_session_req (cognitive 33): cc_switch::cli::tui::runtime_systems::workers::handle_session_req has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (23 pts), match/switch 4 (7 pts), loops 1 (2 pts), boolean chains 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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":1524}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d0aed6d6ea8dbf3e67d5224e7a31cccdc5e999485e8ccd13f69e566045c19f0"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::workers::run_session_scan (cognitive 33): cc_switch::cli::tui::runtime_systems::workers::run_session_scan has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (26 pts), match/switch 4 (5 pts), boolean chains 1, loops 1 (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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":1956}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dde8cd084ab9d93970793b1747bffe462aacd197268be49cb767f129fd10425"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::cache::parse_targets_completed_cancellable (cognitive 33): cc_switch::session_manager::cache::parse_targets_completed_cancellable has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 4 (5 pts), match/switch 2 (5 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":"src-tauri/src/session_manager/cache.rs"},"region":{"startLine":715}}}],"partialFingerprints":{"codehealthFindingId/v1":"defb0e01b95b83c4a7f3f4ffe1eaa7ff59839da96d606d6dbd09a89d00be6398"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::gemini::search_session_cancellable (cognitive 33): cc_switch::session_manager::providers::gemini::search_session_cancellable has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 2 (4 pts), match/switch 2 (4 pts) (nesting depth added 17). 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":"src-tauri/src/session_manager/providers/gemini.rs"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0c8d52055414ab23ec335ad8054072229530dcce395cb590648eeb00978fb92"}},{"ruleId":"D2","level":"warning","message":{"text":"benchmark_cc_switch.run_pty_command (cognitive 33): benchmark_cc_switch.run_pty_command has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (18 pts), error handling 4 (10 pts), loops 2 (4 pts), boolean chains 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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":921}}}],"partialFingerprints":{"codehealthFindingId/v1":"77a727d264ff2b8e13f444a7690b9c5df23b013b8613cf0dff0f9e80c9e458c5"}},{"ruleId":"D2","level":"warning","message":{"text":"check_benchmark_thresholds.check_thresholds (cognitive 33): check_benchmark_thresholds.check_thresholds has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 4, loops 3 (4 pts), ternaries 1 (3 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":"scripts/check_benchmark_thresholds.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"a78f8ca9e0184be922d27bf466e894383caaad4e0ab5df8c220f930eb163a45f"}},{"ruleId":"D2","level":"warning","message":{"text":"App::on_webdav_sync_form_key (cognitive 32): App::on_webdav_sync_form_key has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (28 pts), match/switch 3 (4 pts) (nesting depth added 18). 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":"src-tauri/src/cli/tui/app/form_handlers/webdav.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"84c60cc3c04d367d4c67e7afab7d21ae47c8a07e53711a6721220deb63913b0c"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderService::delete (cognitive 32): ProviderService::delete has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 7, match/switch 2 (3 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":3973}}}],"partialFingerprints":{"codehealthFindingId/v1":"33bb1e71c7c1ad9f8a8228971ba022466d4f932e15fbb15081c16736a0ef2148"}},{"ruleId":"D2","level":"warning","message":{"text":"ProxyService::get_status_with_cleanup_for_app (cognitive 32): ProxyService::get_status_with_cleanup_for_app has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 1 (3 pts), boolean chains 2, loops 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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":948}}}],"partialFingerprints":{"codehealthFindingId/v1":"062c54a356d333afe3edea353f2f84b505f9344954fb0aff0ec1acceca536ff7"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::data::load_providers_with_mode (cognitive 32): cc_switch::cli::tui::data::load_providers_with_mode has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19 (21 pts), match/switch 5 (6 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 4). 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":"src-tauri/src/cli/tui/data.rs"},"region":{"startLine":1482}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e35cd49c228b59848a20a5f5e93f598f936c33dfb0ee0198f5563070c80a525"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::handlers::handle_managed_auth_msg (cognitive 32): cc_switch::cli::tui::runtime_systems::handlers::handle_managed_auth_msg has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (22 pts), match/switch 6 (10 pts) (nesting depth added 19). 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":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"58c8c706c68556d9cbdb6b25dcbf1d74f241749f4ed977c414726d53169a83a8"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::overlay::layout::wrap_segment (cognitive 32): cc_switch::cli::tui::ui::overlay::layout::wrap_segment has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 2 (3 pts), boolean chains 2 (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":"src-tauri/src/cli/tui/ui/overlay/layout.rs"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"aad1ab69a40e2ff9e7572df68c693e441e5cc736470838c40218d4125da4290e"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::handlers::handle_passthrough_request (cognitive 32): cc_switch::proxy::handlers::handle_passthrough_request has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (20 pts), match/switch 6 (9 pts), boolean chains 3 (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":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"71aa60379c9eb3e581fd883e9076078b592ea75e9e1f6c34d3457ad27324b597"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::session_usage_driver::scan_jsonl_incremental (cognitive 32): cc_switch::services::session_usage_driver::scan_jsonl_incremental has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (24 pts), match/switch 4 (5 pts), boolean chains 2, loops 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":"src-tauri/src/services/session_usage_driver.rs"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f0e926d96582f432ac60501dee66f91936163d02aff12e91a01992f1f408243"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::transcript::index_opencode_files (cognitive 32): cc_switch::session_manager::transcript::index_opencode_files has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":1624}}}],"partialFingerprints":{"codehealthFindingId/v1":"91f1ff3d2b53ba06a10272a749205e0b8c8d5826f069f655cea6f5d490e12234"}},{"ruleId":"D2","level":"warning","message":{"text":"App::on_settings_key (cognitive 31): App::on_settings_key has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 7 (18 pts), if/else 4 (10 pts), boolean chains 3 (nesting depth added 17). 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":"src-tauri/src/cli/tui/app/content_config.rs"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"239f564266b1050a30ced56777614f474d776dfc22f2b32e1ce436a0ac10111d"}},{"ruleId":"D2","level":"warning","message":{"text":"TranscriptIndexStore::enforce_cache_budget_with_limits (cognitive 31): TranscriptIndexStore::enforce_cache_budget_with_limits has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 6, loops 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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":1059}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f15280a88e12d8f379625393fe5fea02eec784e4afd1e36b611201718da9c1f"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::copilot_optimizer::merge_tool_results (cognitive 31): cc_switch::proxy::copilot_optimizer::merge_tool_results has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 4 (7 pts), match/switch 4 (7 pts), boolean chains 2 (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":"src-tauri/src/proxy/copilot_optimizer.rs"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"8304fa4156012ec2be3cc11cd7f75e17a19fe09dee37271eb3b921b2027be831"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_chat::chat_message_to_response_output_item (cognitive 31): cc_switch::proxy::providers::transform_codex_chat::chat_message_to_response_output_item has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (26 pts), match/switch 1 (3 pts), loops 1 (2 pts) (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":"src-tauri/src/proxy/providers/transform_codex_chat.rs"},"region":{"startLine":1633}}}],"partialFingerprints":{"codehealthFindingId/v1":"790a7fb1125dba8450b2a86a46a6078b0f138e5618580970d8bc7b8516043d7f"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_responses::anthropic_to_responses (cognitive 31): cc_switch::proxy::providers::transform_responses::anthropic_to_responses has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22 (31 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":"src-tauri/src/proxy/providers/transform_responses.rs"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"33fb39fbe9093653932d3c89fe0cc890b592b5284473253963858f48fe1c5171"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderService::update (cognitive 30): ProviderService::update has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 8, match/switch 1 (2 pts) (nesting depth added 2). 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":2494}}}],"partialFingerprints":{"codehealthFindingId/v1":"141e94dd2c7ad086f0b386167ca1afd17f6b620d4e964b9b919063cae7b4404a"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderService::sync_current_to_live (cognitive 30): ProviderService::sync_current_to_live has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (6 pts), match/switch 3 (5 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":3132}}}],"partialFingerprints":{"codehealthFindingId/v1":"9221581901da0f1647d6e2f4e983021d5ce106b5e499ef2b04622c4fb6bb3a8b"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::forms::mcp::mcp_preview_value (cognitive 30): cc_switch::cli::tui::ui::forms::mcp::mcp_preview_value has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 3 (7 pts), match/switch 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7816a61307c10ec2d3d15df2a31ee7495121e40198b3c2ac2aa994322da6fad"}},{"ruleId":"D2","level":"warning","message":{"text":"Database::apply_schema_migrations_on_conn (cognitive 29): Database::apply_schema_migrations_on_conn has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 4 (10 pts), match/switch 2 (3 pts) (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":"src-tauri/src/database/schema.rs"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3fd7365c333843896553b1acd1087c734ed9a94910249953f16763bd7e79d42"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_actions::editor::submit_provider_form_apply_codex_config_toml (cognitive 29): cc_switch::cli::tui::runtime_actions::editor::submit_provider_form_apply_codex_config_toml has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 3 (5 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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":907}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5576b329df50fe1b5c6fb79f54e922520802a66f116d0629f2353ade2e172d8"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::config::render_openclaw_agents_route (cognitive 29): cc_switch::cli::tui::ui::config::render_openclaw_agents_route has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21 (25 pts), loops 2, boolean chains 1, match/switch 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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":2294}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bb476dc0b58c731fae6fbc5e095b9063585230d86291441330b11f87ac33af2"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::main_page::render_main (cognitive 29): cc_switch::cli::tui::ui::main_page::render_main has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23 (24 pts), boolean chains 4, loops 1 (nesting depth added 1). 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":"src-tauri/src/cli/tui/ui/main_page.rs"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcf2e81c25d7efc2de73b009287c5144a8719aadbb3dbdeaec175f09a6d794fc"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::claude::normalize_anthropic_tool_thinking_history (cognitive 29): cc_switch::proxy::providers::claude::normalize_anthropic_tool_thinking_history has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 2 (3 pts), match/switch 1 (3 pts) (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":"src-tauri/src/proxy/providers/claude.rs"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"736be678e6d467fd6fdd66d32f04f3133c980cd40e076a102f2966def276771a"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_chat::responses_content_to_chat_content (cognitive 29): cc_switch::proxy::providers::transform_codex_chat::responses_content_to_chat_content has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (25 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (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":"src-tauri/src/proxy/providers/transform_codex_chat.rs"},"region":{"startLine":1197}}}],"partialFingerprints":{"codehealthFindingId/v1":"473dc9fef7258da92f559c1569c526bf2f8c9e9dc64d26dbbf2bf732f4dc5112"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::subscription::query_claude_quota (cognitive 29): cc_switch::services::subscription::query_claude_quota has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 2 (3 pts), boolean chains 2, match/switch 2 (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":"src-tauri/src/services/subscription.rs"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"49600b0750c1e3ac3145c830f1dbc6a6347883c9fd4f70bde02c6803d63fad5e"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::pi::visit_active_messages_cancellable (cognitive 29): cc_switch::session_manager::providers::pi::visit_active_messages_cancellable has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (26 pts), match/switch 1 (2 pts), loops 1 (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":"src-tauri/src/session_manager/providers/pi.rs"},"region":{"startLine":791}}}],"partialFingerprints":{"codehealthFindingId/v1":"079b0c18593487c856b3bede67fa74e1afe34489c10709da06890ebef478c072"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_session_project_picker_key (cognitive 28): App::handle_session_project_picker_key has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (24 pts), match/switch 3 (4 pts) (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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":1256}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac12a0523a020c83f48ea42f6d00776c3f303790fe4a151d79daccac261973d9"}},{"ruleId":"D2","level":"warning","message":{"text":"StreamingOutcomeRecorder::finish (cognitive 28): StreamingOutcomeRecorder::finish has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (27 pts), 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":"src-tauri/src/proxy/response_handler.rs"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"76ce8f22652a9e3bb9e3e84694f8edb53a6a17dc696530429a07d3b7daac0b16"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillService::update_skill (cognitive 28): SkillService::update_skill has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (25 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":"src-tauri/src/services/skill.rs"},"region":{"startLine":2679}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdb6e934717887d47759b5b10a8e9b49ecfa4ec50639c86ce95afa4f157d9337"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::commands::provider_inspect::push_subscription_quota_lines (cognitive 28): cc_switch::cli::commands::provider_inspect::push_subscription_quota_lines has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (23 pts), loops 2 (4 pts), 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":"src-tauri/src/cli/commands/provider_inspect.rs"},"region":{"startLine":770}}}],"partialFingerprints":{"codehealthFindingId/v1":"f51b43a63402ba05dbf1cd2d3a2e0d6e064880b722cd1f9b000badc21b18205b"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::chrome::render_footer (cognitive 28): cc_switch::cli::tui::ui::chrome::render_footer has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 2 (4 pts), boolean chains 2 (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":"src-tauri/src/cli/tui/ui/chrome.rs"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1ed7bb9b653fb850a39fefec873a7a9700e81cec7e60847655a680c2c9ba3a9"}},{"ruleId":"D2","level":"warning","message":{"text":"App::on_usage_logs_key (cognitive 27): App::on_usage_logs_key has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (22 pts), match/switch 2 (3 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":"src-tauri/src/cli/tui/app/content_usage.rs"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"d050d04124cd8aea051262c6d057443abf39d9c02b0d6a8981ed14803cefcf38"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_mcp_field_navigation (cognitive 27): App::handle_mcp_field_navigation has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (23 pts), match/switch 2 (3 pts), boolean chains 1 (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":"src-tauri/src/cli/tui/app/form_handlers/mcp.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"2684f99cefee22b6431c9ea4636eb3b25687a66f01148996ae0d4d4ab0cf0d42"}},{"ruleId":"D2","level":"warning","message":{"text":"Database::init_impl_inner (cognitive 27): Database::init_impl_inner has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18 (23 pts), match/switch 2 (3 pts), boolean chains 1 (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":"src-tauri/src/database/mod.rs"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"95f6ab5f80000a07e040d2d04a3fb482d3c1ec8703c35e46ea61efadc2cc8f1e"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexConfigPatch::apply_to (cognitive 27): CodexConfigPatch::apply_to has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 7 (9 pts), boolean chains 4 (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":"src-tauri/src/live/project/codex.rs"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"daa03658c7a021708f15a4f5f4861cc928f25e4d2f3774dec6457f4234f79351"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexConfigPatch::write_route (cognitive 27): CodexConfigPatch::write_route has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3, loops 2, match/switch 2 (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":"src-tauri/src/live/project/codex.rs"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca8d7fb72d4049dc51a017a482b331a021997160efb9cf977ab46481df4a03b2"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatToResponsesState::finalize_tools (cognitive 27): ChatToResponsesState::finalize_tools has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 1, loops 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":"src-tauri/src/proxy/providers/streaming_codex_chat.rs"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"511afea1ffed820eb7d72f45de2973b3177b680069a5f20f5b36526b109146d8"}},{"ruleId":"D2","level":"warning","message":{"text":"LiveSnapshot::restore (cognitive 27): LiveSnapshot::restore has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (24 pts), match/switch 2 (3 pts) (nesting depth added 10). 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":"src-tauri/src/services/provider/live.rs"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeea4d507b7aedba6b310eb3d9cb523596032e36f5056b2e13301a27142b2fb1"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::queue_sessions_refresh_if_needed (cognitive 27): cc_switch::cli::tui::queue_sessions_refresh_if_needed has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 9 (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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":2739}}}],"partialFingerprints":{"codehealthFindingId/v1":"d087cdabb6d7ca752975952684d639065221997c67718569f082aaa359d39f62"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::data::build_usage_daily_chart_series (cognitive 27): cc_switch::cli::tui::data::build_usage_daily_chart_series has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (21 pts), loops 4 (5 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":"src-tauri/src/cli/tui/data.rs"},"region":{"startLine":2842}}}],"partialFingerprints":{"codehealthFindingId/v1":"b41ab1aa539e639d7015c9e683411671ed50b27a7eea935ec48dd136a7a80ca9"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::shared::quota_compact_line (cognitive 27): cc_switch::cli::tui::ui::shared::quota_compact_line has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 2, 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":"src-tauri/src/cli/tui/ui/shared.rs"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"a19f6dca6863f8a646246f104eaaf9622079d4ac1f58c44772b7601c49e08e5c"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::forwarder::validate_responses_stream_start (cognitive 27): cc_switch::proxy::forwarder::validate_responses_stream_start has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 2 (3 pts), match/switch 1 (2 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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":1248}}}],"partialFingerprints":{"codehealthFindingId/v1":"449999bda3c7111d4e83d8e3ec91170549c74cde693ffaf455fb4e2fec8cc29e"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_gemini::rectify_tool_call_args (cognitive 27): cc_switch::proxy::providers::transform_gemini::rectify_tool_call_args has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 3, loops 1 (3 pts), match/switch 1 (2 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":"src-tauri/src/proxy/providers/transform_gemini.rs"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"36103f958083635342a2d322de58f8defa4656a765d1e958a755db41f71779b1"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::provider::live::sync_openclaw_providers_from_live (cognitive 27): cc_switch::services::provider::live::sync_openclaw_providers_from_live has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2, match/switch 1 (2 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":"src-tauri/src/services/provider/live.rs"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b8448b7ce7da07296b973cd89ef4e013a737e48769d9205c7499b7f8b8032b3"}},{"ruleId":"D2","level":"warning","message":{"text":"TranscriptRemotePager::refresh_source_if_pending (cognitive 26): TranscriptRemotePager::refresh_source_if_pending has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 3, match/switch 1 (2 pts) (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":"src-tauri/src/cli/tui/app/types.rs"},"region":{"startLine":1535}}}],"partialFingerprints":{"codehealthFindingId/v1":"484e04db3c18512a0bb81af65e2f5e9a6d7cabec454f48891ac05aec8d7704b3"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderService::save_claude_from_editor (cognitive 26): ProviderService::save_claude_from_editor has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 6, match/switch 1 (4 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":"src-tauri/src/services/provider/claude_editor_service.rs"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"f55cdc8713cc04b0f370b87640a6bd4939aae8607458e1de19a17d0a648c9715"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderService::prepare_post_commit_action (cognitive 26): ProviderService::prepare_post_commit_action has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 3, match/switch 1 (2 pts) (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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"f784701de25de2024014bbd9ec7401418871d3ff6ae204a6223d49b4acf0a882"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderService::validate_provider_settings (cognitive 26): ProviderService::validate_provider_settings has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 1, 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":3763}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d33c2eede857318ca870ec603a445bd3f09616c7d421168d82d64bbc6fb5757"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillService::scan_unmanaged (cognitive 26): SkillService::scan_unmanaged has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 2 (5 pts), loops 3 (4 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":"src-tauri/src/services/skill.rs"},"region":{"startLine":3349}}}],"partialFingerprints":{"codehealthFindingId/v1":"321ced1b892626bddc41d439fd585b0b5270dbc495badc1555330b21ca060c24"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_actions::editor::submit_config_common_snippet (cognitive 26): cc_switch::cli::tui::runtime_actions::editor::submit_config_common_snippet has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 3 (6 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":1350}}}],"partialFingerprints":{"codehealthFindingId/v1":"09ee0ae5d12ba4cae2a87deddd337b70479a027bf147ffe552fa723086aae0d1"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::types::parse_model_ids_from_response (cognitive 26): cc_switch::cli::tui::runtime_systems::types::parse_model_ids_from_response has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (8 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":"src-tauri/src/cli/tui/runtime_systems/types.rs"},"region":{"startLine":931}}}],"partialFingerprints":{"codehealthFindingId/v1":"6851cbbda7ba8e733894a3309fc498ffdf18f363923b4efc103da11126fd1b20"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_codex_reasoning_picker_key (cognitive 25): App::handle_codex_reasoning_picker_key has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (20 pts), match/switch 3 (5 pts) (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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6e08db3924b30f47588ff04a8819dcd9cc0bb51b3ce7dce067f193af4591392"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderAddFormState::apply_template_fields (cognitive 25): ProviderAddFormState::apply_template_fields has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 3, match/switch 1 (2 pts) (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":"src-tauri/src/cli/tui/form/provider_templates.rs"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"b60652d6f46eafbff9bd9cbd14ab483cd4217ecfe387fc7ba133b457c9b732f8"}},{"ruleId":"D2","level":"warning","message":{"text":"DotenvPatch::apply (cognitive 25): DotenvPatch::apply has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 5, loops 2, match/switch 1 (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":"src-tauri/src/live/patch/dotenv.rs"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"d55f252098d818eea88e7889b4587439cf2fe141cfe257fee16187371621a63a"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::handle_tui_action (cognitive 25): cc_switch::cli::tui::handle_tui_action has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3, match/switch 2 (3 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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":2495}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e38f530b53dbbce89ba8f62ced39efbb6e39fd2777c03167d78edb378c5f649"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::types::build_model_fetch_candidate_urls (cognitive 25): cc_switch::cli::tui::runtime_systems::types::build_model_fetch_candidate_urls has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 2, match/switch 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":"src-tauri/src/cli/tui/runtime_systems/types.rs"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"e16530c8eef2a3c78656112695215c7142e1903a62bf457021152ff4c33e2742"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::config::create_secure_config_dir_all_no_symlink (cognitive 25): cc_switch::config::create_secure_config_dir_all_no_symlink has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (15 pts), match/switch 3 (9 pts), loops 1 (nesting depth added 17). 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":"src-tauri/src/config.rs"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f57dd3e6366d1829de833d3682c651413395384bf240b8598e1c2fb2c2c87c2"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::mcp::convert_from_hermes_mcp_spec (cognitive 25): cc_switch::mcp::convert_from_hermes_mcp_spec has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 3 (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":"src-tauri/src/mcp.rs"},"region":{"startLine":1506}}}],"partialFingerprints":{"codehealthFindingId/v1":"f00c6c48fa455ec51bf9df0d3887b1b000cb449c948b56ecda703734bc006093"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_anthropic::append_sanitized_tool_result_value (cognitive 25): cc_switch::proxy::providers::transform_codex_anthropic::append_sanitized_tool_result_value has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 14). 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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":846}}}],"partialFingerprints":{"codehealthFindingId/v1":"b15c0e29402e7a9397f4e5f74b5c3a3a623d203464aa659c5866715266ce7cb2"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_picker_overlay_key (cognitive 24): App::handle_picker_overlay_key has cognitive complexity 24 (threshold 15). Drivers by points: if/else 24. 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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"3267bd4a67a5f10bde8c8087971528d0fdd8bd68c0670078c4e4ddc02dceb393"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderAddFormState::fields (cognitive 24): ProviderAddFormState::fields has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (21 pts), match/switch 2, boolean chains 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":"src-tauri/src/cli/tui/form/provider_state.rs"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f19f6491951c493ef5f036c1ae55683e791923eaa72005432055b239b177d1d"}},{"ruleId":"D2","level":"warning","message":{"text":"JsonPatch::apply_to (cognitive 24): JsonPatch::apply_to has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 6 (7 pts), match/switch 1 (2 pts), boolean chains 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":"src-tauri/src/live/patch/json.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c5a0256be2139d3fd107e9fc65260e2184885b54eca4e3789fc157b04be792c"}},{"ruleId":"D2","level":"warning","message":{"text":"TomlPatch::apply_to (cognitive 24): TomlPatch::apply_to has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 6 (7 pts), match/switch 1 (2 pts), boolean chains 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":"src-tauri/src/live/patch/toml.rs"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dc4fcd720139244abd5deef6450a6ebb0210640c592577fbe772038461b6edc"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexOAuthManager::add_account_internal (cognitive 24): CodexOAuthManager::add_account_internal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 3 (5 pts), boolean chains 4 (nesting depth added 5). 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":"src-tauri/src/proxy/providers/codex_oauth_auth.rs"},"region":{"startLine":1157}}}],"partialFingerprints":{"codehealthFindingId/v1":"224e0da1b70b64887935a61d50b8b4214471b8a1372ba3039cbb28e1b5afecd9"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillService::import_from_apps (cognitive 24): SkillService::import_from_apps has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 5 (6 pts), match/switch 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":"src-tauri/src/services/skill.rs"},"region":{"startLine":3434}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6504a3a1a9a61cf3cfce83d4ec5a3aefa9857cdace1c426527df2284d4933fe"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::commands::provider::edit_provider (cognitive 24): cc_switch::cli::commands::provider::edit_provider has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (19 pts), loops 1 (3 pts), boolean chains 2 (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":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":1706}}}],"partialFingerprints":{"codehealthFindingId/v1":"64ca9cd5501c48af275d9957f787b4d870f2888443b5f5d77ee762c60f165850"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::form::provider_state_loading::populate_opencode_form (cognitive 24): cc_switch::cli::tui::form::provider_state_loading::populate_opencode_form has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (24 pts) (nesting depth added 13). 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":"src-tauri/src/cli/tui/form/provider_state_loading.rs"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddfb490df2828d5317ec12d23b85f991cd7331d3982223e00a7499e52541db65"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::overlay::pickers::bounded_openclaw_agents_model_label (cognitive 24): cc_switch::cli::tui::ui::overlay::pickers::bounded_openclaw_agents_model_label has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, loops 3 (4 pts) (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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":1969}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e268119c48a81b551513a96745331a516c1807d4dcac6edc70ef51ddfcd03c8"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::sessions::render_session_list (cognitive 24): cc_switch::cli::tui::ui::sessions::render_session_list has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 3, match/switch 1 (nesting depth added 2). 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":"src-tauri/src/cli/tui/ui/sessions.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a461980e4f5d28d1079b55d2b322291002376ac9e9578ac401b3a70716b0d71"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::codex_config::update_codex_config_snippet (cognitive 24): cc_switch::codex_config::update_codex_config_snippet has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), match/switch 3 (4 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":"src-tauri/src/codex_config.rs"},"region":{"startLine":1726}}}],"partialFingerprints":{"codehealthFindingId/v1":"97feb3074246e2cc9518ff583d505f060d0c91dcccbd249af1c74dfdc4e921db"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::deeplink::provider::merge_codex_config (cognitive 24): cc_switch::deeplink::provider::merge_codex_config has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (24 pts) (nesting depth added 13). 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":"src-tauri/src/deeplink/provider.rs"},"region":{"startLine":565}}}],"partialFingerprints":{"codehealthFindingId/v1":"e397e3f5e58e4126c2d38b37a08de27f2e1758720d4466b97c29a665ed4854ab"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::mcp::json_value_to_toml_item (cognitive 24): cc_switch::mcp::json_value_to_toml_item has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (4 pts), match/switch 2 (4 pts), boolean chains 2 (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":"src-tauri/src/mcp.rs"},"region":{"startLine":1030}}}],"partialFingerprints":{"codehealthFindingId/v1":"66d0f9685cb863cc3b4db8b408965993b17a96270520f27b39c6a0c7addc650a"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::visible_apps::apply_startup_policy (cognitive 24): cc_switch::services::visible_apps::apply_startup_policy has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, loops 1 (2 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":"src-tauri/src/services/visible_apps.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"a542dbeef91998879eed4882da4967e27c2eef197bb7ef8dfa49d7ca4d0fba3d"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::utils::visit_bounded_lines_cancellable_with_status (cognitive 24): cc_switch::session_manager::providers::utils::visit_bounded_lines_cancellable_with_status has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 1, loops 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":"src-tauri/src/session_manager/providers/utils.rs"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"b553dd0a1de5db02a7dc3eac3c92bf6f98400ccbe51658588b9c222c7dfd1fe5"}},{"ruleId":"D2","level":"warning","message":{"text":"AnthropicToResponsesState::close_block (cognitive 23): AnthropicToResponsesState::close_block has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (22 pts), match/switch 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":"src-tauri/src/proxy/providers/streaming_codex_anthropic.rs"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecfddc880f32cee7379eade75941306fd192846e150b38786be1536daa0e0c9c"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillService::extract_repo_archive_with_limits (cognitive 23): SkillService::extract_repo_archive_with_limits has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (4 pts), match/switch 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":"src-tauri/src/services/skill/discovery.rs"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"92af147d28135ab67490d1e098dc44d65466a6b3dd0cb07fdd26a2c40a51ad74"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillService::sync_to_app_unlocked (cognitive 23): SkillService::sync_to_app_unlocked has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (3 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":"src-tauri/src/services/skill.rs"},"region":{"startLine":1584}}}],"partialFingerprints":{"codehealthFindingId/v1":"b30d204341af54f5e8a0d7d569cffda550f502a3b2a5ab7b1f08740154b68572"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::config::render_openclaw_tools_route (cognitive 23): cc_switch::cli::tui::ui::config::render_openclaw_tools_route has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 1, loops 1, match/switch 1 (nesting depth added 1). 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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":1400}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeb737e88b9dc011c2a9f305656d57dc48f837754e7ac51e3927cb7229093d24"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::main_page::render_local_env_tool_cell (cognitive 23): cc_switch::cli::tui::ui::main_page::render_local_env_tool_cell has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (19 pts), match/switch 2 (4 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":"src-tauri/src/cli/tui/ui/main_page.rs"},"region":{"startLine":599}}}],"partialFingerprints":{"codehealthFindingId/v1":"49ba27769ea6fb759bc8c32ed578378da22564e4002d572ce187325c7b40cced"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::shared::bounded_trimmed_text_for_display (cognitive 23): cc_switch::cli::tui::ui::shared::bounded_trimmed_text_for_display has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (4 pts), boolean chains 3 (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":"src-tauri/src/cli/tui/ui/shared.rs"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a0d34647d51696007b0563fd3c21f3eb17e5ea7c39aa6a7c3e3efda857c5dfe"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::mcp::convert_from_opencode_mcp_spec (cognitive 23): cc_switch::mcp::convert_from_opencode_mcp_spec has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 2, match/switch 1 (nesting depth added 12). 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":"src-tauri/src/mcp.rs"},"region":{"startLine":859}}}],"partialFingerprints":{"codehealthFindingId/v1":"8089f97b49edc6f6c5268f995903118aae4700da520c9a63ee9eb25c24616de4"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::mcp::convert_to_hermes_mcp_spec (cognitive 23): cc_switch::mcp::convert_to_hermes_mcp_spec has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 3, match/switch 1 (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":"src-tauri/src/mcp.rs"},"region":{"startLine":1456}}}],"partialFingerprints":{"codehealthFindingId/v1":"61d3e9b4e0d321ae9be3141fca31e0b3276a92b3911dcbcc25c85f76f7f0b4d7"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_anthropic::drop_incomplete_tool_turns (cognitive 23): cc_switch::proxy::providers::transform_codex_anthropic::drop_incomplete_tool_turns has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 1, loops 1 (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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":924}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4fbfe9ccf9593c46964fab1de9dd84f27f8b4054d0703d1cbbb21352f76a550"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_chat::responses_to_chat_completions_with_reasoning (cognitive 23): cc_switch::proxy::providers::transform_codex_chat::responses_to_chat_completions_with_reasoning has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (19 pts), loops 2, match/switch 1 (2 pts) (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":"src-tauri/src/proxy/providers/transform_codex_chat.rs"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"04a66f2edc5485bfd2f701ea50c4cf6dc38c7c7e2e8b038c437788603df0419c"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::env_checker::check_shell_configs (cognitive 23): cc_switch::services::env_checker::check_shell_configs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (17 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 15). 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":"src-tauri/src/services/env_checker.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fc62f3ceee5326ea014ab82c945677e0f16ff963ef3b603804914d72d190e82"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::provider::codex_login::plan (cognitive 23): cc_switch::services::provider::codex_login::plan has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 7, match/switch 3 (5 pts) (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":"src-tauri/src/services/provider/codex_login.rs"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"a130e6efd02bdc5dad84a103539e3addea5405b1da388ae2d813b0d7562ba915"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::provider::common::migrate_legacy_codex_config (cognitive 23): cc_switch::services::provider::common::migrate_legacy_codex_config has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (18 pts), match/switch 2 (3 pts), boolean chains 1, 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":"src-tauri/src/services/provider/common.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e95c8459dbbf3437de21f625756cdb319ee2d181cad752d2a228c5e4f2f01f2"}},{"ruleId":"D2","level":"warning","message":{"text":"benchmark_cc_switch.main (cognitive 23): benchmark_cc_switch.main has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 2, error handling 1, ternaries 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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":2153}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6f94e0b199d7517c7d03c541c7e3f509766ecff33b65a4012a8ba0949888579"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_managed_account_picker_key (cognitive 22): App::handle_managed_account_picker_key has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":728}}}],"partialFingerprints":{"codehealthFindingId/v1":"40f2cfaa48d2e6bfaa325eb3aa954f6788d5210f7b102fafb74856ee5e00ff72"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenClawRenderModelPreview::from_data (cognitive 22): OpenClawRenderModelPreview::from_data has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (3 pts) (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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":1733}}}],"partialFingerprints":{"codehealthFindingId/v1":"095f2b6e5517264da74d02e10d2fb67f7c8a2484740b60a92f529c958a5713f0"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderService::extract_codex_common_config_from_config_toml (cognitive 22): ProviderService::extract_codex_common_config_from_config_toml has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (3 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":"src-tauri/src/services/provider/codex.rs"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"9af485ec9ed2ca9f1bc28f1a513785a84253e6c1fbdfb151a90aa4e3da4734be"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderService::run_staged_transaction (cognitive 22): ProviderService::run_staged_transaction has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 4 (5 pts) (nesting depth added 10). 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"16c06386dd73b40ae74914783f64a729b3dd2d4ba1e5e196f54e4f5f924bb773"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::commands::prompts::manage_pi_system_prompt (cognitive 22): cc_switch::cli::commands::prompts::manage_pi_system_prompt has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 3, boolean chains 2 (nesting depth added 8). 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":"src-tauri/src/cli/commands/prompts.rs"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"4299f88fe7e7359070b5fadd882d532210844d1f29aa4371d1f01e249fc9a1b1"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::commands::provider_input::build_sponsor_template_settings_config (cognitive 22): cc_switch::cli::commands::provider_input::build_sponsor_template_settings_config has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 3 (5 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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":567}}}],"partialFingerprints":{"codehealthFindingId/v1":"a723a756816c6d8a2278d1a541d3a68c46d6e3dd58ffd5d11cd755f25d732b31"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::copilot_optimizer::sanitize_orphan_tool_results (cognitive 22): cc_switch::proxy::copilot_optimizer::sanitize_orphan_tool_results has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 3 (7 pts), loops 2 (3 pts), boolean chains 1 (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":"src-tauri/src/proxy/copilot_optimizer.rs"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"abbe2a5dd96a56966d28a4cc1a4c3e9e6d156ae269bcaaffaf5635f6a450b4fd"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::gemini_schema::normalize_json_schema (cognitive 22): cc_switch::proxy::providers::gemini_schema::normalize_json_schema has cognitive complexity 22 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 4 (10 pts), match/switch 1 (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":"src-tauri/src/proxy/providers/gemini_schema.rs"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d3490a5f288ad541191ded6e1e562f9de59138378c792131b5d0ee459a23971"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::gemini_schema::object_requires_parameters_json_schema (cognitive 22): cc_switch::proxy::providers::gemini_schema::object_requires_parameters_json_schema has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 1 (2 pts), boolean chains 1, loops 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":"src-tauri/src/proxy/providers/gemini_schema.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ba0fda27277ebf849bc4127c40db9eef21a245429508719e4c2f46af5d3a699"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::provider::key_field_live::edit_common (cognitive 22): cc_switch::services::provider::key_field_live::edit_common has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 13). Of this number, 21 points are the body\u0027s own statements and 1 belongs 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":"src-tauri/src/services/provider/key_field_live.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8baf1b95e6202d5803416ee3251426090f092d38a5bbe8b5b88afede5a87f41"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::subscription::query_gemini_quota (cognitive 22): cc_switch::services::subscription::query_gemini_quota has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 5, boolean chains 2, loops 1 (2 pts) (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":"src-tauri/src/services/subscription.rs"},"region":{"startLine":1266}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf5d525cdf78487a53e10ae557c99b1688c712e1feaa2c5a7a58dc52d395053f"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::opencode::delete_session_sqlite (cognitive 22): cc_switch::session_manager::providers::opencode::delete_session_sqlite has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 1 (2 pts), match/switch 1 (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":"src-tauri/src/session_manager/providers/opencode.rs"},"region":{"startLine":1478}}}],"partialFingerprints":{"codehealthFindingId/v1":"455b0481a594c4b6c7be7b7a1d36369c4a42762be3c91ae6eeccbc89662c0b18"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiAppConfig::load (cognitive 21): MultiAppConfig::load has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (13 pts), match/switch 2 (7 pts), boolean chains 1 (nesting depth added 6). 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":"src-tauri/src/app_config.rs"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a1706b5288e8d75b40d7324fedb016c75c98d7162ec921482d8ebd33864f1d8"}},{"ruleId":"D2","level":"warning","message":{"text":"App::on_skills_installed_key (cognitive 21): App::on_skills_installed_key has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 2 (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":"src-tauri/src/cli/tui/app/content_skills.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"41e8de76600d5e1498afaf97c06c9ae64d536bce9e8f392202b000ccfac5c988"}},{"ruleId":"D2","level":"warning","message":{"text":"PagedListState::wheel (cognitive 21): PagedListState::wheel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (19 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":"src-tauri/src/cli/tui/app/paged_list.rs"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"b427a95cca4691e09c6b63fe33ab751091ad4b5440405e0eb5e9c9b872f7d243"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderAddFormState::normalized_codex_model_catalog_for_save (cognitive 21): ProviderAddFormState::normalized_codex_model_catalog_for_save has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 1, loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/form/provider_json.rs"},"region":{"startLine":1211}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ff9c005d67e5d7499aee49d34a15d5e19098ad381cb98094357f3e2a099abec"}},{"ruleId":"D2","level":"warning","message":{"text":"Supervisor::watch_worker (cognitive 21): Supervisor::watch_worker has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 4, boolean chains 3 (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":"src-tauri/src/daemon/supervisor.rs"},"region":{"startLine":927}}}],"partialFingerprints":{"codehealthFindingId/v1":"38df6dc29382c5a0a0e18d2aac7af0fb0c42e698270e7e9994805f367910750e"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatToResponsesState::handle_chat_chunk (cognitive 21): ChatToResponsesState::handle_chat_chunk has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 1 (3 pts) (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":"src-tauri/src/proxy/providers/streaming_codex_chat.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddcded642964284e65226da3386918954f902e6199e6bcff3606f1f1550dcb55"}},{"ruleId":"D2","level":"warning","message":{"text":"ScanCacheStore::delete_missing_for_provider_bounded (cognitive 21): ScanCacheStore::delete_missing_for_provider_bounded has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 pts), match/switch 1 (3 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":"src-tauri/src/session_manager/scan_cache_store.rs"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"833d98c7503139898aae25a71eceb5e301a84013a6c5087eaab771c24ec10202"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::claude_mcp::upsert_mcp_server (cognitive 21): cc_switch::claude_mcp::upsert_mcp_server has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 3 (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":"src-tauri/src/claude_mcp.rs"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3b02526508dae1f06b2fb17f0bd2287a9fffb02c0fb8b58b14e69bd91e267d1"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_anthropic::anthropic_response_to_responses_with_context (cognitive 21): cc_switch::proxy::providers::transform_codex_anthropic::anthropic_response_to_responses_with_context has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (3 pts), loops 1 (2 pts), boolean chains 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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":1265}}}],"partialFingerprints":{"codehealthFindingId/v1":"3385802475e27d2880884e1e41c27061775dba88fd1916302477c8c0afb30cff"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_chat::append_responses_item_as_chat_message (cognitive 21): cc_switch::proxy::providers::transform_codex_chat::append_responses_item_as_chat_message has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 7). 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":"src-tauri/src/proxy/providers/transform_codex_chat.rs"},"region":{"startLine":652}}}],"partialFingerprints":{"codehealthFindingId/v1":"136272dd809b99863f46af9d61e5b49217268017eafc06c9cba463f05a1b4106"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::thinking_rectifier::rectify_anthropic_request (cognitive 21): cc_switch::proxy::thinking_rectifier::rectify_anthropic_request has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 3 (6 pts), loops 2 (3 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":"src-tauri/src/proxy/thinking_rectifier.rs"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"93e1fa62081ebf00a5d33e89939f101c892b699ff0ab30616f20edab418798a5"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::provider::common_config::scrub_leaked_gemini_common_config_if_needed (cognitive 21): cc_switch::services::provider::common_config::scrub_leaked_gemini_common_config_if_needed has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 3, match/switch 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":"src-tauri/src/services/provider/common_config.rs"},"region":{"startLine":912}}}],"partialFingerprints":{"codehealthFindingId/v1":"eec39e2d311d957062eaf9af2daee4b38818847aa34d741296b779cbfdccd177"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::provider::live_merge::merge_toml_table_like_with_base (cognitive 21): cc_switch::services::provider::live_merge::merge_toml_table_like_with_base has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (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":"src-tauri/src/services/provider/live_merge.rs"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"d08485fbdaf6b2ed677dd2f8f0d38145338c90e52b1b6ec955011c462564f0fa"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::pi::read_tree_cancellable (cognitive 21): cc_switch::session_manager::providers::pi::read_tree_cancellable has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (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":"src-tauri/src/session_manager/providers/pi.rs"},"region":{"startLine":649}}}],"partialFingerprints":{"codehealthFindingId/v1":"f13a18a25a4795427b3733b70a31b5f7f0a51cffeb2cd8a66b4c715558dfdf39"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::query_manifest::build_view_manifest_with_search (cognitive 21): cc_switch::session_manager::query_manifest::build_view_manifest_with_search has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 pts), boolean chains 3 (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":"src-tauri/src/session_manager/query_manifest.rs"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"29e5fa013aec22763bf0532067c4c01f6cbe0335c289e217fd487ea19c58ba06"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_codex_inline_catalog_key (cognitive 20): App::handle_codex_inline_catalog_key has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 2 (3 pts) (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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":994}}}],"partialFingerprints":{"codehealthFindingId/v1":"971b25414d7afda216d81c41e92316c3bf41847e5a01b270197f7f83554ff671"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_usage_query_page_key (cognitive 20): App::handle_usage_query_page_key has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 4 (6 pts) (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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":1311}}}],"partialFingerprints":{"codehealthFindingId/v1":"856fa866442fd751a7b0b30863e9724e57c39ec8381f36ca0cf7d4bd2348ffff"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_hermes_models_picker_navigation_key (cognitive 20): App::handle_hermes_models_picker_navigation_key has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 1 (nesting depth added 10). 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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a55cbf13f71aee4041d82f8f7c169b5729dee817a60f2a7702d1e14d545bd81"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_openclaw_agents_fallback_picker_key (cognitive 20): App::handle_openclaw_agents_fallback_picker_key has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 2 (3 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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":1457}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dc63f991f3e4b3d506567643046d485b9f091ae1af723c6f8499752b05267a9"}},{"ruleId":"D2","level":"warning","message":{"text":"PromptService::enable_prompt (cognitive 20): PromptService::enable_prompt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (nesting depth added 10). 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":"src-tauri/src/services/prompt.rs"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"59fde4cd5ce38d03273b82ced39154b54d9af424efc03bafa45dacd6f6020eff"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderService::query_provider_usage (cognitive 20): ProviderService::query_provider_usage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (20 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":"src-tauri/src/services/provider/usage.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3b08e6e1408492295b8139f6da6a9d82d52143e6c7c32dcb2e9254437cafd43"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillService::merge_local_ssot_skills (cognitive 20): SkillService::merge_local_ssot_skills has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (3 pts), match/switch 1 (3 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":"src-tauri/src/services/skill/discovery.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecb35ab838674970a3e3cbca791a3013aeb1bcda35cec5f2c7a1f0fea074a3c9"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillService::source_path_from_readme (cognitive 20): SkillService::source_path_from_readme has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (4 pts), boolean chains 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":"src-tauri/src/services/skill.rs"},"region":{"startLine":2451}}}],"partialFingerprints":{"codehealthFindingId/v1":"31d044fa6d3341f692d8af47baa1f1d835ad0b2829c41409b5f97f4bab8b0128"}},{"ruleId":"D2","level":"warning","message":{"text":"TranscriptIndexStore::reserve_build_budget (cognitive 20): TranscriptIndexStore::reserve_build_budget has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, loops 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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":960}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ffb0e1a71234b3a26fa1b041e2921fa6a856f87694e98fe3442b81650151735"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::editor::detect_external_editors_from (cognitive 20): cc_switch::cli::editor::detect_external_editors_from has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (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":"src-tauri/src/cli/editor.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"4902296c3d50948e81b4b01e8537aa47efbb8e45c84a2446bfaac3a027d1891e"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::handlers::handle_model_fetch_msg (cognitive 20): cc_switch::cli::tui::runtime_systems::handlers::handle_model_fetch_msg has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 12). 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":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":1051}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b6d67ae55b5dab863554d65d08efc6339ed7c39d93f3b1a0569e4d7988e777e"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::workers::skills_worker_loop (cognitive 20): cc_switch::cli::tui::runtime_systems::workers::skills_worker_loop has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 6 (11 pts), loops 3 (5 pts), if/else 1 (3 pts), boolean chains 1 (nesting depth added 9). 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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":3768}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0e7a0d53163f3424b476bef04545b48509beaa65bfadbe1518201415bc99768"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::forms::provider::mark_common_json_lines (cognitive 20): cc_switch::cli::tui::ui::forms::provider::mark_common_json_lines has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee7dc6e3ffb2e9a7a2ad43b6fdd09c458423f6d8a6a6192b2aa0209b25122ae9"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::overlay::pickers::render_failover_queue_manager_overlay (cognitive 20): cc_switch::cli::tui::ui::overlay::pickers::render_failover_queue_manager_overlay has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 5). 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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":2143}}}],"partialFingerprints":{"codehealthFindingId/v1":"a518ba9bffd535a03d9618d5b714fb9b281917f258986a8f0a3aa95c61cd893b"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::deeplink::provider::merge_gemini_config (cognitive 20): cc_switch::deeplink::provider::merge_gemini_config has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/deeplink/provider.rs"},"region":{"startLine":607}}}],"partialFingerprints":{"codehealthFindingId/v1":"243d2a946b35f47e2635207b9671652ef710b28f3829fd45ce250f6b051905fa"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::coding_plan::query_kimi (cognitive 20): cc_switch::services::coding_plan::query_kimi has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (2 pts), match/switch 2, 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":"src-tauri/src/services/coding_plan.rs"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a50d00f9c79a68319b8388bb40bdbf2cbf27e46bcaadeb9b9a8b404ef4ced99"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::provider::claude_editor::inactive_fields (cognitive 20): cc_switch::services::provider::claude_editor::inactive_fields has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 pts), boolean chains 2 (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":"src-tauri/src/services/provider/claude_editor.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"f02e856bdef6be5e5447ed4c83059c733c1096b66c0bf9d4c8ef9377a22863a6"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::session_usage::resolve_claude_cursor (cognitive 20): cc_switch::services::session_usage::resolve_claude_cursor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (19 pts), 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":"src-tauri/src/services/session_usage.rs"},"region":{"startLine":746}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc273d4a958eb226f9456ef820aae0e39886a8b3dbb83917844f6a97b390c870"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::session_usage_gemini::sync_single_gemini_file (cognitive 20): cc_switch::services::session_usage_gemini::sync_single_gemini_file has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 3 (5 pts), boolean chains 2, 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":"src-tauri/src/services/session_usage_gemini.rs"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"b51f9790613ecda66124224020dc4002f0460745d9e2637b9de081465d128b9a"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::skill::parse_branch_from_source_url (cognitive 20): cc_switch::services::skill::parse_branch_from_source_url has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 1 (2 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":"src-tauri/src/services/skill.rs"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"f48c56fbdc05b0280d5cb715e3445555cab58f4ab49798e494995b0b573cd94b"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::webdav::webdav_status_error (cognitive 20): cc_switch::services::webdav::webdav_status_error has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5 (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":"src-tauri/src/services/webdav.rs"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"03cecbbd14f3ffd3e45625d2bd7ba9d5e036c64fe94a7561fc05080e4d184386"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::hermes::stream_sessions_cancellable (cognitive 20): cc_switch::session_manager::providers::hermes::stream_sessions_cancellable has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 3 (4 pts), boolean chains 2, loops 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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b8a5968e9ac3957a6d42b07638b1b999f83fefd6da9918bbfc5528d16b76979"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_local_proxy_settings_page_key (cognitive 19): App::handle_local_proxy_settings_page_key has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 4 (7 pts) (nesting depth added 10). 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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"2def23307bd45e5f93d46195a0dbaa0319f654464f49c9d1d373c72fc727e487"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderAddFormState::apply_provider_json_value_to_fields (cognitive 19): ProviderAddFormState::apply_provider_json_value_to_fields has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (16 pts), loops 1 (2 pts), boolean chains 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":"src-tauri/src/cli/tui/form/provider_state.rs"},"region":{"startLine":2786}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ef60bb2b5a21f851589c45c5c1fe64cddbd8fac2ece42149d8cc1fc2b5226fb"}},{"ruleId":"D2","level":"warning","message":{"text":"Database::migrate_v5_to_v6 (cognitive 19): Database::migrate_v5_to_v6 has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (nesting depth added 12). 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":"src-tauri/src/database/schema.rs"},"region":{"startLine":1266}}}],"partialFingerprints":{"codehealthFindingId/v1":"a45aee239a3bc017d070b5cefbc37c09d4be3b77cef6bddfb423d513e1a4acec"}},{"ruleId":"D2","level":"warning","message":{"text":"StreamLogCollector::record_chunk (cognitive 19): StreamLogCollector::record_chunk has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (3 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":"src-tauri/src/proxy/usage/parser.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"48c693527aa04dc390c081191e47ffae5c41686d3a3b74f9b8a17fe0e87183f5"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderService::set_common_config_snippet (cognitive 19): ProviderService::set_common_config_snippet has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, boolean chains 1. 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":2198}}}],"partialFingerprints":{"codehealthFindingId/v1":"72faf79aca1dba50eb6f82b5c2608751f82c714a3f7ae646eaf713f11901a166"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderService::prepare_live_snapshot (cognitive 19): ProviderService::prepare_live_snapshot has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 7). 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":3409}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2cc73c2e8e41045abfb2fb20a67762c64b610d151fe0f7214fb7343247e3e33"}},{"ruleId":"D2","level":"warning","message":{"text":"ProxyService::preserve_toml_mcp_servers_from_existing_config (cognitive 19): ProxyService::preserve_toml_mcp_servers_from_existing_config has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (4 pts), match/switch 1 (2 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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":2235}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa1b48c6614ac2c8ef08aee2ed71b3f3d9b4e20e9d44ce490978ccf1fe809549"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_actions::editor::validate_provider_submit (cognitive 19): cc_switch::cli::tui::runtime_actions::editor::validate_provider_submit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5 (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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"54224630ad3d2426a9fed8b774048c1ee3d8dc1f57d74047a5deb454a6ee5447"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_actions::editor::submit_provider_form_apply_codex_auth (cognitive 19): cc_switch::cli::tui::runtime_actions::editor::submit_provider_form_apply_codex_auth has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 2 (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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"c638e78a1cecef65ee4e9a8d5434cd48768339fb3c4ce478ad4affcf3c278eef"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::forms::mcp::mcp_field_label_and_value (cognitive 19): cc_switch::cli::tui::ui::forms::mcp::mcp_field_label_and_value has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (17 pts), match/switch 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"54a08b5d05184286b1f2d6a83b8d4982baa591279de63972522cacbc84be93ae"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::forms::provider::provider_json_preview_source_fits (cognitive 19): cc_switch::cli::tui::ui::forms::provider::provider_json_preview_source_fits has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4, boolean chains 3 (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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a3388c9b54818043108dd02045539373da9c64a008883afb2d701b92b6aa6f5"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::handlers::responses_sse_to_response_value (cognitive 19): cc_switch::proxy::handlers::responses_sse_to_response_value has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), match/switch 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":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ed7d43ccc2d8a24f9ccc23d340ee67fde98dc4ff8a81a484a015c72973638a9"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::codex_chat_common::extract_reasoning_field_text (cognitive 19): cc_switch::proxy::providers::codex_chat_common::extract_reasoning_field_text has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 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":"src-tauri/src/proxy/providers/codex_chat_common.rs"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"1578dc78506686ea4d91fc7ce9c4a5722ae537e40034edd59936678d80b230c6"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::streaming_codex_anthropic::responses_sse_events_from_anthropic_message (cognitive 19): cc_switch::proxy::providers::streaming_codex_anthropic::responses_sse_events_from_anthropic_message has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (6 pts), loops 1 (2 pts), boolean chains 1 (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":"src-tauri/src/proxy/providers/streaming_codex_anthropic.rs"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"303b6ef16711d727720b745b4770472bcab60cf8bd838de511deaac374f6c903"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_gemini::gemini_to_anthropic_with_shadow_and_hints (cognitive 19): cc_switch::proxy::providers::transform_gemini::gemini_to_anthropic_with_shadow_and_hints has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (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":"src-tauri/src/proxy/providers/transform_gemini.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"547a6661ea0a4b15f995b285d96cdda4ae29142748addf776ff0c735154d7252"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::coding_plan::query_minimax (cognitive 19): cc_switch::services::coding_plan::query_minimax has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 2, 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":"src-tauri/src/services/coding_plan.rs"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"27d01fcfc443d3bebf4d4bc5a4b717f75aae2bb2791c7e72843fb5704a794519"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::session_usage_codex::parse_parent_signature_file (cognitive 19): cc_switch::services::session_usage_codex::parse_parent_signature_file has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 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":"src-tauri/src/services/session_usage_codex.rs"},"region":{"startLine":1192}}}],"partialFingerprints":{"codehealthFindingId/v1":"820fba908ac2c8dca2bfd3686b5dcad284b58e24c9572c5bc3332ce311081f4a"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::session_usage_pi::parse_usage_record (cognitive 19): cc_switch::services::session_usage_pi::parse_usage_record has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 3 (5 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":"src-tauri/src/services/session_usage_pi.rs"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"7254cbf9ec2e2974136ab5a270bc2c502fd40804da91beec6e94e26dc0cb8321"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::store::persist_multi_app_config_to_db_preserving_current_providers (cognitive 19): cc_switch::store::persist_multi_app_config_to_db_preserving_current_providers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 5 (8 pts), boolean chains 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":"src-tauri/src/store.rs"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"b08edbe75417668d22cf34d9c78c78f3d777ba81dd5c69a0ece49642f8f26095"}},{"ruleId":"D2","level":"warning","message":{"text":"App::on_config_webdav_key (cognitive 18): App::on_config_webdav_key has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), match/switch 2 (3 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":"src-tauri/src/cli/tui/app/content_config.rs"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d6e0721cd70eefceab251fa88eacb8e96450408ee9fce74f4e95c7aa1e79a00"}},{"ruleId":"D2","level":"warning","message":{"text":"App::on_prompts_key (cognitive 18): App::on_prompts_key has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 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":"src-tauri/src/cli/tui/app/content_entities.rs"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"129e4381434689f47df1c6eba90abd0253982c5c4105d250491fd51ac06e13a2"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_provider_field_navigation (cognitive 18): App::handle_provider_field_navigation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), boolean chains 3, match/switch 1 (nesting depth added 7). 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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"b90cfeea44a0390bd8cedaeb9da413a51aba1aa085338163b4c0fea79e1a3fa5"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_usage_query_field_activate (cognitive 18): App::handle_usage_query_field_activate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 1 (nesting depth added 8). 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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":1445}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e918b6e16ea8df8fafc7379d421cdea70843451e7bd1b106305c1eeddacf8e7"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_failover_queue_manager_key (cognitive 18): App::handle_failover_queue_manager_key has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 2 (3 pts) (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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":1795}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ad7f3c37d574ca026ccc19aa689627e68ada034ff38b50c0c8af4e881c71d05"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelMapping::map_model (cognitive 18): ModelMapping::map_model has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (18 pts) (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":"src-tauri/src/proxy/model_mapper.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2ef1c308299a53cff6dbd918f2d46294f8a6c64ebac5421967379a5b6e89185"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderService::import_default_config (cognitive 18): ProviderService::import_default_config has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":2673}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9f7677e2e542d26f01c124b051692809e7e19b39742f47c62f1c63b4d145911"}},{"ruleId":"D2","level":"warning","message":{"text":"PagedManifestBuilder::publish (cognitive 18): PagedManifestBuilder::publish has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (15 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":"src-tauri/src/session_manager/paged_manifest.rs"},"region":{"startLine":1618}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f16ab161e559a59631a5808854e30881cf55bd8e3e52a4e94ccd753044e2663"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::handlers::handle_codex_history_msg (cognitive 18): cc_switch::cli::tui::runtime_systems::handlers::handle_codex_history_msg has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 4 (8 pts) (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":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f24479f1f5c9e985e6ffa2c5dc4d2980669584af686798a6b0c0d7c2b4385c9"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::config::render_settings (cognitive 18): cc_switch::cli::tui::ui::config::render_settings has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 2 (3 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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":3426}}}],"partialFingerprints":{"codehealthFindingId/v1":"6638faaba6a35c601aff99726cd329cf904f1d0d2d366ccaa5c4e81d443f2641"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::home_chart::render_home_usage_chart (cognitive 18): cc_switch::cli::tui::ui::home_chart::render_home_usage_chart has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, 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":"src-tauri/src/cli/tui/ui/home_chart.rs"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb92c07e98d3237683e9e86f2b21eb427ee7d48b06ae607c0e679178ae4f5677"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::overlay::pickers::render_hermes_models_picker_overlay (cognitive 18): cc_switch::cli::tui::ui::overlay::pickers::render_hermes_models_picker_overlay has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 6). 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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":937}}}],"partialFingerprints":{"codehealthFindingId/v1":"2385078c150a3db97d5ee0fac1eda716f06b54d8206608b49f44ecb1faa8d381"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::providers::render_providers (cognitive 18): cc_switch::cli::tui::ui::providers::render_providers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 2 (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":"src-tauri/src/cli/tui/ui/providers.rs"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5be6b9377c8beac8980d63d8e773c59c346dbcd2e77ed7a8fed805ea84e7184"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::deeplink::provider::import_provider_from_deeplink (cognitive 18): cc_switch::deeplink::provider::import_provider_from_deeplink has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (3 pts), match/switch 1 (3 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":"src-tauri/src/deeplink/provider.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"da232d5d179180dd73a4a20c8c522c3aebdc21c626f72d9b826b420241ca5a93"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::deeplink::utils::decode_base64_param (cognitive 18): cc_switch::deeplink::utils::decode_base64_param has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 3 (4 pts), boolean chains 3, match/switch 1 (3 pts) (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":"src-tauri/src/deeplink/utils.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"72c3f0ead1f843e2b17b7de37734dc9432047907ce4ab11153b982347ebb2af4"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::hermes_config::get_providers (cognitive 18): cc_switch::hermes_config::get_providers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 1 (4 pts), loops 2 (3 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":"src-tauri/src/hermes_config.rs"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"71855f954f2db1a7bfeb3fe24346cb3dd2064a0c7b4ab74676d26c99cbd0aa96"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::mcp::import_from_hermes (cognitive 18): cc_switch::mcp::import_from_hermes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 3 (6 pts), 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":"src-tauri/src/mcp.rs"},"region":{"startLine":1625}}}],"partialFingerprints":{"codehealthFindingId/v1":"259417c53e898655960fb62e622f3511fb8442e429ee50ed4fba24d4b0d904ff"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::mode::operation::recover (cognitive 18): cc_switch::mode::operation::recover has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (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":"src-tauri/src/mode/operation.rs"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0bc629dfae6add403f768563d97eff575533afc2d068f0001b5b3fb8bae30d8"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::handlers::finish_codex_live_aware_response (cognitive 18): cc_switch::proxy::handlers::finish_codex_live_aware_response has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 3 (5 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":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":1060}}}],"partialFingerprints":{"codehealthFindingId/v1":"655da04c56dcb43e2def33518c4c07d5051fdb6b088251d8e9176750d8b27d81"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_chat::apply_reasoning_options (cognitive 18): cc_switch::proxy::providers::transform_codex_chat::apply_reasoning_options has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 2 (3 pts), boolean chains 1 (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":"src-tauri/src/proxy/providers/transform_codex_chat.rs"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"3173a8cf420a3045d67bd056dfafc42d4e1aeed3cfad07cf6afad0b2a5ba8ab0"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::tool_media::strip_media_from_tool_value_at_depth (cognitive 18): cc_switch::proxy::tool_media::strip_media_from_tool_value_at_depth has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 pts), 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":"src-tauri/src/proxy/tool_media.rs"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"603aefecb01f7725da339db396c63d1d0223fc8551cc5adc6b76b171066f708a"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::provider::live::capture_live_snapshot (cognitive 18): cc_switch::services::provider::live::capture_live_snapshot has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 2 (3 pts) (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":"src-tauri/src/services/provider/live.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"e427d846bb9e6918f45dc5b0870a125a27bf79c9f472a70c8beed68319e12a21"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::opencode::load_messages_cancellable (cognitive 18): cc_switch::session_manager::providers::opencode::load_messages_cancellable has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), match/switch 2, boolean chains 1, loops 1 (nesting depth added 2). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/session_manager/providers/opencode.rs"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"6aec5fd2574c7d74242e1b649bd8deb3abcec584a971d2f5ed8e4d6b99f688a7"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::opencode::load_messages_sqlite_from_connection (cognitive 18): cc_switch::session_manager::providers::opencode::load_messages_sqlite_from_connection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2, boolean chains 1 (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":"src-tauri/src/session_manager/providers/opencode.rs"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8abd7f0cd0c5b2ef37a0336ad55a140fdb8ff8c25730df0eff970120c3e3a0e"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::pi::visit_session_targets_cancellable (cognitive 18): cc_switch::session_manager::providers::pi::visit_session_targets_cancellable has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), match/switch 2 (3 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":"src-tauri/src/session_manager/providers/pi.rs"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"685ffa42c1342e6d64a62b3c1190fdde41e546d143a5ce11f584c944229d10af"}},{"ruleId":"D2","level":"warning","message":{"text":"TuiScreen._consume_escape (cognitive 18): TuiScreen._consume_escape has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":1031}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f33dac027d9c5264020cbb3f4b0ad381ccecabd6b5e7164986841f6264214b5"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiAppConfig::migrate_mcp_to_unified (cognitive 17): MultiAppConfig::migrate_mcp_to_unified has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), match/switch 1 (2 pts) (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":"src-tauri/src/app_config.rs"},"region":{"startLine":683}}}],"partialFingerprints":{"codehealthFindingId/v1":"da8822887644e877cf829fe5c8f4baa9e7e1cfdfa512ce8aa470d11cdac31a79"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_codex_model_catalog_page_key (cognitive 17): App::handle_codex_model_catalog_page_key has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (3 pts) (nesting depth added 8). 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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":1142}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc949a158a83a5e4416fba2d29048915d018e6228752e1efa8f66ac68405fe0b"}},{"ruleId":"D2","level":"warning","message":{"text":"ProxyService::enable_takeover_for_app_unlocked_with_options (cognitive 17): ProxyService::enable_takeover_for_app_unlocked_with_options has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, boolean chains 7. 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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":2719}}}],"partialFingerprints":{"codehealthFindingId/v1":"764e2ce5d100a14be6c86e96a942ee5bb31bcaa7df3a55fb38775a6d480e55e2"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillService::sync_updated_skill_to_app (cognitive 17): SkillService::sync_updated_skill_to_app has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, 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":"src-tauri/src/services/skill.rs"},"region":{"startLine":1421}}}],"partialFingerprints":{"codehealthFindingId/v1":"fed2d27a6c49521eeebe2f23c34fdbf66d3485b896ebac40e3c245200135ed2d"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillService::migration_tree_hash_with_ignored_root_file::visit (cognitive 17): SkillService::migration_tree_hash_with_ignored_root_file::visit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 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":"src-tauri/src/services/skill.rs"},"region":{"startLine":1677}}}],"partialFingerprints":{"codehealthFindingId/v1":"40ea03ce995d7d33aeb892674d9643b1e0ba98637c4a110e4b88d9b9cc3e4501"}},{"ruleId":"D2","level":"warning","message":{"text":"PagedManifestBuilder::build_deduplicated_recency_runs (cognitive 17): PagedManifestBuilder::build_deduplicated_recency_runs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts) (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":"src-tauri/src/session_manager/paged_manifest.rs"},"region":{"startLine":1881}}}],"partialFingerprints":{"codehealthFindingId/v1":"55010a0af364ba9efc9916fd8951842f72bfb66b441fb974ccd5b5bed7f6f287"}},{"ruleId":"D2","level":"warning","message":{"text":"TranscriptIndexStore::open_or_build (cognitive 17): TranscriptIndexStore::open_or_build has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 1 (2 pts), boolean chains 1, 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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8969f2dc4af2288e7ea9672181aebd469602dfb51dfcc2102e80262f3b01dd8"}},{"ruleId":"D2","level":"warning","message":{"text":"TranscriptIndexStore::open_current (cognitive 17): TranscriptIndexStore::open_current has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 2, match/switch 2 (nesting depth added 1). 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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"24703ce5711ae7d3a43aa049fe7c1ba29cb2c5d79775d3ae945784010ae7dc3d"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::commands::mcp::list_servers (cognitive 17): cc_switch::cli::commands::mcp::list_servers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 1 (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":"src-tauri/src/cli/commands/mcp.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d9ae0a73cc1beb9a735d2750e083afdb7307cca254b824089fdf92317235633"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_actions::editor::submit_provider_form_apply_json (cognitive 17): cc_switch::cli::tui::runtime_actions::editor::submit_provider_form_apply_json has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 3 (4 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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"093283a5a4769e471cf0375a56f8a8addc6a00ce4aa146242ba6e10e0627a3b1"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::shared::bounded_json_preview_with_budget (cognitive 17): cc_switch::cli::tui::ui::shared::bounded_json_preview_with_budget has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 1, match/switch 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":"src-tauri/src/cli/tui/ui/shared.rs"},"region":{"startLine":1293}}}],"partialFingerprints":{"codehealthFindingId/v1":"e509997a7ae905da6bd4f97207bfcfbc64f2a4e7dbfb73b559ce1fde302700af"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::usage::render_usage_metrics (cognitive 17): cc_switch::cli::tui::ui::usage::render_usage_metrics has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3 (nesting depth added 2). 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":"src-tauri/src/cli/tui/ui/usage.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"1086b81a44537c59567438ca8439c08712ff34bd6198718d45d0bdf48b16611d"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::mcp::convert_to_opencode_mcp_spec (cognitive 17): cc_switch::mcp::convert_to_opencode_mcp_spec has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, match/switch 1 (nesting depth added 8). 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":"src-tauri/src/mcp.rs"},"region":{"startLine":809}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4e21d7fa72a0c95afd42d51ac200ccc278167307cc76ddba99ce7eab184b118"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::streaming_gemini::merge_tool_call_snapshots (cognitive 17): cc_switch::proxy::providers::streaming_gemini::merge_tool_call_snapshots has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (7 pts), loops 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":"src-tauri/src/proxy/providers/streaming_gemini.rs"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"664149fbeee9decb65826aaf5c0b296eb9347e9dec24cc297f32263c26d78cab"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::thinking_rectifier::should_rectify_thinking_signature (cognitive 17): cc_switch::proxy::thinking_rectifier::should_rectify_thinking_signature has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/thinking_rectifier.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7399542dbc6a756de86e4546f1848bcea6123bd5a33fbe91fb95eca76df34b2"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::local_env_check::check_tool_version_at_path (cognitive 17): cc_switch::services::local_env_check::check_tool_version_at_path has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 1 (2 pts), loops 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":"src-tauri/src/services/local_env_check.rs"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"65ace9699d7676d1bd9f32a7bff18cc165dc3b1294be6526f5e486b2e1efbdbe"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::provider::codex_live::prepare (cognitive 17): cc_switch::services::provider::codex_live::prepare has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), match/switch 5 (6 pts), boolean chains 3 (nesting depth added 2). 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":"src-tauri/src/services/provider/codex_live.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7c1cecc2f1bd527380d0e7ea2be8124ef19a68982d0102bb4fce7de98aad626"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::session_usage_codex::normalize_codex_model (cognitive 17): cc_switch::services::session_usage_codex::normalize_codex_model has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3 (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":"src-tauri/src/services/session_usage_codex.rs"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"9469eda09ad5d3addf21a6e8a93f6bd671d146e60867ff50dc6b750971b921e9"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::claude::search_session_cancellable (cognitive 17): cc_switch::session_manager::providers::claude::search_session_cancellable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 3, boolean chains 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":"src-tauri/src/session_manager/providers/claude.rs"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a7c23f4cde101a18192df451d6f9b7ac1ddbfc08b3dd07df26f35fbcc8254e6"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::codex::append_db_title_candidates (cognitive 17): cc_switch::session_manager::providers::codex::append_db_title_candidates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, loops 1, 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":"src-tauri/src/session_manager/providers/codex.rs"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"54458183747da8d40149476bce0df47371787a5328c22ccc71ba38111fa1b810"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::opencode::load_opencode_sqlite_parts_preview (cognitive 17): cc_switch::session_manager::providers::opencode::load_opencode_sqlite_parts_preview has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, 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":"src-tauri/src/session_manager/providers/opencode.rs"},"region":{"startLine":1123}}}],"partialFingerprints":{"codehealthFindingId/v1":"26928beb365f61814e41b2ec00706ca57b719d9136eb20fd3858669b99c07298"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::opencode::get_first_user_summary_streaming (cognitive 17): cc_switch::session_manager::providers::opencode::get_first_user_summary_streaming has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 2 (nesting depth added 1). 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":"src-tauri/src/session_manager/providers/opencode.rs"},"region":{"startLine":1746}}}],"partialFingerprints":{"codehealthFindingId/v1":"d37c0b3f65d527f9d411c6f445513a2b53d7d2f96ca1feef912f8d433dbbb6c8"}},{"ruleId":"D2","level":"warning","message":{"text":"TuiScreen._handle_csi (cognitive 17): TuiScreen._handle_csi has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), ternaries 3 (5 pts) (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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":1075}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba2d0f6837ff9913f3580478fd2d43848c17fad654d49ca69e05eed99cd3b77f"}},{"ruleId":"D2","level":"warning","message":{"text":"App::open_proxy_help_view (cognitive 16): App::open_proxy_help_view has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 2, match/switch 2 (nesting depth added 1). 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":"src-tauri/src/cli/tui/app/content_config.rs"},"region":{"startLine":1364}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfabe808320991f7e18d769d54fae595e42213a38b63df90c7c8c2243939131e"}},{"ruleId":"D2","level":"warning","message":{"text":"App::on_sessions_wheel (cognitive 16): App::on_sessions_wheel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, match/switch 1 (2 pts) (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":"src-tauri/src/cli/tui/app/content_entities.rs"},"region":{"startLine":1053}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8189eb0dadf07de26d588eea1fa87ce516b616370e71be45c675870b1938e3f"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_codex_local_routing_field_activate (cognitive 16): App::handle_codex_local_routing_field_activate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 7). 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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":1079}}}],"partialFingerprints":{"codehealthFindingId/v1":"68c6fb27ecc24c6c61dc492cd72987c492320e92412a6ffb8cd1fcd37de82846"}},{"ruleId":"D2","level":"warning","message":{"text":"App::build_webdav_sync_form_save_action (cognitive 16): App::build_webdav_sync_form_save_action has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2 (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":"src-tauri/src/cli/tui/app/form_handlers/webdav.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"50dbb88044f3cc54e426f1b637f191b78ef9a7db89fd511be8297c2ea2ebd1ad"}},{"ruleId":"D2","level":"warning","message":{"text":"UsageLogPager::finish_request (cognitive 16): UsageLogPager::finish_request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), 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":"src-tauri/src/cli/tui/app/types.rs"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"42948664c97a448f0688b5e6a22fa70028df97c0fd32519dee2737a303764835"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderAddFormState::toggle_include_common_config (cognitive 16): ProviderAddFormState::toggle_include_common_config has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 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":"src-tauri/src/cli/tui/form/provider_state.rs"},"region":{"startLine":2903}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe3da728912b3b734d47461e8ebfa8a2717f3db7b0de43407dc0d3df6a18a958"}},{"ruleId":"D2","level":"warning","message":{"text":"Supervisor::ensure_worker_locked (cognitive 16): Supervisor::ensure_worker_locked has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 5, boolean chains 2 (nesting depth added 2). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/daemon/supervisor.rs"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"0431fef7c1dddd079081862825543b8f1bf9ef86ad1d5cdb606ed9c2d86c7e29"}},{"ruleId":"D2","level":"warning","message":{"text":"ClaudeProjection::of (cognitive 16): ClaudeProjection::of has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 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":"src-tauri/src/live/project/claude.rs"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5d1f96f459ff7f65a960e3fa88f53dac59dc5fcfc029b485a8d8ae110b75cfe"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderRouter::select_providers (cognitive 16): ProviderRouter::select_providers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 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":"src-tauri/src/proxy/provider_router.rs"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"3396f6f0875ef19585a589d42aa6b8c6b6f0b52d885067153d016f46674517f4"}},{"ruleId":"D2","level":"warning","message":{"text":"CopilotAuthManager::load_from_disk_sync (cognitive 16): CopilotAuthManager::load_from_disk_sync has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (16 pts) (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":"src-tauri/src/proxy/providers/copilot_auth.rs"},"region":{"startLine":1389}}}],"partialFingerprints":{"codehealthFindingId/v1":"38de09fe335e84fa17deea50be067137ae709aacd45d1fc106e8a9326a682ffe"}},{"ruleId":"D2","level":"warning","message":{"text":"ConfigService::sync_codex_live (cognitive 16): ConfigService::sync_codex_live has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (16 pts) (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":"src-tauri/src/services/config.rs"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"62d1acee2ee6ac813000e00689cf4e678b5d18aff65a14f8574758e838b9ca63"}},{"ruleId":"D2","level":"warning","message":{"text":"PagedManifestStore::validate_generation_pages_in (cognitive 16): PagedManifestStore::validate_generation_pages_in has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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":"src-tauri/src/session_manager/paged_manifest.rs"},"region":{"startLine":784}}}],"partialFingerprints":{"codehealthFindingId/v1":"29c4ab646a613dfc5520b09fedb20db76e24ca12931ad3724258bcaacaf26276"}},{"ruleId":"D2","level":"warning","message":{"text":"PagedManifestStore::read_or_recover_coordinator_locked (cognitive 16): PagedManifestStore::read_or_recover_coordinator_locked has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, match/switch 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":"src-tauri/src/session_manager/paged_manifest.rs"},"region":{"startLine":908}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc71f46486148650d99377cd119b207c876ad0aeb709ac9652342e11f0bd859d"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::i18n::texts::tui_local_proxy_settings_summary (cognitive 16): cc_switch::cli::i18n::texts::tui_local_proxy_settings_summary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (16 pts) (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":"src-tauri/src/cli/i18n.rs"},"region":{"startLine":1807}}}],"partialFingerprints":{"codehealthFindingId/v1":"cacd60bebc1d2df9fc2504374fc5862a5daf100ddb5f2a186320d8f626972460"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::handle_session_usage_sync_msg (cognitive 16): cc_switch::cli::tui::handle_session_usage_sync_msg has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 3 (4 pts), boolean chains 3 (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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":1918}}}],"partialFingerprints":{"codehealthFindingId/v1":"c595db2075ef5a3f9122dc6d601cd8f660702cab29ee95b8fcfa10d2bf64b63e"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::handlers::handle_speedtest_msg (cognitive 16): cc_switch::cli::tui::runtime_systems::handlers::handle_speedtest_msg has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (7 pts), match/switch 3 (6 pts), loops 1 (3 pts) (nesting depth added 10). 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":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1d295b9bd78b82dfcefe003ad19118e0062cfabe7bc2333089b3ab7525539c8"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::runtime_systems::workers::proxy_worker_loop (cognitive 16): cc_switch::cli::tui::runtime_systems::workers::proxy_worker_loop has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (13 pts), loops 2 (3 pts) (nesting depth added 9). 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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"6586a0c7420d4b575fdec906678b852e9ef9a76d48752c5631d0370141fa6a2a"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::forms::provider::render_provider_add_form (cognitive 16): cc_switch::cli::tui::ui::forms::provider::render_provider_add_form has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, match/switch 2. 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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d87a6925b33ee2ef1e116793a167a0f985ae15b5f9ab02575423dcd259ca7f9"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::cli::tui::ui::home_chart::render_bars (cognitive 16): cc_switch::cli::tui::ui::home_chart::render_bars has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (4 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":"src-tauri/src/cli/tui/ui/home_chart.rs"},"region":{"startLine":735}}}],"partialFingerprints":{"codehealthFindingId/v1":"d21dcadab5981e2799565e93856b1943348d35ec2df30db978d37401c5f2c50b"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::codex_config::build_simplified_catalog_from_texts (cognitive 16): cc_switch::codex_config::build_simplified_catalog_from_texts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (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":"src-tauri/src/codex_config.rs"},"region":{"startLine":1095}}}],"partialFingerprints":{"codehealthFindingId/v1":"14da4c10bf9e3c4a4fe7f54a505045ef3801a895479c4db84059a1b164d00643"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::config::resolve_config_dir (cognitive 16): cc_switch::config::resolve_config_dir has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (5 pts), loops 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":"src-tauri/src/config.rs"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"07ab3bb18c743c3e480badd7fc66712e1e4694d7b67c682ecdfc8b8905f5d647"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::daemon::migration::linux_database_holder_pids (cognitive 16): cc_switch::daemon::migration::linux_database_holder_pids has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 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":"src-tauri/src/daemon/migration.rs"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"188becee5ca02bbae1baf5857636342168b645c8e928892d04334e5e4a3eed5c"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::deeplink::provider::merge_claude_config (cognitive 16): cc_switch::deeplink::provider::merge_claude_config has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (16 pts) (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":"src-tauri/src/deeplink/provider.rs"},"region":{"startLine":505}}}],"partialFingerprints":{"codehealthFindingId/v1":"e312e50a6b458fafeecf6ceb59e905a34b169e13afb5afaecf3a2eb2f8f6cf6e"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::gemini_mcp::read_mcp_servers_map (cognitive 16): cc_switch::gemini_mcp::read_mcp_servers_map has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 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":"src-tauri/src/gemini_mcp.rs"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"f049006120184290360543f87d92083001bbde491b52df7869fcb3ee36fbe9c6"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::live::project::codex::custom_route (cognitive 16): cc_switch::live::project::codex::custom_route has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, match/switch 2 (3 pts) (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":"src-tauri/src/live/project/codex.rs"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3e93e52dc39595b3796ddb8eb76609a175395be19b36fb923d39ad4dc2bd9cb"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::mcp::sync_enabled_to_codex (cognitive 16): cc_switch::mcp::sync_enabled_to_codex has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 1 (3 pts), loops 1 (2 pts) (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":"src-tauri/src/mcp.rs"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"97bc68fa15f52164ab38f8efe4de39966d6816d3b9c0eeab826aa02bd5b1db63"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::opencode_config::set_provider_value (cognitive 16): cc_switch::opencode_config::set_provider_value has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (16 pts) (nesting depth added 10). 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":"src-tauri/src/opencode_config.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e5077d1968fe4080cc0635eb0ef862d7f1944942fceee8baac5282b6bf58eba"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::proxy::providers::transform_codex_anthropic::trailing_turn_supports_thinking (cognitive 16): cc_switch::proxy::providers::transform_codex_anthropic::trailing_turn_supports_thinking has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 1 (2 pts) (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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":1011}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5e06c8c51c4fdc5deb6d17c66c651c2761f7a7944521a30d0c6ae3279b599b4"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::session_usage_opencode::flush_opencode_batch (cognitive 16): cc_switch::services::session_usage_opencode::flush_opencode_batch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (5 pts), loops 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":"src-tauri/src/services/session_usage_opencode.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"af925d1541704ce69b1d34f65ce12391a847d4adb444ab0036d23e0905201d44"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::session_usage_opencode::query_assistant_messages (cognitive 16): cc_switch::services::session_usage_opencode::query_assistant_messages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (3 pts), boolean chains 1, 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":"src-tauri/src/services/session_usage_opencode.rs"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fb8aaa8c744f772730f66ca925ad3bc3cf3c8330acb246df8faa5e02a060dff"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::session_usage_pi::pi_request_identity (cognitive 16): cc_switch::services::session_usage_pi::pi_request_identity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts) (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":"src-tauri/src/services/session_usage_pi.rs"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeb0dcd9792cc1cf93749d8ad01bc2a54749c95c8ee0a95897941257fc0ec792"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::services::webdav_sync::archive::restore_skills_zip (cognitive 16): cc_switch::services::webdav_sync::archive::restore_skills_zip has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, loops 1 (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":"src-tauri/src/services/webdav_sync/archive.rs"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e8cba2128337919cbfcb0bb1997af8d1790f237fd2848ae1abd382035b1aa71"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::providers::pi::collect_jsonl_files (cognitive 16): cc_switch::session_manager::providers::pi::collect_jsonl_files has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), match/switch 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":"src-tauri/src/session_manager/providers/pi.rs"},"region":{"startLine":1054}}}],"partialFingerprints":{"codehealthFindingId/v1":"637b9afd29dbabb5107daaec24a9e96d40c08be65a754244f56c77586a0e7263"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::session_manager::transcript::index_jsonl (cognitive 16): cc_switch::session_manager::transcript::index_jsonl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":1458}}}],"partialFingerprints":{"codehealthFindingId/v1":"6706632513df4f9bac0d5af880f11e5bcea802a18bd70d0d5a5177b1ad468dfd"}},{"ruleId":"D2","level":"warning","message":{"text":"cc_switch::usage_script::validate_single_usage (cognitive 16): cc_switch::usage_script::validate_single_usage has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/usage_script.rs"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d37e22358cea4386d2a9a171dcf23ab10a559b3af5a58c1e78e10e0a915e205"}},{"ruleId":"D2","level":"warning","message":{"text":"Snapshot.restore (cognitive 16): Snapshot.restore has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, 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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f12c0076f4d2cb2334148994b563168ed0a8eaadddcb3699c246506552d3ac6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/i18n.rs: FileTooLong \u2014 8445 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 1634 free functions. The bar is 500 significant lines; this is 7945 over it, 16.89\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":"src-tauri/src/cli/i18n.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"027e48ee07ce42c7535e06273ea51d3ccb87ea10ceab3fe1dbdd0047a1ea2bc5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: App: TooManyMethods \u2014 281 methods, declared across 19 files: app/menu.rs (61), app/content_config.rs (53), form_handlers/provider.rs (36), overlay_handlers/pickers.rs (29), \u002B15 more file(s). The bar is 30 methods; this is 251 over it, 9.37\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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":"src-tauri/src/cli/tui/app/app_state.rs"},"region":{"startLine":722}}}],"partialFingerprints":{"codehealthFindingId/v1":"482068071d66cc6b90d6d649c464a5f81289babb45f06e996b6f02681532e02b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Database: TooManyMethods \u2014 251 methods, declared across 17 files: dao/proxy.rs (46), database/schema.rs (41), database/backup.rs (37), dao/settings.rs (25), \u002B13 more file(s). The bar is 30 methods; this is 221 over it, 8.37\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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":"src-tauri/src/database/mod.rs"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"0393f22bda220dc3823817364a11dea90457fee960466c9d63fda0311721e50d"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ProxyService: ClassTooLong \u2014 2988 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 162 methods, 2 blocks, lines 50-4306. The bar is 400 significant lines; this is 2588 over it, 7.47\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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"88563077760ee9e5dbeae8dc72e57c883cb4ff1fd34038e123d3e19488a49d1b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/types.rs: FileTooLong \u2014 3602 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 3102 over it, 7.20\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":"src-tauri/src/cli/tui/app/types.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef512070cd2fd4bd2a6121825ceac55f89512e51f2b4ae491d8b607cf82810e4"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ProviderAddFormState: TooManyMethods \u2014 206 methods, declared across 4 files: form/provider_state.rs (178), form/provider_json.rs (15), form/provider_templates.rs (11), tui/form.rs (2). The bar is 30 methods; this is 176 over it, 6.87\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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":"src-tauri/src/cli/tui/form.rs"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab5dd10bce9d4460b33a03d0940b286ca290c3e2fc33543410865989c506b3d4"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ProviderService: ClassTooLong \u2014 2682 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 157 methods. The bar is 400 significant lines; this is 2282 over it, 6.71\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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5b9f605384492d838fc6c95a38a25fa21e65af0cb283d266ab1fe52b2438377"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/config.rs: FileTooLong \u2014 3186 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 109 free functions. The bar is 500 significant lines; this is 2686 over it, 6.37\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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"abaceee776ba2c0bcad5fd50361c0589d6d65ba13de84976a267ec3f593eda68"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: services/proxy.rs: FileTooLong \u2014 3082 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 97% of them inside a single declaration: ProxyService (2 blocks, 50-4306). The bar is 500 significant lines; this is 2582 over it, 6.16\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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fe9063b98576febb4b6882bd0b4fcf9800377947d178f67b6c21534fb1a04b1"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::run: FunctionTooLong \u2014 cc_switch::cli::tui::run runs 595 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 495 over it, 5.95\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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":3051}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff78bac987c54c2357fec370cd8bbfff2f10145da27cd3ec8c69c61edbc3ceaa"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: provider/mod.rs: FileTooLong \u2014 2938 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 91% of them inside a single declaration: ProviderService (373-4129). The bar is 500 significant lines; this is 2438 over it, 5.88\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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d448f9787dce6beb8b320aa971460d2c2d3f30d69a01bf929694b7afa81b1f34"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: runtime_systems/workers.rs: FileTooLong \u2014 2876 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 73 free functions. The bar is 500 significant lines; this is 2376 over it, 5.75\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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9912b83cd7109d467e2247d6dfca77a7499233e64cd2478e240080a1661c2a84"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/data.rs: FileTooLong \u2014 2757 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 85 free functions. The bar is 500 significant lines; this is 2257 over it, 5.51\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":"src-tauri/src/cli/tui/data.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"489f879b8f5f65eddf7267278c67d2620c97548c5cd6679ffa00bba0cb765ade"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/mod.rs: FileTooLong \u2014 2721 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 59 free functions. The bar is 500 significant lines; this is 2221 over it, 5.44\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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d91e187c3bfacc0c16cc11f33e5cec376fb42c7aaf14432fc3425335b05c5dba"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ProxyService: TooManyMethods \u2014 162 methods. The bar is 30 methods; this is 132 over it, 5.40\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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"d21cf9a3615efd1a46e818d58be42292bfa65702e381d5b3f1559550234c4751"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SkillService: ClassTooLong \u2014 2126 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 126 methods. The bar is 400 significant lines; this is 1726 over it, 5.32\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":"src-tauri/src/services/skill.rs"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"8994a3768e2cbe69405cb34b6ef206d8e59ba228c4aff5687bdcb0306663ac55"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ProviderService: TooManyMethods \u2014 157 methods, declared across 10 files: provider/mod.rs (102), provider/codex.rs (15), provider/usage.rs (9), provider/claude.rs (8), \u002B6 more file(s). The bar is 30 methods; this is 127 over it, 5.23\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"15c42a93cb833c6ffc5dc7217ab8f62dac13df43bf7dbd222f135c389f684bac"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::runtime_actions::handle_action: FunctionTooLong \u2014 cc_switch::cli::tui::runtime_actions::handle_action runs 517 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 417 over it, 5.17\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":"src-tauri/src/cli/tui/runtime_actions/mod.rs"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba7237a9a57294c6d5dbee6e75dd67b8ffaabb467981b431c88d193410dc8b38"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: services/skill.rs: FileTooLong \u2014 2544 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 84% of them inside a single declaration: SkillService (630-3753). The bar is 500 significant lines; this is 2044 over it, 5.09\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":"src-tauri/src/services/skill.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5cd466c5cc177322e06212ee2bd3b1b67c9e53d89a180454dd6f4199ccd0848"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: form/provider_state.rs: FileTooLong \u2014 2382 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 1882 over it, 4.76\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":"src-tauri/src/cli/tui/form/provider_state.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7636bb7e0ca2a25cb2c2561f3d29b305a9cd1cb8797f9b90157e7259d60d4f2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Database.seed_model_pricing: MethodTooLong \u2014 seed_model_pricing runs 467 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 367 over it, 4.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":"src-tauri/src/database/schema.rs"},"region":{"startLine":1735}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd544144f9afb731d15ea6c4a7e553b7c42cbfadd5df4b11ccc5e290ab6609ff"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/provider_input.rs: FileTooLong \u2014 2242 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 80 free functions. The bar is 500 significant lines; this is 1742 over it, 4.48\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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff31962ede810674b98fa787b02b8e76db316aa0451fd0efb90fbd8a089e506e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: session_manager/transcript.rs: FileTooLong \u2014 2214 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 51 free functions. The bar is 500 significant lines; this is 1714 over it, 4.43\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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e1a62ddb2d85ea3d4c33de7eebb9d254db63725d9d3083a260885f51cca6bd6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::runtime_systems::handlers::handle_session_msg: FunctionTooLong \u2014 cc_switch::cli::tui::runtime_systems::handlers::handle_session_msg runs 435 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 335 over it, 4.35\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":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"95d06b27e7d6475afa1f66ef0561b7369f4ee5ed753bb81ff4123fb5766704c5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SkillService: TooManyMethods \u2014 126 methods, declared across 2 files: services/skill.rs (101), skill/discovery.rs (25). The bar is 30 methods; this is 96 over it, 4.20\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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":"src-tauri/src/services/skill.rs"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"33d51ffc4981b4d5763633866bc6d895044fa2abd4be56ddb481c18f6c3ebb8e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: overlay/pickers.rs: FileTooLong \u2014 1999 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 45 free functions. The bar is 500 significant lines; this is 1499 over it, 4.00\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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"76c5dbfb607c294fbb56c610eed81e57510de4321c0fc7ac68cf22d9410f7f08"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: ProviderAddFormState: TooManyFields \u2014 116 stored fields beside 206 methods. The bar is 30 stored fields; this is 86 over it, 3.87\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/form.rs"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9e5d60f7ae5f1a924edf54f2579690443d2870b68a1ed8c16b5ba14dc402ff6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: database/schema.rs: FileTooLong \u2014 1908 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 100% of them inside a single declaration: Database (9-3475). The bar is 500 significant lines; this is 1408 over it, 3.82\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":"src-tauri/src/database/schema.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d926b0c9a17e58534f83108c8ba7cbd5af1853b653b15938345db04fb42d402"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SessionsState: ClassTooLong \u2014 1525 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 111 methods, 3 blocks, lines 1121-4242. The bar is 400 significant lines; this is 1125 over it, 3.81\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":"src-tauri/src/cli/tui/app/types.rs"},"region":{"startLine":1121}}}],"partialFingerprints":{"codehealthFindingId/v1":"087d89ae9b0a8bdcd05c54ee0658cc1dc2f6a59b9e1cf9a55cd5b06a21c14a4a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SessionsState: TooManyMethods \u2014 111 methods. The bar is 30 methods; this is 81 over it, 3.70\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":"src-tauri/src/cli/tui/app/types.rs"},"region":{"startLine":1121}}}],"partialFingerprints":{"codehealthFindingId/v1":"4216fcf1083b8a44b1786eff76472e093698167f223f14308698b9ae77384858"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ProviderAddFormState.to_provider_json_value: MethodTooLong \u2014 to_provider_json_value runs 366 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 266 over it, 3.66\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":"src-tauri/src/cli/tui/form/provider_json.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cea02e561a3894251105837a2bbc9231b9435519469741ced9243b8ed960746"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: session_manager/paged_manifest.rs: FileTooLong \u2014 1778 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 41 free functions. The bar is 500 significant lines; this is 1278 over it, 3.56\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":"src-tauri/src/session_manager/paged_manifest.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3ee5c3469c79ff2a7559bc3724c0ed330c26b80442e95440555f5b6b93df990"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: forms/provider.rs: FileTooLong \u2014 1713 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 37 free functions. The bar is 500 significant lines; this is 1213 over it, 3.43\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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"100a00393cd68c463b92ab8a2df617386cce85df41aed6683eed88cd9b3ef9ec"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/provider.rs: FileTooLong \u2014 1627 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 69 free functions. The bar is 500 significant lines; this is 1127 over it, 3.25\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":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"787cad004b8fdc995a8a1ee458d0c77c10bd6606a54bf10a878fd97bc5c05c19"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::overlay::render::render_overlay: FunctionTooLong \u2014 cc_switch::cli::tui::ui::overlay::render::render_overlay runs 321 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 221 over it, 3.21\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":"src-tauri/src/cli/tui/ui/overlay/render.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"d57f1f5dc6896f783aee4f56b0d4f8869ee97d7149c210250bbb2be2a92d68e9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: services/usage_stats.rs: FileTooLong \u2014 1550 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 61% of them inside a single declaration: Database (2 blocks, 491-1738). The bar is 500 significant lines; this is 1050 over it, 3.10\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":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"47cfd46096ca93be9fbffca5aea2cbdb33bbfb4faa847221f932f3163a728bb3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: form_handlers/provider.rs: FileTooLong \u2014 1515 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 91% of them inside a single declaration: App (12-1967). The bar is 500 significant lines; this is 1015 over it, 3.03\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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"651a58e61c4cce12bb6d52b18272eadf53af70e243fe043cc416580d52462cef"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::config::render_openclaw_agents_route: FunctionTooLong \u2014 cc_switch::cli::tui::ui::config::render_openclaw_agents_route runs 302 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 202 over it, 3.02\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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":2294}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a2c5dd476d4a3660e1f158ec281d59ac2e26b27e20bee24b4e0c6feefc8334e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: providers/opencode.rs: FileTooLong \u2014 1437 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 49 free functions. The bar is 500 significant lines; this is 937 over it, 2.87\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":"src-tauri/src/session_manager/providers/opencode.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"71fdc81585ee9da62ef8cd24bb9b5c3fb7059aa490420bd2a39535c34a75bd89"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: runtime_systems/handlers.rs: FileTooLong \u2014 1425 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 925 over it, 2.85\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":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ae37ba8f3c027c2c860801b299d07d3628da3445aad33a382b6e925bdf460a0"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::runtime_systems::workers::handle_session_req: FunctionTooLong \u2014 cc_switch::cli::tui::runtime_systems::workers::handle_session_req runs 283 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 183 over it, 2.83\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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":1524}}}],"partialFingerprints":{"codehealthFindingId/v1":"63e4500468c1736d524ffba7d1060d0510a73ede22c9c37789072718d4c7227b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/codex_config.rs: FileTooLong \u2014 1409 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 88 free functions. The bar is 500 significant lines; this is 909 over it, 2.82\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":"src-tauri/src/codex_config.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"121940538ff23ba4719f39bff0f42c05d3ee193487af67c9ecc6219f20e5bb6e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.on_sessions_key: MethodTooLong \u2014 on_sessions_key runs 281 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 181 over it, 2.81\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":"src-tauri/src/cli/tui/app/content_entities.rs"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"691b0fcc9cb6f1b919a3ca4c78e7a84098ec42662ed2436ee22014956dee0554"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Database.create_tables_on_conn: MethodTooLong \u2014 create_tables_on_conn runs 272 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 172 over it, 2.72\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":"src-tauri/src/database/schema.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"db8adbad59a5038f5d883f1b48bb68c2be3ebf2dfdf5112277be30df976bdf81"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: providers/transform_codex_chat.rs: FileTooLong \u2014 1355 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 57 free functions. The bar is 500 significant lines; this is 855 over it, 2.71\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":"src-tauri/src/proxy/providers/transform_codex_chat.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bc70a6f982ddd38dbfab341e3b8badc8fe7e4daeae89863834102aeda365f65"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: overlay_handlers/pickers.rs: FileTooLong \u2014 1348 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 96% of them inside a single declaration: App (80-1892). The bar is 500 significant lines; this is 848 over it, 2.70\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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"252722ffd34522c3c41fb4311244fbb648107bb06d51c10706952dc973c2f1c6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/helpers.rs: FileTooLong \u2014 1308 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 69 free functions. The bar is 500 significant lines; this is 808 over it, 2.62\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":"src-tauri/src/cli/tui/app/helpers.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cc15770adf88f7a160fe38c739cf394446b4a6e348dbd0a37c685a7badd0c6e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.handle_provider_field_activate: MethodTooLong \u2014 handle_provider_field_activate runs 261 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 161 over it, 2.61\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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c3a61b99da1bf0dea460a35f42b63c9f8a24a069f86fa4c43ca3c9076bf0c3d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: App: TooManyFields \u2014 78 stored fields beside 281 methods. The bar is 30 stored fields; this is 48 over it, 2.60\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/app_state.rs"},"region":{"startLine":722}}}],"partialFingerprints":{"codehealthFindingId/v1":"321206c5a44935f1e978c6f520eeac35a74ce8f80947dd9a4d9ec70584307a82"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/codex_history_migration.rs: FileTooLong \u2014 1273 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 60 free functions. The bar is 500 significant lines; this is 773 over it, 2.55\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":"src-tauri/src/codex_history_migration.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a757c5dad07880a72b1bb4dbd08aedf2f7fb09b5926b26eeca326c9baef0bbc7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/usage.rs: FileTooLong \u2014 1269 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 60 free functions. The bar is 500 significant lines; this is 769 over it, 2.54\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":"src-tauri/src/cli/tui/ui/usage.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ddcc1f32ac8e55b2ac6d435a724cbfe40947d6c11311cafc28029704dee7529"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: services/session_usage_codex.rs: FileTooLong \u2014 1247 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 36 free functions. The bar is 500 significant lines; this is 747 over it, 2.49\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":"src-tauri/src/services/session_usage_codex.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"717d44c25fa76fd22b49d44ed14b0382972d0b326bb232fc25e1f0bdcea58899"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::help::provider_field_help: FunctionTooLong \u2014 cc_switch::cli::tui::help::provider_field_help runs 248 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 148 over it, 2.48\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":"src-tauri/src/cli/tui/help.rs"},"region":{"startLine":618}}}],"partialFingerprints":{"codehealthFindingId/v1":"2684fc5c3ff247ffb42d0ac89d90fbe471ff725440fac2516c0d4c6564773831"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/content_config.rs: FileTooLong \u2014 1226 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 100% of them inside a single declaration: App (5-1717). The bar is 500 significant lines; this is 726 over it, 2.45\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":"src-tauri/src/cli/tui/app/content_config.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeeb364f1773531bf579561a018543a3eef9808e72e5500569bfb3c1a9fae19e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::proxy::handlers::handle_passthrough_request: FunctionTooLong \u2014 cc_switch::proxy::handlers::handle_passthrough_request runs 245 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 145 over it, 2.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":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb83f05e14071dbb5bdbcf31413828163750782fd4af4e8a122927d2e26eeea5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: SessionsState: TooManyFields \u2014 69 stored fields beside 111 methods. The bar is 30 stored fields; this is 39 over it, 2.30\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/types.rs"},"region":{"startLine":1121}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb2de8fc418a6aa368fcb63b4ef76e2a8ce85f84a13705159265f8e6efde5889"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::forms::provider::provider_field_label_and_value: FunctionTooLong \u2014 cc_switch::cli::tui::ui::forms::provider::provider_field_label_and_value runs 229 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 129 over it, 2.29\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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":1916}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6b123c96a0e3177fde3a57613162aa1533f6fa70ea4fb66d4ca646caf3f69dc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: proxy/forwarder.rs: FileTooLong \u2014 1135 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 635 over it, 2.27\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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a47cc1200e79bd3c7c6e4ecdb7ac70bf57d59db22138f8526fcedf960ce7f94"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ProviderService.refresh_provider_snapshot: MethodTooLong \u2014 refresh_provider_snapshot runs 224 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 124 over it, 2.24\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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":1358}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d07a4378b851e2b0b9f63c7619457dc2eff5452ff019843c62efffead67bb6c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/shared.rs: FileTooLong \u2014 1112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 85 free functions. The bar is 500 significant lines; this is 612 over it, 2.22\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":"src-tauri/src/cli/tui/ui/shared.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"58664cbdbcffe98dcc2d978a71b6801173bba55eb18d021b03e5599ee53415f2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: form/provider_json.rs: FileTooLong \u2014 1095 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 74% of them inside a single declaration: ProviderAddFormState (148-1281). The bar is 500 significant lines; this is 595 over it, 2.19\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":"src-tauri/src/cli/tui/form/provider_json.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9c75e8616e1a87daf3e8408d3886d95d3588a76bf5befea12417c6604a4a922"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: services/subscription.rs: FileTooLong \u2014 1091 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 31 free functions. The bar is 500 significant lines; this is 591 over it, 2.18\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":"src-tauri/src/services/subscription.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"97b19b578fec2e3a5ffdf0519c6646233e348e614648b2166112705abf63184a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::main_page::render_main: FunctionTooLong \u2014 cc_switch::cli::tui::ui::main_page::render_main runs 216 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 116 over it, 2.16\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":"src-tauri/src/cli/tui/ui/main_page.rs"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"112f2a071b1df836ccaa128ba562436304960567e0169f630f782a1986958a3b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Database.get_daily_trends: MethodTooLong \u2014 get_daily_trends runs 216 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 116 over it, 2.16\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":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":758}}}],"partialFingerprints":{"codehealthFindingId/v1":"37dd3a46dbf77df25fcfc6b54e26168251dc217b53a513b830237d29c5ffc2c2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::services::session_usage_codex::sync_single_codex_file: FunctionTooLong \u2014 cc_switch::services::session_usage_codex::sync_single_codex_file runs 213 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 113 over it, 2.13\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":"src-tauri/src/services/session_usage_codex.rs"},"region":{"startLine":1530}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c84a33cfacfcd1d1f4c2a6c1d6d373a8380e766f0f49c0d590a4f3cc1d8f4d3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RequestForwarder.prepare_request_with_client: MethodTooLong \u2014 prepare_request_with_client runs 211 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 111 over it, 2.11\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":"src-tauri/src/proxy/forwarder/request_builder.rs"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f988e9e6ede6d45d41027fa8c77b67c4337868234f84d8bed0de8fb31e8e96e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: runtime_actions/editor.rs: FileTooLong \u2014 1052 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 34 free functions. The bar is 500 significant lines; this is 552 over it, 2.10\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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"415261c89c63ed98969919b9036113eb9f0671c4adbd84dece694c94bf77e782"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::daemon::migration::quiesce_for_database_migration: FunctionTooLong \u2014 cc_switch::daemon::migration::quiesce_for_database_migration runs 210 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 110 over it, 2.10\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":"src-tauri/src/daemon/migration.rs"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1e2abaa7263bd616a6228eda7138abd5c500f43c46422e8c1b8613db292704c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::config::render_openclaw_tools_route: FunctionTooLong \u2014 cc_switch::cli::tui::ui::config::render_openclaw_tools_route runs 209 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 109 over it, 2.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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":1400}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbbc81df60c7e6d474c9f78747f54cbd11a29cd5a8ad2d2164662566a140ab69"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: providers/transform_codex_anthropic.rs: FileTooLong \u2014 1032 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 34 free functions. The bar is 500 significant lines; this is 532 over it, 2.06\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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9315873d17b3f2e19555f7f46bb195b82462b2b178317b86424f9ae9fb42bf5e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/provider_inspect.rs: FileTooLong \u2014 1017 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 34 free functions. The bar is 500 significant lines; this is 517 over it, 2.03\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":"src-tauri/src/cli/commands/provider_inspect.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f807f67f4b585dc1fe000c20bfcbb04adaefdcfebe6d461b56f18fdd5c96578e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/mcp.rs: FileTooLong \u2014 1017 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 38 free functions. The bar is 500 significant lines; this is 517 over it, 2.03\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":"src-tauri/src/mcp.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e39817b4482ff474c0a84695e2738de28a7fff79ed98b7832189478cf48bcea"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/settings.rs: FileTooLong \u2014 1006 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 79 free functions. The bar is 500 significant lines; this is 506 over it, 2.01\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":"src-tauri/src/settings.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a7aa5739d79beb9cdf9fe5aeefdf0eb9ff86e10465e1e86454438457a8ea9f2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.handle_confirm_overlay_key: MethodTooLong \u2014 handle_confirm_overlay_key runs 200 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 100 over it, 2.00\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":"src-tauri/src/cli/tui/app/overlay_handlers/dialogs.rs"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fc5c1c6a8d1592fbf4f434b92cc4308e0b30a4804cc327d570e45fc0c069923"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ProviderAddFormState.update_provider_meta: MethodTooLong \u2014 update_provider_meta runs 199 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 99 over it, 1.99\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":"src-tauri/src/cli/tui/form/provider_json.rs"},"region":{"startLine":844}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea76dd6373aa426781b21a9da4b5323a6367b063d18c29e0f05ee8ad26cca8ed"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: proxy/handlers.rs: FileTooLong \u2014 990 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 490 over it, 1.98\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":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c2a353327204a6325717378a17f3aa6bef2bf47d906909aea8f9a45b930bcd3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: database/backup.rs: FileTooLong \u2014 983 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 87% of them inside a single declaration: Database (194-1526). The bar is 500 significant lines; this is 483 over it, 1.97\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":"src-tauri/src/database/backup.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e39f233628b80d481d3dddd48db5c66895a3f1931dc7b86e249a26896ba2220"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/content_entities.rs: FileTooLong \u2014 977 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 96% of them inside a single declaration: App (3-1298). The bar is 500 significant lines; this is 477 over it, 1.95\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":"src-tauri/src/cli/tui/app/content_entities.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"25b4af5e17180daa38136cd2a68256417e47b13f2b8ceeb557669431d1f16d53"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/update.rs: FileTooLong \u2014 972 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 60 free functions. The bar is 500 significant lines; this is 472 over it, 1.94\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":"src-tauri/src/cli/commands/update.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"343fccfa308f40d746530d35c19306413b87a00fe93d96a640b661a4ce3a72ef"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Supervisor: ClassTooLong \u2014 761 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 31 methods, 3 blocks, lines 91-1170. The bar is 400 significant lines; this is 361 over it, 1.90\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":"src-tauri/src/daemon/supervisor.rs"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"044943fd8bd1d43758f5894578b9b3cf7320fccd81f53575b6275118e2364aab"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::proxy::handlers::handle_claude_request: FunctionTooLong \u2014 cc_switch::proxy::handlers::handle_claude_request runs 189 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 89 over it, 1.89\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":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"7018acdf45ed9e0b2ab3fba57d526082c0a35c080eb9738fdad764e24ea86657"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: services/session_usage.rs: FileTooLong \u2014 943 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 33 free functions. The bar is 500 significant lines; this is 443 over it, 1.89\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":"src-tauri/src/services/session_usage.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a89d4394d1357644f87070aae26fe73ad62fe0ef351b21449848f74c86baa47f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::runtime_systems::workers::session_dispatcher_loop_with: FunctionTooLong \u2014 cc_switch::cli::tui::runtime_systems::workers::session_dispatcher_loop_with runs 188 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 88 over it, 1.88\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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":1245}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a782fa2a5b5722310e3366b8ea1e56e9741cac8930742158de9352ea1ff709d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: providers/codex_oauth_auth.rs: FileTooLong \u2014 929 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 75% of them inside a single declaration: CodexOAuthManager (2 blocks, 317-1513). The bar is 500 significant lines; this is 429 over it, 1.86\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":"src-tauri/src/proxy/providers/codex_oauth_auth.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a05d1db2b837bc7d028b48725b2292d51e4fbf24d44f112542a160cae873e103"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.handle_text_input_submit: MethodTooLong \u2014 handle_text_input_submit runs 184 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 84 over it, 1.84\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":"src-tauri/src/cli/tui/app/overlay_handlers/dialogs.rs"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc9107a7b532156c27edd510dcad5fa966cbc676c782ce0ac34eeb852d5a82f9"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::overlay::pickers::render_claude_model_picker_overlay: FunctionTooLong \u2014 cc_switch::cli::tui::ui::overlay::pickers::render_claude_model_picker_overlay runs 184 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 84 over it, 1.84\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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"b49c600c997be53b42042b5a91071caa380884d6716410b1a2930fb2429dfdcc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/menu.rs: FileTooLong \u2014 913 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 100% of them inside a single declaration: App (6-1345). The bar is 500 significant lines; this is 413 over it, 1.83\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":"src-tauri/src/cli/tui/app/menu.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ebbab3af917cd2963bb314791ca319222d2ac944a4bfdd8f555d56624387294"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: runtime_actions/mod.rs: FileTooLong \u2014 911 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 411 over it, 1.82\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":"src-tauri/src/cli/tui/runtime_actions/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d460dc94028d18cbfdd76e2b6edc1d2adbca59299f72b46f0b13d8fe5ff027b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ProviderAddFormState.apply_template_fields: MethodTooLong \u2014 apply_template_fields runs 181 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 81 over it, 1.81\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":"src-tauri/src/cli/tui/form/provider_templates.rs"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"2faf5b49b072979847a336a855f7dc69a663b266f006ac380d0c1117b89ae13d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::runtime_systems::handlers::handle_webdav_msg: FunctionTooLong \u2014 cc_switch::cli::tui::runtime_systems::handlers::handle_webdav_msg runs 181 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 81 over it, 1.81\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":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":1513}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a80c1f6a4170c207f41ce95205bfb352b2d900b43c72f1723610acaeecc8d82"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SkillService.migrate_storage: MethodTooLong \u2014 migrate_storage runs 181 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 81 over it, 1.81\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":"src-tauri/src/services/skill.rs"},"region":{"startLine":2025}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd708d222cc3d46f1c906c6430102a53f616c0dbcd06514a6684560517008a0b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: forwarder/request_builder.rs: FileTooLong \u2014 897 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 397 over it, 1.79\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":"src-tauri/src/proxy/forwarder/request_builder.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5397d1330f75224bbd97a8bf9bcc74b205f553ec2e320a27539c26c6965a3df2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: daemon/supervisor.rs: FileTooLong \u2014 884 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 86% of them inside a single declaration: Supervisor (3 blocks, 91-1170). The bar is 500 significant lines; this is 384 over it, 1.77\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":"src-tauri/src/daemon/supervisor.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"90c9a72eed42472cde79976d93268ce439114e4dd81fd675a3a421f5b9fc3372"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CodexOAuthManager: ClassTooLong \u2014 698 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 28 methods, 2 blocks, lines 317-1513. The bar is 400 significant lines; this is 298 over it, 1.75\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":"src-tauri/src/proxy/providers/codex_oauth_auth.rs"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7aee50e7bed5d042334cd6c3b3db315b40317cb029b8076b7236cb86db17fbe"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: providers/copilot_auth.rs: FileTooLong \u2014 871 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 76% of them inside a single declaration: CopilotAuthManager (2 blocks, 411-1563). The bar is 500 significant lines; this is 371 over it, 1.74\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":"src-tauri/src/proxy/providers/copilot_auth.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d18005b40cad9a9e3a69a0168fbeba5f90bd0abd38969ffbcd76c287c7d02ce3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/help.rs: FileTooLong \u2014 857 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 357 over it, 1.71\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":"src-tauri/src/cli/tui/help.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d261b6d974abce6b0e9c1926dfa70b5e1c0537e96c1fd9e2f90f2c9662c5d4c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/config_openclaw.rs: FileTooLong \u2014 840 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 75 free functions. The bar is 500 significant lines; this is 340 over it, 1.68\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":"src-tauri/src/cli/commands/config_openclaw.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d55d2453ea3be276b624619ef14a31d0e500d8a3a86e0770546141e5169b1ae"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: RequestForwarder: ClassTooLong \u2014 668 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 17 methods, 2 blocks, lines 28-1096. The bar is 400 significant lines; this is 268 over it, 1.67\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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb9c7a74154e4fda31f9eda16c20c7f71f1ef24eda5828dc173dc213b3cb2f80"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Database.validate_imported_schema_contract: MethodTooLong \u2014 validate_imported_schema_contract runs 167 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) 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":"src-tauri/src/database/backup.rs"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"3950649ce05288232ede06929bfefa44f681d448f052e729399691a6ea7df1d3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::proxy::forwarder::request_builder::build_request: FunctionTooLong \u2014 cc_switch::proxy::forwarder::request_builder::build_request runs 167 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) 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":"src-tauri/src/proxy/forwarder/request_builder.rs"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"13e0f3d0da6df42fca658b10c7ed5b096c4e48ac5b0e590c0cb031f796309654"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::proxy::handlers::finish_codex_live_aware_response: FunctionTooLong \u2014 cc_switch::proxy::handlers::finish_codex_live_aware_response runs 167 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) 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":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":1060}}}],"partialFingerprints":{"codehealthFindingId/v1":"6aa064bf9517ae91cd361390d0cfe1f56569274d0406df936e125c124e990429"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: dao/proxy.rs: FileTooLong \u2014 831 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 96% of them inside a single declaration: Database (49-1249). The bar is 500 significant lines; this is 331 over it, 1.66\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":"src-tauri/src/database/dao/proxy.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"38efab6918d192af23959cfc47de964886cb17d1c36e18c3e404f17586e9497d"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CopilotAuthManager: ClassTooLong \u2014 662 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 36 methods, 2 blocks, lines 411-1563. The bar is 400 significant lines; this is 262 over it, 1.66\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":"src-tauri/src/proxy/providers/copilot_auth.rs"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae4ade4b82806aa2db6835a965ea6e6b95c89d74c78c686145c93f4560a6b1ab"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::commands::provider_inspect::quota_provider: FunctionTooLong \u2014 cc_switch::cli::commands::provider_inspect::quota_provider runs 165 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 65 over it, 1.65\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":"src-tauri/src/cli/commands/provider_inspect.rs"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"011ebac4c29bc7f2fa4df3389defebf1a9cbfd5da2175a112867ddef5743e0dc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: providers/pi.rs: FileTooLong \u2014 804 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 41 free functions. The bar is 500 significant lines; this is 304 over it, 1.61\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":"src-tauri/src/session_manager/providers/pi.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f39f370925d86709269830af393118946b59cf8cfb20c0f2af1832615e5b64d5"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::handle_tui_action: FunctionTooLong \u2014 cc_switch::cli::tui::handle_tui_action runs 160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 60 over it, 1.60\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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":2495}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fded686d602302315e5c1ad27e8c6562340253b9f13913404d5acac2d686009"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::proxy::providers::transform_codex_anthropic::convert_input_to_messages: FunctionTooLong \u2014 cc_switch::proxy::providers::transform_codex_anthropic::convert_input_to_messages runs 160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 60 over it, 1.60\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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":505}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9b7938e5d3fd4c72710094acc472fa903df3a639c618fa6dd189722d00a2afb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: runtime_systems/types.rs: FileTooLong \u2014 797 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 297 over it, 1.59\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":"src-tauri/src/cli/tui/runtime_systems/types.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8403312751fc8cd6e17450afa5fda9806c1d2a9874bdcc3f2e10623a3dd47c4d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::commands::provider_input::display_provider_summary: FunctionTooLong \u2014 cc_switch::cli::commands::provider_input::display_provider_summary runs 158 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) 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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":4509}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3777798a6d5c235a61b21dc31dfcc6e7a4c753fba4ac1e2ab33f984b2e6c3cc"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::proxy::providers::transform_codex_chat::append_responses_item_as_chat_message: FunctionTooLong \u2014 cc_switch::proxy::providers::transform_codex_chat::append_responses_item_as_chat_message runs 157 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 57 over it, 1.57\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":"src-tauri/src/proxy/providers/transform_codex_chat.rs"},"region":{"startLine":652}}}],"partialFingerprints":{"codehealthFindingId/v1":"234730fd53c2c331896cee3e3f4e04dfe21ae3214c716520531146a1f9ccf04d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RequestForwarder.forward_response_detailed: MethodTooLong \u2014 forward_response_detailed runs 155 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 55 over it, 1.55\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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"59f147d49f96165168cb56a7d8df1d6d249c4553bdd36786868a044221894833"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RequestForwarder.forward_buffered_response_detailed: MethodTooLong \u2014 forward_buffered_response_detailed runs 155 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 55 over it, 1.55\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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"5912c7232dedde0369d3beb206a85e41eb8e625223a2893d96e7b3354139ad07"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::config::render_settings: FunctionTooLong \u2014 cc_switch::cli::tui::ui::config::render_settings runs 154 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 54 over it, 1.54\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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":3426}}}],"partialFingerprints":{"codehealthFindingId/v1":"495e4fd57c37aef89c92132f0f8307ce9e3ee754cbb1ec0d51a01edf4cda3231"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.on_settings_key: MethodTooLong \u2014 on_settings_key runs 153 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 53 over it, 1.53\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":"src-tauri/src/cli/tui/app/content_config.rs"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ce84248aee8ecc9a0cd12446ff4f3a0815c88126ba37f0739223e2283d86255"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::sessions::render_session_list: FunctionTooLong \u2014 cc_switch::cli::tui::ui::sessions::render_session_list runs 152 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) 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":"src-tauri/src/cli/tui/ui/sessions.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"f60f2e2e3eecb99734ec70098c49b31b4a310d09c10dba03fc34c64d9c6c0c49"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: form/provider_templates.rs: FileTooLong \u2014 756 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 76% of them inside a single declaration: ProviderAddFormState (290-1026). The bar is 500 significant lines; this is 256 over it, 1.51\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":"src-tauri/src/cli/tui/form/provider_templates.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f0d3a27869bdb9c91e82d57f23e73fd4143c116546041732aa5873265298146"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::commands::provider_inspect::model_fetch_target: FunctionTooLong \u2014 cc_switch::cli::commands::provider_inspect::model_fetch_target runs 151 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 51 over it, 1.51\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":"src-tauri/src/cli/commands/provider_inspect.rs"},"region":{"startLine":1005}}}],"partialFingerprints":{"codehealthFindingId/v1":"238a819fafdf4bf81836c32c0181f510f2ca172a684dd6d71ca3ec5984bf774d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::help::current_help_target: FunctionTooLong \u2014 cc_switch::cli::tui::help::current_help_target runs 151 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 51 over it, 1.51\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":"src-tauri/src/cli/tui/help.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"30eaba3167f901f7a2315c84a969a8ed2ee961b54d5187d113883e897d2427fd"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::runtime_systems::workers::skills_worker_loop: FunctionTooLong \u2014 cc_switch::cli::tui::runtime_systems::workers::skills_worker_loop runs 151 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 51 over it, 1.51\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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":3768}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec371fe75d16807bc36c149c543fabe7b4a87d9b0004e850c3edcd7208e5eb3a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::handle_usage_pricing_msg: FunctionTooLong \u2014 cc_switch::cli::tui::handle_usage_pricing_msg runs 150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 50 over it, 1.50\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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":1237}}}],"partialFingerprints":{"codehealthFindingId/v1":"89aa7d66bedc77cfd7993df620faa39e764d8fdf1f74666bb89f6db65bd485ff"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: providers/transform_gemini.rs: FileTooLong \u2014 748 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 248 over it, 1.50\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":"src-tauri/src/proxy/providers/transform_gemini.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"40e6e891d7d45ed862d2de278218bdd0a90bd39745d89bfa66365f10060ad3cb"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CodexOAuthManager.add_account_internal: MethodTooLong \u2014 add_account_internal runs 149 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 49 over it, 1.49\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":"src-tauri/src/proxy/providers/codex_oauth_auth.rs"},"region":{"startLine":1157}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8c72b05ac1a99ca87aedc1270bed654ad1733bd2f8fcc589993fc8c5e70a6dc"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ProviderService.prepare_post_commit_action: MethodTooLong \u2014 prepare_post_commit_action runs 149 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 49 over it, 1.49\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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"13c0e5881f46da7a4d04a35e40680edb59b1f84ca5111f6a70927929910a9592"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: provider/common_config.rs: FileTooLong \u2014 740 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 37 free functions. The bar is 500 significant lines; this is 240 over it, 1.48\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":"src-tauri/src/services/provider/common_config.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0556a20ab89000b2418470c05ad8fe6a160c8800dfd0af984615cd9a663302c6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::mcp::import_from_codex: FunctionTooLong \u2014 cc_switch::mcp::import_from_codex runs 148 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 48 over it, 1.48\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":"src-tauri/src/mcp.rs"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"72385ad8d5a78120f0d0f57a872ea621fb79a7a22dce69ef890ccd3967310b93"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::services::session_usage::sync_single_file: FunctionTooLong \u2014 cc_switch::services::session_usage::sync_single_file runs 147 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 47 over it, 1.47\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":"src-tauri/src/services/session_usage.rs"},"region":{"startLine":859}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ba5d3630247452ae0e4bd3666cc1eff621c65fc525e7f6428e19e599d46d6d8"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::data::load_providers_with_mode: FunctionTooLong \u2014 cc_switch::cli::tui::data::load_providers_with_mode runs 144 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 44 over it, 1.44\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":"src-tauri/src/cli/tui/data.rs"},"region":{"startLine":1482}}}],"partialFingerprints":{"codehealthFindingId/v1":"4379d9fd13c5330327491533af59f1015d1cac4a9db49c009b61a35f95af3482"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ChatToResponsesState: ClassTooLong \u2014 575 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 19 methods, 3 blocks, lines 66-888. The bar is 400 significant lines; this is 175 over it, 1.44\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":"src-tauri/src/proxy/providers/streaming_codex_chat.rs"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0410654eb43d6edd8b00f5dd8f1c9c8a56d1796b77ab772424822fe1751dc24"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: providers/streaming_codex_chat.rs: FileTooLong \u2014 718 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 80% of them inside a single declaration: ChatToResponsesState (3 blocks, 66-888). The bar is 500 significant lines; this is 218 over it, 1.44\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":"src-tauri/src/proxy/providers/streaming_codex_chat.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7735204750cc96e766acbb4505596124b0fe2be50bfee8dbc533539015584d8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: providers/hermes.rs: FileTooLong \u2014 718 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 218 over it, 1.44\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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"58d69a37f86818e732d814fd3cf69f149a3d052f319e6992c243f9b06733cae4"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: TranscriptIndexStore: ClassTooLong \u2014 573 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 17 methods, 2 blocks, lines 426-1240. The bar is 400 significant lines; this is 173 over it, 1.43\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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5c9dd0ec16674162c713f9b83b2f3a4669ecd1adcc8c17183854bd07fb68a53"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Database.apply_schema_migrations_on_conn: MethodTooLong \u2014 apply_schema_migrations_on_conn runs 143 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 43 over it, 1.43\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":"src-tauri/src/database/schema.rs"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c9743b87ce769a060583559dbe2bf1a9c3df771b3449fb16ee9dc9b4bf26a9a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::session_manager::transcript::scan_named_json_array: FunctionTooLong \u2014 cc_switch::session_manager::transcript::scan_named_json_array runs 143 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 43 over it, 1.43\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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":2436}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c391037bab54cafb533be94077d1e4f5521c7bbd19fb514c07cbf4db9f01f2f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/sessions.rs: FileTooLong \u2014 707 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 207 over it, 1.41\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":"src-tauri/src/cli/commands/sessions.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bccca862193101e685a308533e13d38ba23cbcc142da646476bdfd53d454cee"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::runtime_systems::handlers::handle_skills_msg: FunctionTooLong \u2014 cc_switch::cli::tui::runtime_systems::handlers::handle_skills_msg runs 141 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 41 over it, 1.41\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":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":1278}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd2e142c6e19bf579adb1258d4f8772204323bf0568c7225957afc5d0fd37914"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RequestForwarder.send_streaming_request: MethodTooLong \u2014 send_streaming_request runs 141 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 41 over it, 1.41\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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b208f9546e7b0018ed7fed1000d2dccc282ec7c91b12c1c896fc932ccd78d79"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RequestForwarder.send_buffered_request: MethodTooLong \u2014 send_buffered_request runs 141 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 41 over it, 1.41\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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":903}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6854b971de656850dc7ecb9e9cb03d15ad036669e5dd86211223c166ffe0580"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::usage_script::execute_usage_script: FunctionTooLong \u2014 cc_switch::usage_script::execute_usage_script runs 140 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) 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":"src-tauri/src/usage_script.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"8de513d031e0d750436061f2510191c38e443016bb053f0b55a56b5a3e329229"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::provider_preset_builtin::codex_provider_preset: FunctionTooLong \u2014 cc_switch::provider_preset_builtin::codex_provider_preset runs 139 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 39 over it, 1.39\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":"src-tauri/src/provider_preset_builtin.rs"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"804124a17011256093a357ac58b69dfc50b42a574efc718dfdb7f78f0a9d57d0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: TranscriptIndexStore.build: MethodTooLong \u2014 build runs 139 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 39 over it, 1.39\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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":705}}}],"partialFingerprints":{"codehealthFindingId/v1":"da1b18c848e4dc0611041ef7b95249df9de9ce16f924cb9f7a024f0f468adc9d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::overlay::pickers::render_failover_queue_manager_overlay: FunctionTooLong \u2014 cc_switch::cli::tui::ui::overlay::pickers::render_failover_queue_manager_overlay runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38\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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":2143}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcebdf41eb767c0f9347916241ba5121791a2e4b5cc8a3a4ed452accf37cdf6f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::services::session_usage_driver::scan_jsonl_incremental: FunctionTooLong \u2014 cc_switch::services::session_usage_driver::scan_jsonl_incremental runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38\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":"src-tauri/src/services/session_usage_driver.rs"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"c94932c72b7ea0de3a0891e5e45cca589f74b5aeb10eb124e609acac21e54472"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: McpAddFormState: TooManyMethods \u2014 41 methods, declared across 2 files: form/mcp.rs (40), tui/form.rs (1). The bar is 30 methods; this is 11 over it, 1.37\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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":"src-tauri/src/cli/tui/form.rs"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"443e682dae7cf385ccdd4d2cfeca80d0d4c64f4a442dd2e923e9fd38d43c413c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/openclaw_config.rs: FileTooLong \u2014 681 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 52 free functions. The bar is 500 significant lines; this is 181 over it, 1.36\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":"src-tauri/src/openclaw_config.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"470211c3b55f7e9f65f7db77e63ebf7c0326fca8ba0afed38d54923880fdb3c1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/home_chart.rs: FileTooLong \u2014 680 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 41 free functions. The bar is 500 significant lines; this is 180 over it, 1.36\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":"src-tauri/src/cli/tui/ui/home_chart.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"29aee222acc0e2a8f8e6d8ebff469c18366367fd521e489a7764bcc494c25b6e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ProviderAddFormState.apply_sponsor_preset: MethodTooLong \u2014 apply_sponsor_preset runs 136 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 36 over it, 1.36\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":"src-tauri/src/cli/tui/form/provider_templates.rs"},"region":{"startLine":739}}}],"partialFingerprints":{"codehealthFindingId/v1":"3962f8deabea3d378eb0675fbdac3c4c4030fd18807f2e4ba931d2dd630cfa79"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::cache_invalidation_for_action: FunctionTooLong \u2014 cc_switch::cli::tui::cache_invalidation_for_action runs 136 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 36 over it, 1.36\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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":2194}}}],"partialFingerprints":{"codehealthFindingId/v1":"c10efca74bd5bc5a88597bc4182e70295377c5a11b849f67c0238fb785df114f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: AppSettings: TooManyFields \u2014 40 stored fields beside 6 methods. The bar is 30 stored fields; this is 10 over it, 1.33\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/settings.rs"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"0184ba484b7d841ff41e0bb195f52052c7292efc663429c60fa1ac7bc5170234"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: services/session_usage_pi.rs: FileTooLong \u2014 666 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 166 over it, 1.33\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":"src-tauri/src/services/session_usage_pi.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f36b61b5632d44e0c9a78017dbb375b5773999b1470de7ec9af445d4067a402"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: proxy/response.rs: FileTooLong \u2014 663 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 163 over it, 1.33\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":"src-tauri/src/proxy/response.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbe72fa8efdffa21cec8bcd727088c1539a3012c3200a1bbe5345e34e146eb7d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.clamp_selections: MethodTooLong \u2014 clamp_selections runs 132 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) 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":"src-tauri/src/cli/tui/app/menu.rs"},"region":{"startLine":1174}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3a1a7b71f9e9e95b35f613ea26ada6369fa12708be4e6c7cdd4120e8a627aa2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ProviderService.update: MethodTooLong \u2014 update runs 132 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) 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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":2494}}}],"partialFingerprints":{"codehealthFindingId/v1":"77629ef1f523a7c2c2b5806f1fe355c5691b158915eb7b2a06f26126b4a0eefe"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: providers/codex.rs: FileTooLong \u2014 659 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 159 over it, 1.32\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":"src-tauri/src/session_manager/providers/codex.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ceb07584b3e0d7eea8ca2cf1a0bd623249f208be22ddc19c1fe69c85eedfe7d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::proxy::providers::transform_codex_anthropic::responses_request_to_anthropic: FunctionTooLong \u2014 cc_switch::proxy::providers::transform_codex_anthropic::responses_request_to_anthropic runs 131 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 31 over it, 1.31\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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1f1f1993dad246ea4e81af5d18ff2ed7d6f03dcc95e546d9383421fdbd5cc7a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ProxyService.proxy_status_from_daemon_response_for_app: MethodTooLong \u2014 proxy_status_from_daemon_response_for_app runs 131 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 31 over it, 1.31\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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":1156}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbe26392fb5598cf44ece44402636efce2b9e0e8db07bf384d21029dc85a9458"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ProxyService.sync_live_config_to_current_provider: MethodTooLong \u2014 sync_live_config_to_current_provider runs 130 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 30 over it, 1.30\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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":3053}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e414b16cd9bf639300870f43fcd4f9b81ea049950971fd52ce3971d4d9912d3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::session_manager::cache::process_stream_batch: FunctionTooLong \u2014 cc_switch::session_manager::cache::process_stream_batch runs 130 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 30 over it, 1.30\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":"src-tauri/src/session_manager/cache.rs"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f92d2705ff6d66b31bd135df496a6f90f95ad8c7267d5060d202cd77ab3df04"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/sessions.rs: FileTooLong \u2014 647 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 147 over it, 1.29\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":"src-tauri/src/cli/tui/ui/sessions.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9440ca8fba297354a1ba62212136f075c488874425f22d83d6561054fe42f9b6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::runtime_systems::handlers::handle_managed_auth_msg: FunctionTooLong \u2014 cc_switch::cli::tui::runtime_systems::handlers::handle_managed_auth_msg runs 129 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 29 over it, 1.29\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":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a78dd2107d6355c7316d236ed802e4bdde7c180cb241efae79bfe4555473d6f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::usage::render_usage_detail_body: FunctionTooLong \u2014 cc_switch::cli::tui::ui::usage::render_usage_detail_body runs 129 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 29 over it, 1.29\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":"src-tauri/src/cli/tui/ui/usage.rs"},"region":{"startLine":1167}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae3489481b66821dffe401c8ed60636af6a8b0325ab10aa7555c2577444ac429"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SkillService.update_skill: MethodTooLong \u2014 update_skill runs 129 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 29 over it, 1.29\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":"src-tauri/src/services/skill.rs"},"region":{"startLine":2679}}}],"partialFingerprints":{"codehealthFindingId/v1":"329ccd476e32092860f9efc920cce27b39e62f58796e0a6e67979afcac68db5f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: TranscriptRemotePager: ClassTooLong \u2014 513 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 28 methods, 2 blocks, lines 1023-2036. The bar is 400 significant lines; this is 113 over it, 1.28\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":"src-tauri/src/cli/tui/app/types.rs"},"region":{"startLine":1023}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6eda56e26378b404e43adb566a56d41979b22eb2ce21a0f5c2b53370f164726"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.build_provider_form_save_action: MethodTooLong \u2014 build_provider_form_save_action runs 128 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 28 over it, 1.28\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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"0114cac3dd2dc6caf7a7d14bd932bb9b3ccb6b99df03610ab9ddcff6a7e84474"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::main_page::render_proxy_activity_dashboard: FunctionTooLong \u2014 cc_switch::cli::tui::ui::main_page::render_proxy_activity_dashboard runs 128 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 28 over it, 1.28\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":"src-tauri/src/cli/tui/ui/main_page.rs"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"87db4e97f2cbb49da3b74c9b89c19b26ac5149d1869a15b562b0a4a807064321"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::data::load_model_pricing_snapshot_from_conn: FunctionTooLong \u2014 cc_switch::cli::tui::data::load_model_pricing_snapshot_from_conn runs 126 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 26 over it, 1.26\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":"src-tauri/src/cli/tui/data.rs"},"region":{"startLine":2226}}}],"partialFingerprints":{"codehealthFindingId/v1":"7702611050789394ea355b3277ff51e6aa5deb46f04c1e5c8ddc8c0f9157c75b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::forms::provider::render_provider_add_form: FunctionTooLong \u2014 cc_switch::cli::tui::ui::forms::provider::render_provider_add_form runs 126 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 26 over it, 1.26\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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"35caa67a4d14aea9f0d558c4a8cee45998f5bee82cd90c1b30b5fe4b71200a2f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::services::session_usage_gemini::insert_gemini_session_entry: FunctionTooLong \u2014 cc_switch::services::session_usage_gemini::insert_gemini_session_entry runs 126 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 26 over it, 1.26\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":"src-tauri/src/services/session_usage_gemini.rs"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a34716348f5a6497702d332f45fbbb15c3ba58f6a4de5c2290d676fecb69306"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: EditorState: ClassTooLong \u2014 500 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 30 methods, 2 blocks, lines 80-820. The bar is 400 significant lines; this is 100 over it, 1.25\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":"src-tauri/src/cli/tui/app/editor_state.rs"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e1f80e5f1b5b00983ae285b926a67dba15f4b28f890dab3f475870ae7cebcb9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: overlay_handlers/dialogs.rs: FileTooLong \u2014 621 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 98% of them inside a single declaration: App (3-842). The bar is 500 significant lines; this is 121 over it, 1.24\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":"src-tauri/src/cli/tui/app/overlay_handlers/dialogs.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"39d484ae11629b27851aefdf7741f8e37a0cbaedaa9b379d42c184d22c345531"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ProviderService.save_claude_from_editor: MethodTooLong \u2014 save_claude_from_editor runs 124 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 24 over it, 1.24\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":"src-tauri/src/services/provider/claude_editor_service.rs"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2cddf57831246b4b6854135acafc2018ce7b5deaad48ff84f4f520e975e4104"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::services::provider::codex_live::prepare: FunctionTooLong \u2014 cc_switch::services::provider::codex_live::prepare runs 124 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 24 over it, 1.24\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":"src-tauri/src/services/provider/codex_live.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a513e8ac9a08f070c4fe9f863391c66b15b6fac1532f47d75293f9471b26622"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/hermes_config.rs: FileTooLong \u2014 617 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 47 free functions. The bar is 500 significant lines; this is 117 over it, 1.23\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":"src-tauri/src/hermes_config.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"143d799d02f32c17cd3a4f6cc62e333f84fb535996d59c8ee68b76c5b0728e28"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/app_state.rs: FileTooLong \u2014 615 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 115 over it, 1.23\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":"src-tauri/src/cli/tui/app/app_state.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cee71a13d50f57b55ee2a9c676794df06cef6e976253dea9c007aa65c028064b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::config::render_openclaw_workspace: FunctionTooLong \u2014 cc_switch::cli::tui::ui::config::render_openclaw_workspace runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22\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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":3055}}}],"partialFingerprints":{"codehealthFindingId/v1":"01130057d7e0c4d29235f646cda936dcedcda8c38a43effbc2118eda74d31151"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::provider_preset_builtin::claude_provider_preset: FunctionTooLong \u2014 cc_switch::provider_preset_builtin::claude_provider_preset runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22\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":"src-tauri/src/provider_preset_builtin.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"2889ac889f38c5776ef0dec54cb3ae20adbb0ff1c5601c22492b52f580cb9dd8"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::proxy::providers::transform_codex_anthropic::anthropic_sse_to_message_value: FunctionTooLong \u2014 cc_switch::proxy::providers::transform_codex_anthropic::anthropic_sse_to_message_value runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22\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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":1385}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbd28331bbebe4d62cbeb0375faa0d487569eeb5d70467ad31ed4c18351320b3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/config.rs: FileTooLong \u2014 606 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 38 free functions. The bar is 500 significant lines; this is 106 over it, 1.21\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":"src-tauri/src/config.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a061f5b20ee32696659331b87bab473acbb59fcc4820546e96f96ea403bf6378"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.handle_form_tab_key: MethodTooLong \u2014 handle_form_tab_key runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21\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":"src-tauri/src/cli/tui/app/form_handlers/tab.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"2799c15903b9f753521d741d7f6196ced460f6496af5689e7cdc516d464a9df7"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::runtime_systems::workers::run_session_scan: FunctionTooLong \u2014 cc_switch::cli::tui::runtime_systems::workers::run_session_scan runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21\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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":1956}}}],"partialFingerprints":{"codehealthFindingId/v1":"552075225a7889bd1c004dc2985325cf69b07b204eddc39cdc0a85130a97038e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ProviderService.set_common_config_snippet: MethodTooLong \u2014 set_common_config_snippet runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21\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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":2198}}}],"partialFingerprints":{"codehealthFindingId/v1":"54b451a2dde59c76a6aeb93c7957a8fa7764febb7816ce3dd9314b62ae9965b8"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: PagedListState: TooManyMethods \u2014 36 methods. The bar is 30 methods; this is 6 over it, 1.20\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":"src-tauri/src/cli/tui/app/paged_list.rs"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"02c05def2f39774502be57d2fc54b0ec3934c9deae1f3cab23eb2aafbf97f2f7"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CopilotAuthManager: TooManyMethods \u2014 36 methods. The bar is 30 methods; this is 6 over it, 1.20\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":"src-tauri/src/proxy/providers/copilot_auth.rs"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e17d68dc81f471c69b718b9c05ee1d490578004975193985c8620606c3aebd1"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: PagedManifestStore: TooManyMethods \u2014 36 methods. The bar is 30 methods; this is 6 over it, 1.20\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":"src-tauri/src/session_manager/paged_manifest.rs"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2e3a4588bea4e150601a150667c87e1a455b2da1bc6de9edda224e4dd7472dc"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.open_proxy_help_view: MethodTooLong \u2014 open_proxy_help_view runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20\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":"src-tauri/src/cli/tui/app/content_config.rs"},"region":{"startLine":1364}}}],"partialFingerprints":{"codehealthFindingId/v1":"a50f5a104f98d72012163c727c947f301d08af6cb9abd6942c32c05e98ee2db2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ProviderService.apply_prepared_post_commit_action: MethodTooLong \u2014 apply_prepared_post_commit_action runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20\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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":1188}}}],"partialFingerprints":{"codehealthFindingId/v1":"387984559f2e00650fc408dbbdba6ae9285dd41cdcf8fd45b9ef3a84318fd401"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: project/codex.rs: FileTooLong \u2014 599 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 31 free functions. The bar is 500 significant lines; this is 99 over it, 1.20\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":"src-tauri/src/live/project/codex.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2139872a565a8b9b029512bc470237268b8336ad6d81148643fbb3bf78e78f03"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/form.rs: FileTooLong \u2014 595 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 95 over it, 1.19\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":"src-tauri/src/cli/tui/form.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aae0070d9d6a7be4c4256957cd7e7b5ef01ead6cd2e5330e38e34e4961471a0"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::commands::proxy::build_proxy_overview_lines: FunctionTooLong \u2014 cc_switch::cli::commands::proxy::build_proxy_overview_lines runs 119 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) 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":"src-tauri/src/cli/commands/proxy.rs"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"074e453bd3fc641aec31416193f5af3a03c83a3eef8bca76491b5d57ae97602d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.handle_session_project_picker_key: MethodTooLong \u2014 handle_session_project_picker_key runs 119 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) 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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":1256}}}],"partialFingerprints":{"codehealthFindingId/v1":"b708da5a4d3400d7355a86042d536e19f5a7118efdd1850c416cd44e70f56422"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::commands::config::restore_config: FunctionTooLong \u2014 cc_switch::cli::commands::config::restore_config runs 118 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\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":"src-tauri/src/cli/commands/config.rs"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1e887c54c792b6720efcad00ca53e9327f5c8777521dd88cce0f8576b7bcf1f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::data::build_usage_daily_chart_series: FunctionTooLong \u2014 cc_switch::cli::tui::data::build_usage_daily_chart_series runs 118 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\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":"src-tauri/src/cli/tui/data.rs"},"region":{"startLine":2842}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbdc62089cb0acb12e7a27a5eaf6439b679fdbc29c1cfc30f87b7614cc1bb4da"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::services::subscription::query_gemini_quota: FunctionTooLong \u2014 cc_switch::services::subscription::query_gemini_quota runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17\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":"src-tauri/src/services/subscription.rs"},"region":{"startLine":1266}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d2aa78d673db65fbb5bd4969349d59568c6f91185a47adc937c6effd0a3e6df"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: cc_switch::cli::tui::runtime_actions::config: TooManyFunctions \u2014 35 free functions. The bar is 30 free functions; this is 5 over it, 1.17\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":"src-tauri/src/cli/tui/runtime_actions/config.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd84fb17165440d3d19a854d2db3925db1cbd3ad9ae30ce5a36b643cb470ef38"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: skill/discovery.rs: FileTooLong \u2014 581 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 100% of them inside a single declaration: SkillService (3-792). The bar is 500 significant lines; this is 81 over it, 1.16\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":"src-tauri/src/services/skill/discovery.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"06e5450e4b9328aee627fc0a397c1cb4a53b934f7c6a7909b82c0644d94969e6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::commands::provider::edit_provider: FunctionTooLong \u2014 cc_switch::cli::commands::provider::edit_provider runs 116 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 16 over it, 1.16\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":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":1706}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f8bcf1fca08c9c63289a2c0f806f268d2f7a428e8443584a04e7b362c98106b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::config::render_openclaw_env_route: FunctionTooLong \u2014 cc_switch::cli::tui::ui::config::render_openclaw_env_route runs 116 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 16 over it, 1.16\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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":933}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5633c39cad187728ae479a46aa1944a93b3455b1cdc4666af35c0dccaea721d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SkillService.migrate_ssot_if_pending: MethodTooLong \u2014 migrate_ssot_if_pending runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 15 over it, 1.15\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":"src-tauri/src/services/skill.rs"},"region":{"startLine":893}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa42f7e683f7295c84e13111e42689985ad9140b20f5f01327a61dc844a0dd21"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Database.migrate_proxy_config_to_per_app: MethodTooLong \u2014 migrate_proxy_config_to_per_app runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.14\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":"src-tauri/src/database/schema.rs"},"region":{"startLine":820}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7dcb7c4424b0875a7745d91f8fdddc54807de576773004e31e0bac9d09cde8e"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: UiDataByAppCache: ClassTooLong \u2014 454 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 24 methods, 2 blocks, lines 446-1235. The bar is 400 significant lines; this is 54 over it, 1.14\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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"6547cec7aa174424bfcb083add350fd442b48028c48f24ac83880ddbd3e7bdec"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: cc_switch::pi_config: TooManyFunctions \u2014 34 free functions. The bar is 30 free functions; this is 4 over it, 1.13\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":"src-tauri/src/pi_config/mod.rs"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bf81a9e0a26d461e6660e1cebe08c12141d474174a1c500392a529dfa441af1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SkillService.install: MethodTooLong \u2014 install runs 113 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 13 over it, 1.13\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":"src-tauri/src/services/skill.rs"},"region":{"startLine":3128}}}],"partialFingerprints":{"codehealthFindingId/v1":"58babbc23a4edb9baca14da50291e575cb66a127f38fcbac28719049fae2202a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: session_manager/cache.rs: FileTooLong \u2014 564 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 64 over it, 1.13\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":"src-tauri/src/session_manager/cache.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a71aed750849fe29da9ae6e4558d7b270130a445c06c102277125fac3d88d2bc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/prompts.rs: FileTooLong \u2014 562 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 62 over it, 1.12\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":"src-tauri/src/cli/commands/prompts.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"03b014378e55b8a71299204d502e20ad98829e21948f87e6694e976a9002b598"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: services/local_env_check.rs: FileTooLong \u2014 562 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 62 over it, 1.12\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":"src-tauri/src/services/local_env_check.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"773c4c4b215030141d2c5c61863be8ecbb0279d73a10ed087cf091ce671b7013"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: database/mod.rs: FileTooLong \u2014 559 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 59 over it, 1.12\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":"src-tauri/src/database/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"baf0485e6a022b505eb1fcaf591502fe99052e1574c84854bc3585062c5c6282"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/editor_state.rs: FileTooLong \u2014 556 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 90% of them inside a single declaration: EditorState (2 blocks, 80-820). The bar is 500 significant lines; this is 56 over it, 1.11\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":"src-tauri/src/cli/tui/app/editor_state.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"52d1739ede5aeca99962e9fdf6c27a43b51a80814c638c062834a826898fb352"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/settings.rs: FileTooLong \u2014 555 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 34 free functions. The bar is 500 significant lines; this is 55 over it, 1.11\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":"src-tauri/src/cli/commands/settings.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb70966a665364b56bfe612c4812d626a11c56a6c52e4808c22efafa8d790ee0"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::overlay::pickers::render_hermes_models_picker_overlay: FunctionTooLong \u2014 cc_switch::cli::tui::ui::overlay::pickers::render_hermes_models_picker_overlay runs 111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 11 over it, 1.11\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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":937}}}],"partialFingerprints":{"codehealthFindingId/v1":"7600b5e692b5343f4692357708ba0a17202a10fa1452a00aea1d44f53e9ffc00"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/provider_usage_query.rs: FileTooLong \u2014 551 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 51 over it, 1.10\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":"src-tauri/src/cli/commands/provider_usage_query.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"23295365a7a2855f25783a22b4875352ea0d33f5f97a16783c2affd92a6ea592"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::forms::provider::render_codex_model_catalog_form: FunctionTooLong \u2014 cc_switch::cli::tui::ui::forms::provider::render_codex_model_catalog_form runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10\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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ebd73e8d3450b936f8d14a9b44552de7faad49cd3187ffa42f398466c5953b7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Database.migrate_v1_to_v2: MethodTooLong \u2014 migrate_v1_to_v2 runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10\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":"src-tauri/src/database/schema.rs"},"region":{"startLine":681}}}],"partialFingerprints":{"codehealthFindingId/v1":"83d3cb3fc57df12dea69f12005b1a4a2aa0fb941214241a2cfd65483f29848e8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: providers/streaming_responses.rs: FileTooLong \u2014 545 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 45 over it, 1.09\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":"src-tauri/src/proxy/providers/streaming_responses.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"885347bbc8c443cc46fb3ade8fba2a9ef60dd7e5f4e00bdedc5d93d43bbfdddd"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::proxy::providers::transform::openai_to_anthropic: FunctionTooLong \u2014 cc_switch::proxy::providers::transform::openai_to_anthropic runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) 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":"src-tauri/src/proxy/providers/transform.rs"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d9b775d915a8ae35b6aa0dad92ec8d36e286222fd0a590ac28a29ba47cf932d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: TranscriptReader.load_page: MethodTooLong \u2014 load_page runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) 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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a640b18f4ff825cc48b1ea1f907f5c96dbddf9a1c6eb3505898318b3aa13cb6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.on_providers_key: MethodTooLong \u2014 on_providers_key runs 108 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 8 over it, 1.08\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":"src-tauri/src/cli/tui/app/content_entities.rs"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb2531e5de2bf7338f92af0f3d65d860bfbe7f368e094158c91211b81b35c775"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::forms::mcp::mcp_preview_value: FunctionTooLong \u2014 cc_switch::cli::tui::ui::forms::mcp::mcp_preview_value runs 108 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 8 over it, 1.08\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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"430664f938909e6aa6138267a6beb9849e852b0a39d29f6ade972a443382ddd3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/app_config.rs: FileTooLong \u2014 539 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 39 over it, 1.08\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":"src-tauri/src/app_config.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8511f7caf1f14d09a5b74ed81835df9f6a9f54897cb8ab19c5359fbfa8a84bc6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: providers/streaming_codex_anthropic.rs: FileTooLong \u2014 538 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 62% of them inside a single declaration: AnthropicToResponsesState (3 blocks, 54-506). The bar is 500 significant lines; this is 38 over it, 1.08\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":"src-tauri/src/proxy/providers/streaming_codex_anthropic.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6d6f8fd748b20c7fcc2570adf80bdd4c9d1538e95de38c87233fe8878c1b743"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::forms::provider::render_provider_inline_fields: FunctionTooLong \u2014 cc_switch::cli::tui::ui::forms::provider::render_provider_inline_fields runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.07\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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"a32fc5f2ada3c9563ca4051f15fa68f3c629fda1c3710aa22bf185af5075b526"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: StreamingOutcomeRecorder.finish: MethodTooLong \u2014 finish runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.07\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":"src-tauri/src/proxy/response_handler.rs"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc9ef045b0189d0140f8e9e2b5f54c5f64522a34217d02cca89e3ee87b6a22ab"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Database.get_usage_summary_by_app: MethodTooLong \u2014 get_usage_summary_by_app runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.07\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":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"c95f20c72a369b0ab6de90a0912ffc243fccb31f135dc0e9f1ac7c3a31dc39f7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Database.dump_sql: MethodTooLong \u2014 dump_sql runs 106 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 6 over it, 1.06\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":"src-tauri/src/database/backup.rs"},"region":{"startLine":1221}}}],"partialFingerprints":{"codehealthFindingId/v1":"5118293ecbd1603f3e62ae19690fd0d529fc0afef09765c86f6eba4218d5fedd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui/main_page.rs: FileTooLong \u2014 529 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 29 over it, 1.06\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":"src-tauri/src/cli/tui/ui/main_page.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b3c1bf8610093ec29e50a9486b58a5a4b14b96ed228b1649aba134cca7fddf1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/provider.rs: FileTooLong \u2014 528 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 28 over it, 1.06\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":"src-tauri/src/provider.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c3aa4d6830796dd2905b40feb4bb80f63c7e392c068cee132d7de2e3a282b76"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/keymap.rs: FileTooLong \u2014 526 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 26 over it, 1.05\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":"src-tauri/src/cli/tui/keymap.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2216ce41bcc3b46af62b22e40aa91f62e0f2be5045a2f94c1ce5bff6d1cb5188"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::commands::provider::build_add_settings_config: FunctionTooLong \u2014 cc_switch::cli::commands::provider::build_add_settings_config runs 105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 5 over it, 1.05\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":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":1338}}}],"partialFingerprints":{"codehealthFindingId/v1":"560bc077a104ff651bc7d95c299a030516e4d4d712583a3cb518ba9852309842"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::sessions::render_session_messages: FunctionTooLong \u2014 cc_switch::cli::tui::ui::sessions::render_session_messages runs 105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 5 over it, 1.05\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":"src-tauri/src/cli/tui/ui/sessions.rs"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"18158fc1125ac58fc86fb719e107dade3d03266b8bcf0f600edabffcd6fcfcf4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: deeplink/provider.rs: FileTooLong \u2014 521 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 21 over it, 1.04\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":"src-tauri/src/deeplink/provider.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"83f045e7dde0d343aeeccc9210cb9ca14c65d4f4d63112ab49f1416f337f1af8"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ScanCacheStore: ClassTooLong \u2014 416 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 16 methods, 2 blocks, lines 39-743. The bar is 400 significant lines; this is 16 over it, 1.04\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":"src-tauri/src/session_manager/scan_cache_store.rs"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d849a4ef3508bf62d961c5003a87eb9012cfb5b7b0e3f7202670b19ffa22fb7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.on_sessions_wheel: MethodTooLong \u2014 on_sessions_wheel runs 104 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 4 over it, 1.04\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":"src-tauri/src/cli/tui/app/content_entities.rs"},"region":{"startLine":1053}}}],"partialFingerprints":{"codehealthFindingId/v1":"58139d1c17821799e41904487e77c33133a2e80ee543ba5d9bb493bc11de88fa"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.handle_model_fetch_picker_key: MethodTooLong \u2014 handle_model_fetch_picker_key runs 104 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 4 over it, 1.04\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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":1119}}}],"partialFingerprints":{"codehealthFindingId/v1":"af6e9c417da5425a33c33b1d9166c0a4bed12c968568c2cdc8e22aa326a46472"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::session_manager::providers::hermes::stream_sessions_cancellable: FunctionTooLong \u2014 cc_switch::session_manager::providers::hermes::stream_sessions_cancellable runs 104 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 4 over it, 1.04\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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cff29652525378f3f945b1e0e74e1de42d28c3d558037ec887cfacb52ce2596"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::session_manager::providers::utils::build_snippet_cancellable: FunctionTooLong \u2014 cc_switch::session_manager::providers::utils::build_snippet_cancellable runs 104 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 4 over it, 1.04\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":"src-tauri/src/session_manager/providers/utils.rs"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"608dd2c6cc47e257364d37590d4433d4cf3e2b1d48daabaa2c54ca6d6aec2d85"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Supervisor: TooManyMethods \u2014 31 methods. The bar is 30 methods; this is 1 over it, 1.03\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":"src-tauri/src/daemon/supervisor.rs"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"35343ef923a36e2ceb66547e8d97fe69353f52b1a71b977f20cc4e114fba8739"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: DeepLinkImportRequest: TooManyFields \u2014 31 stored fields. The bar is 30 stored fields; this is 1 over it, 1.03\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/deeplink/mod.rs"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"97ed6de448bbf7bdf8acdbcd210758c89a7ac128a17efe271e6e3197b109a17f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Supervisor.ensure_worker_locked: MethodTooLong \u2014 ensure_worker_locked runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\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":"src-tauri/src/daemon/supervisor.rs"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"10f933c585880ee06300535e97ff2e17ec78e351774080f95729a2184695837f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::proxy::providers::transform_gemini::convert_message_content_to_parts: FunctionTooLong \u2014 cc_switch::proxy::providers::transform_gemini::convert_message_content_to_parts runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\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":"src-tauri/src/proxy/providers/transform_gemini.rs"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"558483a157575dbccb350e978834b8db5a6f19a768df1132c976d297eea6994b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ProviderService.query_provider_usage: MethodTooLong \u2014 query_provider_usage runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\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":"src-tauri/src/services/provider/usage.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d3ee93532bef325f44f4d172d5ff10af6d792ac7b7ce0e960362326f74312a1"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::ui::overlay::pickers::render_model_fetch_picker_overlay: FunctionTooLong \u2014 cc_switch::cli::tui::ui::overlay::pickers::render_model_fetch_picker_overlay runs 102 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":1185}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb27a702750e5dcad14c8d1df97610ef6e73e12fce32188eaba0c10bcc378044"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Database.init_impl_inner: MethodTooLong \u2014 init_impl_inner runs 102 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\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":"src-tauri/src/database/mod.rs"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eb16eea96a525a52f8bf910e80c6cfb6f3f81f5c3ff4ccb3b0508bac261418f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: cc_switch::cli::tui::data::load_proxy_snapshot_from_state_async: FunctionTooLong \u2014 cc_switch::cli::tui::data::load_proxy_snapshot_from_state_async runs 101 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 1 over it, 1.01\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":"src-tauri/src/cli/tui/data.rs"},"region":{"startLine":3562}}}],"partialFingerprints":{"codehealthFindingId/v1":"a652b5078bd2a5f3646e76fa23fcc9815a7593511fcff301a8400809b4b4be6c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Database.get_provider_stats: MethodTooLong \u2014 get_provider_stats runs 101 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 1 over it, 1.01\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":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":1040}}}],"partialFingerprints":{"codehealthFindingId/v1":"60ba24e03e7b6736e05845c55779b851f7a7da85ec290a03e6f16d37bd4cfd8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 24 shared lines): src-tauri/src/cli/tui/ui/forms/mcp.rs:282-370 | src-tauri/src/cli/tui/ui/forms/prompt.rs:72-165 | src-tauri/src/cli/tui/ui/forms/provider.rs:1590-1678 | src-tauri/src/cli/tui/ui/forms/s3.rs:58-142 | src-tauri/src/cli/tui/ui/forms/webdav.rs:51-129 \u2014 These 5 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 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 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"b38556b2af68cb42fae6571a3a4e8e290bd416bdc885b802efdf29dfe1fc3677"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 40 shared lines): src-tauri/src/cli/tui/ui/forms/mcp.rs:282-370 | src-tauri/src/cli/tui/ui/forms/prompt.rs:72-165 | src-tauri/src/cli/tui/ui/forms/provider.rs:544-669 | src-tauri/src/cli/tui/ui/forms/provider.rs:1590-1678 \u2014 These 4 members are variants of one another: a block of 40 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"83c4e0b266651781e83bb9be5d3de8f813a39a5c7d46a9eb2c5096db5eafb32d"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (140 shared lines): src-tauri/src/proxy/forwarder.rs:253-455 | src-tauri/src/proxy/forwarder.rs:498-700 \u2014 These two members are variants of one another: 140 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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c07c760a22ed3e92cc8f93f09ca2aaef47ce91431bdd3f9f20b221735e98eb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (77 shared lines): src-tauri/src/session_manager/providers/claude.rs:235-367 | src-tauri/src/session_manager/providers/codex.rs:866-991 \u2014 These two members are variants of one another: 77 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":"src-tauri/src/session_manager/providers/claude.rs"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"13e15c1cf8d0a64713fd8a4694351c708e7f5e89c414946f866f3a79df4ff56a"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (65 shared lines): src-tauri/src/cli/commands/provider.rs:1706-1868 | src-tauri/src/cli/commands/provider.rs:1986-2106 \u2014 These two members are variants of one another: 65 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":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":1706}}}],"partialFingerprints":{"codehealthFindingId/v1":"27a05ab6761d6b0bae11fbda610d204c833e65f4210e0b9f22e17b267c082f03"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (63 shared lines): src-tauri/src/cli/commands/auth.rs:378-490 | src-tauri/src/cli/commands/provider_inspect.rs:435-646 \u2014 These two members are variants of one another: 63 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":"src-tauri/src/cli/commands/auth.rs"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"917263bfb40204a7dfd26ea6560254c98a2a47deef581409a7e7972205896fff"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (33 shared lines): src-tauri/src/cli/tui/ui/config.rs:4109-4215 | src-tauri/src/cli/tui/ui/config.rs:4223-4296 \u2014 These two members are variants of one another: 33 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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":4109}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f8ac98a40868941dbb9aa0afd171a1fccd98d1a8b3ac211a7f82ac10551f0c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (28 shared lines): src-tauri/src/session_manager/providers/hermes.rs:415-492 | src-tauri/src/session_manager/providers/opencode.rs:594-714 \u2014 These two members are variants of one another: 28 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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"39b8c791594878bbaa4a159320e8b8e6c58958e0b517885594b9b2730224c682"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (20 shared lines): src-tauri/src/services/skill.rs:1669-1751 | src-tauri/src/services/skill.rs:1769-1808 \u2014 These two members are variants of one another: 20 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":"src-tauri/src/services/skill.rs"},"region":{"startLine":1669}}}],"partialFingerprints":{"codehealthFindingId/v1":"53679ec03c7867111e7884e7eca85cc3d04c3963fad51d4f5499540ead828f75"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): src-tauri/src/cli/tui/ui/shared.rs:971-994 | src-tauri/src/cli/tui/ui/shared.rs:1039-1058 \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":"src-tauri/src/cli/tui/ui/shared.rs"},"region":{"startLine":971}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6ef520cfa98ae831d4aa4c37f9f7e9678133e8c618dfed8e22ec28140916a6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (9 members, 50\u002B identical tokens): src-tauri/src/cli/tui/ui/config.rs:942-1076 | src-tauri/src/cli/tui/ui/config.rs:1409-1660 | src-tauri/src/cli/tui/ui/config.rs:2303-2680 | src-tauri/src/cli/tui/ui/forms/mcp.rs:11-126 | src-tauri/src/cli/tui/ui/forms/prompt.rs:9-63 | src-tauri/src/cli/tui/ui/forms/provider.rs:372-534 | src-tauri/src/cli/tui/ui/forms/provider.rs:1063-1184 | src-tauri/src/cli/tui/ui/forms/provider.rs:1291-1420 | src-tauri/src/cli/tui/ui/forms/provider.rs:1484-1580 \u2014 These 9 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 9 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 9 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":942}}}],"partialFingerprints":{"codehealthFindingId/v1":"57ae618c46244e5fb4266e12826998840b1a8801f41925ffcb3dfebad3b9e38e"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): src-tauri/src/cli/tui/runtime_actions/editor.rs:1023-1114 | src-tauri/src/cli/tui/runtime_actions/editor.rs:1121-1182 | src-tauri/src/cli/tui/runtime_actions/editor.rs:1198-1271 | src-tauri/src/cli/tui/runtime_actions/editor.rs:1273-1311 | src-tauri/src/cli/tui/runtime_actions/editor.rs:1317-1348 \u2014 These 5 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 5 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 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":1023}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebf4fe4c60aa1e89399ada9358ecbe3185f61564e1ad6e559d1840806ddab0d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): src-tauri/src/cli/tui/ui/config.rs:3061-3198 | src-tauri/src/cli/tui/ui/config.rs:3206-3299 | src-tauri/src/cli/tui/ui/config.rs:3307-3405 | src-tauri/src/cli/tui/ui/config.rs:4223-4296 | src-tauri/src/cli/tui/ui/skills/repos.rs:9-111 \u2014 These 5 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 5 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 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":3061}}}],"partialFingerprints":{"codehealthFindingId/v1":"e778d2e924311d7ab33855a54a00c8390bf6319c2203e398cd9456bffd38454a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): src-tauri/src/cli/tui/ui/overlay/pickers.rs:347-405 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:413-459 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:903-935 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:2357-2392 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:2643-2680 \u2014 These 5 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 5 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 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d91d1c2246b481920fe3214117a1ed206d3c887af8adb62659cfe81c991dc12"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): src-tauri/src/session_manager/providers/claude.rs:112-179 | src-tauri/src/session_manager/providers/codex.rs:751-828 | src-tauri/src/session_manager/providers/hermes.rs:839-896 | src-tauri/src/session_manager/providers/openclaw.rs:401-459 | src-tauri/src/session_manager/providers/pi.rs:502-533 \u2014 These 5 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 5 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 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/session_manager/providers/claude.rs"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"54277be94b286de9097a83da9a67d1a895a01fb47bd883a59e728a2482bb876f"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): src-tauri/src/cli/tui/ui/overlay/basic.rs:243-271 | src-tauri/src/cli/tui/ui/overlay/basic.rs:305-335 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:2536-2580 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:2587-2626 \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":"src-tauri/src/cli/tui/ui/overlay/basic.rs"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b636f74559e323a81959c2645d317137c8af6243b68afd02c42c8447e6c15e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): src-tauri/src/codex_history_migration.rs:900-959 | src-tauri/src/codex_history_migration.rs:972-1034 | src-tauri/src/codex_history_migration.rs:1042-1114 | src-tauri/src/codex_history_migration.rs:1122-1177 \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":"src-tauri/src/codex_history_migration.rs"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"71dbefa871373aa72e6169c68b0c4b5cfbaf05351e359f24edf6b4ac03daae02"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): src-tauri/src/deeplink/provider.rs:508-563 | src-tauri/src/deeplink/provider.rs:610-651 | src-tauri/src/deeplink/provider.rs:656-694 | src-tauri/src/deeplink/provider.rs:699-746 \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":"src-tauri/src/deeplink/provider.rs"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"9477db25d7625842bf9ad2920f05e59106a7e91fea8ce4d8faf44eb42376820d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): src-tauri/src/mcp.rs:348-415 | src-tauri/src/mcp.rs:743-806 | src-tauri/src/mcp.rs:907-975 | src-tauri/src/mcp.rs:1625-1714 \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":"src-tauri/src/mcp.rs"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"79f7c8d6d86815734d2e77c85f52733fd8ffdb78127688ed9b51d3da52b7dc5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): src-tauri/src/mcp.rs:809-856 | src-tauri/src/mcp.rs:859-904 | src-tauri/src/mcp.rs:1456-1502 | src-tauri/src/mcp.rs:1506-1547 \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":"src-tauri/src/mcp.rs"},"region":{"startLine":809}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac8eea1d33fcefd46079b2a3c8bac419802fb252f604de6a72a863db61cd6646"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): src-tauri/src/session_manager/providers/claude.rs:57-69 | src-tauri/src/session_manager/providers/codex.rs:683-695 | src-tauri/src/session_manager/providers/hermes.rs:757-769 | src-tauri/src/session_manager/providers/openclaw.rs:354-366 \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":"src-tauri/src/session_manager/providers/claude.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"238f3f72d387d72bfb90aba66ecb608df173dbc4b393570762598cffdef99165"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (73\u201375 lines \u00D7 2): src-tauri/src/cli/tui/form/provider_state.rs:2709-2783 | src-tauri/src/cli/tui/form/provider_state.rs:2827-2899 \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":"src-tauri/src/cli/tui/form/provider_state.rs"},"region":{"startLine":2709}}}],"partialFingerprints":{"codehealthFindingId/v1":"064a8a5b891451c8c8b184e721cd588f02ab199d575dd26d3cbde759de8d710b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (65 lines \u00D7 2): src-tauri/src/cli/tui/app/form_handlers/provider.rs:1013-1077 | src-tauri/src/cli/tui/app/form_handlers/provider.rs:1157-1221 \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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":1013}}}],"partialFingerprints":{"codehealthFindingId/v1":"47d303c4cea4975f1ef117a947985b811ce335181a43b9228ae836c1d936beee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41\u201348 lines \u00D7 2): src-tauri/src/cli/commands/provider.rs:1755-1802 | src-tauri/src/cli/commands/provider.rs:2017-2057 \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":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":1755}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5b543210ad3af0e1d8dc18e34532bd1bdcb8ec0cac7d881f17f58195d99d55c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (45\u201346 lines \u00D7 2): src-tauri/src/cli/tui/ui/config.rs:1433-1477 | src-tauri/src/cli/tui/ui/config.rs:2331-2376 \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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":1433}}}],"partialFingerprints":{"codehealthFindingId/v1":"5529aadd73780419809978e41ffb55341f44b1243e578f566956190299ac3847"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (45 lines \u00D7 2): src-tauri/src/cli/tui/runtime_systems/workers.rs:3773-3817 | src-tauri/src/cli/tui/runtime_systems/workers.rs:3820-3864 \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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":3773}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ad4a9e51d43e1f0a96b5171caaad9f53d3f3b86d99c605f081a31ec91146180"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44 lines \u00D7 2): src-tauri/src/proxy/forwarder.rs:412-455 | src-tauri/src/proxy/forwarder.rs:657-700 \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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4eb06143a3c2d87d03f6b005bb28f9e52397c30da5b9f2bd789894d981e637c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41 lines \u00D7 2): src-tauri/src/proxy/providers/codex_oauth_auth.rs:1421-1461 | src-tauri/src/proxy/providers/copilot_auth.rs:1259-1299 \u2014 before extracting anything, compare \u0060src-tauri/src/proxy/providers/codex_oauth_auth.rs\u0060 and \u0060src-tauri/src/proxy/providers/copilot_auth.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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":"src-tauri/src/proxy/providers/codex_oauth_auth.rs"},"region":{"startLine":1421}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e3466f2cf24ab60ba5e5b5c033fe27bc3adbbda011ab0da5961c525c32a993e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (40 lines \u00D7 2): src-tauri/src/cli/tui/form/provider_state.rs:750-789 | src-tauri/src/cli/tui/form/provider_state.rs:822-861 \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":"src-tauri/src/cli/tui/form/provider_state.rs"},"region":{"startLine":750}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b38be7d83379fb9896655a0751eaba1e9fd7c6b3f92c69c6a24191a3e85fc32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39 lines \u00D7 2): src-tauri/src/proxy/forwarder.rs:254-292 | src-tauri/src/proxy/forwarder.rs:499-537 \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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fae8be875cce76fdbd6286b9460c55c302e52bae68e3dad29a14025b77b18c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201333 lines \u00D7 3): src-tauri/src/cli/tui/ui/pricing.rs:12-44 | src-tauri/src/cli/tui/ui/usage.rs:55-87 | src-tauri/src/cli/tui/ui/usage.rs:107-132 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/pricing.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/usage.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 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":"src-tauri/src/cli/tui/ui/pricing.rs"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"3df53a0fb105ba25ddff280ac63ccfc61e8bed5f92a986a2cfe6860a30bb7896"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2): src-tauri/src/cli/tui/mod.rs:3312-3343 | src-tauri/src/cli/tui/mod.rs:3365-3396 \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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":3312}}}],"partialFingerprints":{"codehealthFindingId/v1":"03cf89d0fd6aeb6410173e32877e3dc1e4a19e78e590665ec599d4d90a170c1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31\u201332 lines \u00D7 2): src-tauri/src/cli/tui/mod.rs:3419-3449 | src-tauri/src/cli/tui/mod.rs:3878-3909 \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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":3419}}}],"partialFingerprints":{"codehealthFindingId/v1":"a389fda312f8a0667debdb2c07b3806b32f79bb5643afacdf41ec9c3c173f364"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201331 lines \u00D7 2): src-tauri/src/codex_history_migration.rs:973-1001 | src-tauri/src/codex_history_migration.rs:1043-1073 \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":"src-tauri/src/codex_history_migration.rs"},"region":{"startLine":973}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d873de36ebcf925a88a66c62f12951fc01f38b2aa3aad5bb885bee56785b968"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): src-tauri/src/proxy/forwarder.rs:310-340 | src-tauri/src/proxy/forwarder.rs:555-585 \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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8597a816d870588b7a8cdb6524369782b3c575cba80f6609f1bc01a339af979"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): src-tauri/src/cli/tui/runtime_actions/editor.rs:180-208 | src-tauri/src/cli/tui/runtime_actions/editor.rs:1362-1390 \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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1b89ac531b2283c77493320fd59e40b406e46174e801dae9c9685d1f0bdf924"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): src-tauri/src/cli/tui/ui/config.rs:1366-1394 | src-tauri/src/cli/tui/ui/config.rs:2260-2288 \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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":1366}}}],"partialFingerprints":{"codehealthFindingId/v1":"c76fd7f76b1bd61b86712406a321f3ad3268e74411fb72b15398fac7b45b9342"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): src-tauri/src/proxy/providers/transform_codex_chat.rs:808-836 | src-tauri/src/proxy/providers/transform_codex_chat.rs:838-866 \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":"src-tauri/src/proxy/providers/transform_codex_chat.rs"},"region":{"startLine":808}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6a733aa6b263e4bdf5ffdcf80e97e2bce8105ae78a81c718f19c11b96baec73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): src-tauri/src/cli/commands/auth.rs:435-462 | src-tauri/src/cli/commands/provider_inspect.rs:540-567 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/commands/auth.rs\u0060 and \u0060src-tauri/src/cli/commands/provider_inspect.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 65 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":"src-tauri/src/cli/commands/auth.rs"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"998d0a0df55e6b07df287ab4e9b799069506ca9c029989ec7cdebfef3200f28a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201328 lines \u00D7 2): src-tauri/src/cli/commands/config_s3.rs:215-242 | src-tauri/src/cli/commands/config_webdav.rs:306-328 \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":"src-tauri/src/cli/commands/config_s3.rs"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"20129bb60e3dd5074e19de5a9868cb8e1aaff28d4b48ca0d07319d0abb5e35f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201327 lines \u00D7 2): src-tauri/src/cli/tui/runtime_actions/editor.rs:725-750 | src-tauri/src/cli/tui/runtime_actions/editor.rs:967-993 \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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9f83eaec2ecf2fef37f7fd33944660bf481f3bc058df05daedd22fb0c622e82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): src-tauri/src/services/proxy.rs:3020-3046 | src-tauri/src/services/proxy.rs:3737-3763 \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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":3020}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bd92c146171ef2c75740f36b25cb6b2a26540c0f4f79311268cc171a831edfb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 3): src-tauri/src/cli/commands/hermes.rs:219-244 | src-tauri/src/cli/tui/runtime_actions/config.rs:431-456 | src-tauri/src/commands/workspace.rs:448-473 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/hermes.rs"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3341fd8858b6e66c0c0efbc60d30803d232c322546426fd0d4c3f1b448c720f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): src-tauri/src/services/usage_stats.rs:1060-1085 | src-tauri/src/services/usage_stats.rs:1186-1211 \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":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":1060}}}],"partialFingerprints":{"codehealthFindingId/v1":"130d35c6425f8c894fc0c815fd66383ce8cadd46345a7dc1482e36dade2c03ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201325 lines \u00D7 2): src-tauri/src/claude_mcp.rs:313-336 | src-tauri/src/gemini_mcp.rs:99-123 \u2014 before extracting anything, compare \u0060src-tauri/src/claude_mcp.rs\u0060 and \u0060src-tauri/src/gemini_mcp.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 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":"src-tauri/src/claude_mcp.rs"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"25db04c96268eb620bdc26cbaeed5c6b1a2a933c275eaf114257c22e64d06b6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/mcp.rs:77-101 | src-tauri/src/cli/tui/ui/forms/provider.rs:496-520 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/mcp.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/provider.rs\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 154 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2a1211200c25ce19c04179a251ebceea40b30bcb6b0ee33f8d62bb72f04e305"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 5): src-tauri/src/services/balance.rs:73-96 | src-tauri/src/services/balance.rs:145-168 | src-tauri/src/services/balance.rs:204-227 | src-tauri/src/services/balance.rs:261-284 | src-tauri/src/services/balance.rs:321-344 \u2014 all 5 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/balance.rs"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"506bd0125904a16ba5601a4f1853ce35a1970afb29a1dd4001ccb5e2fcb94fa3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): src-tauri/src/cli/tui/mod.rs:3732-3755 | src-tauri/src/cli/tui/mod.rs:3789-3812 \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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":3732}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e919f8fb43886462473e4d5a589205a9f39b265d887253a7557f3300f7d877c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): src-tauri/src/cli/tui/ui/config.rs:3000-3023 | src-tauri/src/cli/tui/ui/config.rs:3030-3053 \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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":3000}}}],"partialFingerprints":{"codehealthFindingId/v1":"aac55045b98e49e114731bcd7ddddd9f7f32e6c7c07ae03f0a6cccf6a2240f5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/provider.rs:910-933 | src-tauri/src/cli/tui/ui/forms/provider.rs:1146-1169 \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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca06ead42837357533658a92325758ff426ceab5f0fdaf5ede04c85f7ee86bf0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): src-tauri/src/cli/tui/ui/usage.rs:900-923 | src-tauri/src/cli/tui/ui/usage.rs:951-974 \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":"src-tauri/src/cli/tui/ui/usage.rs"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dd551bfc839005a5fdcb5e153d7f3e6f6a5b55a49f922201405201505fdd069"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): src-tauri/src/proxy/providers/streaming_gemini.rs:375-398 | src-tauri/src/proxy/providers/streaming_gemini.rs:445-468 \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":"src-tauri/src/proxy/providers/streaming_gemini.rs"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"8835d9cd384785b2938cc3290c86fb2908a44f82bbd6731e9e953d095e695c7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201323 lines \u00D7 2): src-tauri/src/cli/tui/ui/config.rs:2382-2401 | src-tauri/src/cli/tui/ui/config.rs:2647-2669 \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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":2382}}}],"partialFingerprints":{"codehealthFindingId/v1":"98f284c301f6ec2329f9216e1a35d9e221ed6e3064dfde96c78636192f2402a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): src-tauri/src/cli/tui/ui/config.rs:3243-3266 | src-tauri/src/cli/tui/ui/config.rs:3316-3338 \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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":3243}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a2f6a691be3240695db33685047cf10cfd3dbf33aeb53de94e7c5a511225eae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201323 lines \u00D7 2): src-tauri/src/cli/tui/ui/usage.rs:1020-1039 | src-tauri/src/cli/tui/ui/usage.rs:1070-1092 \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":"src-tauri/src/cli/tui/ui/usage.rs"},"region":{"startLine":1020}}}],"partialFingerprints":{"codehealthFindingId/v1":"798fe9993f95058a07748122a5f5be6c5de22ee1e7bf38222555f3939d2fd1d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 2): src-tauri/src/config.rs:725-747 | src-tauri/src/database/mod.rs:256-277 \u2014 before extracting anything, compare \u0060src-tauri/src/config.rs\u0060 and \u0060src-tauri/src/database/mod.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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":"src-tauri/src/config.rs"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"e29cfde77202ad99b6aacfcf44b218c6e18f2713ae827ea145c30d18168c8109"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): src-tauri/src/services/proxy.rs:3567-3589 | src-tauri/src/services/proxy.rs:3661-3683 \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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":3567}}}],"partialFingerprints":{"codehealthFindingId/v1":"87c4fe3ced947022527df127f91e377556590a4e6c834dbb6151bb8d3efb1459"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201322 lines \u00D7 4): src-tauri/src/cli/tui/ui/config.rs:3068-3083 | src-tauri/src/cli/tui/ui/config.rs:3241-3262 | src-tauri/src/cli/tui/ui/config.rs:3314-3334 | src-tauri/src/cli/tui/ui/skills/repos.rs:20-41 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/config.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/skills/repos.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":3068}}}],"partialFingerprints":{"codehealthFindingId/v1":"65b4a70e4df6abb4ca39120331c74628ae9a179a47681754b458fece45ef632a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201322 lines \u00D7 2): src-tauri/src/cli/commands/auth.rs:467-488 | src-tauri/src/cli/commands/provider_inspect.rs:569-589 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/commands/auth.rs\u0060 and \u0060src-tauri/src/cli/commands/provider_inspect.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 65 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":"src-tauri/src/cli/commands/auth.rs"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"e90f8fbb12a5d87a3fe169dbe1b339f15277b0d8620c4e9c17c50290ddd4c464"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): src-tauri/src/proxy/handlers.rs:610-631 | src-tauri/src/proxy/handlers.rs:761-782 \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":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":610}}}],"partialFingerprints":{"codehealthFindingId/v1":"47977da37cea66c2c7d56d6ca0c9eb0db0ea8791ff6f9672ff2332023e07a5a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): src-tauri/src/proxy/http_client.rs:83-104 | src-tauri/src/proxy/http_client.rs:116-137 \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":"src-tauri/src/proxy/http_client.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"227381f2560920b772dc5c1d077b594d9bfed328c521729ac64c7f58042526a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): src-tauri/src/services/codex_oauth.rs:219-240 | src-tauri/src/services/codex_oauth.rs:253-274 \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":"src-tauri/src/services/codex_oauth.rs"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"eec08e469b5bdf1d574cec1076db8365ffc07b3e743486d6005c4f5e2cecd1f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): src-tauri/src/services/session_usage.rs:1297-1318 | src-tauri/src/services/session_usage_codex.rs:2012-2033 \u2014 before extracting anything, compare \u0060src-tauri/src/services/session_usage.rs\u0060 and \u0060src-tauri/src/services/session_usage_codex.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 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":"src-tauri/src/services/session_usage.rs"},"region":{"startLine":1297}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1c8b276c354a8063078ad1f364a5d1b2393c9c2920823a31ea084b81986df4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): src-tauri/src/session_manager/providers/codex.rs:807-828 | src-tauri/src/session_manager/providers/openclaw.rs:438-459 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/codex.rs\u0060 and \u0060src-tauri/src/session_manager/providers/openclaw.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 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":"src-tauri/src/session_manager/providers/codex.rs"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c13e0f836571813f4b61e5212f8f7e703fac1f3dc62495a4684e4c0e241874e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201322 lines \u00D7 2): src-tauri/src/session_manager/providers/gemini.rs:283-304 | src-tauri/src/session_manager/providers/gemini.rs:351-371 \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":"src-tauri/src/session_manager/providers/gemini.rs"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"22d09f00dd530fc25d27870510ebdb5687817fe76899df8976ad720dbfc8eccd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 3): src-tauri/src/cli/tui/ui/config.rs:958-978 | src-tauri/src/cli/tui/ui/config.rs:1434-1453 | src-tauri/src/cli/tui/ui/config.rs:2333-2352 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":958}}}],"partialFingerprints":{"codehealthFindingId/v1":"523a688fff03bd4cffb0470716bc02e42d5839ac0078d9f2e3b7972b33f19643"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): src-tauri/src/cli/tui/mod.rs:1701-1721 | src-tauri/src/cli/tui/mod.rs:1778-1798 \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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":1701}}}],"partialFingerprints":{"codehealthFindingId/v1":"8569102c074024c4fc4ec2580368c455cf100445c00c81016247fb15193c5ce7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 2): src-tauri/src/cli/tui/ui/usage.rs:204-224 | src-tauri/src/cli/tui/ui/usage.rs:227-246 \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":"src-tauri/src/cli/tui/ui/usage.rs"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ee90e8f777843a1fa3c8983060f00e7720809ff5d611b3d0e5b56e54d907a21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): src-tauri/src/session_manager/providers/claude.rs:342-362 | src-tauri/src/session_manager/providers/codex.rs:966-986 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/claude.rs\u0060 and \u0060src-tauri/src/session_manager/providers/codex.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 113 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":"src-tauri/src/session_manager/providers/claude.rs"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"83b543fad5b1e497be964cdb2fb52b2d3fb326020fa4e181e22518bed4512519"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 4): src-tauri/src/cli/tui/ui/forms/mcp.rs:293-312 | src-tauri/src/cli/tui/ui/forms/provider.rs:1601-1620 | src-tauri/src/cli/tui/ui/forms/s3.rs:69-88 | src-tauri/src/cli/tui/ui/forms/webdav.rs:61-79 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/mcp.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/provider.rs\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 154 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"c61dadeeb87940c7e4be518a0e29110a3bc68f3bd27f04cfed31fe27840b0dbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 3): src-tauri/src/services/session_usage.rs:1292-1310 | src-tauri/src/services/session_usage_codex.rs:2007-2025 | src-tauri/src/services/session_usage_gemini.rs:366-385 \u2014 before extracting anything, compare \u0060src-tauri/src/services/session_usage.rs\u0060 and \u0060src-tauri/src/services/session_usage_codex.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 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":"src-tauri/src/services/session_usage.rs"},"region":{"startLine":1292}}}],"partialFingerprints":{"codehealthFindingId/v1":"925f4753d479f9d374d7c7ec7d747d3d6f678658a5f9acfcb1eeea65d32971b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201320 lines \u00D7 2): src-tauri/src/cli/tui/ui/config.rs:4128-4147 | src-tauri/src/cli/tui/ui/config.rs:4244-4261 \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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":4128}}}],"partialFingerprints":{"codehealthFindingId/v1":"526c648178137a5f32f20d196e1c19de5d0f7dc4d49b7997df5845139e67d43a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/provider.rs:1216-1235 | src-tauri/src/cli/tui/ui/forms/provider.rs:1336-1355 \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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":1216}}}],"partialFingerprints":{"codehealthFindingId/v1":"6301a860f0eb346a53019f2df09f8354af3d00504dc90cfaaf15a80e74f4ac55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): src-tauri/src/services/coding_plan.rs:116-135 | src-tauri/src/services/coding_plan.rs:372-391 \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":"src-tauri/src/services/coding_plan.rs"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"12e4a0c19e24256748ba35459aca03cef3ce7e3ecd1decb18fb9dbccef56bd7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): src-tauri/src/cli/commands/provider_input.rs:2690-2708 | src-tauri/src/cli/tui/form/provider_json.rs:430-448 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/commands/provider_input.rs\u0060 and \u0060src-tauri/src/cli/tui/form/provider_json.rs\u0060 as WHOLE FILES: this scan already matched 6 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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":2690}}}],"partialFingerprints":{"codehealthFindingId/v1":"27017e2816d95cf43a092b243e844effbe2dddeea005bfa8f24a5ae66250b2bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): src-tauri/src/cli/commands/skills.rs:668-686 | src-tauri/src/cli/tui/runtime_skills.rs:85-102 \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":"src-tauri/src/cli/commands/skills.rs"},"region":{"startLine":668}}}],"partialFingerprints":{"codehealthFindingId/v1":"94d67b2c92caa699111953bf7aae8495ad0f9f1f8b4ffd6e2877f2add198f79d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): src-tauri/src/cli/tui/app/types.rs:3178-3196 | src-tauri/src/cli/tui/app/types.rs:3294-3312 \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":"src-tauri/src/cli/tui/app/types.rs"},"region":{"startLine":3178}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cce21456aaebbc4f89b9b710417b5077a3a1c66ee77130cd318197a01e87a99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201319 lines \u00D7 2): src-tauri/src/cli/tui/form/provider_state.rs:1357-1375 | src-tauri/src/cli/tui/form/provider_state.rs:1408-1419 \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":"src-tauri/src/cli/tui/form/provider_state.rs"},"region":{"startLine":1357}}}],"partialFingerprints":{"codehealthFindingId/v1":"664422f1515cf759b682a50b5622bfb5c6fb29862fc6b3b299f52630e226a2d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): src-tauri/src/cli/tui/form/provider_state.rs:2682-2700 | src-tauri/src/cli/tui/form/provider_state.rs:2790-2808 \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":"src-tauri/src/cli/tui/form/provider_state.rs"},"region":{"startLine":2682}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0ac838d18992e352fcd391c789d6c2a930734afff85864d4cc3966e58c9f3bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201319 lines \u00D7 2): src-tauri/src/cli/tui/ui/config.rs:1480-1495 | src-tauri/src/cli/tui/ui/config.rs:1625-1643 \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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":1480}}}],"partialFingerprints":{"codehealthFindingId/v1":"591a1a958b58d41588c0292ce47dafb90064a58f2d24b3dbf74f4fa0f9bcebbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/s3.rs:125-142 | src-tauri/src/cli/tui/ui/forms/webdav.rs:111-129 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/s3.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/webdav.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 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":"src-tauri/src/cli/tui/ui/forms/s3.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f9fd1c48763fc84dcdd6eeaed6d9472e82c69b0bb6989397233ae663d0618ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): src-tauri/src/proxy/providers/claude.rs:399-417 | src-tauri/src/proxy/providers/gemini.rs:53-71 \u2014 before extracting anything, compare \u0060src-tauri/src/proxy/providers/claude.rs\u0060 and \u0060src-tauri/src/proxy/providers/gemini.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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":"src-tauri/src/proxy/providers/claude.rs"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"418943ccd89e456ddd86f25dab9cc98df7a32bb4e44b7ba144261f25d50e885d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): src-tauri/src/proxy/providers/claude.rs:472-490 | src-tauri/src/proxy/providers/gemini.rs:141-159 \u2014 before extracting anything, compare \u0060src-tauri/src/proxy/providers/claude.rs\u0060 and \u0060src-tauri/src/proxy/providers/gemini.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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":"src-tauri/src/proxy/providers/claude.rs"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b6bd16194d324fde75cdea3d3edd0a40500e842df02c2cc01bd5dc2c5822a08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201319 lines \u00D7 2): src-tauri/src/proxy/providers/transform.rs:596-608 | src-tauri/src/proxy/providers/transform_codex_chat.rs:1213-1231 \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":"src-tauri/src/proxy/providers/transform.rs"},"region":{"startLine":596}}}],"partialFingerprints":{"codehealthFindingId/v1":"4665f496c76613caf91640e6758a432b028d29e623b0a670e36c5e573a717a01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): src-tauri/src/services/skill.rs:1126-1143 | src-tauri/src/services/skill.rs:2333-2351 \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":"src-tauri/src/services/skill.rs"},"region":{"startLine":1126}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6c224bd5d5a1de14f750f6a5067090af6141541782fe9ec68bb1d49c721cffc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): src-tauri/src/session_manager/cache.rs:202-220 | src-tauri/src/session_manager/cache.rs:321-339 \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":"src-tauri/src/session_manager/cache.rs"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5984a5ac6341312fd4c345e3ec88a286f3e8b2ef120f290c1319aa90776632c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): src-tauri/src/usage_script.rs:74-92 | src-tauri/src/usage_script.rs:154-172 \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":"src-tauri/src/usage_script.rs"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c52377a5c0e2b6a42ec43154de8bbded99d7d07ce6aaa83a961f7a36b9ced7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 4): src-tauri/src/cli/tui/ui/forms/mcp.rs:353-370 | src-tauri/src/cli/tui/ui/forms/prompt.rs:148-165 | src-tauri/src/cli/tui/ui/forms/provider.rs:652-669 | src-tauri/src/cli/tui/ui/forms/provider.rs:1661-1678 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/mcp.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/prompt.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b42dcd9b9ba90437db45d6bd2b2980a8f20fd1803ed86adcd644e6c280262d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): src-tauri/src/cli/commands/update.rs:821-838 | src-tauri/src/cli/commands/update.rs:855-872 \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":"src-tauri/src/cli/commands/update.rs"},"region":{"startLine":821}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7df479f9dc0561d5dc136c55c6de356e60839acdba7723f85415c7ae37affc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201318 lines \u00D7 2): src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:1537-1551 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:1684-1701 \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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":1537}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d69b3fb631605186dfc0ab0ecb30f66c33844a17765c3dcc445bde5adf25643"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): src-tauri/src/cli/tui/runtime_actions/editor.rs:687-704 | src-tauri/src/cli/tui/runtime_actions/editor.rs:850-867 \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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":687}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba0ec52aae095643aad14a49a803707d834dc43061cf5a8b9481f371de916158"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): src-tauri/src/proxy/providers/transform_codex_anthropic.rs:814-831 | src-tauri/src/proxy/providers/transform_responses.rs:161-178 \u2014 before extracting anything, compare \u0060src-tauri/src/proxy/providers/transform_codex_anthropic.rs\u0060 and \u0060src-tauri/src/proxy/providers/transform_responses.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":814}}}],"partialFingerprints":{"codehealthFindingId/v1":"43fdac4b585466d7dcb1aaf6496d6f2bf4c1d54d4bdfcd252839ffe9806ec23c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): src-tauri/src/proxy/response_handler.rs:282-300 | src-tauri/src/proxy/response_handler.rs:308-325 \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":"src-tauri/src/proxy/response_handler.rs"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"9070d5ddc3522c92c767722138515d15fd8964b046067ce0cd5cdd58c9786087"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): src-tauri/src/session_manager/transcript.rs:972-989 | src-tauri/src/session_manager/transcript.rs:1071-1088 \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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":972}}}],"partialFingerprints":{"codehealthFindingId/v1":"814eaebef3741619999854befdab9df2ddb4bf836ae3127146acf4315afa2aec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201317 lines \u00D7 5): src-tauri/src/cli/tui/ui/config.rs:3067-3078 | src-tauri/src/cli/tui/ui/config.rs:3240-3255 | src-tauri/src/cli/tui/ui/config.rs:3313-3328 | src-tauri/src/cli/tui/ui/config.rs:4271-4280 | src-tauri/src/cli/tui/ui/skills/repos.rs:19-35 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/config.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/skills/repos.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":3067}}}],"partialFingerprints":{"codehealthFindingId/v1":"559b10380bb109e6b0ef3dfe6bc28d85cecefcf9539fd511745043260fa6d278"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): src-tauri/src/cli/commands/provider.rs:122-138 | src-tauri/src/proxy/providers/codex.rs:38-54 | src-tauri/src/proxy/providers/codex.rs:90-106 \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":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"97f97cb261e4f1fe30b761001b1f071354e27499a76b55b9d8b5bd85a5e72071"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): src-tauri/src/services/coding_plan.rs:106-122 | src-tauri/src/services/coding_plan.rs:277-293 | src-tauri/src/services/coding_plan.rs:362-378 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/coding_plan.rs"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a138381087c2e39af807a7a0727abb8d0c67d02105683daffa330abe5f34357"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 3): src-tauri/src/services/usage_stats.rs:506-522 | src-tauri/src/services/usage_stats.rs:1051-1066 | src-tauri/src/services/usage_stats.rs:1177-1192 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"eff481aaf7edb6373d6e75bb61ad7cb6065bc5dce2a126721bb253bc749e5381"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): src-tauri/src/cli/tui/app/form_handlers/provider.rs:248-264 | src-tauri/src/cli/tui/app/form_handlers/provider.rs:1378-1394 \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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"142290c7fb69ad54aa69eb7f0a60a4b54b24d6f3205fd19e4f882c1b527c4351"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:489-505 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:868-884 \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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"04539c21767c8a83318f61af257aa6305ecaacfae1e1f10e53a81c5b1d3cce16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): src-tauri/src/cli/tui/mod.rs:3609-3625 | src-tauri/src/cli/tui/mod.rs:3631-3647 \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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":3609}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0e5dc2e02ad8692aaef45c92c1cb77e68741a4af5ae4a952e7a54f95824edc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): src-tauri/src/daemon/migration.rs:473-489 | src-tauri/src/daemon/migration.rs:538-553 \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":"src-tauri/src/daemon/migration.rs"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"37d3b632ff86efac3be3bc7907e167e735998765f0e9ab52639a415b0359e296"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): src-tauri/src/deeplink/provider.rs:764-780 | src-tauri/src/services/provider/mod.rs:3596-3612 \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":"src-tauri/src/deeplink/provider.rs"},"region":{"startLine":764}}}],"partialFingerprints":{"codehealthFindingId/v1":"1db2d2e7b5abfc88d47996f070b00f46d335490ad8f2858980473fdb0fe38ebe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): src-tauri/src/proxy/providers/streaming.rs:237-252 | src-tauri/src/proxy/providers/streaming.rs:288-304 \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":"src-tauri/src/proxy/providers/streaming.rs"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"8618fe029c4a9d56084b4ec8d2e13622ad5a1e8ebedea2724d79ab097921d459"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): src-tauri/src/session_manager/providers/claude.rs:279-295 | src-tauri/src/session_manager/providers/codex.rs:917-933 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/claude.rs\u0060 and \u0060src-tauri/src/session_manager/providers/codex.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 113 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":"src-tauri/src/session_manager/providers/claude.rs"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba2b35606b13cb939d40109ae677872c816e01bef9e10c2e39db63eee5e42f46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 2): src-tauri/src/session_manager/providers/hermes.rs:470-484 | src-tauri/src/session_manager/providers/opencode.rs:670-686 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/hermes.rs\u0060 and \u0060src-tauri/src/session_manager/providers/opencode.rs\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 117 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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c2674422512a9a4e24ee55a20a53069326bce94b88637f392049bb43a7c3e96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201316 lines \u00D7 3): src-tauri/src/proxy/providers/streaming.rs:202-217 | src-tauri/src/proxy/providers/streaming_gemini.rs:313-324 | src-tauri/src/proxy/providers/streaming_gemini.rs:425-436 \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":"src-tauri/src/proxy/providers/streaming.rs"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9172a9240acf5c4f00da8168ad10d33ae949af14b19bb16f270f4205e0f3cea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): src-tauri/src/cli/tui/app/types.rs:1948-1963 | src-tauri/src/cli/tui/app/types.rs:2283-2298 \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":"src-tauri/src/cli/tui/app/types.rs"},"region":{"startLine":1948}}}],"partialFingerprints":{"codehealthFindingId/v1":"327b39208bb1c7b80b2b5337f44a0cb54595405ea9f9821e68d6b0d092bd4550"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): src-tauri/src/cli/tui/form/provider_json.rs:1374-1389 | src-tauri/src/services/provider/common.rs:159-174 \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":"src-tauri/src/cli/tui/form/provider_json.rs"},"region":{"startLine":1374}}}],"partialFingerprints":{"codehealthFindingId/v1":"99b5fc7bc9eb46f7702c7bee736d92558aee7e491a6ce3f0e25f1393b439d887"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): src-tauri/src/cli/tui/ui/config.rs:403-418 | src-tauri/src/cli/tui/ui/config.rs:431-446 \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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"f96f31a26733c17bff5dc929a5f2ed470397ac12c4047a4b3ed6bc023735c3a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): src-tauri/src/database/dao/proxy.rs:80-95 | src-tauri/src/database/dao/proxy.rs:111-126 \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":"src-tauri/src/database/dao/proxy.rs"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"4735db21f4200eb9a4cc2282fe19be7ba98a0a7a226edd96b464c7da77704f2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): src-tauri/src/mcp.rs:400-415 | src-tauri/src/mcp.rs:791-806 \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":"src-tauri/src/mcp.rs"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"384aad57ab36232a80d9943c0b657e8240f4c373449651b5d5a3a4235659118e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): src-tauri/src/proxy/cache_injector.rs:19-33 | src-tauri/src/proxy/cache_injector.rs:41-56 \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":"src-tauri/src/proxy/cache_injector.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"04fddb5f34625520b8d9bce5a92c4f5152b4e14734cb967acff26bbac82a3a46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): src-tauri/src/services/s3.rs:282-297 | src-tauri/src/services/s3.rs:398-413 \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":"src-tauri/src/services/s3.rs"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"72ee8a30828d1c8dfd236084209bf660443547fd3eadf6e94ad73f00b73d72b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): src-tauri/src/services/usage_stats.rs:529-544 | src-tauri/src/services/usage_stats.rs:935-950 \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":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":529}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5c8d0e56280e582c7c0cd25a146d0e7ea799b16d7d8a3436faaeeb416373ea7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201315 lines \u00D7 11): src-tauri/src/cli/tui/ui/config.rs:4190-4199 | src-tauri/src/cli/tui/ui/config.rs:4285-4293 | src-tauri/src/cli/tui/ui/forms/prompt.rs:139-148 | src-tauri/src/cli/tui/ui/forms/provider.rs:644-652 | src-tauri/src/cli/tui/ui/forms/provider.rs:926-935 | src-tauri/src/cli/tui/ui/forms/provider.rs:1013-1021 | src-tauri/src/cli/tui/ui/forms/provider.rs:1162-1171 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:2303-2317 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:2512-2525 | src-tauri/src/cli/tui/ui/skills/discover.rs:116-129 | src-tauri/src/cli/tui/ui/skills/repos.rs:95-108 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/config.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/skills/repos.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":4190}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d068fe4b1fb6f437c116f44294b87e929eada0bbd5755cf206321504f4cce19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 6): src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:420-432 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:1538-1552 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:1586-1598 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:1621-1633 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:1688-1702 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:1742-1756 \u2014 all 6 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"400d60286ce0425031e581c77159248d503e4126d294a7cf44c4f9d5d8ec3dd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): src-tauri/src/claude_mcp.rs:338-352 | src-tauri/src/gemini_mcp.rs:176-190 \u2014 before extracting anything, compare \u0060src-tauri/src/claude_mcp.rs\u0060 and \u0060src-tauri/src/gemini_mcp.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 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":"src-tauri/src/claude_mcp.rs"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"d79719c0d92d314a80e261664108c38a4bc7b86df99cad2f7614d274669c77ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): src-tauri/src/cli/commands/auth.rs:412-426 | src-tauri/src/cli/commands/provider_inspect.rs:514-527 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/commands/auth.rs\u0060 and \u0060src-tauri/src/cli/commands/provider_inspect.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 65 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":"src-tauri/src/cli/commands/auth.rs"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"579a33abf9643e6d5b4de789f11d02274b2f6e5cbe8b8b0a941800034578cc3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): src-tauri/src/cli/tui/app/content_entities.rs:814-828 | src-tauri/src/cli/tui/app/content_entities.rs:855-869 \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":"src-tauri/src/cli/tui/app/content_entities.rs"},"region":{"startLine":814}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ce1ad134ee21412aff242db20ab4302baccd287e7fce4b88bed179ace2e985a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): src-tauri/src/cli/tui/app/content_entities.rs:830-844 | src-tauri/src/cli/tui/app/content_entities.rs:871-885 \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":"src-tauri/src/cli/tui/app/content_entities.rs"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"75af70fd9bcb8116b9ef63954843f9cefba35f5826fa467d99e8ee80aaa40e0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): src-tauri/src/cli/tui/app/types.rs:1840-1854 | src-tauri/src/cli/tui/app/types.rs:2215-2229 \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":"src-tauri/src/cli/tui/app/types.rs"},"region":{"startLine":1840}}}],"partialFingerprints":{"codehealthFindingId/v1":"9525d327014f7970ccc96022119c469242be6bfcc76083f71d1274db13a00303"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): src-tauri/src/cli/tui/app/types.rs:4944-4958 | src-tauri/src/cli/tui/app/types.rs:4994-5007 \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":"src-tauri/src/cli/tui/app/types.rs"},"region":{"startLine":4944}}}],"partialFingerprints":{"codehealthFindingId/v1":"b86d811ea3684788e5e3ba203ba2d412a02eae9cbbfcf141913c8d9513d23799"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201315 lines \u00D7 2): src-tauri/src/daemon/supervisor.rs:632-642 | src-tauri/src/daemon/supervisor.rs:751-765 \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":"src-tauri/src/daemon/supervisor.rs"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b0b9234921368ad74836770a1dba6e0ed70ee2c28e1abd947f94d08e3d14d6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): src-tauri/src/proxy/forwarder.rs:737-751 | src-tauri/src/proxy/forwarder.rs:934-948 \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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a3b65dd51cc39ab54c3102cb7d12464441be20ff5d2b076316bef7846e1a155"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): src-tauri/src/proxy/handlers.rs:395-409 | src-tauri/src/proxy/handlers.rs:822-836 \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":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"58282780db8ccc465b0730d4c619072fcffdf15a8eb550dbf94ec3aaaf459997"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): src-tauri/src/proxy/response.rs:218-232 | src-tauri/src/proxy/response.rs:282-296 \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":"src-tauri/src/proxy/response.rs"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"a757a8413c0ea4ceea0de155382d9e8df31db163447895bc825f814826322ad7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): src-tauri/src/services/provider/mod.rs:2937-2951 | src-tauri/src/services/provider/mod.rs:4028-4042 \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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":2937}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e730c00584218cb5d59ef5230b6474d3598421827e30b4dabf0987c38a8142f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): src-tauri/src/services/usage_stats.rs:852-866 | src-tauri/src/services/usage_stats.rs:1017-1031 \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":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":852}}}],"partialFingerprints":{"codehealthFindingId/v1":"1da360214693c7572e86aad38788e4a5584247adb53296904c4b3af07b3d4b67"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): src-tauri/src/session_manager/providers/codex.rs:886-900 | src-tauri/src/session_manager/providers/openclaw.rs:541-555 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/codex.rs\u0060 and \u0060src-tauri/src/session_manager/providers/openclaw.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 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":"src-tauri/src/session_manager/providers/codex.rs"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f5b7694cf8cdccce3db4a0a8d4ecdb2aead726fe6245a76196b6c77da47fb42"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): src-tauri/src/session_manager/providers/hermes.rs:952-966 | src-tauri/src/session_manager/providers/opencode.rs:1396-1410 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/hermes.rs\u0060 and \u0060src-tauri/src/session_manager/providers/opencode.rs\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 117 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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":952}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2e8d095e50b3f524433d8fb0110cf1038b655141de8b0f09236601326a79f3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 4): src-tauri/src/services/usage_stats.rs:499-512 | src-tauri/src/services/usage_stats.rs:631-642 | src-tauri/src/services/usage_stats.rs:1046-1057 | src-tauri/src/services/usage_stats.rs:1172-1183 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":499}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f86cd681cc0d0d2686f9effbae61f2eacd9b0b33a79a052cc107928b44f354a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): src-tauri/src/cli/commands/provider_input.rs:2862-2875 | src-tauri/src/cli/commands/provider_input.rs:3226-3239 | src-tauri/src/cli/commands/provider_input.rs:3433-3446 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":2862}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d07ee1abc84d2295c59f706ad4cc01ffbcccfb22640edd7b26a5db2cf83df3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 3): src-tauri/src/cli/tui/ui/providers.rs:133-145 | src-tauri/src/cli/tui/ui/sessions.rs:703-715 | src-tauri/src/cli/tui/ui/shared.rs:544-557 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/providers.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9e042b41e8bd41b0253f579fb9d77f8bf3f529a1a8b2e85cca7784988ded22b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): src-tauri/src/services/provider/mod.rs:1376-1389 | src-tauri/src/services/provider/mod.rs:1417-1430 | src-tauri/src/services/provider/mod.rs:1578-1591 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":1376}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee204eec6d7b172d213b920c5a7d4b0b6be4c9def0d58bc8c7878012b852ed74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/cli/commands/provider_input.rs:2980-2993 | src-tauri/src/cli/tui/form/provider_json.rs:491-504 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/commands/provider_input.rs\u0060 and \u0060src-tauri/src/cli/tui/form/provider_json.rs\u0060 as WHOLE FILES: this scan already matched 6 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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":2980}}}],"partialFingerprints":{"codehealthFindingId/v1":"70e05bbcde465c7058c448768d27feb50892b7aa00fa239f78985d374d6478f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): src-tauri/src/cli/tui/runtime_systems/workers.rs:2998-3011 | src-tauri/src/cli/tui/runtime_systems/workers.rs:3039-3050 \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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":2998}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b06de17fc50e8354b8342bfee8a2af0758aad2b6b2d4ddce0d34c7cf46bdcf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/cli/tui/ui/config.rs:1575-1588 | src-tauri/src/cli/tui/ui/config.rs:2565-2578 \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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":1575}}}],"partialFingerprints":{"codehealthFindingId/v1":"af9e1f86974e96ac2b5d2e75fd1dc3cb86a73c0df42c40c9942c32af0c28dbc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/cli/tui/ui/config.rs:3960-3973 | src-tauri/src/cli/tui/ui/config.rs:4013-4026 \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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":3960}}}],"partialFingerprints":{"codehealthFindingId/v1":"703d6b661398f7a2bc9bfd4756edefe744b4203d458385fcffd58cbaace5fec4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/cli/tui/ui/editor.rs:15-28 | src-tauri/src/cli/tui/ui/skills/detail.rs:38-51 \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":"src-tauri/src/cli/tui/ui/editor.rs"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"41717d94b1fe65a3ad870610fb226c3fcf6227948b3cf1736ef3a4e01b434182"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/shared.rs:545-558 | src-tauri/src/cli/tui/ui/forms/shared.rs:580-593 \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":"src-tauri/src/cli/tui/ui/forms/shared.rs"},"region":{"startLine":545}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2ad036e80f071196c9e2573b9efc64f79c1c505a70acecd063cf8674e938a8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/cli/tui/ui/usage.rs:495-508 | src-tauri/src/cli/tui/ui/usage.rs:522-535 \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":"src-tauri/src/cli/tui/ui/usage.rs"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"513c7e40b5be11ba7d546f5e573737c1d86c7c002b26c1edd54aee9f6eb1a914"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/codex_history_migration.rs:576-589 | src-tauri/src/codex_history_migration.rs:1501-1514 \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":"src-tauri/src/codex_history_migration.rs"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dded1fec001c23b957e9de737dc399490a311650c3104a9ad9129e26f3bd448"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/codex_history_migration.rs:1098-1111 | src-tauri/src/codex_history_migration.rs:1161-1174 \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":"src-tauri/src/codex_history_migration.rs"},"region":{"startLine":1098}}}],"partialFingerprints":{"codehealthFindingId/v1":"6981cdd41a1834a2eebbad4720f33cd95b52b785e22ef4bd3731891f7d497337"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/daemon/mod.rs:44-57 | src-tauri/src/daemon/mod.rs:70-83 \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":"src-tauri/src/daemon/mod.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aa988cc61cf6fa0e1930a564409cfe33937c7fffdfde86060ac69a288989441"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/database/dao/proxy.rs:330-343 | src-tauri/src/database/dao/proxy.rs:376-389 \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":"src-tauri/src/database/dao/proxy.rs"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bcdfeb3114310df5aaa5ac00015ed185a2bc0a4d513452e249f1286c81fa6e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): src-tauri/src/deeplink/provider.rs:405-417 | src-tauri/src/deeplink/provider.rs:729-742 \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":"src-tauri/src/deeplink/provider.rs"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"680b0e61c8c3ef481c6292fa971df84468fc883aca4d67ea55cdfe5db219df20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): src-tauri/src/proxy/forwarder.rs:368-380 | src-tauri/src/proxy/forwarder.rs:613-626 \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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bb065acdec0c1aed5f6301a41d37d7c5ea61391c630754d93cb511d36e15ad4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/proxy/forwarder.rs:1195-1208 | src-tauri/src/proxy/handlers.rs:1300-1313 \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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":1195}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fb3e4811e43e2aaa7721293d6c80ba920e94e4ef98d6aa72cc273ba22d009af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/proxy/handlers.rs:267-280 | src-tauri/src/proxy/handlers.rs:384-397 \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":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"553935ceb8b6fc365250232b3bb6144e14244af180ade464254288a53fe748bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/proxy/providers/streaming.rs:441-454 | src-tauri/src/proxy/providers/streaming.rs:457-470 \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":"src-tauri/src/proxy/providers/streaming.rs"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"2be934b1f4c4e2b6a54b92b681804e9ce7025fd330c5bb5b776a8b900cfe53e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/proxy/providers/streaming_codex_chat.rs:499-512 | src-tauri/src/proxy/providers/streaming_codex_chat.rs:745-758 \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":"src-tauri/src/proxy/providers/streaming_codex_chat.rs"},"region":{"startLine":499}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ec855f81cb4ab8f593d88c2bd9537c91cd3d8b231582ed5d9cdf51c97c90484"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/services/provider/mod.rs:2709-2722 | src-tauri/src/services/provider/mod.rs:2819-2832 \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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":2709}}}],"partialFingerprints":{"codehealthFindingId/v1":"45f50c370e125059df87a8fab08fa99f9e1938d25ea8ae4556a94e11fb4c82ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/session_manager/scan_cache_store.rs:476-489 | src-tauri/src/session_manager/scan_cache_store.rs:505-518 \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":"src-tauri/src/session_manager/scan_cache_store.rs"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8d16e939117b9e8eb4194070cbc5d16a1ffc4a68302da257a8196d9f955c643"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): src-tauri/src/cli/commands/provider.rs:1922-1934 | src-tauri/src/cli/tui/form/provider_state.rs:30-42 | src-tauri/src/services/provider/mod.rs:431-443 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":1922}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d40814989706c6742f850fb09bd442da70058cdc9ba562837b42dc26c848505"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): src-tauri/src/proxy/handlers.rs:129-141 | src-tauri/src/proxy/handlers.rs:153-165 | src-tauri/src/proxy/handlers.rs:177-189 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ef38c8cc1b0f4143fa701715bbb6927e4fa15906e3fd88a90ecd403b20b8501"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): src-tauri/src/proxy/handlers.rs:614-626 | src-tauri/src/proxy/handlers.rs:765-777 | src-tauri/src/proxy/handlers.rs:811-823 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc619cf0fd24300bbaf47985da9910ec983cc835eb2562e0267b39a4b31986b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 3): src-tauri/src/services/subscription.rs:144-156 | src-tauri/src/services/subscription.rs:438-449 | src-tauri/src/services/subscription.rs:1044-1056 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/subscription.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e19cebc493f6c70cbae6b61752fc7c13cfb9cb1f59dd52db19990ded0074739"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src-tauri/src/cli/claude_temp_launch.rs:280-292 | src-tauri/src/cli/codex_temp_launch.rs:309-321 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/claude_temp_launch.rs\u0060 and \u0060src-tauri/src/cli/codex_temp_launch.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 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":"src-tauri/src/cli/claude_temp_launch.rs"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"d35e59cab3478c071c4cbd93c371a20a58cef348f78cdeb6cc8f70efffaa9d3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): src-tauri/src/cli/commands/config.rs:212-224 | src-tauri/src/cli/commands/config.rs:336-347 \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":"src-tauri/src/cli/commands/config.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"0732458a3d96fdf5bbc5351fe46a3c6390c3f7d1fa8820220139e50c51071c4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src-tauri/src/cli/commands/provider_input.rs:2714-2726 | src-tauri/src/cli/commands/provider_input.rs:2740-2752 \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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":2714}}}],"partialFingerprints":{"codehealthFindingId/v1":"269102f486e81c73d3b5d5811b435b14379ed3c6094f9bfb224bc939b7f19d0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src-tauri/src/cli/commands/provider_input.rs:3657-3669 | src-tauri/src/cli/tui/form/provider_json.rs:1552-1564 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/commands/provider_input.rs\u0060 and \u0060src-tauri/src/cli/tui/form/provider_json.rs\u0060 as WHOLE FILES: this scan already matched 6 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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":3657}}}],"partialFingerprints":{"codehealthFindingId/v1":"07f5468185936350e7d29a8f3f221b3ebda18be600f526dca0d7f1d8e72fc61a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src-tauri/src/cli/commands/provider_inspect.rs:987-999 | src-tauri/src/cli/tui/ui/shared.rs:628-640 \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":"src-tauri/src/cli/commands/provider_inspect.rs"},"region":{"startLine":987}}}],"partialFingerprints":{"codehealthFindingId/v1":"1adb32834a31764a9702c9ae06485fd5e4abf7d11d3ea8c6fa3c0f8211eefe7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:330-342 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:366-378 \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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ae697fe80a223b3d980d9a305e25cfae3b8181a2b08ba007922f6c99b492204"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src-tauri/src/cli/tui/mod.rs:3706-3718 | src-tauri/src/cli/tui/mod.rs:3763-3775 \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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":3706}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c1d0b832eee67f39dae71d8046b1ab3995acd2cc353bb115b8943ad4fe1e7e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201313 lines \u00D7 2): src-tauri/src/cli/tui/runtime_actions/editor.rs:1066-1078 | src-tauri/src/cli/tui/runtime_actions/editor.rs:1145-1153 \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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":1066}}}],"partialFingerprints":{"codehealthFindingId/v1":"044fb229813fe8f61d80997c8053588a2cdb1ed7ef69d8f116e9706c72e5e9bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201313 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/mcp.rs:32-44 | src-tauri/src/cli/tui/ui/forms/prompt.rs:22-30 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/mcp.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/prompt.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2524c79e8997cf8fb6796ff4f6af5b9acac13c633d0340762b4606f22f4ec0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/prompt.rs:17-27 | src-tauri/src/cli/tui/ui/forms/provider.rs:450-462 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/prompt.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/provider.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 127 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":"src-tauri/src/cli/tui/ui/forms/prompt.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"a78af57703d26ce0f05f051f4e9896f94efb3d29b7d6bfc2a94702f47e69c9fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/prompt.rs:130-142 | src-tauri/src/cli/tui/ui/forms/webdav.rs:93-104 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/prompt.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/webdav.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 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":"src-tauri/src/cli/tui/ui/forms/prompt.rs"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"d99c17dd34d610895d656321333b7e082d2e7640ecdaad9a3d280a505a100268"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src-tauri/src/proxy/forwarder.rs:345-357 | src-tauri/src/proxy/forwarder.rs:590-602 \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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"19de899fb6b3e56a93dcda364da4dc07c908337cba16e9425aa62009a8aa6de9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src-tauri/src/proxy/response.rs:601-613 | src-tauri/src/proxy/response.rs:853-865 \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":"src-tauri/src/proxy/response.rs"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"54179d015a2e38bcd7b8871683deca8771ca22b33c4c9e581fdf2d69b9ba877b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src-tauri/src/services/proxy.rs:3152-3164 | src-tauri/src/services/proxy.rs:3201-3213 \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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":3152}}}],"partialFingerprints":{"codehealthFindingId/v1":"991b9d58a1abf549da5d3db46d49c777eb13bed97b8399fe071887f784024864"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src-tauri/src/services/proxy/codex_toml.rs:7-19 | src-tauri/src/services/proxy/codex_toml.rs:46-58 \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":"src-tauri/src/services/proxy/codex_toml.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"989f6ee4eedd6523b9badadf054e67d682ab88f4564d91ca45649f33e6174d88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): src-tauri/src/session_manager/providers/claude.rs:236-248 | src-tauri/src/session_manager/providers/codex.rs:867-878 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/claude.rs\u0060 and \u0060src-tauri/src/session_manager/providers/codex.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 113 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":"src-tauri/src/session_manager/providers/claude.rs"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"df8cb16d189f19abb71b90c9078601a3d329abc4bba9531c39295de4b2218e3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src-tauri/src/session_manager/providers/hermes.rs:156-168 | src-tauri/src/session_manager/providers/opencode.rs:178-190 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/hermes.rs\u0060 and \u0060src-tauri/src/session_manager/providers/opencode.rs\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 117 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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"35c8162397c9fe879a52ecdfc321237bfa743a022a4e1ed8f6df6ebc7eaaf034"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 3): src-tauri/src/cli/commands/config.rs:208-219 | src-tauri/src/cli/commands/config.rs:275-285 | src-tauri/src/cli/commands/config.rs:332-342 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/config.rs"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"7724f88a1bcbb1ba4ce8f1ab82599556bbede2b6c3d37da06312e36f734b707a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): src-tauri/src/cli/tui/ui/forms/mcp.rs:332-343 | src-tauri/src/cli/tui/ui/forms/provider.rs:1640-1651 | src-tauri/src/cli/tui/ui/forms/s3.rs:107-118 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/mcp.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/provider.rs\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 154 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eaae4469c6f4c8206df915c2e25f7439faaf3efacb5426761577a98f632a144"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 3): src-tauri/src/cli/tui/ui/forms/provider.rs:872-883 | src-tauri/src/cli/tui/ui/forms/s3.rs:16-26 | src-tauri/src/cli/tui/ui/forms/webdav.rs:16-26 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/provider.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/s3.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 79 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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":872}}}],"partialFingerprints":{"codehealthFindingId/v1":"783f208cdf00e23651202c10b3de5ad89b13a720c4f33f6a757116f36ebfe42c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): src-tauri/src/proxy/error.rs:136-147 | src-tauri/src/proxy/handlers.rs:1003-1014 | src-tauri/src/proxy/response.rs:875-886 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/error.rs"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbb7b4efdae4628ac3ab6561276d58a06cd99235455795eec6fad92ffa64fda3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/cli/tui/app/form_handlers/provider.rs:863-874 | src-tauri/src/cli/tui/app/form_handlers/provider.rs:995-1006 \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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":863}}}],"partialFingerprints":{"codehealthFindingId/v1":"de4bb615140bcf1d91d5af321b373fe7b4e24aabb1c719cb503dffe51f8853ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): src-tauri/src/cli/tui/app/overlay_handlers/dialogs.rs:813-823 | src-tauri/src/cli/tui/app/overlay_handlers/dialogs.rs:827-838 \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":"src-tauri/src/cli/tui/app/overlay_handlers/dialogs.rs"},"region":{"startLine":813}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc3090443e56b193c955d6b025275860179b7171e8f9ba3004b472ca25f1c6e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): src-tauri/src/cli/tui/mod.rs:1721-1732 | src-tauri/src/cli/tui/mod.rs:1804-1814 \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":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":1721}}}],"partialFingerprints":{"codehealthFindingId/v1":"569b19cc77535c4f058adaf979e713b7897a3c341b952a623ad83c7f85e35196"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/cli/tui/runtime_actions/editor.rs:1300-1311 | src-tauri/src/cli/tui/runtime_actions/editor.rs:1337-1348 \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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":1300}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9f84d57101823fca504c7b54192f1d56570bd7c1163297e53ff073b7e2051f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): src-tauri/src/cli/tui/runtime_systems/types.rs:935-944 | src-tauri/src/services/provider/models.rs:62-73 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/runtime_systems/types.rs\u0060 and \u0060src-tauri/src/services/provider/models.rs\u0060 as WHOLE FILES: this scan already matched 4 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. 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":"src-tauri/src/cli/tui/runtime_systems/types.rs"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c34b6edee2ddf6175db8292d0f4e81fabd76b8d4cb1cf0a52a6bba6977741bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): src-tauri/src/cli/tui/ui/config.rs:1422-1431 | src-tauri/src/cli/tui/ui/config.rs:2317-2328 \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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":1422}}}],"partialFingerprints":{"codehealthFindingId/v1":"acb2d1034e3f212289305b15ed29d83f7246bdc0994a71095200dac3e0c843b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/prompt.rs:41-52 | src-tauri/src/cli/tui/ui/forms/provider.rs:1542-1553 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/prompt.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/provider.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 127 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":"src-tauri/src/cli/tui/ui/forms/prompt.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd8ccc91b29801394c942b983e8b60afa7836cf1485cd475f28cfc97b5032a4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/provider.rs:1202-1213 | src-tauri/src/cli/tui/ui/forms/provider.rs:1322-1333 \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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":1202}}}],"partialFingerprints":{"codehealthFindingId/v1":"084c26849f94f683aec12f4b8d6a1abd2c92ddd0b98d77e0c53c8fe5cb5d0610"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/cli/tui/ui/overlay/pickers.rs:259-270 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:1145-1156 \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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e8ff76e73d734a3379497c5dfee57418f28acfea86a8a642b05122134f88182"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/cli/tui/ui/overlay/pickers.rs:1817-1828 | src-tauri/src/cli/tui/ui/sessions.rs:760-771 \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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":1817}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f62ed381ef527645bd52ba3a819a4be24c645a2e1552ed2833ce1b2950e995a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/cli/tui/ui/overlay/pickers.rs:2005-2016 | src-tauri/src/cli/tui/ui/shared.rs:422-433 \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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":2005}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d2d3bb6decdd12ac0523191ed04b0b4b1839bc0bb9945db6ab750ea62a13b73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): src-tauri/src/codex_history_migration.rs:917-927 | src-tauri/src/codex_history_migration.rs:1144-1155 \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":"src-tauri/src/codex_history_migration.rs"},"region":{"startLine":917}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d8a5b5fb6a7663b6f83883dfebc3fecc4a90145ed73cb45b8926cfc55a7405c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/codex_history_migration.rs:999-1010 | src-tauri/src/codex_history_migration.rs:1138-1149 \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":"src-tauri/src/codex_history_migration.rs"},"region":{"startLine":999}}}],"partialFingerprints":{"codehealthFindingId/v1":"74d982f12a4a6f779764b6f521473e1397339fef4937c39d0282b1a5509e7bfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/mcp.rs:364-375 | src-tauri/src/mcp.rs:755-766 \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":"src-tauri/src/mcp.rs"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"d24f0e7cd71a913d419067fadf5bbb0d326721c081d098bbb7b7524962081d73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/openclaw_config.rs:726-737 | src-tauri/src/openclaw_config.rs:751-762 \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":"src-tauri/src/openclaw_config.rs"},"region":{"startLine":726}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c9625150f05e98462f05957049f35dc2284c59c1e7c5fb3f4e57b6117a4ce4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/proxy/handlers.rs:228-239 | src-tauri/src/proxy/handlers.rs:571-582 \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":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"17eb6d209fa3614f3c2a6fe3d48caba60b94d7f6431e63f940766f8fa31d9416"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/proxy/providers/streaming.rs:425-436 | src-tauri/src/proxy/providers/streaming.rs:525-536 \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":"src-tauri/src/proxy/providers/streaming.rs"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"c01ad30ce9b5a88d6f303e423d5f528d24a5f229e591505bbea183d0a21dbf05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/proxy/providers/streaming_responses.rs:340-351 | src-tauri/src/proxy/providers/streaming_responses.rs:606-617 \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":"src-tauri/src/proxy/providers/streaming_responses.rs"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"312734ed443e0dfecc16f2f32395740895d64b257ea8219a4a6ba18c8e8dfcb1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/services/provider/mod.rs:4004-4015 | src-tauri/src/services/provider/mod.rs:4091-4102 \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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":4004}}}],"partialFingerprints":{"codehealthFindingId/v1":"765ca214b46bfce98be889aa6869a461919f61f3b6037aac1ef5d7051b960030"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): src-tauri/src/services/session_usage_codex.rs:1994-2005 | src-tauri/src/services/session_usage_gemini.rs:354-364 \u2014 before extracting anything, compare \u0060src-tauri/src/services/session_usage_codex.rs\u0060 and \u0060src-tauri/src/services/session_usage_gemini.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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":"src-tauri/src/services/session_usage_codex.rs"},"region":{"startLine":1994}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5b95a824a4dab1e85cc33e585f5c787a36cc5e141e774e723ae17f2cb2f0e8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/services/skill.rs:2124-2135 | src-tauri/src/services/skill.rs:2152-2163 \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":"src-tauri/src/services/skill.rs"},"region":{"startLine":2124}}}],"partialFingerprints":{"codehealthFindingId/v1":"658426d3ac2a13af185c0009ccacb3f9e8d734cd77d774e3a66da1fc20a78fa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): src-tauri/src/session_manager/providers/claude.rs:296-307 | src-tauri/src/session_manager/providers/codex.rs:933-942 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/claude.rs\u0060 and \u0060src-tauri/src/session_manager/providers/codex.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 113 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":"src-tauri/src/session_manager/providers/claude.rs"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"41518215c979b0d66961adbb83b81aaa4ad59b0b90a2111fc466c07edef039b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): src-tauri/src/session_manager/providers/codex.rs:870-880 | src-tauri/src/session_manager/providers/openclaw.rs:525-536 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/codex.rs\u0060 and \u0060src-tauri/src/session_manager/providers/openclaw.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 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":"src-tauri/src/session_manager/providers/codex.rs"},"region":{"startLine":870}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9a8d8af16e02dbe3556ca9d8774ef96b28ebab84ed1181ce594b45eb55bbe08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): src-tauri/src/session_manager/providers/hermes.rs:638-649 | src-tauri/src/session_manager/providers/hermes.rs:706-716 \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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":638}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1ddc3f08e8c0c31df7ff40273ccc59143ec2bb535d4112c6c79e3c08c36ccd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 5): src-tauri/src/session_manager/providers/claude.rs:156-165 | src-tauri/src/session_manager/providers/codex.rs:806-815 | src-tauri/src/session_manager/providers/hermes.rs:877-886 | src-tauri/src/session_manager/providers/openclaw.rs:437-446 | src-tauri/src/session_manager/providers/pi.rs:513-523 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/claude.rs\u0060 and \u0060src-tauri/src/session_manager/providers/codex.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 113 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":"src-tauri/src/session_manager/providers/claude.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fccf47997cefbe71c4b2fb7f6f6ea7d23f90f4e37680785d6230809098c54b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): src-tauri/src/proxy/providers/streaming.rs:236-246 | src-tauri/src/proxy/providers/streaming.rs:287-297 | src-tauri/src/proxy/providers/streaming.rs:338-348 | src-tauri/src/proxy/providers/streaming.rs:476-486 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/providers/streaming.rs"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3c99155492329d5e003c09a19a7e6c2cb77fc595e678f8f4837c9f5522004a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): src-tauri/src/cli/tui/runtime_actions/settings.rs:438-448 | src-tauri/src/cli/tui/runtime_actions/settings.rs:468-478 | src-tauri/src/cli/tui/runtime_actions/settings.rs:498-508 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/runtime_actions/settings.rs"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c6c00eefee5f8267a99bc7fafce282c8ee897b3bdcec1fb52c7a3ea464f4752"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): src-tauri/src/cli/tui/ui/config.rs:946-956 | src-tauri/src/cli/tui/ui/config.rs:1419-1429 | src-tauri/src/cli/tui/ui/config.rs:2314-2324 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":946}}}],"partialFingerprints":{"codehealthFindingId/v1":"577ffc6c7531231620f5bb4c2968d0445ff8eba5079ba40c89619d318d254db0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): src-tauri/src/cli/tui/ui/forms/mcp.rs:75-85 | src-tauri/src/cli/tui/ui/forms/provider.rs:494-504 | src-tauri/src/cli/tui/ui/forms/provider.rs:1537-1547 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/mcp.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/provider.rs\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 154 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"8abe9d32ba4402dda9653355ac8ceee4733be20930ca6745a018bbf9405dab1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): src-tauri/src/codex_history_migration.rs:1014-1024 | src-tauri/src/codex_history_migration.rs:1094-1104 | src-tauri/src/codex_history_migration.rs:1157-1167 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/codex_history_migration.rs"},"region":{"startLine":1014}}}],"partialFingerprints":{"codehealthFindingId/v1":"b10e630a9136806b54ac88f195e2a3af45755875f6f6fae2d3fb885caea6d773"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): src-tauri/src/mcp.rs:747-757 | src-tauri/src/mcp.rs:911-920 | src-tauri/src/mcp.rs:1629-1638 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/mcp.rs"},"region":{"startLine":747}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9098358f4535d094bbf39fe4d9d859c511014d294f71aff1c098e3a482f8c2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): src-tauri/src/services/proxy.rs:743-753 | src-tauri/src/services/proxy.rs:799-808 | src-tauri/src/services/proxy.rs:2828-2838 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/proxy.rs"},"region":{"startLine":743}}}],"partialFingerprints":{"codehealthFindingId/v1":"424971584ea958a15ccef14fd4ceebb20fad1afab52e72383c791bf336be3660"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): src-tauri/src/cli/commands/provider.rs:1830-1840 | src-tauri/src/cli/commands/provider.rs:2074-2083 \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":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":1830}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9917ac26eb81636007507e1565832b00afa52ac9e21f0642711fbf92849f616"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/cli/commands/provider_input.rs:382-392 | src-tauri/src/cli/commands/provider_input.rs:449-459 \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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"d227fcd3f9dd3f30fab1c00c8e0069583711d4683e5f8fb14e6afbb699b3be78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:625-635 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:686-696 \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":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":625}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9c7c93109e78d10ec5ed693f6cc0358427729549d03c72b5c1a817d9742dc23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/cli/tui/runtime_actions/claude_temp_launch.rs:54-64 | src-tauri/src/cli/tui/runtime_actions/codex_temp_launch.rs:41-51 \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":"src-tauri/src/cli/tui/runtime_actions/claude_temp_launch.rs"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"822a5972a8f9b3c18a822478f7dc2850c4b9eb58e1cf5cdfe0f7e69ae8c90522"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/codex_config.rs:3538-3548 | src-tauri/src/codex_config.rs:3612-3622 \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":"src-tauri/src/codex_config.rs"},"region":{"startLine":3538}}}],"partialFingerprints":{"codehealthFindingId/v1":"71faa0b241a65460989adc2d6520f3c4c8c23211e3db4d41ba0b54516350bbde"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/database/dao/proxy.rs:194-204 | src-tauri/src/database/dao/proxy.rs:218-228 \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":"src-tauri/src/database/dao/proxy.rs"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd99cb8b1b8466bb571263bd79c10a80addde9c71e8e84ebd77e73be3f76edac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/openclaw_config.rs:819-829 | src-tauri/src/openclaw_config.rs:898-908 \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":"src-tauri/src/openclaw_config.rs"},"region":{"startLine":819}}}],"partialFingerprints":{"codehealthFindingId/v1":"b259665a60fbcf76e0203cbefa757c64a6184bb49ce61be1f6deea14020f59d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/proxy/providers/codex_oauth_auth.rs:747-757 | src-tauri/src/proxy/providers/codex_oauth_auth.rs:775-785 \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":"src-tauri/src/proxy/providers/codex_oauth_auth.rs"},"region":{"startLine":747}}}],"partialFingerprints":{"codehealthFindingId/v1":"17c8e8386febedb5e7a9e73b743c2b6e281368e100721db0ea1f07faea09ba39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): src-tauri/src/proxy/providers/codex_oauth_auth.rs:1368-1377 | src-tauri/src/proxy/providers/copilot_auth.rs:1191-1201 \u2014 before extracting anything, compare \u0060src-tauri/src/proxy/providers/codex_oauth_auth.rs\u0060 and \u0060src-tauri/src/proxy/providers/copilot_auth.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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":"src-tauri/src/proxy/providers/codex_oauth_auth.rs"},"region":{"startLine":1368}}}],"partialFingerprints":{"codehealthFindingId/v1":"89748bf6ed80896b06828b716b2dc25c913fc9e4c133b001147e023e39facaf8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/proxy/providers/codex_oauth_auth.rs:1380-1390 | src-tauri/src/proxy/providers/copilot_auth.rs:1204-1214 \u2014 before extracting anything, compare \u0060src-tauri/src/proxy/providers/codex_oauth_auth.rs\u0060 and \u0060src-tauri/src/proxy/providers/copilot_auth.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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":"src-tauri/src/proxy/providers/codex_oauth_auth.rs"},"region":{"startLine":1380}}}],"partialFingerprints":{"codehealthFindingId/v1":"52767be4e0877689d8c57178296dc6df234a0f24263361342ce71e30aec34980"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): src-tauri/src/proxy/providers/streaming_responses.rs:424-434 | src-tauri/src/proxy/providers/streaming_responses.rs:484-493 \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":"src-tauri/src/proxy/providers/streaming_responses.rs"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"211a0c735bc1f269ab546a31e8f75476500bd2f6101205811f5d8e6b92b62956"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/proxy/response.rs:373-383 | src-tauri/src/proxy/response.rs:403-413 \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":"src-tauri/src/proxy/response.rs"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cae2e111deb912bc98d604bef8cd31e7532b9cf2bcb1a79fef1eb5f91657ff3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/services/session_usage.rs:1049-1059 | src-tauri/src/services/session_usage_gemini.rs:259-269 \u2014 before extracting anything, compare \u0060src-tauri/src/services/session_usage.rs\u0060 and \u0060src-tauri/src/services/session_usage_gemini.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 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":"src-tauri/src/services/session_usage.rs"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"98f44a7af40a68aff9c82ab382cdc822d55ea4a24a93b69e27db2ecbd32dc301"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/services/skill.rs:733-743 | src-tauri/src/services/skill.rs:763-773 \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":"src-tauri/src/services/skill.rs"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"c983319b0968f62fd386f652a03d04272e09e1245a7571027ba6bb9a273f9e20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/services/skill.rs:3016-3026 | src-tauri/src/services/skill.rs:3045-3055 \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":"src-tauri/src/services/skill.rs"},"region":{"startLine":3016}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fe646910bb4c704bc90905e19d9ee6f2232d981a2b98d14f43a3ff74263f319"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/session_manager/cache.rs:238-248 | src-tauri/src/session_manager/cache.rs:282-292 \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":"src-tauri/src/session_manager/cache.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"4627e666164e5171e0e5108295dab20c5875a75eee4450019b3d8da683eba011"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/session_manager/paged_manifest.rs:2501-2511 | src-tauri/src/session_manager/paged_manifest.rs:2559-2569 \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":"src-tauri/src/session_manager/paged_manifest.rs"},"region":{"startLine":2501}}}],"partialFingerprints":{"codehealthFindingId/v1":"35b15e1785f545ec3b6fa87894c198b5ca355202fb0e40c7e6bdac2231e6b693"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/session_manager/providers/hermes.rs:393-403 | src-tauri/src/session_manager/providers/opencode.rs:572-582 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/hermes.rs\u0060 and \u0060src-tauri/src/session_manager/providers/opencode.rs\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 117 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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"d64112d3ec6e1102f0f910a5a62ffdc9f2d81dcd5cd3996d2289d3aa00db0df9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/session_manager/providers/hermes.rs:812-822 | src-tauri/src/session_manager/providers/opencode.rs:1194-1204 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/hermes.rs\u0060 and \u0060src-tauri/src/session_manager/providers/opencode.rs\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 117 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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":812}}}],"partialFingerprints":{"codehealthFindingId/v1":"73c560011ce0347b4d55c7aed31c75278272240967d58a2608c5b7584ab3e1bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/session_manager/providers/hermes.rs:903-913 | src-tauri/src/session_manager/providers/opencode.rs:1297-1307 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/hermes.rs\u0060 and \u0060src-tauri/src/session_manager/providers/opencode.rs\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 117 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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":903}}}],"partialFingerprints":{"codehealthFindingId/v1":"c82f2666e39fa2609622a1d380a550ed80fa52f1c261ffcdf3c80f236609252f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/session_manager/providers/pi.rs:666-676 | src-tauri/src/session_manager/providers/pi.rs:807-817 \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":"src-tauri/src/session_manager/providers/pi.rs"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0b5f9834ebe27349a1479a2056754f0a244155012c6c6c39730ca526b24e819"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/session_manager/transcript.rs:2856-2866 | src-tauri/src/session_manager/transcript.rs:2967-2977 \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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":2856}}}],"partialFingerprints":{"codehealthFindingId/v1":"421c806ad0e50b1d4a69633d118c031cbef1adb1a0c72ff1274031ecb25e61fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 10): src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:423-432 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:496-505 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:598-607 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:776-785 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:821-830 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:875-884 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:1543-1552 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:1589-1598 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:1624-1633 | src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs:1693-1702 \u2014 all 10 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a346eb8c4614c3c00394478cabda75aefdfa64eb89b878352d1c9bed77832c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 8): src-tauri/src/services/balance.rs:76-85 | src-tauri/src/services/balance.rs:148-157 | src-tauri/src/services/balance.rs:207-216 | src-tauri/src/services/balance.rs:264-273 | src-tauri/src/services/balance.rs:324-333 | src-tauri/src/services/coding_plan.rs:107-116 | src-tauri/src/services/coding_plan.rs:278-287 | src-tauri/src/services/coding_plan.rs:363-372 \u2014 there are 8 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 8 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/balance.rs"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"97b3b11413f8b676e87e2a48a90e550dabed7291fe9de4d661b76a2c8080ca10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): src-tauri/src/cli/tui/ui/forms/mcp.rs:283-292 | src-tauri/src/cli/tui/ui/forms/prompt.rs:73-82 | src-tauri/src/cli/tui/ui/forms/provider.rs:545-554 | src-tauri/src/cli/tui/ui/forms/provider.rs:1591-1600 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/mcp.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/prompt.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"a562d2ff0e026bbabe20e755f850c46f311f09c67b7358dec9547b3dce2aae4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): src-tauri/src/session_manager/providers/claude.rs:60-69 | src-tauri/src/session_manager/providers/codex.rs:686-695 | src-tauri/src/session_manager/providers/hermes.rs:760-769 | src-tauri/src/session_manager/providers/openclaw.rs:357-366 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/claude.rs\u0060 and \u0060src-tauri/src/session_manager/providers/codex.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 113 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":"src-tauri/src/session_manager/providers/claude.rs"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"330c94df71c24eda1841da25b445b5de553e9f35445a13765441e9f92e29fffd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): src-tauri/src/cli/tui/app/helpers.rs:1444-1453 | src-tauri/src/cli/tui/ui/sessions.rs:734-743 | src-tauri/src/session_manager/query_manifest.rs:195-204 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/app/helpers.rs\u0060 and \u0060src-tauri/src/session_manager/query_manifest.rs\u0060 as WHOLE FILES: this scan already matched 4 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/helpers.rs"},"region":{"startLine":1444}}}],"partialFingerprints":{"codehealthFindingId/v1":"229c9a886a26f1ac196c0a12d0289da106e831ccdbaeaa5d171a66ed5e89bab5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): src-tauri/src/cli/tui/ui/config.rs:870-879 | src-tauri/src/cli/tui/ui/config.rs:1368-1377 | src-tauri/src/cli/tui/ui/config.rs:2262-2271 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":870}}}],"partialFingerprints":{"codehealthFindingId/v1":"55f8b712bb9c9dc33bbbc48898e233d4ad0bdd8e24f330780060f9fa711c128b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): src-tauri/src/deeplink/provider.rs:405-414 | src-tauri/src/deeplink/provider.rs:433-442 | src-tauri/src/deeplink/provider.rs:729-738 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/deeplink/provider.rs"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4abf0bf5c2b692f6e0f7a518eea71aa0ac377ec7a07da713f8a53e44a25add5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): src-tauri/src/proxy/handlers.rs:274-283 | src-tauri/src/proxy/handlers.rs:391-400 | src-tauri/src/proxy/handlers.rs:818-827 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"2872bc49efb14bfdae8fed52f25d57fd0f68b698da3fa73d654ab501a558595c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): src-tauri/src/proxy/providers/codex.rs:364-373 | src-tauri/src/proxy/providers/codex.rs:376-385 | src-tauri/src/proxy/providers/codex.rs:412-421 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/providers/codex.rs"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc0b9e114507680a336de3961808ea1e68d1ab0dcd8164374cd71572bdb281ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): src-tauri/src/proxy/response.rs:324-333 | src-tauri/src/proxy/response.rs:371-380 | src-tauri/src/proxy/response.rs:401-410 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/response.rs"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"e881a780a5808bbe7eaf47e56e166b3c76549e9c44d5ff576d8402b8cdd60f87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): src-tauri/src/services/coding_plan.rs:127-136 | src-tauri/src/services/coding_plan.rs:298-307 | src-tauri/src/services/coding_plan.rs:383-392 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/coding_plan.rs"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c8f1209f6714b49241fb805339a452f6c6d6830b2cbce774c1c1ce245293d28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/claude_mcp.rs:173-182 | src-tauri/src/mcp.rs:25-34 \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":"src-tauri/src/claude_mcp.rs"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2fd7c8227524e994efd0ab8a1014b49466d32b76d9e0cf13f571dd421bd0b59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/cli/commands/sessions.rs:238-247 | src-tauri/src/cli/commands/sessions.rs:504-513 \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":"src-tauri/src/cli/commands/sessions.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"72e0887035b910b78073d21e1f4c00c51e2ad1438dcf6397edec2fbb9ba9a068"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/cli/commands/sessions.rs:883-892 | src-tauri/src/cli/tui/ui/sessions.rs:718-727 \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":"src-tauri/src/cli/commands/sessions.rs"},"region":{"startLine":883}}}],"partialFingerprints":{"codehealthFindingId/v1":"c01607bf693bab7b511976cf06aabb810268039523b12392376ad40256bb588e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/cli/tui/app/types.rs:4962-4971 | src-tauri/src/cli/tui/app/types.rs:5008-5017 \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":"src-tauri/src/cli/tui/app/types.rs"},"region":{"startLine":4962}}}],"partialFingerprints":{"codehealthFindingId/v1":"1871ea453c9a9b047b5fdc5301df82a8d8ad21c328f4bbbab695dd3f1195d08f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/cli/tui/form/provider_state.rs:3186-3195 | src-tauri/src/cli/tui/form/provider_state.rs:3206-3215 \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":"src-tauri/src/cli/tui/form/provider_state.rs"},"region":{"startLine":3186}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ab95f0f204e48aa10f665f11bd0535e2a1a633cce3e1850a622494dc58a53e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/cli/tui/runtime_actions/editor.rs:1024-1033 | src-tauri/src/cli/tui/runtime_actions/editor.rs:1122-1131 \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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":1024}}}],"partialFingerprints":{"codehealthFindingId/v1":"710ad9b093014389280cd4286b0c1e761e012b28703604dc635caef91d23fda8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/cli/tui/runtime_actions/editor.rs:1123-1132 | src-tauri/src/cli/tui/runtime_actions/editor.rs:1319-1328 \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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":1123}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fb4165472c83aa025541c336f38ccb5d144739bea13ac6dc78b11a6d072a763"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/cli/tui/runtime_systems/types.rs:879-888 | src-tauri/src/services/provider/models.rs:145-154 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/runtime_systems/types.rs\u0060 and \u0060src-tauri/src/services/provider/models.rs\u0060 as WHOLE FILES: this scan already matched 4 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. 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":"src-tauri/src/cli/tui/runtime_systems/types.rs"},"region":{"startLine":879}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1feb22dc17473c5236bb7cec41806ca88dfde2417462167c0926ef0bb623966"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/cli/tui/runtime_systems/workers.rs:2207-2216 | src-tauri/src/cli/tui/runtime_systems/workers.rs:2221-2230 \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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":2207}}}],"partialFingerprints":{"codehealthFindingId/v1":"a48a65041e1b9608becaeb2824b1c8590dd2c5bdbfd07fd0e038682879183afc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/cli/tui/ui/config.rs:1309-1318 | src-tauri/src/cli/tui/ui/config.rs:2230-2239 \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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":1309}}}],"partialFingerprints":{"codehealthFindingId/v1":"e391fee8535d68d09f004a03f0455506da6030d9e7da1108542d715a53d6684d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/prompt.rs:93-102 | src-tauri/src/cli/tui/ui/forms/provider.rs:561-570 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/prompt.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/provider.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 127 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":"src-tauri/src/cli/tui/ui/forms/prompt.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"03170087226bf8fcdc53031a1b997263e8c16e140f567ce5620dfdb232f024ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/provider.rs:900-909 | src-tauri/src/cli/tui/ui/forms/provider.rs:1136-1145 \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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"67261f59ee633ba52c6b9bbf25707858e0c6db1ef67f505cdbcb733f236e8125"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/provider.rs:981-989 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:1019-1028 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/provider.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/overlay/pickers.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":981}}}],"partialFingerprints":{"codehealthFindingId/v1":"82d4aebe5106e25b800856917a65c94b7fef654a2f9a7815332b4aac16618473"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/cli/tui/ui/overlay/basic.rs:338-347 | src-tauri/src/cli/tui/ui/overlay/status.rs:316-325 \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":"src-tauri/src/cli/tui/ui/overlay/basic.rs"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"3584ec83953c42ed5802e1392faa5ba32422a23b07efee27673c0be93a0f76cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): src-tauri/src/cli/tui/ui/overlay/pickers.rs:1829-1838 | src-tauri/src/cli/tui/ui/sessions.rs:773-781 \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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":1829}}}],"partialFingerprints":{"codehealthFindingId/v1":"f688c7cf2db9b7ee535a63a4d9195b44a0212a3b659093b263f81d4d19467f20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/cli/tui/ui/shared.rs:985-994 | src-tauri/src/cli/tui/ui/shared.rs:1049-1058 \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":"src-tauri/src/cli/tui/ui/shared.rs"},"region":{"startLine":985}}}],"partialFingerprints":{"codehealthFindingId/v1":"63a9c22fc08073d0f11ba4038f6966f5dde81fec4a4613074802e7c3bb036aba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): src-tauri/src/codex_history_migration.rs:548-555 | src-tauri/src/codex_history_migration.rs:1455-1464 \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":"src-tauri/src/codex_history_migration.rs"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ba27effaf06741095a434bfa9d8192d8134c799bb763e4e746fd4645be2529e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): src-tauri/src/codex_history_migration.rs:1005-1012 | src-tauri/src/codex_history_migration.rs:1081-1090 \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":"src-tauri/src/codex_history_migration.rs"},"region":{"startLine":1005}}}],"partialFingerprints":{"codehealthFindingId/v1":"01f8c97545d75509f5f0e4b9feea6fce99353dfe494a22480b693b6f9db3949c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): src-tauri/src/config.rs:585-593 | src-tauri/src/database/mod.rs:281-290 \u2014 before extracting anything, compare \u0060src-tauri/src/config.rs\u0060 and \u0060src-tauri/src/database/mod.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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":"src-tauri/src/config.rs"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"550304e108a8d4350651bdb2c63aaf015c1bfcebba6c41e6e060cafddfd8c2a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/database/dao/proxy.rs:1049-1058 | src-tauri/src/database/dao/proxy.rs:1124-1133 \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":"src-tauri/src/database/dao/proxy.rs"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2f410a394d62b8214a81ba738109bfc4c5a6413c79ab1effe08b1110cf6d0ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/hermes_config.rs:343-352 | src-tauri/src/openclaw_config.rs:358-367 \u2014 before extracting anything, compare \u0060src-tauri/src/hermes_config.rs\u0060 and \u0060src-tauri/src/openclaw_config.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 56 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":"src-tauri/src/hermes_config.rs"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"86b18acd72cd4a288483e743f02c0d9080755d49cd7d8736acc1c890a0c5d8d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/openclaw_config.rs:502-511 | src-tauri/src/openclaw_config.rs:524-533 \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":"src-tauri/src/openclaw_config.rs"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"3964791db8cf653809c55e1b506182fe9b7b72c2ce9c3b700d1cbefe978eb8c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/proxy/providers/codex.rs:388-397 | src-tauri/src/proxy/providers/codex.rs:445-454 \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":"src-tauri/src/proxy/providers/codex.rs"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0d2d5e3d3b1be78551176909c5b4402e690ccc0395267f76059da107091eaa9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/proxy/providers/copilot_auth.rs:916-925 | src-tauri/src/proxy/providers/copilot_auth.rs:1030-1039 \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":"src-tauri/src/proxy/providers/copilot_auth.rs"},"region":{"startLine":916}}}],"partialFingerprints":{"codehealthFindingId/v1":"6be9da6d7811e58b72a660380504f47a440dafa8f1cb40c9dee0adc2f9bb36cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/services/coding_plan.rs:147-156 | src-tauri/src/services/coding_plan.rs:168-177 \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":"src-tauri/src/services/coding_plan.rs"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb97faf48d1eba959cc590029b01e7d29a442546d0f60b75db6fc8c41fd47090"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/services/provider/endpoints.rs:56-65 | src-tauri/src/services/provider/mod.rs:2957-2966 \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":"src-tauri/src/services/provider/endpoints.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"4be50e2516426325a0bd8cf9719816d714a09cdbf3a573220169614c610a4446"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/services/skill.rs:1176-1185 | src-tauri/src/services/skill.rs:1507-1516 \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":"src-tauri/src/services/skill.rs"},"region":{"startLine":1176}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5e7458f007585248de10695b4d14ea63ed8d82ff9a9e5081db3fb73f34a0c3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): src-tauri/src/services/skill.rs:1262-1271 | src-tauri/src/services/skill.rs:1426-1434 \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":"src-tauri/src/services/skill.rs"},"region":{"startLine":1262}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d479946f273ed2e827ca9057463b6c3bc1fba29e4916cefb0c54578a29db4fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/services/skill.rs:1697-1706 | src-tauri/src/services/skill.rs:1787-1796 \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":"src-tauri/src/services/skill.rs"},"region":{"startLine":1697}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1d51b0fbaa039fea74eff47d399fa6d512cf0fde9ebd901fcb8201744cd6170"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/services/usage_stats.rs:537-546 | src-tauri/src/services/usage_stats.rs:1205-1214 \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":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa0fc3db6e675864d875f72f20774665b8713f75b610bcee0a80a8bd937fc501"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/services/webdav.rs:256-265 | src-tauri/src/services/webdav.rs:414-423 \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":"src-tauri/src/services/webdav.rs"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dd66fd6ea0d08059cd5609ad6cc06e6b51f58cce91ef3e45b16ec4280413874"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/session_manager/paged_manifest.rs:2520-2529 | src-tauri/src/session_manager/paged_manifest.rs:2578-2587 \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":"src-tauri/src/session_manager/paged_manifest.rs"},"region":{"startLine":2520}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5b198767977b7946d5b0fd923c3417bdac3151b4b9006a17962cc3f5a55d1dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/session_manager/providers/codex.rs:755-764 | src-tauri/src/session_manager/providers/openclaw.rs:405-414 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/codex.rs\u0060 and \u0060src-tauri/src/session_manager/providers/openclaw.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 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":"src-tauri/src/session_manager/providers/codex.rs"},"region":{"startLine":755}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9a457fcba09562ef1b33682c2bce6c1c29c3b53569d07e078c3bffd68402b70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 8): src-tauri/src/services/balance.rs:88-96 | src-tauri/src/services/balance.rs:160-168 | src-tauri/src/services/balance.rs:219-227 | src-tauri/src/services/balance.rs:276-284 | src-tauri/src/services/balance.rs:336-344 | src-tauri/src/services/coding_plan.rs:130-138 | src-tauri/src/services/coding_plan.rs:301-309 | src-tauri/src/services/coding_plan.rs:386-394 \u2014 there are 8 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 8 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/balance.rs"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8a4e4e9f7119385fea7f322be4ebd9125c156b347a967b30a4de271b10e555b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 6): src-tauri/src/cli/tui/ui/forms/mcp.rs:297-306 | src-tauri/src/cli/tui/ui/forms/prompt.rs:93-102 | src-tauri/src/cli/tui/ui/forms/provider.rs:561-570 | src-tauri/src/cli/tui/ui/forms/provider.rs:1605-1614 | src-tauri/src/cli/tui/ui/forms/s3.rs:73-82 | src-tauri/src/cli/tui/ui/forms/webdav.rs:65-73 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/mcp.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/prompt.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ca1e5787b838bd628f38bbadf8a56abb16d2ddd4bae3db19c5d9975c4ca5d49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): src-tauri/src/cli/tui/ui/forms/mcp.rs:69-77 | src-tauri/src/cli/tui/ui/forms/prompt.rs:87-95 | src-tauri/src/cli/tui/ui/forms/provider.rs:898-906 | src-tauri/src/cli/tui/ui/forms/provider.rs:1134-1142 | src-tauri/src/cli/tui/ui/forms/provider.rs:1531-1539 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/mcp.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/prompt.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a89ae5dece598eb9d96bf4d6b8a8320479a060bcc42a4326714ec77e0bc56fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): src-tauri/src/services/provider/mod.rs:1400-1408 | src-tauri/src/services/provider/mod.rs:1603-1611 | src-tauri/src/services/provider/mod.rs:1623-1631 | src-tauri/src/services/provider/mod.rs:1643-1651 | src-tauri/src/services/provider/mod.rs:1663-1671 \u2014 all 5 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":1400}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed1c3f77743003ac3bc70cb81c1a1be43048dc65aff1d55c0e0327394d312544"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): src-tauri/src/cli/tui/ui/forms/mcp.rs:341-349 | src-tauri/src/cli/tui/ui/forms/provider.rs:640-648 | src-tauri/src/cli/tui/ui/forms/provider.rs:1649-1657 | src-tauri/src/cli/tui/ui/forms/s3.rs:116-124 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/mcp.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/provider.rs\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 154 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"16bd4354736e99d4185500bd472687847c15f0d817675baa4a2de1230039ecf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): src-tauri/src/cli/commands/provider_inspect.rs:1083-1091 | src-tauri/src/cli/commands/provider_inspect.rs:1103-1111 | src-tauri/src/cli/commands/provider_inspect.rs:1122-1130 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/provider_inspect.rs"},"region":{"startLine":1083}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2dee350d7b9d5bfa645170f84d3c08febc8dc07bee8305ebbb5ba7b9386bdae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): src-tauri/src/cli/tui/runtime_actions/editor.rs:687-695 | src-tauri/src/cli/tui/runtime_actions/editor.rs:757-765 | src-tauri/src/cli/tui/runtime_actions/editor.rs:850-858 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":687}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aa2bdd59bb8d3d236b43eb5b21367f45358fefa4df37c21a42aefd8137904a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): src-tauri/src/cli/tui/ui/overlay/mcp_key_value.rs:121-129 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:255-263 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:1141-1149 \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":"src-tauri/src/cli/tui/ui/overlay/mcp_key_value.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"74039f79ea9ad2b88ac75c7dcf33e465144d52ec5ea943275e132aa843bafc4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): src-tauri/src/proxy/providers/streaming_responses.rs:357-365 | src-tauri/src/proxy/providers/streaming_responses.rs:563-571 | src-tauri/src/proxy/providers/streaming_responses.rs:708-716 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/providers/streaming_responses.rs"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"74795685f1090ac0ab65e37425e8994d799fd53a229f900d1f302e646a03f229"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): src-tauri/src/services/session_usage.rs:1054-1062 | src-tauri/src/services/session_usage_codex.rs:1935-1943 | src-tauri/src/services/session_usage_gemini.rs:264-272 \u2014 before extracting anything, compare \u0060src-tauri/src/services/session_usage.rs\u0060 and \u0060src-tauri/src/services/session_usage_codex.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 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":"src-tauri/src/services/session_usage.rs"},"region":{"startLine":1054}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a273f434016eb38743c3a150da6fad804237f6824338e81a4f144964a2deec5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): src-tauri/src/session_manager/providers/claude.rs:239-248 | src-tauri/src/session_manager/providers/codex.rs:870-878 | src-tauri/src/session_manager/providers/openclaw.rs:525-534 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/claude.rs\u0060 and \u0060src-tauri/src/session_manager/providers/codex.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 113 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":"src-tauri/src/session_manager/providers/claude.rs"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"861740621c9c9f9055ff5f08453510c5e7ffce414bb2cbae3aba562b9994739d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): src-tauri/src/session_manager/providers/codex.rs:752-760 | src-tauri/src/session_manager/providers/hermes.rs:840-848 | src-tauri/src/session_manager/providers/openclaw.rs:402-410 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/codex.rs\u0060 and \u0060src-tauri/src/session_manager/providers/hermes.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 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":"src-tauri/src/session_manager/providers/codex.rs"},"region":{"startLine":752}}}],"partialFingerprints":{"codehealthFindingId/v1":"f02b35fa569e136ebc945e66f5476c32a963ae001b6c76e06b9910dde7aa9a12"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 2): src-tauri/src/cli/commands/provider.rs:351-357 | src-tauri/src/cli/commands/provider_input.rs:4045-4053 \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":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"862f03a39fb55e7f588fd06647e15e35259f0bbb298913b8ddf0c51de7f8458f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/commands/provider_input.rs:141-149 | src-tauri/src/cli/tui/form/provider_state.rs:355-363 \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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd1c7ac990c223a51d6ccc8875a9f93922603e8a68325fc249264cca3263149a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/commands/provider_input.rs:3646-3654 | src-tauri/src/cli/tui/form/provider_json.rs:1541-1549 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/commands/provider_input.rs\u0060 and \u0060src-tauri/src/cli/tui/form/provider_json.rs\u0060 as WHOLE FILES: this scan already matched 6 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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":3646}}}],"partialFingerprints":{"codehealthFindingId/v1":"479441445efbf71fe036860dd6f2fd07be542f1177f117feb8c1fa7b4a819c9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): src-tauri/src/cli/commands/provider_input.rs:3800-3808 | src-tauri/src/cli/commands/provider_input.rs:4465-4472 \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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":3800}}}],"partialFingerprints":{"codehealthFindingId/v1":"d252c4b19aeb3d232f9238fdb382b8b42f3f4e77082397e0c10a71eb2375940a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/provider_quota.rs:203-211 | src-tauri/src/cli/tui/ui/shared.rs:893-901 \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":"src-tauri/src/cli/provider_quota.rs"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"26d3a71ff9009ddf2ac660997263a411a77d8b2fd7b1921dae0a19fb6636425b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/tui/app/content_entities.rs:692-700 | src-tauri/src/cli/tui/app/content_entities.rs:1125-1133 \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":"src-tauri/src/cli/tui/app/content_entities.rs"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7a211e19282cf36ae5192e552f35e1fbaca4d3be66c176b6353b690997d0d3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/tui/app/content_entities.rs:702-710 | src-tauri/src/cli/tui/app/content_entities.rs:1135-1143 \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":"src-tauri/src/cli/tui/app/content_entities.rs"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"202e14b2ddda5746f545f83e35403458c7561dba67a2764d6ab0311c9c167fb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/tui/app/helpers.rs:1369-1377 | src-tauri/src/session_manager/query_manifest.rs:155-163 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/app/helpers.rs\u0060 and \u0060src-tauri/src/session_manager/query_manifest.rs\u0060 as WHOLE FILES: this scan already matched 4 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/helpers.rs"},"region":{"startLine":1369}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c71c1bce3538c976ca3bc0892c053815757d11b12f016a787d665b79a55ea34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/tui/app/helpers.rs:1430-1438 | src-tauri/src/session_manager/query_manifest.rs:181-189 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/app/helpers.rs\u0060 and \u0060src-tauri/src/session_manager/query_manifest.rs\u0060 as WHOLE FILES: this scan already matched 4 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/helpers.rs"},"region":{"startLine":1430}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e5aed44bdc15313a43a0419440c911b52fbd589acba91782b3b1cf5f4e0f9d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/tui/app/helpers.rs:1605-1613 | src-tauri/src/cli/tui/ui/skills/helpers.rs:12-20 \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":"src-tauri/src/cli/tui/app/helpers.rs"},"region":{"startLine":1605}}}],"partialFingerprints":{"codehealthFindingId/v1":"401f8b4e51bd4b837841d36d2335045104804db6072759347d68465848a26fd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): src-tauri/src/cli/tui/app/helpers.rs:1619-1626 | src-tauri/src/cli/tui/app/helpers.rs:1656-1664 \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":"src-tauri/src/cli/tui/app/helpers.rs"},"region":{"startLine":1619}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb422e14d8d4f9edf6d19df2cdf85ad844811e42baec9efa304753083f68346a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/tui/form/provider_json.rs:311-319 | src-tauri/src/cli/tui/form/provider_json.rs:453-461 \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":"src-tauri/src/cli/tui/form/provider_json.rs"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b5133d68259e3a6fbf1ff56a0348e87a720ccd43e2f7aa6253abca962615819"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/tui/runtime_actions/editor.rs:516-524 | src-tauri/src/cli/tui/runtime_actions/editor.rs:561-569 \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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"9db07024bac8f18443d4d430734a2c06c95b0c31cfb222197000e093a575df68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/tui/runtime_actions/editor.rs:869-877 | src-tauri/src/cli/tui/runtime_actions/editor.rs:931-939 \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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":869}}}],"partialFingerprints":{"codehealthFindingId/v1":"628f8c25cd94f225e15cecae5ff36ca4720f5d1ef8f57f1c53bd2569a87b18e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/tui/runtime_actions/editor.rs:1200-1208 | src-tauri/src/cli/tui/runtime_actions/editor.rs:1275-1283 \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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":1200}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a73d6f59c412541a3105172a9e899a4f2de3ec32c89d957866efeae3205839a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/tui/runtime_actions/editor.rs:1275-1283 | src-tauri/src/cli/tui/runtime_actions/editor.rs:1319-1327 \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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":1275}}}],"partialFingerprints":{"codehealthFindingId/v1":"82ccd48e7ec8f29919f47685e21f0792768cc13cc52e463201951f0f330b182c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/tui/runtime_systems/workers.rs:179-187 | src-tauri/src/cli/tui/runtime_systems/workers.rs:3769-3777 \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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5f3ee4b4a4e0bdbba01af4eaabe16ffbeb30865f0c7eb030bc17767c2b883bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/tui/runtime_systems/workers.rs:292-300 | src-tauri/src/cli/tui/runtime_systems/workers.rs:697-705 \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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"4760d4c5e462df152d638d7709eb1e29170d1e4675bd6adbfc5de1e1f1eac88b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/tui/runtime_systems/workers.rs:1317-1325 | src-tauri/src/cli/tui/runtime_systems/workers.rs:1353-1361 \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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":1317}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c516f6121d50990eda05a3b2357b7ea5bc710c1252b668ca072b013db7f9cea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/tui/ui/overlay/pickers.rs:1233-1242 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:1410-1418 \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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":1233}}}],"partialFingerprints":{"codehealthFindingId/v1":"517a1daa79c6e8a346b71938fe190a12465e03a57cbf5ecc4cef27852bbf0f01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/config.rs:348-356 | src-tauri/src/config.rs:1373-1381 \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":"src-tauri/src/config.rs"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcdfb53d305718bca527a065a3f2051b21c95f6e295e9e1d85256fa604611b4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/daemon/supervisor.rs:1256-1264 | src-tauri/src/services/proxy.rs:4112-4120 \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":"src-tauri/src/daemon/supervisor.rs"},"region":{"startLine":1256}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e73e044c9056f8e68ed02dbb6f48cc6312b86d64e33726e29bf6b2330360181"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/mcp.rs:810-818 | src-tauri/src/mcp.rs:1457-1465 \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":"src-tauri/src/mcp.rs"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0210bfca995e0a92d2b7db702d58bba2469afb277c5b07e338c18307f80e2fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/proxy/forwarder.rs:765-773 | src-tauri/src/proxy/forwarder.rs:962-970 \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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":765}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ce0dae98751b2d3ba7a1b5583a354a1025c99f5791a27270b6f1760b7cae391"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/proxy/providers/codex_oauth_auth.rs:1352-1360 | src-tauri/src/proxy/providers/copilot_auth.rs:1175-1183 \u2014 before extracting anything, compare \u0060src-tauri/src/proxy/providers/codex_oauth_auth.rs\u0060 and \u0060src-tauri/src/proxy/providers/copilot_auth.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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":"src-tauri/src/proxy/providers/codex_oauth_auth.rs"},"region":{"startLine":1352}}}],"partialFingerprints":{"codehealthFindingId/v1":"82812f5dfb1c03dc39604ddf98b31f9a023abe720c6ceb836c4475d827d077a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/proxy/providers/streaming_gemini.rs:76-84 | src-tauri/src/proxy/providers/transform_gemini.rs:1032-1040 \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":"src-tauri/src/proxy/providers/streaming_gemini.rs"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"f98685e69c7348cb8a096b68bbf065e679890afc08abedcfb4921dfc8fd1d6eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/proxy/providers/streaming_responses.rs:316-324 | src-tauri/src/proxy/providers/streaming_responses.rs:584-592 \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":"src-tauri/src/proxy/providers/streaming_responses.rs"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"740304bcc437947b6dc24ae6ee4e227c1faed969a779b72cf8908f2df5044476"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 2): src-tauri/src/proxy/providers/transform.rs:245-253 | src-tauri/src/proxy/providers/transform_responses.rs:396-401 \u2014 before extracting anything, compare \u0060src-tauri/src/proxy/providers/transform.rs\u0060 and \u0060src-tauri/src/proxy/providers/transform_responses.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 37 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":"src-tauri/src/proxy/providers/transform.rs"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"935e6dd2812a1a52e877ef4eccbb1ffec703ca8bf58ee28f7294cc3f809b68fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): src-tauri/src/proxy/response.rs:519-526 | src-tauri/src/proxy/response.rs:595-603 \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":"src-tauri/src/proxy/response.rs"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"b54b75190a52566b23095a2659abe244a70d9e3d98443ba8f0fab20c72382634"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/services/s3_sync.rs:265-273 | src-tauri/src/services/webdav_sync/mod.rs:345-353 \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":"src-tauri/src/services/s3_sync.rs"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"0870386deb6456796f36e3a8744a8bee7327b0398054a49412e6836354f79791"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/session_manager/providers/claude.rs:328-337 | src-tauri/src/session_manager/providers/codex.rs:954-962 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/claude.rs\u0060 and \u0060src-tauri/src/session_manager/providers/codex.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 113 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":"src-tauri/src/session_manager/providers/claude.rs"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"f076f27ab1fc693b48830f119c0be74d90d6aa5bd9b57112e2821e983c4d1d91"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 5): src-tauri/src/cli/tui/ui/forms/mcp.rs:307-314 | src-tauri/src/cli/tui/ui/forms/prompt.rs:110-116 | src-tauri/src/cli/tui/ui/forms/provider.rs:1615-1621 | src-tauri/src/cli/tui/ui/forms/s3.rs:83-89 | src-tauri/src/cli/tui/ui/forms/webdav.rs:74-80 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/mcp.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/prompt.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"41566358f15a1a7fc1b1f28e52e8e2cc1e2f12a73181828a6536631b1f5eb9b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): src-tauri/src/cli/tui/ui/forms/mcp.rs:332-339 | src-tauri/src/cli/tui/ui/forms/prompt.rs:130-137 | src-tauri/src/cli/tui/ui/forms/provider.rs:1640-1647 | src-tauri/src/cli/tui/ui/forms/s3.rs:107-114 | src-tauri/src/cli/tui/ui/forms/webdav.rs:93-100 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/mcp.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/prompt.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"a906608a0f5f2fe10a6069e9df21b959cf487f392a774c2568d79e07c8de74cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 5): src-tauri/src/cli/tui/ui/forms/mcp.rs:351-357 | src-tauri/src/cli/tui/ui/forms/prompt.rs:145-152 | src-tauri/src/cli/tui/ui/forms/provider.rs:650-656 | src-tauri/src/cli/tui/ui/forms/provider.rs:932-939 | src-tauri/src/cli/tui/ui/forms/provider.rs:1659-1665 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/mcp.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/prompt.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"9507d4fc9337ea84bfa3f74de60a236b17f39a9e7c5e079fa21f357f229c8e4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): src-tauri/src/cli/tui/ui/overlay/pickers.rs:398-405 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:452-459 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:928-935 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:2385-2392 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:2673-2680 \u2014 all 5 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"4aa67edcd908f52de75d7d8ee7e07d3db0d8e49b88da9480405f0aae2505859e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): src-tauri/src/cli/tui/app/content_entities.rs:45-52 | src-tauri/src/cli/tui/app/content_entities.rs:702-709 | src-tauri/src/cli/tui/app/content_entities.rs:1135-1142 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/content_entities.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"d02086a5c5faefc8fb1facc874c754a8692a587057b030cbbb765596cd2f68a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 3): src-tauri/src/cli/tui/ui/overlay/mcp_key_value.rs:62-69 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:543-550 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:833-839 \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":"src-tauri/src/cli/tui/ui/overlay/mcp_key_value.rs"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed33e87b1b52ad14ad4f6bdcab34ce7ce45e4c35791766fa28033ab4a12fc6c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): src-tauri/src/mcp.rs:362-369 | src-tauri/src/mcp.rs:753-760 | src-tauri/src/mcp.rs:916-923 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/mcp.rs"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d1784a24e59de61730b8a84771412de0c0db1c29ea733b7d38d59e032e00932"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/commands/config.rs:329-336 | src-tauri/src/cli/commands/config.rs:400-407 \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":"src-tauri/src/cli/commands/config.rs"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"338357bd2673ef3ae8cb2e31c92472970fee6221796b0124f64747f6b9fa82b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/commands/config_webdav.rs:273-280 | src-tauri/src/cli/commands/config_webdav.rs:284-291 \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":"src-tauri/src/cli/commands/config_webdav.rs"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"d473e0163ebabec177b56c9bf345d29cac6cc2da5e992c4b0fbd6569c065310c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/commands/prompts.rs:417-424 | src-tauri/src/cli/commands/prompts.rs:602-609 \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":"src-tauri/src/cli/commands/prompts.rs"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca1871d240e07fccb9c8e3c5af98d26154e255b49c7dc7a6f4f3addc0e9ba0d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): src-tauri/src/cli/commands/provider.rs:1711-1718 | src-tauri/src/cli/commands/provider.rs:1990-1996 \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":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":1711}}}],"partialFingerprints":{"codehealthFindingId/v1":"93fb9bf25533c433ea57865fc8d5d4e2839faf4498ca9c8a9fa0e2f88d1a84c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/commands/provider_input.rs:3012-3019 | src-tauri/src/cli/tui/form/provider_json.rs:523-530 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/commands/provider_input.rs\u0060 and \u0060src-tauri/src/cli/tui/form/provider_json.rs\u0060 as WHOLE FILES: this scan already matched 6 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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":3012}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f75c7261d16db0dbcf4a3184336a6d1a3ee1ce511f5152fae0b1bb684bb464b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/tui/app/editor_state.rs:199-206 | src-tauri/src/cli/tui/ui/forms/shared.rs:361-368 \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":"src-tauri/src/cli/tui/app/editor_state.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"201fdaa032597d58494a0c4dd11243ad9b0815ace875668a7ee153c725436d66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/tui/data.rs:2613-2620 | src-tauri/src/cli/tui/data.rs:2659-2666 \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":"src-tauri/src/cli/tui/data.rs"},"region":{"startLine":2613}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e1f3c5fe06b9ab9bd56e115f333383151077e682f0c365d7a141ee587355804"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/tui/runtime_actions/editor.rs:792-799 | src-tauri/src/cli/tui/runtime_actions/editor.rs:811-818 \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":"src-tauri/src/cli/tui/runtime_actions/editor.rs"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b8b1e361fbaf476455e3809d13c9e07c2e130cac10d50de1ad88c6ebf792aaa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/tui/runtime_systems/types.rs:953-960 | src-tauri/src/services/provider/models.rs:85-92 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/runtime_systems/types.rs\u0060 and \u0060src-tauri/src/services/provider/models.rs\u0060 as WHOLE FILES: this scan already matched 4 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. 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":"src-tauri/src/cli/tui/runtime_systems/types.rs"},"region":{"startLine":953}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a7c0fc60f4e6c772c3420764b346d8452b3baad33d9a9f9a514b74f7f38ee4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/tui/runtime_systems/workers.rs:468-475 | src-tauri/src/cli/tui/runtime_systems/workers.rs:551-558 \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":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"d98c1704ee127e46a55b9741e70fc0e6ece836b42ee72e39cb96b1f922364e22"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/tui/ui.rs:227-234 | src-tauri/src/cli/tui/ui.rs:240-247 \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":"src-tauri/src/cli/tui/ui.rs"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"038ca29e55cdba67024c149cdf9ac4dcaec76689f7a69295741b3295e103a3ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/tui/ui/overlay/layout.rs:96-103 | src-tauri/src/cli/tui/ui/overlay/layout.rs:128-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":"src-tauri/src/cli/tui/ui/overlay/layout.rs"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"2683c0c4d26a6a4263b100aa222c8c80c19992c7c39ef73e1f9256a16f7e828d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/tui/ui/pricing.rs:159-166 | src-tauri/src/cli/tui/ui/pricing.rs:184-191 \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":"src-tauri/src/cli/tui/ui/pricing.rs"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"65a7acd6e00b9a1a65cbcc0fb81d5dff226c1ffd3a99b03c7d5a30bf7f0318ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/tui/ui/prompts.rs:166-173 | src-tauri/src/cli/tui/ui/prompts.rs:241-248 \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":"src-tauri/src/cli/tui/ui/prompts.rs"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"31532878343b5bc6c0e414d1387c97653d4b99b5da20c2a950a6056552c09662"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): src-tauri/src/codex_config.rs:190-196 | src-tauri/src/codex_config.rs:307-314 \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":"src-tauri/src/codex_config.rs"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bb2d8859d869ebd5bf90b9827f4b5cf42e7b0d03e73d8c8a43186f3b9e3f45e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/codex_config.rs:381-388 | src-tauri/src/codex_config.rs:401-408 \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":"src-tauri/src/codex_config.rs"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cbbb7a0dba78278d163d10919d13849fd02b0fd4540bc1151215a3a03dfaf90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/codex_config.rs:1396-1403 | src-tauri/src/codex_config.rs:1444-1451 \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":"src-tauri/src/codex_config.rs"},"region":{"startLine":1396}}}],"partialFingerprints":{"codehealthFindingId/v1":"d012cbca4a175f97cae940456c88615a9d07fe2d725a79864d362f06f934ddf8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/database/backup.rs:1435-1442 | src-tauri/src/database/dao/proxy.rs:1158-1165 \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":"src-tauri/src/database/backup.rs"},"region":{"startLine":1435}}}],"partialFingerprints":{"codehealthFindingId/v1":"c14917bb756af7ab48d51d749ff52ef61f31185879eab984e60b47d2ceca231b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/hermes_config.rs:334-341 | src-tauri/src/openclaw_config.rs:349-356 \u2014 before extracting anything, compare \u0060src-tauri/src/hermes_config.rs\u0060 and \u0060src-tauri/src/openclaw_config.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 56 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":"src-tauri/src/hermes_config.rs"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac7a6d130d7c9907f7dc7578a68e225993a78f55896eff6c083f52fc55236592"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20138 lines \u00D7 4): src-tauri/src/mcp.rs:840-842 | src-tauri/src/mcp.rs:890-897 | src-tauri/src/mcp.rs:1485-1492 | src-tauri/src/mcp.rs:1535-1536 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/mcp.rs"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"b731a04fcc9de2d640f1085a0e92fda11e53e2005826dc382f9c42f693bb3c73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/proxy/error.rs:211-218 | src-tauri/src/proxy/response/error_summary.rs:44-51 \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":"src-tauri/src/proxy/error.rs"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd514666140b3c710635847d77e07bd41da5361ac47d6b6d02d2a8fa85c84b23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/proxy/providers/streaming_codex_anthropic.rs:677-684 | src-tauri/src/proxy/providers/streaming_codex_chat.rs:935-942 \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":"src-tauri/src/proxy/providers/streaming_codex_anthropic.rs"},"region":{"startLine":677}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5958ee49cb8229539316cc23c66628ae3cae7de4b860727e652d6db92104574"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/proxy/providers/streaming_codex_chat.rs:212-219 | src-tauri/src/proxy/providers/streaming_codex_chat.rs:242-249 \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":"src-tauri/src/proxy/providers/streaming_codex_chat.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"3effebb696b0b41fbe1749e587da878f25c77efc10c10d22a84f5e4952d310fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/services/provider/common_config.rs:652-659 | src-tauri/src/services/provider/common_config.rs:705-712 \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":"src-tauri/src/services/provider/common_config.rs"},"region":{"startLine":652}}}],"partialFingerprints":{"codehealthFindingId/v1":"906e9dfb780689f7215fc4a668fc5a7d0ef8a527a406c27b04e768f60a935f7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/services/provider/common_config.rs:667-674 | src-tauri/src/services/provider/common_config.rs:720-727 \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":"src-tauri/src/services/provider/common_config.rs"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"81a97900e10673156c3f69f7dcf670a7ec7c90311026de5b7438ed11e843cc0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/services/skill.rs:1475-1482 | src-tauri/src/services/skill.rs:2764-2771 \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":"src-tauri/src/services/skill.rs"},"region":{"startLine":1475}}}],"partialFingerprints":{"codehealthFindingId/v1":"c695bf18cbc05edb52b97675263ccf360569c7c9a1de99d87b3e018c2caf93fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/services/skill.rs:3355-3362 | src-tauri/src/services/skill.rs:3450-3457 \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":"src-tauri/src/services/skill.rs"},"region":{"startLine":3355}}}],"partialFingerprints":{"codehealthFindingId/v1":"e520a378acc5de8054924794aa2a67495e7b84672eb7c46141718fda79d18327"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/session_manager/paged_manifest.rs:314-321 | src-tauri/src/session_manager/transcript.rs:2704-2711 \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":"src-tauri/src/session_manager/paged_manifest.rs"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb4d40e6f479151f495b5feb0af43b13d365ec4b64bf532bbe0ae072fb2a1e53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/session_manager/providers/gemini.rs:46-53 | src-tauri/src/session_manager/providers/openclaw.rs:74-81 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/gemini.rs\u0060 and \u0060src-tauri/src/session_manager/providers/openclaw.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 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":"src-tauri/src/session_manager/providers/gemini.rs"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"522f5e24eddc3ae4b1edd50f00a87f3b6a2d794c6a042088391e807a7df90f0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/session_manager/providers/gemini.rs:229-236 | src-tauri/src/session_manager/providers/opencode.rs:1737-1744 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/gemini.rs\u0060 and \u0060src-tauri/src/session_manager/providers/opencode.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 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":"src-tauri/src/session_manager/providers/gemini.rs"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"23038a267c05ffe6bbfcbc5fd031c1f07ef18088533b6ab7d321e014d308ee38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/session_manager/providers/hermes.rs:447-454 | src-tauri/src/session_manager/providers/opencode.rs:644-651 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/hermes.rs\u0060 and \u0060src-tauri/src/session_manager/providers/opencode.rs\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 117 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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdb64d3f80e265ce743c0826f6f900ccf4ceb4c88d5b31fe7019057b0a2b6f60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/session_manager/providers/opencode.rs:1540-1547 | src-tauri/src/session_manager/providers/opencode.rs:1557-1564 \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":"src-tauri/src/session_manager/providers/opencode.rs"},"region":{"startLine":1540}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee48d58feac306a2bfd055651aae819541a7efd914e884e9f66de07df18d415e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): src-tauri/src/cli/tui/ui/forms/provider.rs:904-911 | src-tauri/src/cli/tui/ui/forms/provider.rs:985-991 | src-tauri/src/cli/tui/ui/forms/provider.rs:1140-1147 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:1023-1030 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/provider.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/overlay/pickers.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":904}}}],"partialFingerprints":{"codehealthFindingId/v1":"02018962f5040401a54f00fd34e8e079102f4a60965d15d3ad0423edc105fddf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): src-tauri/src/cli/tui/ui/overlay/basic.rs:264-271 | src-tauri/src/cli/tui/ui/overlay/basic.rs:328-335 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:2573-2580 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:2620-2626 \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":"src-tauri/src/cli/tui/ui/overlay/basic.rs"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"636ca4bf2ed4e14fb353ac4d1992ecff68567e19f141d5836d7d009959821df2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): src-tauri/src/mcp.rs:361-367 | src-tauri/src/mcp.rs:752-758 | src-tauri/src/mcp.rs:915-921 | src-tauri/src/mcp.rs:1633-1639 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/mcp.rs"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"6899fa58d0278bcaa1d0d1cb822e33af911172ff8ebad1f0e0752674433fc53d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): src-tauri/src/cli/tui/runtime_actions/mod.rs:38-44 | src-tauri/src/cli/tui/runtime_actions/mod.rs:57-63 | src-tauri/src/cli/tui/runtime_actions/mod.rs:77-83 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/runtime_actions/mod.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3fed249972cbaeda6438307938c4c7a298cbc0d31213c859702ca7bc22c210b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): src-tauri/src/proxy/providers/copilot_auth.rs:759-765 | src-tauri/src/proxy/providers/copilot_auth.rs:906-912 | src-tauri/src/proxy/providers/copilot_auth.rs:1020-1026 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/providers/copilot_auth.rs"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"55f6ba61b1d0315a2f95a41304d7dccda992690409a7e8082add279a76b318fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): src-tauri/src/services/usage_stats.rs:537-544 | src-tauri/src/services/usage_stats.rs:943-950 | src-tauri/src/services/usage_stats.rs:1205-1211 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a8876dd8911894fa27e0566fe0c021a1885949a281ecc305307a000e46f9f1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/app_config.rs:38-44 | src-tauri/src/app_config.rs:107-113 \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":"src-tauri/src/app_config.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a068fc87026de915bf7b4cd74d624924e17f1e5b9e829d4b4cf0260af4302a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/app_config.rs:428-434 | src-tauri/src/settings.rs:137-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":"src-tauri/src/app_config.rs"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"7329b1ad1edff4bda46a08e8e95a78461fca3abbd8bb1ada417f98adb38e2989"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/commands/provider.rs:1842-1848 | src-tauri/src/cli/commands/provider.rs:2085-2091 \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":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":1842}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccd892caf1f3a44e2869ee52ffcd2656d8ef2f05d58420ed1f6808a5520d2554"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/tui/app/editor_state.rs:264-270 | src-tauri/src/cli/tui/app/editor_state.rs:305-311 \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":"src-tauri/src/cli/tui/app/editor_state.rs"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"1de855a7abfa600c72f4818815cb889e1ccaae55a82f32cc05723f1d91f774be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/tui/app/editor_state.rs:641-647 | src-tauri/src/cli/tui/app/editor_state.rs:777-783 \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":"src-tauri/src/cli/tui/app/editor_state.rs"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd3d3061bcf107fce4fd899beaa3da34c1b2dbf7d8a0afb3b207d2cde9f1fec2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/tui/app/editor_state.rs:663-669 | src-tauri/src/cli/tui/app/editor_state.rs:689-695 \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":"src-tauri/src/cli/tui/app/editor_state.rs"},"region":{"startLine":663}}}],"partialFingerprints":{"codehealthFindingId/v1":"93c9fe6ab8ce7db03f9b3f66ebc88fb055f9bde23bcea164f629aad3db62ad7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/tui/app/form_handlers/provider.rs:779-785 | src-tauri/src/cli/tui/app/form_handlers/provider.rs:832-838 \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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"736b6e3d5a2a9dbd29c0272b0b69724478d39e0bc819108a9b3f229116f2ee13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/tui/app/form_handlers/provider.rs:1316-1322 | src-tauri/src/cli/tui/app/form_handlers/provider.rs:1328-1334 \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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":1316}}}],"partialFingerprints":{"codehealthFindingId/v1":"25a3c962f146355ffdbe99f1fefc6c836db3e90923b24113f489bcaa31ea658c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): src-tauri/src/cli/tui/runtime_actions/settings.rs:93-98 | src-tauri/src/cli/tui/runtime_actions/settings.rs:645-651 \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":"src-tauri/src/cli/tui/runtime_actions/settings.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e89076fa502da034e0ae8a7d703d58f118f70bf19999eac84242d72ac0769d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/tui/ui/chrome.rs:463-469 | src-tauri/src/cli/tui/ui/chrome.rs:473-479 \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":"src-tauri/src/cli/tui/ui/chrome.rs"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"71b572ed8d30169b58b9edbf6d6367211281a3d7499d22682ab34505eed514c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/provider.rs:579-585 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:1039-1045 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/provider.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/overlay/pickers.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e1ee3fdccaff88061bdb685474eb291b09c41928b723fb6e92e31d01ec610e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/database/dao/proxy.rs:351-357 | src-tauri/src/database/dao/proxy.rs:397-403 \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":"src-tauri/src/database/dao/proxy.rs"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9401a00e20b5174287fbfabc229638e87fe5c30b92b40336dc68c46eb23a6c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/live/project/codex.rs:315-321 | src-tauri/src/live/project/codex.rs:325-331 \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":"src-tauri/src/live/project/codex.rs"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a7dd9f33587c3b7985cc1408e9ec4fdc29ff1f983f1b637383ddf07de83b475"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/mcp.rs:543-549 | src-tauri/src/mcp.rs:565-571 \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":"src-tauri/src/mcp.rs"},"region":{"startLine":543}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eee7612dea7b58aab56ca5c571c66cd896e97e301d9ef5349fb9b33e05ec238"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/mcp.rs:1176-1182 | src-tauri/src/mcp.rs:1192-1198 \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":"src-tauri/src/mcp.rs"},"region":{"startLine":1176}}}],"partialFingerprints":{"codehealthFindingId/v1":"01b588e0da9ce1f9b78801208bb8bcb4390a0ca92bae499169415c6206011c19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/proxy/providers/codex_chat_history.rs:377-383 | src-tauri/src/proxy/providers/streaming_gemini.rs:263-270 \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":"src-tauri/src/proxy/providers/codex_chat_history.rs"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cb7a89ea42656d73d7a18f481f9d7f830672766df4ee9780fb0f24e6670e92d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/proxy/providers/streaming_responses.rs:97-103 | src-tauri/src/proxy/providers/streaming_responses.rs:108-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/providers/streaming_responses.rs"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"32ffbd3c6017c4956abead6f0318cd20d7e43dd1e050bf567d404860eb1e6e01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20137 lines \u00D7 2): src-tauri/src/proxy/providers/transform_codex_anthropic.rs:531-535 | src-tauri/src/proxy/providers/transform_codex_anthropic.rs:567-573 \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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ae0d6bcd26a19fab8d4f1b1c8a66c059b968cdaf192b39b7fb9fb0c8c3d8307"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/proxy/providers/transform_codex_anthropic.rs:878-884 | src-tauri/src/proxy/providers/transform_responses.rs:208-214 \u2014 before extracting anything, compare \u0060src-tauri/src/proxy/providers/transform_codex_anthropic.rs\u0060 and \u0060src-tauri/src/proxy/providers/transform_responses.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":878}}}],"partialFingerprints":{"codehealthFindingId/v1":"c81407441501808ac9cef48fd733722636c5c3008bc2957e7e44743ee1f6234e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/proxy/providers/transform_gemini.rs:186-192 | src-tauri/src/proxy/providers/transform_gemini.rs:755-761 \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":"src-tauri/src/proxy/providers/transform_gemini.rs"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"b554a460e12322035f60b5297e786d051f0557340e9724a51429377c6518e25e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/services/provider/mod.rs:2083-2089 | src-tauri/src/services/provider/mod.rs:2099-2105 \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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":2083}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8eb67bbeeadd645c263f9af59b4a9c60ee149f00b74a588a7bd9be180e88600"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/services/provider/pi.rs:194-200 | src-tauri/src/services/provider/pi.rs:218-224 \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":"src-tauri/src/services/provider/pi.rs"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"24d23200e7c666d02371d9121842b26d781db46d1b009142eea284128d9ef506"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/services/proxy.rs:4140-4146 | src-tauri/src/services/proxy.rs:4156-4162 \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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":4140}}}],"partialFingerprints":{"codehealthFindingId/v1":"737c56221769a6dab95110c8b1fd13fc5a12f8fd1d2cd99b1c55969fded800f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/session_manager/providers/claude.rs:94-100 | src-tauri/src/session_manager/providers/openclaw.rs:383-389 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/claude.rs\u0060 and \u0060src-tauri/src/session_manager/providers/openclaw.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 47 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":"src-tauri/src/session_manager/providers/claude.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"4808d4edd8644a9d73d3ec588547cb13e2d72068e4371ff7a98839f9bd7367f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): src-tauri/src/session_manager/providers/gemini.rs:188-194 | src-tauri/src/session_manager/providers/opencode.rs:1678-1683 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/gemini.rs\u0060 and \u0060src-tauri/src/session_manager/providers/opencode.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 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":"src-tauri/src/session_manager/providers/gemini.rs"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfe86f5af25464ff002425e6cbd126d26513fe3369dd67d20ba2956b690e28fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/session_manager/providers/opencode.rs:1753-1759 | src-tauri/src/session_manager/providers/opencode.rs:1786-1792 \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":"src-tauri/src/session_manager/providers/opencode.rs"},"region":{"startLine":1753}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a99ff91b92457e951a94b61f128cf4e80ef4194e066f008d1decefb5b122fab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/session_manager/transcript.rs:2407-2413 | src-tauri/src/session_manager/transcript.rs:2415-2421 \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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":2407}}}],"partialFingerprints":{"codehealthFindingId/v1":"37f45392ab9b6fa80ced026548310591994643ec0585d695ed50344ee07077e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 9): src-tauri/src/cli/tui/ui/config.rs:944-949 | src-tauri/src/cli/tui/ui/config.rs:1417-1422 | src-tauri/src/cli/tui/ui/config.rs:2312-2317 | src-tauri/src/cli/tui/ui/forms/mcp.rs:20-25 | src-tauri/src/cli/tui/ui/forms/prompt.rs:15-20 | src-tauri/src/cli/tui/ui/forms/provider.rs:448-453 | src-tauri/src/cli/tui/ui/forms/provider.rs:1067-1072 | src-tauri/src/cli/tui/ui/forms/provider.rs:1295-1300 | src-tauri/src/cli/tui/ui/forms/provider.rs:1488-1493 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/mcp.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/prompt.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":944}}}],"partialFingerprints":{"codehealthFindingId/v1":"33efd6bc7c0a634eb7d0ea716f33706b844a813be8f5a7a9abf3410ecdf969de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): src-tauri/src/cli/commands/provider.rs:351-356 | src-tauri/src/cli/commands/provider.rs:604-609 | src-tauri/src/cli/commands/provider_input.rs:4045-4050 \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":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e5be5f61503f0cfd8e7d72434a1417eadc3eb9147ffd6f13119114a79645bdc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): src-tauri/src/cli/commands/provider_input.rs:4096-4101 | src-tauri/src/cli/commands/provider_input.rs:4402-4407 | src-tauri/src/cli/commands/provider_input.rs:4421-4426 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":4096}}}],"partialFingerprints":{"codehealthFindingId/v1":"abd5cce0ba5447546c32a99536aeb5c16c56bdf05c5fcc69e47d21efaaac61de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): src-tauri/src/proxy/providers/transform.rs:339-344 | src-tauri/src/proxy/providers/transform_gemini.rs:573-582 | src-tauri/src/proxy/providers/transform_responses.rs:540-546 \u2014 before extracting anything, compare \u0060src-tauri/src/proxy/providers/transform.rs\u0060 and \u0060src-tauri/src/proxy/providers/transform_responses.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 37 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":"src-tauri/src/proxy/providers/transform.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"677c3d5b1eafa1691f2eceb26436a2389f702bb497231e886fd8e2e1e73e5b8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/cli/commands/provider_input.rs:3777-3783 | src-tauri/src/cli/commands/provider_input.rs:4316-4321 \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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":3777}}}],"partialFingerprints":{"codehealthFindingId/v1":"edb065cc96ca7b9e8e8d9ff6a4e9f9bef17b62e9393eba5f3bc8bc8ceba7b83a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/cli/tui/app/form_handlers/provider.rs:1300-1305 | src-tauri/src/cli/tui/app/form_handlers/provider.rs:1550-1555 \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":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":1300}}}],"partialFingerprints":{"codehealthFindingId/v1":"2865630a95bbea33f4dfe4f2646174202fd087886431cdd5680270af8cdf29e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/cli/tui/data.rs:3048-3053 | src-tauri/src/cli/tui/data.rs:3093-3098 \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":"src-tauri/src/cli/tui/data.rs"},"region":{"startLine":3048}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc0bfe21fddc11c0d8a2fddaebf10eb33ac099616e17ace41b724263584749c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/cli/tui/form/mcp.rs:306-311 | src-tauri/src/cli/tui/form/s3.rs:186-191 \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":"src-tauri/src/cli/tui/form/mcp.rs"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"16017878d71e5cb2c92e24f000b43fe9051714bf550be775b78e030a3f7293ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/cli/tui/ui/config.rs:4150-4155 | src-tauri/src/cli/tui/ui/config.rs:4263-4268 \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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":4150}}}],"partialFingerprints":{"codehealthFindingId/v1":"562aff87d595466f208b77655b25e0bed57efe6aaefc4756f1e6515f0da3902e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/cli/tui/ui/editor.rs:76-81 | src-tauri/src/cli/tui/ui/forms/prompt.rs:206-212 \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":"src-tauri/src/cli/tui/ui/editor.rs"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"72ea2a1fd05a8c77660cbfc7e77bd7fcc62e1e97c11baedb18692f9657b8e650"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/mcp.rs:45-50 | src-tauri/src/cli/tui/ui/forms/prompt.rs:31-36 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/mcp.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/prompt.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 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":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f994bac29d7003f510b5fc78cc01bb87476703436df4e89bfffbb4971ff71fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/provider.rs:891-896 | src-tauri/src/cli/tui/ui/forms/provider.rs:1127-1132 \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":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":891}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8de17c421550c2eaa72c771aeb65edb66edeab083e085a3b6bd87472c3508a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/cli/tui/ui/forms/s3.rs:60-65 | src-tauri/src/cli/tui/ui/forms/webdav.rs:53-58 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/forms/s3.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/forms/webdav.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 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":"src-tauri/src/cli/tui/ui/forms/s3.rs"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ddd3b248dcc2545a4d633df6aa8e9c191b66e6dfa5cbcce8defb860a278bd94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/deeplink/provider.rs:619-624 | src-tauri/src/deeplink/provider.rs:666-673 \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":"src-tauri/src/deeplink/provider.rs"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"a54f908b8e14356217e970fab5fddced57719305a30cee4785a5e3c01639dc63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/proxy/copilot_optimizer.rs:282-288 | src-tauri/src/proxy/copilot_optimizer.rs:311-316 \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":"src-tauri/src/proxy/copilot_optimizer.rs"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ca1b88c92c8f64e9ed3756a4d9acf6869b90caecab0adfcdcd79710f2be0847"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/proxy/providers/codex_chat_common.rs:10-15 | src-tauri/src/proxy/providers/codex_chat_common.rs:55-60 \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":"src-tauri/src/proxy/providers/codex_chat_common.rs"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"40857d65bcad9958b6d9b2288ee9fc8f1349ceb24ee45c0035908bfb6df7f8f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/proxy/providers/transform.rs:159-164 | src-tauri/src/proxy/providers/transform_responses.rs:309-314 \u2014 before extracting anything, compare \u0060src-tauri/src/proxy/providers/transform.rs\u0060 and \u0060src-tauri/src/proxy/providers/transform_responses.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 37 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":"src-tauri/src/proxy/providers/transform.rs"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"622f69740cdfe8c044fa23c808fe82278c97dc931e5e0ffc1b082e33bdbcafd8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20136 lines \u00D7 3): src-tauri/src/proxy/providers/transform.rs:179-184 | src-tauri/src/proxy/providers/transform_gemini.rs:78-80 | src-tauri/src/proxy/providers/transform_responses.rs:328-333 \u2014 before extracting anything, compare \u0060src-tauri/src/proxy/providers/transform.rs\u0060 and \u0060src-tauri/src/proxy/providers/transform_responses.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 37 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":"src-tauri/src/proxy/providers/transform.rs"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"7274d415b43d58f339b59e6a1d90f828efcbe9a66531cf9ff2d266e5f308fc60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/proxy/providers/transform.rs:629-634 | src-tauri/src/proxy/providers/transform_responses.rs:674-679 \u2014 before extracting anything, compare \u0060src-tauri/src/proxy/providers/transform.rs\u0060 and \u0060src-tauri/src/proxy/providers/transform_responses.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 37 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":"src-tauri/src/proxy/providers/transform.rs"},"region":{"startLine":629}}}],"partialFingerprints":{"codehealthFindingId/v1":"dac5e9a7b886f7e42e5fffd2291bc2f2ce7deec87f82f939c02c32f3c5349e8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20136 lines \u00D7 2): src-tauri/src/services/session_usage.rs:657-661 | src-tauri/src/services/session_usage.rs:667-672 \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":"src-tauri/src/services/session_usage.rs"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a02f1f7553f4e9ee76f3eb2e5ca515a5cc10543ee245eadb2f7221dd4c9c8b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20136 lines \u00D7 3): src-tauri/src/services/skill.rs:1685-1690 | src-tauri/src/services/skill.rs:1779-1782 | src-tauri/src/services/webdav_sync/archive.rs:181-186 \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":"src-tauri/src/services/skill.rs"},"region":{"startLine":1685}}}],"partialFingerprints":{"codehealthFindingId/v1":"6356fca8ab7032cb00e4ba542984d60f34e70e99c1f9e6f941b6cc291c2e3333"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/services/skill.rs:1741-1746 | src-tauri/src/services/skill.rs:1771-1776 \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":"src-tauri/src/services/skill.rs"},"region":{"startLine":1741}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bc14451d50bfea1b39504a73c128da05370331dedbe6c9bab56be6d90e300c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/services/usage_stats.rs:821-826 | src-tauri/src/services/usage_stats.rs:911-916 \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":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":821}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0ed91129496ab45de7244d690a043e4d914c1aa4755a1bb4ecd2a66dc341be7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/session_manager/paged_manifest.rs:2688-2693 | src-tauri/src/session_manager/paged_manifest.rs:2721-2726 \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":"src-tauri/src/session_manager/paged_manifest.rs"},"region":{"startLine":2688}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dd38e736034e7e49462512edbf4aaa108c48d9db2ca02cc4ca450ae8fff6cec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): src-tauri/src/cli/claude_temp_launch.rs:273-277 | src-tauri/src/cli/codex_temp_launch.rs:302-306 | src-tauri/src/cli/commands/update.rs:1304-1308 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/claude_temp_launch.rs\u0060 and \u0060src-tauri/src/cli/codex_temp_launch.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 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":"src-tauri/src/cli/claude_temp_launch.rs"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"2438bd2607d348fcd271ce50dbf57cf17cfad48bf0b328c20c1745eb2c8d9a27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): src-tauri/src/cli/commands/provider.rs:1578-1582 | src-tauri/src/cli/commands/provider.rs:1714-1718 | src-tauri/src/cli/commands/provider.rs:1992-1996 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":1578}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cde0fd3e4641ffe22d3d8998db88fc0a85f54842a611110e250caa5515a17d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20135 lines \u00D7 4): src-tauri/src/deeplink/provider.rs:524-528 | src-tauri/src/deeplink/provider.rs:641-642 | src-tauri/src/deeplink/provider.rs:683-687 | src-tauri/src/deeplink/provider.rs:710-714 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/deeplink/provider.rs"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"12f073f8fbee4d809ad9c06ffd35ef0d0d1ca8ba1f6e7f50d3ef1f88c5aa3a0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): src-tauri/src/proxy/providers/transform_codex_anthropic.rs:531-535 | src-tauri/src/proxy/providers/transform_codex_anthropic.rs:567-572 | src-tauri/src/proxy/providers/transform_codex_anthropic.rs:589-594 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"55830b61d48947f7efff34eb839aabf35b1f3ae8e5645fa860d2696db94f2aba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/claude_mcp.rs:76-80 | src-tauri/src/gemini_mcp.rs:35-39 \u2014 before extracting anything, compare \u0060src-tauri/src/claude_mcp.rs\u0060 and \u0060src-tauri/src/gemini_mcp.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 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":"src-tauri/src/claude_mcp.rs"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef31e207a802014c4fe3dff90a9fe694fb4b1bbc8f417badc88f7f6c379f589a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/cli/commands/provider_input.rs:3173-3177 | src-tauri/src/cli/commands/provider_input.rs:3394-3398 \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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":3173}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1ba21afe6ae89441d8c86030bfba93979d401a50deb0ede7af4ce557382fe15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/cli/provider_quota.rs:226-230 | src-tauri/src/cli/tui/ui/shared.rs:916-920 \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":"src-tauri/src/cli/provider_quota.rs"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"bde65c1e2703dc940965608e736a5783baf1ebaf528998d3ad946b521c7bc825"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/cli/tui/app/content_entities.rs:770-774 | src-tauri/src/cli/tui/app/content_entities.rs:783-787 \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":"src-tauri/src/cli/tui/app/content_entities.rs"},"region":{"startLine":770}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b6c626da6a84369e5bfdc1ea06e8725977dd4fd2bcd467aabf245a37369c845"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/cli/tui/app/editor_state.rs:716-720 | src-tauri/src/cli/tui/app/editor_state.rs:733-737 \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":"src-tauri/src/cli/tui/app/editor_state.rs"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"364aa552112ca960301e864577db31b81eaba4dae3d0c3e1c472655844796693"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/cli/tui/app/types.rs:3033-3037 | src-tauri/src/cli/tui/app/types.rs:3695-3699 \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":"src-tauri/src/cli/tui/app/types.rs"},"region":{"startLine":3033}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dcaaad9b913e3426371a8f744adda1579f9266429918b8e5eeddf6765b53d13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/cli/tui/ui/config.rs:182-186 | src-tauri/src/cli/tui/ui/config.rs:244-248 \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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"7246088a344fc303160fe0f425dee24ffd741ee7cef76559880f09e788176abd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/cli/tui/ui/usage.rs:888-892 | src-tauri/src/cli/tui/ui/usage.rs:944-948 \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":"src-tauri/src/cli/tui/ui/usage.rs"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd739139dddd9edf093e86baabd8fb6c27900abf68f2d6cd118797253bed24f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/codex_history_migration.rs:1681-1685 | src-tauri/src/database/backup.rs:894-898 \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":"src-tauri/src/codex_history_migration.rs"},"region":{"startLine":1681}}}],"partialFingerprints":{"codehealthFindingId/v1":"a187de504fab05a486d994129b12b507495991396253852f514ef2d043f77677"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/pi_config/mod.rs:123-128 | src-tauri/src/pi_config/mod.rs:226-230 \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":"src-tauri/src/pi_config/mod.rs"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f61f2fe770d28bb1ea28c3e452fcae43f99bed456a377f82442965b6bc60ce7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/pi_config/mod.rs:177-181 | src-tauri/src/pi_config/mod.rs:207-211 \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":"src-tauri/src/pi_config/mod.rs"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ee57245263978fae3e3e276366be05b8ac13573f80866fb58b1ad300d27a108"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/proxy/providers/streaming_codex_anthropic.rs:494-498 | src-tauri/src/proxy/providers/streaming_codex_chat.rs:871-875 \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":"src-tauri/src/proxy/providers/streaming_codex_anthropic.rs"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bf1833bfdd96f7faffed357f663eecedd51c0481aab2252e4646273b14f4056"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/proxy/providers/transform.rs:112-116 | src-tauri/src/proxy/providers/transform_codex_anthropic.rs:238-245 \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":"src-tauri/src/proxy/providers/transform.rs"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0262cbdd6406744aedad0f11b841ebcc464a58523c499b58f90ec402c3e55e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/proxy/providers/transform_codex_anthropic.rs:859-863 | src-tauri/src/proxy/providers/transform_responses.rs:193-197 \u2014 before extracting anything, compare \u0060src-tauri/src/proxy/providers/transform_codex_anthropic.rs\u0060 and \u0060src-tauri/src/proxy/providers/transform_responses.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":859}}}],"partialFingerprints":{"codehealthFindingId/v1":"23850921689f0072f0cd006c2bd80d449982a540e83af277dc8f9090ba393fce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/proxy/providers/transform_codex_chat.rs:1404-1408 | src-tauri/src/proxy/providers/transform_codex_chat.rs:1425-1429 \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":"src-tauri/src/proxy/providers/transform_codex_chat.rs"},"region":{"startLine":1404}}}],"partialFingerprints":{"codehealthFindingId/v1":"96dc2476bfdb3b4c7cde8628098ff1a84380ccf743766bd57b44f1b273a4641c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/proxy/providers/transform_responses.rs:14-18 | src-tauri/src/proxy/providers/transform_responses.rs:45-49 \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":"src-tauri/src/proxy/providers/transform_responses.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"580b76182ecbdce77f8f3084f78bc853ca42ea3e361ad78f228b0ec1c986990f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/services/env_checker.rs:52-56 | src-tauri/src/services/env_checker.rs:68-72 \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":"src-tauri/src/services/env_checker.rs"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3a22e6dd58131071ba5c30bcd00b284903cf5990a52cbba8ad003646b80934a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/services/provider/endpoints.rs:87-91 | src-tauri/src/services/provider/endpoints.rs:111-115 \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":"src-tauri/src/services/provider/endpoints.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b9487ff3fa12c6df54cf95c1113a749c30edf5ae357bc1509abefbafb94c368"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/services/provider/live.rs:228-232 | src-tauri/src/services/provider/live.rs:402-406 \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":"src-tauri/src/services/provider/live.rs"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae3058aca2c2c41a1e7db91cfe98d8c95d644478d7a88058fff647420bde82bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/services/usage_stats.rs:576-581 | src-tauri/src/services/usage_stats.rs:696-700 \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":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"d714c00205228d9fe1cc2ae21c7d198f408d90f6a446cbecf59df0c62e3e6ef4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/services/usage_stats.rs:1129-1133 | src-tauri/src/services/usage_stats.rs:1241-1245 \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":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":1129}}}],"partialFingerprints":{"codehealthFindingId/v1":"39aa9761e83c3d5becd5d6524a9c57e6cb1cdc99097a91e0b6c648b29ef341ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/session_manager/paged_manifest.rs:527-531 | src-tauri/src/session_manager/paged_manifest.rs:619-623 \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":"src-tauri/src/session_manager/paged_manifest.rs"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ce213cc2b2794e0f30d901195e1a92034a67cf23b355dd70597e244c057a798"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/claude_mcp.rs:101-108 | src-tauri/src/gemini_mcp.rs:44-51 \u2014 before extracting anything, compare \u0060src-tauri/src/claude_mcp.rs\u0060 and \u0060src-tauri/src/gemini_mcp.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 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":"src-tauri/src/claude_mcp.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cae36c445641bc7e7bb286814f34ef9ee31869dd57b9ebaf84cae27e43def1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/claude_model_config.rs:137-144 | src-tauri/src/cli/openclaw_form_normalization.rs:157-164 \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":"src-tauri/src/claude_model_config.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0687c1c36530ccf222b8a07a756011fe0653b0b2ed57ad61fb6a457976a5993"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/cli/claude_temp_launch.rs:238-243 | src-tauri/src/cli/codex_temp_launch.rs:260-265 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/claude_temp_launch.rs\u0060 and \u0060src-tauri/src/cli/codex_temp_launch.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 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":"src-tauri/src/cli/claude_temp_launch.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"594495ffa42416c2fd7573776e4a9b4ca7b44cd011d0568a863c343fcd0d549c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/cli/claude_temp_launch.rs:251-260 | src-tauri/src/cli/codex_temp_launch.rs:280-289 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/claude_temp_launch.rs\u0060 and \u0060src-tauri/src/cli/codex_temp_launch.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 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":"src-tauri/src/cli/claude_temp_launch.rs"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"de09101aa1f00ac106a81b39d1eeb736ad17b8a7b756deefb3886e8576a6aa06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/claude_temp_launch.rs:263-269 | src-tauri/src/cli/codex_temp_launch.rs:292-298 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/claude_temp_launch.rs\u0060 and \u0060src-tauri/src/cli/codex_temp_launch.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 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":"src-tauri/src/cli/claude_temp_launch.rs"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c0aeec47db4d1ebce7284346ad33a1b9946e4c08e4355cb8ae6a69bd1a27867"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/cli/commands/failover.rs:76-81 | src-tauri/src/cli/commands/proxy.rs:76-81 \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":"src-tauri/src/cli/commands/failover.rs"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"64621c6ffbb8114b024074510fe6c7018f0441a8f1e03fa8aeca6ecc18b20179"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/commands/failover.rs:407-414 | src-tauri/src/cli/failover_policy.rs:83-90 \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":"src-tauri/src/cli/commands/failover.rs"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d77cb203d7787575194edd1dac9ffc4619e8385b818aa6e02e97151d67e7209"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): src-tauri/src/cli/commands/provider.rs:507-511 | src-tauri/src/cli/commands/provider.rs:1168-1172 | src-tauri/src/cli/tui/data.rs:3534-3538 \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":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"8860839ff1a8817700c0d8071cee282501fe42f6c46cf2cfe75c8ed10f0deaa3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): src-tauri/src/cli/commands/provider_input.rs:3636-3643 | src-tauri/src/cli/tui/form/provider_json.rs:1522-1529 | src-tauri/src/cli/tui/form/provider_json.rs:1531-1538 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/commands/provider_input.rs\u0060 and \u0060src-tauri/src/cli/tui/form/provider_json.rs\u0060 as WHOLE FILES: this scan already matched 6 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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":3636}}}],"partialFingerprints":{"codehealthFindingId/v1":"e261854274a45576e756a13d45e298eeede5415888893f194ae9ebaaa1b25829"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/cli/commands/provider_usage_query.rs:607-616 | src-tauri/src/cli/tui/form/provider_state.rs:3256-3265 \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":"src-tauri/src/cli/commands/provider_usage_query.rs"},"region":{"startLine":607}}}],"partialFingerprints":{"codehealthFindingId/v1":"21b5b03b86ced77baa5ac298f5b683a877f4cf8849a659d21b81208c77a20a4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/cli/provider_quota.rs:195-200 | src-tauri/src/cli/tui/ui/shared.rs:885-890 \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":"src-tauri/src/cli/provider_quota.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3d7c04328b272c5939a8c1ecd22d1583fe1d04f2f3a6dc15befa6169373ac6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/provider_quota.rs:232-238 | src-tauri/src/cli/tui/ui/shared.rs:922-928 \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":"src-tauri/src/cli/provider_quota.rs"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"086169e6001349ec7b46ed16e8920ffca86dd9ba8cad458e283c5e58f71ff196"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/cli/tui/app/helpers.rs:1418-1423 | src-tauri/src/session_manager/query_manifest.rs:169-174 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/app/helpers.rs\u0060 and \u0060src-tauri/src/session_manager/query_manifest.rs\u0060 as WHOLE FILES: this scan already matched 4 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/helpers.rs"},"region":{"startLine":1418}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dbade3980b5d3e2db03a359ecf75dda0a16c0c931721652e797b5d8253ad202"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/tui/app/types.rs:1077-1083 | src-tauri/src/services/session_cost/mod.rs:24-30 \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":"src-tauri/src/cli/tui/app/types.rs"},"region":{"startLine":1077}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9aa0075e10b5c91a4e8f9500f1906f35a5065cc15a67e775a5ba07225a1e0ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): src-tauri/src/cli/tui/form/mcp.rs:350-355 | src-tauri/src/cli/tui/form/provider_state.rs:1016-1021 | src-tauri/src/cli/tui/form/s3.rs:232-237 | src-tauri/src/cli/tui/form/webdav.rs:142-147 \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 4 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/form/mcp.rs"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"3593b34159f4f49d40880fead71b54e7db63205f1260c4846c8ccdd43bf31aef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/tui/form/s3.rs:239-245 | src-tauri/src/cli/tui/form/webdav.rs:149-155 \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":"src-tauri/src/cli/tui/form/s3.rs"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ed8f1eeab3128a029ff3129b30353f25c8564df7e0b3bcc21d23f815ccaf7b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/cli/tui/runtime_actions/helpers.rs:62-72 | src-tauri/src/services/visible_apps.rs:185-195 \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":"src-tauri/src/cli/tui/runtime_actions/helpers.rs"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"674fdb9a11290676a1177f0ba437d0bb9f1385d4113b64e88dcd1d91872ee5a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/tui/runtime_systems/types.rs:922-929 | src-tauri/src/services/provider/models.rs:180-187 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/runtime_systems/types.rs\u0060 and \u0060src-tauri/src/services/provider/models.rs\u0060 as WHOLE FILES: this scan already matched 4 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. 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":"src-tauri/src/cli/tui/runtime_systems/types.rs"},"region":{"startLine":922}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6ea490e49d19dfd02403eab970b241778ff80349772dd0f320e7994cc8688af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/tui/ui/pricing.rs:263-271 | src-tauri/src/cli/tui/ui/usage.rs:1600-1608 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/pricing.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/usage.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 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":"src-tauri/src/cli/tui/ui/pricing.rs"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"639da2ef4cd7e9b44ae9a148b92e7880cf89e3e7da9c92532c968e4e991f63c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/cli/tui/ui/pricing.rs:273-281 | src-tauri/src/cli/tui/ui/usage.rs:1618-1626 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/pricing.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/usage.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 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":"src-tauri/src/cli/tui/ui/pricing.rs"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"60bb236473c5c62c675278243ce0d35dea6cf276946c80bb0244628fe6a44317"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): src-tauri/src/proxy/error.rs:198-208 | src-tauri/src/proxy/response/error_summary.rs:31-41 | src-tauri/src/proxy/usage/parser.rs:269-279 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/error.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"434de7ebdab473f0fb608f54aa73cfc93324b4621d8d6a7a768bc095ad9da686"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/proxy/forwarder/request_builder.rs:796-800 | src-tauri/src/proxy/gemini_url.rs:158-162 \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":"src-tauri/src/proxy/forwarder/request_builder.rs"},"region":{"startLine":796}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b02abaa84a1ffd395635af610ecf7779676adfbe6adeb85cd7b69a6b105d18a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/proxy/providers/codex_oauth_auth.rs:888-892 | src-tauri/src/proxy/providers/copilot_auth.rs:464-468 \u2014 before extracting anything, compare \u0060src-tauri/src/proxy/providers/codex_oauth_auth.rs\u0060 and \u0060src-tauri/src/proxy/providers/copilot_auth.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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":"src-tauri/src/proxy/providers/codex_oauth_auth.rs"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"b324b748e8743babe79e5cd7de3db60469c5623d243f476399559d2ea1dab7d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/services/provider/common_config.rs:428-437 | src-tauri/src/services/provider/live_merge.rs:239-248 \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":"src-tauri/src/services/provider/common_config.rs"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"e947bd48113fefbc22be7e5358d24dde76865bb4bea58922d6022840a300cb62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/services/provider/mod.rs:116-121 | src-tauri/src/services/subscription.rs:674-679 \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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"af9dba57aa011bc866d98e2cd7379e98705e4525541605d264f1f586861b3baa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): src-tauri/src/services/session_usage.rs:687-692 | src-tauri/src/services/session_usage_codex.rs:1514-1519 | src-tauri/src/services/session_usage_gemini.rs:140-145 \u2014 before extracting anything, compare \u0060src-tauri/src/services/session_usage.rs\u0060 and \u0060src-tauri/src/services/session_usage_codex.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 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":"src-tauri/src/services/session_usage.rs"},"region":{"startLine":687}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f510b54787280bba956876b1b85b4b8796b59cae762859663bd1a0743faf889"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/services/session_usage_codex.rs:275-282 | src-tauri/src/services/session_usage_opencode.rs:181-188 \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":"src-tauri/src/services/session_usage_codex.rs"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"25f1c952e420f519b1ed52ee83adc1334bebcc93eac1273f8c36b9f0071a29da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/session_manager/paged_manifest.rs:2476-2482 | src-tauri/src/session_manager/transcript.rs:3007-3013 \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":"src-tauri/src/session_manager/paged_manifest.rs"},"region":{"startLine":2476}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a9fe1a34447bfc6c6d8cdbb3ffe251e06a672a2edeab123c91a081378748815"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/cli/commands/config_s3.rs:185-189 | src-tauri/src/cli/commands/config_webdav.rs:265-269 \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":"src-tauri/src/cli/commands/config_s3.rs"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"72947da000b4a860d9db23b25cd74b1682ae4238f745accfa04eac4776ceafe1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/cli/tui/ui/pricing.rs:222-231 | src-tauri/src/cli/tui/ui/usage.rs:1360-1369 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/pricing.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/usage.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 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":"src-tauri/src/cli/tui/ui/pricing.rs"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"63b9c177adf9c868d6b8f344d9ed6892c34cfb4b15560cf811e9c00f04ad28a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/hermes_config.rs:156-165 | src-tauri/src/openclaw_config.rs:136-145 \u2014 before extracting anything, compare \u0060src-tauri/src/hermes_config.rs\u0060 and \u0060src-tauri/src/openclaw_config.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 56 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":"src-tauri/src/hermes_config.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"94bd4d4eecd1d33eab43b8e094379460307ec6a6759546bbc1d92efb29c0ae2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/hermes_config.rs:169-175 | src-tauri/src/openclaw_config.rs:147-154 \u2014 before extracting anything, compare \u0060src-tauri/src/hermes_config.rs\u0060 and \u0060src-tauri/src/openclaw_config.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 56 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":"src-tauri/src/hermes_config.rs"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"88afa0a90f309a3b901cb7709061e6f48feda08442cc2ddfa649e0d4c750def7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): src-tauri/src/services/usage_stats.rs:788-813 | src-tauri/src/services/usage_stats.rs:878-903 \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":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":788}}}],"partialFingerprints":{"codehealthFindingId/v1":"519adf4c4e490daac195432704c375e23b9c3a51b7b2e5b4904737769ed4b24c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): src-tauri/src/cli/tui/data.rs:3016-3040 | src-tauri/src/cli/tui/data.rs:3064-3086 \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":"src-tauri/src/cli/tui/data.rs"},"region":{"startLine":3016}}}],"partialFingerprints":{"codehealthFindingId/v1":"3288fe8f30524b3295ed9a8d6b568e581d083eb65080b2afc20322f3feffd80c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): src-tauri/src/cli/commands/config.rs:184-201 | src-tauri/src/cli/commands/config.rs:310-325 \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":"src-tauri/src/cli/commands/config.rs"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"5679e880c9c2703e601cb5bb1ac4cbebf8ef772be26b8d64f425352f3c7cebb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src-tauri/src/session_manager/terminal/mod.rs:33-45 | src-tauri/src/session_manager/terminal/mod.rs:56-72 \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":"src-tauri/src/session_manager/terminal/mod.rs"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff723a7cef446bada94c34fc10a85ad2f47b3635b52e64b3b0bb6092f7f73f82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): src-tauri/src/services/subscription.rs:1289-1304 | src-tauri/src/services/subscription.rs:1349-1364 \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":"src-tauri/src/services/subscription.rs"},"region":{"startLine":1289}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff5a6bcb90789bb03c58d699e8943683814efc4e561d6d1071846e8009168028"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): src-tauri/src/cli/commands/env.rs:151-166 | src-tauri/src/cli/commands/env.rs:174-189 \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":"src-tauri/src/cli/commands/env.rs"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1ca3803faabbd97aa17b0e3e3f7fb5b030a7684088507a55abd8c1a7a4baa39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): src-tauri/src/mcp.rs:401-415 | src-tauri/src/mcp.rs:792-806 | src-tauri/src/mcp.rs:961-975 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/mcp.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b2437084e5f5fe76fddec5d1c79715e2a151f633987e7463e5e0b5f23069750"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/cli/commands/provider.rs:1059-1072 | src-tauri/src/cli/commands/provider.rs:2133-2146 \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":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":1059}}}],"partialFingerprints":{"codehealthFindingId/v1":"4879eb6317261e71cb63c1e94fcf35a4fcbc259b47b504dc09b1df89cf2c7ac3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/session_manager/providers/gemini.rs:70-83 | src-tauri/src/session_manager/providers/openclaw.rs:98-108 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/gemini.rs\u0060 and \u0060src-tauri/src/session_manager/providers/openclaw.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 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":"src-tauri/src/session_manager/providers/gemini.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bbd8b8c58b9a5722fb6670e8eb8b08f831769bc7890102f6f2d0d89f7acd910"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src-tauri/src/proxy/providers/transform_gemini.rs:590-603 | src-tauri/src/proxy/providers/transform_gemini.rs:613-626 \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":"src-tauri/src/proxy/providers/transform_gemini.rs"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"87f178d9f2f3ec66d104971e21d5dc2e5fa7599393ff7658b7e29e76052d280a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src-tauri/src/database/dao/proxy.rs:257-269 | src-tauri/src/database/dao/proxy.rs:309-321 \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":"src-tauri/src/database/dao/proxy.rs"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"54732f9d26b7aa36a6db108399ebde65db3af463640657060d611d89c0a5b4d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/daemon/migration.rs:491-503 | src-tauri/src/daemon/migration.rs:555-566 \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":"src-tauri/src/daemon/migration.rs"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae4da1576e45fdfa0934b0500975222268d965567e7fc3463ac1a322cbfc0b0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src-tauri/src/session_manager/providers/hermes.rs:180-192 | src-tauri/src/session_manager/providers/opencode.rs:210-222 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/hermes.rs\u0060 and \u0060src-tauri/src/session_manager/providers/opencode.rs\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 117 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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"16829f9ef323f6f6706fe1f32437eb470018bc40aa8a4cee05b6e46e9546d34e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): src-tauri/src/mcp.rs:609-621 | src-tauri/src/mcp.rs:942-953 | src-tauri/src/mcp.rs:1677-1688 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/mcp.rs"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a521e1cc758d3c2e5f3c75c0ca58a607f397c10ca56d4ed212f9534b6d6622b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/services/proxy.rs:3185-3196 | src-tauri/src/services/proxy.rs:3202-3213 \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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":3185}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4bba1942910ac0324052f2696e07761efbc44c1b62fb1d798a4d3e22c73344c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): src-tauri/src/session_manager/providers/gemini.rs:52-63 | src-tauri/src/session_manager/providers/openclaw.rs:80-91 | src-tauri/src/session_manager/providers/pi.rs:331-339 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/gemini.rs\u0060 and \u0060src-tauri/src/session_manager/providers/openclaw.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 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":"src-tauri/src/session_manager/providers/gemini.rs"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"bad5c33fda6576b37e6a3654e0e9cfa9ac0b847cb83bd38a25f5dfc1e6bdaa23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/commands/workspace.rs:64-75 | src-tauri/src/commands/workspace.rs:152-160 \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":"src-tauri/src/commands/workspace.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd8b62abf6f02ae17434d90dd529bc1f3e7bc24feaa460d0bae3d30abb53d20f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/session_manager/providers/gemini.rs:87-98 | src-tauri/src/session_manager/providers/openclaw.rs:112-122 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/gemini.rs\u0060 and \u0060src-tauri/src/session_manager/providers/openclaw.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 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":"src-tauri/src/session_manager/providers/gemini.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c211a049e9666bb4a05ad6b7fbbc4ebae101611392f463530c7b9631232002a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/mcp.rs:381-392 | src-tauri/src/mcp.rs:772-783 \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":"src-tauri/src/mcp.rs"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeee527203500513b9852c555fa05acfa488107418200ea9a4d523e672852846"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src-tauri/src/services/codex_oauth.rs:41-52 | src-tauri/src/services/copilot_auth.rs:40-51 \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":"src-tauri/src/services/codex_oauth.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"33a8854d089b5a62a7c51c8098a070fea13d074f39952c517b21d1743b2c1d27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/cli/commands/config_openclaw.rs:994-1004 | src-tauri/src/cli/commands/config_openclaw.rs:1036-1046 \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":"src-tauri/src/cli/commands/config_openclaw.rs"},"region":{"startLine":994}}}],"partialFingerprints":{"codehealthFindingId/v1":"15461b381097d8f5fcad7bb05e3451dbfe20fdf54ec6b074e6795eb9764b3535"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/database/dao/proxy.rs:196-206 | src-tauri/src/database/dao/proxy.rs:276-286 \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":"src-tauri/src/database/dao/proxy.rs"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec8205d7aa61af48d5218e77b674bfc616e90d567d93939f5fe9d0c5dc8d5172"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/services/session_usage.rs:580-590 | src-tauri/src/services/session_usage_codex.rs:1391-1401 \u2014 before extracting anything, compare \u0060src-tauri/src/services/session_usage.rs\u0060 and \u0060src-tauri/src/services/session_usage_codex.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 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":"src-tauri/src/services/session_usage.rs"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"e388b8c4d09a814bcce9561128662609c711d43d14568ada9a31d6385ccdbb67"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/proxy/providers/transform_codex_anthropic.rs:676-686 | src-tauri/src/proxy/providers/transform_codex_anthropic.rs:689-699 \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":"src-tauri/src/proxy/providers/transform_codex_anthropic.rs"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dc8437407169d2f3f2dd6a410d462c643bf38f07195bc7f094d05f7f9ec40a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/proxy/providers/transform_responses.rs:578-584 | src-tauri/src/proxy/providers/transform_responses.rs:598-608 \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":"src-tauri/src/proxy/providers/transform_responses.rs"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4792ee99da651e44cf4756b68adb0e613199d72ae861f3a5175a3459ece2a71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): src-tauri/src/session_manager/providers/gemini.rs:60-70 | src-tauri/src/session_manager/providers/openclaw.rs:88-98 | src-tauri/src/session_manager/providers/pi.rs:336-346 | src-tauri/src/session_manager/providers/pi.rs:367-377 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/gemini.rs\u0060 and \u0060src-tauri/src/session_manager/providers/openclaw.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 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":"src-tauri/src/session_manager/providers/gemini.rs"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"5524b696bcd1f41db7fa254b8b92326177b8ecdfd331db3a7309a27cb3ce9966"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/proxy/providers/streaming.rs:260-270 | src-tauri/src/proxy/providers/streaming.rs:312-322 \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":"src-tauri/src/proxy/providers/streaming.rs"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0cef45a6f1ec836d1749099534c044c2f5f2e9e994e5187e3b29939d89e0a26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src-tauri/src/proxy/providers/transform.rs:247-257 | src-tauri/src/proxy/providers/transform_codex_chat.rs:1486-1495 \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":"src-tauri/src/proxy/providers/transform.rs"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7b1e37e9f1dfeb6fb752d44faed0d580fe315dbda42dc3160f6f065698c77b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/cli/commands/mcp.rs:200-210 | src-tauri/src/cli/commands/provider.rs:1076-1086 \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":"src-tauri/src/cli/commands/mcp.rs"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd5bc7de7641212160b79968bf750827c5149fe0699bae6b7617616b08c76836"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src-tauri/src/hermes_config.rs:353-363 | src-tauri/src/openclaw_config.rs:368-378 \u2014 before extracting anything, compare \u0060src-tauri/src/hermes_config.rs\u0060 and \u0060src-tauri/src/openclaw_config.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 56 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":"src-tauri/src/hermes_config.rs"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"818d79fcb340a5a472279bc942b8dc9c9876a70150568fe1a927ba1b229294df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): src-tauri/src/services/s3.rs:283-292 | src-tauri/src/services/s3.rs:346-355 | src-tauri/src/services/s3.rs:399-408 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/s3.rs"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"375cb3bb90bff82781bef0df2c168a92d364d711616102c10f7c4072d110b61e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/commands/env.rs:37-46 | src-tauri/src/cli/commands/env.rs:328-335 \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":"src-tauri/src/cli/commands/env.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"a096cb7364a198a0d41b1d10aa9be06446f7df071b3308efe31a5ead9067dfb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/services/coding_plan.rs:100-107 | src-tauri/src/services/coding_plan.rs:516-525 \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":"src-tauri/src/services/coding_plan.rs"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"96726a8b7c1a8739fce543a67efc1c7ae668f08e78235e34946cc2f02bb9b814"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/services/webdav.rs:321-329 | src-tauri/src/services/webdav.rs:380-388 \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":"src-tauri/src/services/webdav.rs"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"3784067b83b3415fef445b1aea6580eb29f86e62d82b081e883996f7bb838b85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): src-tauri/src/session_manager/providers/claude.rs:250-258 | src-tauri/src/session_manager/providers/codex.rs:889-897 | src-tauri/src/session_manager/providers/openclaw.rs:544-552 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/claude.rs\u0060 and \u0060src-tauri/src/session_manager/providers/codex.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 113 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":"src-tauri/src/session_manager/providers/claude.rs"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"334547f99dd7d72e39ee49879704fdf9e78a7df31f7d242fc2d66106fbda0ecd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/services/provider/live.rs:200-208 | src-tauri/src/services/provider/live.rs:369-377 \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":"src-tauri/src/services/provider/live.rs"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"1afdbb6e0ee9967e0171d5e1d15cee1cc7b688bd7ecedb89a2a3624326f836f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/services/subscription.rs:643-651 | src-tauri/src/services/subscription.rs:708-716 \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":"src-tauri/src/services/subscription.rs"},"region":{"startLine":643}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e3f0744068dd776e4adc60725ca8a6e1b8815d67e931fc1286c1d2a4f0e73bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/proxy/providers/claude.rs:492-500 | src-tauri/src/proxy/providers/gemini.rs:153-161 \u2014 before extracting anything, compare \u0060src-tauri/src/proxy/providers/claude.rs\u0060 and \u0060src-tauri/src/proxy/providers/gemini.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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":"src-tauri/src/proxy/providers/claude.rs"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"af282b65e698ddc8c128a3b3d500812b263a4a94baef7546556553d7df004719"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/deeplink/provider.rs:597-605 | src-tauri/src/deeplink/provider.rs:643-651 \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":"src-tauri/src/deeplink/provider.rs"},"region":{"startLine":597}}}],"partialFingerprints":{"codehealthFindingId/v1":"06013d350ad62c0f1c4651d1505ecfaba716c62cc57abfa70c4f9f8301a4ccc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/session_manager/providers/gemini.rs:126-134 | src-tauri/src/session_manager/providers/opencode.rs:1585-1593 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/gemini.rs\u0060 and \u0060src-tauri/src/session_manager/providers/opencode.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 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":"src-tauri/src/session_manager/providers/gemini.rs"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"042d075507c7161eb2b63be44a75385ddd42a7e2fc74c1d516007c7e42b08dc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/hermes_config.rs:320-328 | src-tauri/src/openclaw_config.rs:335-343 \u2014 before extracting anything, compare \u0060src-tauri/src/hermes_config.rs\u0060 and \u0060src-tauri/src/openclaw_config.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 56 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":"src-tauri/src/hermes_config.rs"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"e75e8324a6372a94b20e59c513aaf4f3021795a483da5cff023c89ead2079a2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): src-tauri/src/openclaw_config.rs:830-838 | src-tauri/src/openclaw_config.rs:909-917 | src-tauri/src/openclaw_config.rs:946-954 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/openclaw_config.rs"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fae9cbb636f5f4f8e2252f5cec489d825ad27142838afe03a3c51fc3a0af703"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/services/usage_stats.rs:1842-1850 | src-tauri/src/services/usage_stats.rs:1869-1877 \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":"src-tauri/src/services/usage_stats.rs"},"region":{"startLine":1842}}}],"partialFingerprints":{"codehealthFindingId/v1":"e846d101bb702bf936e089700726702236706f9ff7c1451b9fa0c3617f7c363b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src-tauri/src/session_manager/transcript.rs:2797-2805 | src-tauri/src/session_manager/transcript.rs:2978-2986 \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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":2797}}}],"partialFingerprints":{"codehealthFindingId/v1":"65b291815c39f2a22e0edf7ec405538805c9e4d692020310f0e246bdec54c0e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/commands/provider_input.rs:4602-4609 | src-tauri/src/cli/commands/provider_input.rs:4679-4686 \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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":4602}}}],"partialFingerprints":{"codehealthFindingId/v1":"b945c78cec9abb7889a2d02b2fa1fc58c44c1ea57af2f2aa557696ffa4c839f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/mcp.rs:37-44 | src-tauri/src/mcp.rs:45-52 \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":"src-tauri/src/mcp.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"60e1f0527955e5b7b46778555415c2caca9319e3416287c856674c63dfd1fc0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/app_config.rs:746-753 | src-tauri/src/proxy/providers/gemini.rs:98-103 \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":"src-tauri/src/app_config.rs"},"region":{"startLine":746}}}],"partialFingerprints":{"codehealthFindingId/v1":"690b5144c931b3afa9187047dc050be4262f8d83879df6743728c04b2e0962ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/proxy/forwarder.rs:1432-1439 | src-tauri/src/proxy/forwarder.rs:1451-1458 \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":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":1432}}}],"partialFingerprints":{"codehealthFindingId/v1":"2674dbdb9cab73a0ffb80c9c51b3c0e068b17464959542a1b4bf14782052e58c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/openclaw_config.rs:697-704 | src-tauri/src/openclaw_config.rs:882-889 \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":"src-tauri/src/openclaw_config.rs"},"region":{"startLine":697}}}],"partialFingerprints":{"codehealthFindingId/v1":"eccb8d4efbcc1f6d8c4a047ce620b8c2321b70dfa3dd207b3349728fcb118c3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/cli/commands/provider_input.rs:2803-2810 | src-tauri/src/cli/commands/provider_input.rs:3382-3389 \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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":2803}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd680c24e4a0c5e3e1327662059b01b3aa1939c27e183bebdec1eef86c8745bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): src-tauri/src/proxy/providers/claude.rs:368-375 | src-tauri/src/proxy/providers/claude.rs:376-383 | src-tauri/src/proxy/providers/claude.rs:384-391 | src-tauri/src/proxy/providers/claude.rs:392-399 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/providers/claude.rs"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"878d7ed09f96829590e401bcd38b1a3916e559004ff2d3d2b7b6356be3f71abb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): src-tauri/src/cli/commands/config.rs:208-214 | src-tauri/src/cli/commands/config.rs:274-281 | src-tauri/src/cli/commands/config.rs:499-505 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/config.rs"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a0c99f014d570a8de5753420d03dfdaf55986cd64f4ef3c2d72dba247a1ba3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/codex_config.rs:3450-3457 | src-tauri/src/codex_config.rs:3460-3467 \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":"src-tauri/src/codex_config.rs"},"region":{"startLine":3450}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2c60303e46d11fb94d3954b4e1466b6709c92b001c29ef71579cec9d393d9f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/session_manager/terminal/mod.rs:146-153 | src-tauri/src/session_manager/terminal/mod.rs:162-169 \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":"src-tauri/src/session_manager/terminal/mod.rs"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d15c6ade2476620a448fbfd61b998bcccd63e18083c0c15b613baef6434c4f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/commands/prompts.rs:673-679 | src-tauri/src/cli/commands/prompts.rs:801-808 \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":"src-tauri/src/cli/commands/prompts.rs"},"region":{"startLine":673}}}],"partialFingerprints":{"codehealthFindingId/v1":"afbf9fcaf8007e45679d7680e6d3610b4192c130ffaebd35d11c711dc258be5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src-tauri/src/database/mod.rs:133-140 | src-tauri/src/database/mod.rs:152-159 \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":"src-tauri/src/database/mod.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd2ec4bc5c55dcb5b09f3dc963c50d03962d88b8b6c99eb9fff101f4d7c29333"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/cli/commands/prompts.rs:427-432 | src-tauri/src/cli/commands/prompts.rs:612-619 \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":"src-tauri/src/cli/commands/prompts.rs"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"adc9ea1724b75d53d775164412b3964dd832e4ac3507cebb07a686a26a424f20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/services/codex_oauth.rs:53-59 | src-tauri/src/services/copilot_auth.rs:52-58 \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":"src-tauri/src/services/codex_oauth.rs"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd4e96a66a2be1201cb2f0c08ea6d4672505c22536e8bf30b77ebd71c8e0e88b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/session_manager/providers/gemini.rs:196-202 | src-tauri/src/session_manager/providers/opencode.rs:1691-1697 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/gemini.rs\u0060 and \u0060src-tauri/src/session_manager/providers/opencode.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 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":"src-tauri/src/session_manager/providers/gemini.rs"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"3221a2fe51f63cdc116537ea9df429ebcc7f1d90aceb2db90130a79a3a36918f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/codex_history_migration.rs:1618-1624 | src-tauri/src/services/skill.rs:2094-2100 \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":"src-tauri/src/codex_history_migration.rs"},"region":{"startLine":1618}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb73eb68d9bee0fe72cd6deb710525ad4b6aebfc6ea1a61b8269c4cc745e8869"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/services/coding_plan.rs:427-433 | src-tauri/src/services/coding_plan.rs:446-452 \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":"src-tauri/src/services/coding_plan.rs"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1ad585d5b9295cbc978f74edc30e48fe0619139a2405170b13361bbd5c1f1a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/services/provider/mod.rs:2952-2958 | src-tauri/src/services/provider/mod.rs:4043-4049 \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":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":2952}}}],"partialFingerprints":{"codehealthFindingId/v1":"d63290d4664913507424e20810cf1e505c7acd97b49ea97cbb125a30a217ec73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/session_manager/transcript.rs:2789-2795 | src-tauri/src/session_manager/transcript.rs:2861-2867 \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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":2789}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd2bad1d853cef278677ceb3766d796a716070b980140dc557c50011e0cebdf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/tui/form/provider_json.rs:1248-1254 | src-tauri/src/cli/tui/form/provider_json.rs:1263-1269 \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":"src-tauri/src/cli/tui/form/provider_json.rs"},"region":{"startLine":1248}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddf45bed947fd1cb8fc8f307da5ba718ed52d8fd257801cc57a0cb0fa30981ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/proxy/cache_injector.rs:118-124 | src-tauri/src/proxy/cache_injector.rs:125-131 \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":"src-tauri/src/proxy/cache_injector.rs"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f700c740c20a1710ad043ca34ba9e2a4af3f8556c44f1ebf7c934d60744a619"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/tui/ui/overlay/pickers.rs:286-292 | src-tauri/src/cli/tui/ui/overlay/pickers.rs:304-310 \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":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d1622cfe706f614f303219a1a74aabe161b2823df6f03e23857c0ac06e62eb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/deeplink/provider.rs:344-350 | src-tauri/src/deeplink/provider.rs:422-428 \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":"src-tauri/src/deeplink/provider.rs"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"a98207683a399647ed2693c551f76fd755ded04f968ab3d275e5094b0b2ffb8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/session_manager/providers/hermes.rs:503-509 | src-tauri/src/session_manager/providers/opencode.rs:1035-1041 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/hermes.rs\u0060 and \u0060src-tauri/src/session_manager/providers/opencode.rs\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 117 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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d9765bc269a75c417088cd37e54057796ea12c1050f028eea7a86d63afbda31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/commands/provider_input.rs:3824-3830 | src-tauri/src/cli/commands/provider_input.rs:3841-3847 \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":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":3824}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddb575de0b8f64dce6e70f808a487782630a861ebfa957993abce3c7808daceb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): src-tauri/src/app_config.rs:745-751 | src-tauri/src/proxy/providers/gemini.rs:97-102 | src-tauri/src/proxy/usage/parser.rs:298-303 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/app_config.rs"},"region":{"startLine":745}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2c45e1006bee439a6690d964ff49f99dea3bb77effd0584170e11cc646cce34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/commands/update.rs:938-944 | src-tauri/src/cli/commands/update.rs:1064-1070 \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":"src-tauri/src/cli/commands/update.rs"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"17874fe363622194af2e2a34311527530d71312628edab8629ba943c8df4ad89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): src-tauri/src/deeplink/provider.rs:530-535 | src-tauri/src/deeplink/provider.rs:597-602 | src-tauri/src/deeplink/provider.rs:643-648 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/deeplink/provider.rs"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"010f10668f6a4fdf756f3d338687947eeebedabf3445ab398b9d60e622a6dba8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/session_manager/providers/hermes.rs:174-179 | src-tauri/src/session_manager/providers/opencode.rs:204-209 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/hermes.rs\u0060 and \u0060src-tauri/src/session_manager/providers/opencode.rs\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 117 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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a53a09483008100e1cdbc857087a4e5553f6ea498b2038763e142f8e721f1cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/session_manager/transcript.rs:1720-1725 | src-tauri/src/session_manager/transcript.rs:1767-1772 \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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":1720}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9427543ba6c67199caea598787a3f04f76f0bfc4b3914537a661ba2b6b1f719"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): src-tauri/src/config.rs:654-659 | src-tauri/src/database/mod.rs:133-138 | src-tauri/src/database/mod.rs:152-157 \u2014 before extracting anything, compare \u0060src-tauri/src/config.rs\u0060 and \u0060src-tauri/src/database/mod.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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":"src-tauri/src/config.rs"},"region":{"startLine":654}}}],"partialFingerprints":{"codehealthFindingId/v1":"41ac4e1c09a23f3dad9ca984d5fc7076cfa449d2e9a7573f5a6906b9ce55e542"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/proxy/copilot_optimizer.rs:431-435 | src-tauri/src/proxy/copilot_optimizer.rs:490-495 \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":"src-tauri/src/proxy/copilot_optimizer.rs"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f74e6095c73cdd054f035a70516d574923e34abb8acc3da9b6bb83b492b13fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/services/prompt.rs:537-542 | src-tauri/src/services/prompt.rs:579-584 \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":"src-tauri/src/services/prompt.rs"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"c65ddbb3822e526873220b9aa0c3fc8f1c38f2028f1ebcf08d4798d36cbde123"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/services/proxy.rs:4133-4138 | src-tauri/src/services/proxy.rs:4149-4154 \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":"src-tauri/src/services/proxy.rs"},"region":{"startLine":4133}}}],"partialFingerprints":{"codehealthFindingId/v1":"19094b73296eced386e79cb3fe4c9d7fc67c300126b2fd58aa39b4ceb3ec3f24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/proxy/providers/transform_gemini.rs:604-609 | src-tauri/src/proxy/providers/transform_gemini.rs:627-632 \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":"src-tauri/src/proxy/providers/transform_gemini.rs"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"794b47184669053780aeebeedc32a7583746e9c4619f42b4742b106e874f6c2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/services/session_usage.rs:664-668 | src-tauri/src/services/session_usage_codex.rs:1462-1466 \u2014 before extracting anything, compare \u0060src-tauri/src/services/session_usage.rs\u0060 and \u0060src-tauri/src/services/session_usage_codex.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 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":"src-tauri/src/services/session_usage.rs"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb8f30af21c87e4fc01839f2cd9f4f055237f4832b7c3ece66f29591ace8e777"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/database/mod.rs:805-809 | src-tauri/src/database/mod.rs:814-818 \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":"src-tauri/src/database/mod.rs"},"region":{"startLine":805}}}],"partialFingerprints":{"codehealthFindingId/v1":"47ad3abe8d89d4c139299f25a5a5921d4e026e5edbcf04115b2278349d2f82d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): src-tauri/src/cli/commands/provider_input.rs:4101-4105 | src-tauri/src/cli/commands/provider_input.rs:4388-4392 | src-tauri/src/cli/commands/provider_input.rs:4407-4411 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":4101}}}],"partialFingerprints":{"codehealthFindingId/v1":"157ec6bd4cb7782932a13eadd231aa3545e5d767ce0c8dd775cd4a5e7f65d5c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/deeplink/provider.rs:702-706 | src-tauri/src/deeplink/provider.rs:708-712 \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":"src-tauri/src/deeplink/provider.rs"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb94d97a659fc51e23fdee342442183b50bfe961804d5950ddeefb0f01185779"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/mcp.rs:830-834 | src-tauri/src/mcp.rs:843-847 \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":"src-tauri/src/mcp.rs"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"73191aa10aaaa43e10cc8637eb471b48b62509c359387805e6e6477a5058e5fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/session_manager/providers/hermes.rs:434-438 | src-tauri/src/session_manager/providers/opencode.rs:616-620 \u2014 before extracting anything, compare \u0060src-tauri/src/session_manager/providers/hermes.rs\u0060 and \u0060src-tauri/src/session_manager/providers/opencode.rs\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 117 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":"src-tauri/src/session_manager/providers/hermes.rs"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4bc7aa8dbd3ad1d3c366230de652e7e254256014d9073b5a826cdc028f4fe3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/services/skill.rs:1450-1454 | src-tauri/src/services/skill.rs:2744-2748 \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":"src-tauri/src/services/skill.rs"},"region":{"startLine":1450}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdbbd96c9ce9c721100256cd90866bb26206451fca8c2194ebefae587c5a6df6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/proxy/providers/streaming_codex_anthropic.rs:156-160 | src-tauri/src/proxy/providers/streaming_codex_chat.rs:120-124 \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":"src-tauri/src/proxy/providers/streaming_codex_anthropic.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f72dc17c7d6be68a5f7f799fda87c6cbbf374a227124ecb0177d847754ee423"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/claude_mcp.rs:66-72 | src-tauri/src/gemini_mcp.rs:25-31 \u2014 before extracting anything, compare \u0060src-tauri/src/claude_mcp.rs\u0060 and \u0060src-tauri/src/gemini_mcp.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 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":"src-tauri/src/claude_mcp.rs"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b6ed88535028383c89f722318fa0ba2c01bd53c3335889232545800704dee9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): src-tauri/src/cli/commands/start.rs:409-413 | src-tauri/src/cli/tui/runtime_actions/claude_temp_launch.rs:93-97 | src-tauri/src/cli/tui/runtime_actions/codex_temp_launch.rs:94-98 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/start.rs"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"91cb363e70a1fe9fe3993aeaa53dcbb51ddce919b283b7166a113db7ca4bed4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src-tauri/src/cli/tui/ui/config.rs:1549-1555 | src-tauri/src/cli/tui/ui/config.rs:2549-2555 \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":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":1549}}}],"partialFingerprints":{"codehealthFindingId/v1":"96980d427aa6ad9c1edd719a4746ffe09dcbd9e72ff8d90010942ebf345b937e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/cli/tui/ui/pricing.rs:234-238 | src-tauri/src/cli/tui/ui/usage.rs:1372-1376 \u2014 before extracting anything, compare \u0060src-tauri/src/cli/tui/ui/pricing.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/usage.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 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":"src-tauri/src/cli/tui/ui/pricing.rs"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"984bf699c003488950df16ae94e95db4a0f644a8e87bc4128ab980e1e4788458"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/cli/tui/ui/usage.rs:1009-1013 | src-tauri/src/cli/tui/ui/usage.rs:1051-1055 \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":"src-tauri/src/cli/tui/ui/usage.rs"},"region":{"startLine":1009}}}],"partialFingerprints":{"codehealthFindingId/v1":"d576aea447f54f7c695e856e24f0fb167ea9e788f86abbf13a6f42e9bc99a0cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src-tauri/src/services/skill.rs:1112-1116 | src-tauri/src/services/skill.rs:2312-2316 \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":"src-tauri/src/services/skill.rs"},"region":{"startLine":1112}}}],"partialFingerprints":{"codehealthFindingId/v1":"d090caac496b2106c9af008142c8e971556222b0bf618e24b467eba0b626f601"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src-tauri/src/session_manager/transcript.rs:990-995 | src-tauri/src/session_manager/transcript.rs:1090-1095 \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":"src-tauri/src/session_manager/transcript.rs"},"region":{"startLine":990}}}],"partialFingerprints":{"codehealthFindingId/v1":"12913d65c9fbc5d980ee6086d5f2118681cc4855d710dc73eba091a436f5d665"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201329 lines \u00D7 2): scripts/benchmark_cc_switch.py:780-786 | scripts/benchmark_cc_switch.py:811-839 \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 \u0060scripts/benchmark_cc_switch.py:780\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 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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":780}}}],"partialFingerprints":{"codehealthFindingId/v1":"4123f461785e4ae94bb7340ca6b3dff539bb2ce14b80548318ca987d2bd7b610"}},{"ruleId":"D13","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":"129f616239a8dc3c32a0f343412ac2c53d7f1188caee04b181a0f764b3ad26b2"},"taxa":[{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/mod.rs: src-tauri/src/cli/tui/mod.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 110 in cc_switch::cli::tui::run at line 3051. 6 of those changes were fix/bug commits, and the other 10 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/mod.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/mod.rs"},"region":{"startLine":3051}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b11e8934caabe5a87d346ab890708c7e4ddd6acb1101b5569c8b8e47a8a1989"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/runtime_actions/mod.rs: src-tauri/src/cli/tui/runtime_actions/mod.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 164 in cc_switch::cli::tui::runtime_actions::handle_action at line 514. 2 of those changes were fix/bug commits, and the other 8 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/runtime_actions/mod.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/runtime_actions/mod.rs"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdb5b83076ae1c42e5f136bed7d290acdb768fc0734fe01217ff220295486a4b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/ui/forms/provider.rs: src-tauri/src/cli/tui/ui/forms/provider.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 120 in cc_switch::cli::tui::ui::forms::provider::provider_field_label_and_value at line 1916. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/ui/forms/provider.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":1916}}}],"partialFingerprints":{"codehealthFindingId/v1":"d211d02572919ce2bf6f64c47242d84f85ee1e7b1fdd23023c3daf5e739227af"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/help.rs: src-tauri/src/cli/tui/help.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in cc_switch::cli::tui::help::current_help_target at line 104. 10 of those changes were fix/bug commits, and the other 11 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/help.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/help.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"90a4c2439061c82bffc027f3001021df87174b11419b213577a85329db37e7a6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/app/form_handlers/provider.rs: src-tauri/src/cli/tui/app/form_handlers/provider.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 94 in App::handle_provider_field_activate at line 368. 7 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/app/form_handlers/provider.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/form_handlers/provider.rs"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"6795e03b855bdf6797be93e5ff2beeda1baa46751080fb6bb53ad310b370d67f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/runtime_systems/handlers.rs: src-tauri/src/cli/tui/runtime_systems/handlers.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 87 in cc_switch::cli::tui::runtime_systems::handlers::handle_session_msg at line 425. 3 of those changes were fix/bug commits, and the other 7 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/runtime_systems/handlers.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9cf4d619e96403af158a178586930c66b1ac9254bd814e45fe152ffa3c78bf0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/form/provider_json.rs: src-tauri/src/cli/tui/form/provider_json.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in ProviderAddFormState::to_provider_json_value at line 281. 5 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/form/provider_json.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/form/provider_json.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"e43048669d041c45f0b171c0be42ddba7e42f59078abd1e477d1e66759ce786d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/commands/provider_input.rs: src-tauri/src/cli/commands/provider_input.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in cc_switch::cli::commands::provider_input::display_provider_summary at line 4509. 4 of those changes were fix/bug commits, and the other 11 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/commands/provider_input.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":4509}}}],"partialFingerprints":{"codehealthFindingId/v1":"64798c4b4d12afced4dc45039d4abef9df0c22874a427b726f8323c4709b5241"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/services/skill.rs: src-tauri/src/services/skill.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in SkillService::migrate_storage at line 2025. 5 of those changes were fix/bug commits, and the other 6 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/services/skill.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/skill.rs"},"region":{"startLine":2025}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0466e59f1bf331f530c30ee7e961202be205fd92d6efd888d2595e02fe97651"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/app/overlay_handlers/dialogs.rs: src-tauri/src/cli/tui/app/overlay_handlers/dialogs.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in App::handle_confirm_overlay_key at line 75. 2 of those changes were fix/bug commits, and the other 5 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/app/overlay_handlers/dialogs.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/overlay_handlers/dialogs.rs"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae014f754b5897e42c7664cb4116f7e6e76d3ae436e3143b370b3dfd469d67e4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/form/provider_templates.rs: src-tauri/src/cli/tui/form/provider_templates.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in ProviderAddFormState::apply_sponsor_preset at line 739. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/form/provider_templates.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/form/provider_templates.rs"},"region":{"startLine":739}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bbb189ef742b486fd3b81cc4f860d66fb2187182f89d4549ca36ba93b3455d5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/services/provider/mod.rs: src-tauri/src/services/provider/mod.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in ProviderService::refresh_provider_snapshot at line 1358. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/services/provider/mod.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/provider/mod.rs"},"region":{"startLine":1358}}}],"partialFingerprints":{"codehealthFindingId/v1":"7099ee645da37709510fd670166a9233e16078362cadbeb58c00cafc1f528518"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/form/provider_state.rs: src-tauri/src/cli/tui/form/provider_state.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in ProviderAddFormState::input at line 723. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/form/provider_state.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/form/provider_state.rs"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"22f71a054260882da88a32f1fa963bba29f9d80a2861e390f9481e921d847a74"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/ui/overlay/render.rs: src-tauri/src/cli/tui/ui/overlay/render.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in cc_switch::cli::tui::ui::overlay::render::render_overlay at line 4. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/ui/overlay/render.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/overlay/render.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aed76e76c49a209fd4626edb5d8c7b97a88948bdab40d1e3c967e4e2e734f57"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/app/content_config.rs: src-tauri/src/cli/tui/app/content_config.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in App::on_settings_key at line 840. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/app/content_config.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/content_config.rs"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"caceae3f20a73f4cce62f61df812af8596be3bcfea2dd7a5e9235d86e123da7a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/app/menu.rs: src-tauri/src/cli/tui/app/menu.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in App::on_content_key at line 1105. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/app/menu.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/menu.rs"},"region":{"startLine":1105}}}],"partialFingerprints":{"codehealthFindingId/v1":"19a80fc502d0b99c7ea4dd601974b44b1ea039836bb91a26154d07983c42b08f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/database/schema.rs: src-tauri/src/database/schema.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in Database::apply_schema_migrations_on_conn at line 431. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/database/schema.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/database/schema.rs"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"f468953ea0f2ed4dc378d5f6be81426f752e294d899470ce0f85af9725489018"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs: src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in App::handle_claude_model_picker_select_key at line 982. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/overlay_handlers/pickers.rs"},"region":{"startLine":982}}}],"partialFingerprints":{"codehealthFindingId/v1":"688df10d10f5af0dca35e9b310d7436e40d9052b4711c95b8e25dde3c60abc8f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/runtime_systems/workers.rs: src-tauri/src/cli/tui/runtime_systems/workers.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in cc_switch::cli::tui::runtime_systems::workers::run_session_scan at line 1956. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/runtime_systems/workers.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/runtime_systems/workers.rs"},"region":{"startLine":1956}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e303ff30e5015c8d012b21825ec5af1551e2161734c0f3f803253811bd72733"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/commands/provider_inspect.rs: src-tauri/src/cli/commands/provider_inspect.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in cc_switch::cli::commands::provider_inspect::quota_provider at line 428. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/commands/provider_inspect.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/provider_inspect.rs"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"0583e36afaac4b6f2f7e396b60d8e3b3420c0e6fd24713e386001e87a7b8f5a4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/ui.rs: src-tauri/src/cli/tui/ui.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in cc_switch::cli::tui::ui::render_content at line 137. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/ui.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"6257696a4e52bc8fa988cc9e1c5aadfcb0e1e24cf0ea9294d3daac4fe14ec6fe"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/runtime_systems/types.rs: src-tauri/src/cli/tui/runtime_systems/types.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in cc_switch::cli::tui::runtime_systems::types::fetch_provider_models_for_tui at line 967. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/runtime_systems/types.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/runtime_systems/types.rs"},"region":{"startLine":967}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcc990afc6f08a76b30a31fa10b3f0f9567a8166dd480cdf47f9c2dd64c76628"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/proxy/forwarder/request_builder.rs: src-tauri/src/proxy/forwarder/request_builder.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in cc_switch::proxy::forwarder::request_builder::build_request at line 516. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/proxy/forwarder/request_builder.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/forwarder/request_builder.rs"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e60f3643b08418fb9854d31a1a3943341198c62c38d07b353fd6baa17f4b73a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/database/mod.rs: src-tauri/src/database/mod.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in Database::init_impl_inner at line 508. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/database/mod.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/database/mod.rs"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdd5780e4f03d3b1c0a5d27acbcbea44ff4d0a728f53c2b891e80d400ed9c27c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/form/provider_state_loading.rs: src-tauri/src/cli/tui/form/provider_state_loading.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in cc_switch::cli::tui::form::provider_state_loading::populate_usage_query_form at line 68. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/form/provider_state_loading.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/form/provider_state_loading.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"27121bcff72f21c11ac432abc5a010073016f0375f607a62253e888363291c70"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/ui/config.rs: src-tauri/src/cli/tui/ui/config.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in cc_switch::cli::tui::ui::config::render_settings at line 3426. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/ui/config.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/config.rs"},"region":{"startLine":3426}}}],"partialFingerprints":{"codehealthFindingId/v1":"174291ff531068896fccdc43bfddc8a85c140ff0709df183d1ae99e52c0971ad"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/services/proxy.rs: src-tauri/src/services/proxy.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ProxyService::enable_takeover_for_app_unlocked_with_options at line 2719. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/services/proxy.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/proxy.rs"},"region":{"startLine":2719}}}],"partialFingerprints":{"codehealthFindingId/v1":"494a25cc2bbf27f75c4290164aaee125524aed0c37f10728c9bfb1236f2ce2d2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/database/backup.rs: src-tauri/src/database/backup.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in Database::dump_sql at line 1221. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/database/backup.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/database/backup.rs"},"region":{"startLine":1221}}}],"partialFingerprints":{"codehealthFindingId/v1":"452f5dbce72ea4df3b26b4bf88c2e659ab5654a26a87052d8c7f2cb7244fff93"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/commands/provider.rs: src-tauri/src/cli/commands/provider.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in cc_switch::cli::commands::provider::execute at line 846. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/commands/provider.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":846}}}],"partialFingerprints":{"codehealthFindingId/v1":"56ef0d185539611ee0deda5e276c10f6dccb7472fed8b7dbca294e5f37d7a367"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/ui/sessions.rs: src-tauri/src/cli/tui/ui/sessions.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in cc_switch::cli::tui::ui::sessions::render_session_list at line 121. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/ui/sessions.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/sessions.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5a1f237b23c6560b9670df14c3f6a02afed92d95f71e99e5c066e014e78835b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/proxy/providers/transform_codex_chat.rs: src-tauri/src/proxy/providers/transform_codex_chat.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in cc_switch::proxy::providers::transform_codex_chat::append_responses_item_as_chat_message at line 652. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/proxy/providers/transform_codex_chat.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/providers/transform_codex_chat.rs"},"region":{"startLine":652}}}],"partialFingerprints":{"codehealthFindingId/v1":"72d44e2a8dc454dddee01e79f58024936d381bc27959a039de9cfd9b56a36275"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/proxy/forwarder.rs: src-tauri/src/proxy/forwarder.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in RequestForwarder::send_buffered_request at line 903. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/proxy/forwarder.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":903}}}],"partialFingerprints":{"codehealthFindingId/v1":"24a222e7130129e72be08655f8f7130a13e8fe8651773268305a4865e85d057d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/proxy/handlers.rs: src-tauri/src/proxy/handlers.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in cc_switch::proxy::handlers::handle_passthrough_request at line 560. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/proxy/handlers.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/handlers.rs"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"b57787f9dee7a2daf65eaa4ee6229f159f1c4ad883a0b402b71da604f035a139"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/commands/skills.rs: src-tauri/src/cli/commands/skills.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in cc_switch::cli::commands::skills::execute at line 151. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/commands/skills.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/skills.rs"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e3d18edb9a5d16846d080353582b0cf2c1d021fa9e7478210b6b23aeaf8eebf"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/ui/main_page.rs: src-tauri/src/cli/tui/ui/main_page.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in cc_switch::cli::tui::ui::main_page::render_main at line 47. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/ui/main_page.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/main_page.rs"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc8d2c2f4fa63719974fdfeb4babee541439809084c65d874b4482a6c5b6bea0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/app/content_skills.rs: src-tauri/src/cli/tui/app/content_skills.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in App::on_skills_installed_key at line 20. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/app/content_skills.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/content_skills.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba62e936237b6b133122bd3752440c72f191c687c052ec055da58133d66f808d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/app/form_handlers/mcp.rs: src-tauri/src/cli/tui/app/form_handlers/mcp.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in App::handle_mcp_field_navigation at line 156. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/app/form_handlers/mcp.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/form_handlers/mcp.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"69bf1d674f08ffc4af613cbbc6f8c4e144135d90ade15406ff7574c29fe448d1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src-tauri/src/cli/tui/ui/forms/mcp.rs: src-tauri/src/cli/tui/ui/forms/mcp.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in cc_switch::cli::tui::ui::forms::mcp::mcp_preview_value at line 128. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/ui/forms/mcp.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"385a68f1151bd2bc8fbc85d56d636235c650a38021f49f93991bb78ccb5cf228"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: src-tauri/src/codex_config.rs: src-tauri/src/codex_config.rs changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 14 (its worst body is cc_switch::codex_config::codex_auth_resolved_mode at line 3494), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(codex): preserve provider authentication in forms\u201D; \u201Cfix(codex): align provider switching and auth with upstream (#486)\u201D; \u201Cfix(codex): respect user-owned model_catalog_json when generating catalog (#454)\u201D; \u201Cfix(codex): align official login preservation with upstream\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/codex_config.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/codex_config.rs"},"region":{"startLine":3494}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b86b11fb45a62ae6d755372773bd428fe48f5bff7cb2bc627cc4ab42323adbc"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: src-tauri/src/cli/provider_quota.rs: src-tauri/src/cli/provider_quota.rs changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 7 (its worst body is cc_switch::cli::provider_quota::usage_value_summary at line 202), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(tui): align managed OAuth quota controls with upstream\u201D; \u201Cfix(tui): clarify managed Codex OAuth quota refresh controls\u201D; \u201Cfix(database): align schema and migrations with upstream v20 (#484)\u201D; \u201Cfix(usage): align official subscription queries\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/provider_quota.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/provider_quota.rs"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b59ab13eb89620b4f882d7f90132e8725aeb960cc0408eb0ab1b512ff98ae6a"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: src-tauri/src/services/sync_protocol.rs: src-tauri/src/services/sync_protocol.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 6 (its worst body is cc_switch::services::sync_protocol::validate_manifest_compat at line 212), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(database): align schema migrations through upstream v22 (#528)\u201D; \u201Cfix(database): align schema and migrations with upstream v20 (#484)\u201D; \u201Cfix(config): avoid nested executor during SQL import\u201D; \u201Cfix(skills): coordinate state mutations\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/services/sync_protocol.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/sync_protocol.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaaca1833c350fe2dee0b81649be79e3c8748efaa5d389935a84615c1ae25533"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: src-tauri/src/cli/tui/ui/forms/shared.rs: src-tauri/src/cli/tui/ui/forms/shared.rs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 13 (its worst body is cc_switch::cli::tui::ui::forms::shared::add_form_key_items at line 14), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(claude): align configuration editing with upstream (#536)\u201D; \u201Cfix(tui): add independent 1M toggle for Claude default model (#519)\u201D; \u201Cfix(tui): replace provider template chip row with a template field and grouped picker (#428)\u201D; \u201Cfix(tui): persist provider common config changes\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/tui/ui/forms/shared.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/forms/shared.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aa1089a50a71c1e2f8e13f2c89d45dc01961d34cbc2ac5cf05270cdbf2e6544"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: src-tauri/src/cli/commands/auth.rs: src-tauri/src/cli/commands/auth.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 8 (its worst body is cc_switch::cli::commands::auth::reset_quota at line 372), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(codex-oauth): isolate shared workspace accounts (#509)\u201D; \u201Cfix: pin quota reset targets and distinguish inspection failures (#477)\u201D; \u201Cfix(database): align schema and migrations with upstream v20 (#484)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/commands/auth.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/auth.rs"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"97be76e2138c83b24965708c438f38ab821da0edcca1b1552b6f695c2ea7f248"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: src-tauri/src/services/provider/codex.rs: src-tauri/src/services/provider/codex.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 13 (its worst body is ProviderService::extract_codex_common_config_from_config_toml at line 118), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(codex): align provider switching and auth with upstream (#486)\u201D; \u201Cfix(provider): preserve Codex model mappings on switch\u201D; \u201Cfix(codex): refresh auth during forced provider sync\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/services/provider/codex.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/provider/codex.rs"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd03267a8ae821156d16c91da1f74e111385bb6ab05841d4f6be7e0d68ad0ad1"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: src-tauri/src/proxy/providers/codex.rs: src-tauri/src/proxy/providers/codex.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 13 (its worst body is cc_switch::proxy::providers::codex::infer_codex_chat_reasoning_config at line 317), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(codex): infer OpenCode Zen reasoning settings\u201D; \u201Cfix: align credential display across config views\u201D; \u201Cfix(codex): resolve active provider base URL\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/proxy/providers/codex.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/providers/codex.rs"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6b84e39b18c1b571d39aa4fa433576808ba3fb9916bfd5f3ffdf2855ed616f5"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: src-tauri/src/cli/commands/provider_usage_query.rs: src-tauri/src/cli/commands/provider_usage_query.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 9 (its worst body is cc_switch::cli::commands::provider_usage_query::set at line 230), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: align credential display across config views\u201D; \u201Cfix(usage): align official subscription queries\u201D; \u201Cfix(codex): resolve active provider base URL\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-27 22:25:41 \u002B08:00\u0027 --until=\u00272026-10-25 22:25:41 \u002B08:00\u0027 --full-history --no-merges -- src-tauri/src/cli/commands/provider_usage_query.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/provider_usage_query.rs"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"990f7ca9765b38c7bd42c86c0aee7f86e67177c2828a69e80d3ac2280b0336f3"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 133 significant file(s) lose their only recent owner: src-tauri/src/cli/tui/app/tests.rs, src-tauri/src/cli/tui/ui/tests.rs, src-tauri/src/cli/i18n.rs, src-tauri/src/cli/tui/form/tests.rs, src-tauri/src/cli/tui/data.rs, src-tauri/src/cli/tui/runtime_systems/workers.rs, src-tauri/src/proxy/providers/transform_codex_chat.rs, src-tauri/src/services/session_usage_codex.rs (\u002B125 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"48a8e365b58260c97c56b29623591cdeb70506fc438968503d09c3713b3acc67"}},{"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."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d2bea044ff79d7d275f5a91a6e2f548586178eaf480274c33960ad020c854631"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is \u0060src-tauri\u0060 (350335 LoC, 819 module-visible types across 43 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":"28301c1f6fa5b0d59ebaa7c3f9cefe635d3c678c2aa72f16adabf4b103908b56"},"properties":{"commitSha":"f99b614888dd94a4d6726accce5869efdcc3bb67"}},{"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":"20a9ef47963ac3b1efcf1f948720c79ef7c66852a0e48a031d10fc4e48578012"},"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":"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":"0321a2aacf90eb888194ca6a2ded11a05ff40dba6301417e5c694cb964beaf63"},"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":"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":"dfa1bc044dcedd901201c0e1a21cfe0d7401afcdc61751e0dca3ae02ea08275f"},"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":"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":"49ecb9b867eadf2871007ef042e5f324a8236376f2e462962b3107b58d1f465d"},"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":"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":"02790cdfe30601122cb4e4f383775431931f3c5d3f3f43d569c38db9fa4e792d"},"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":"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":"ec400802252cf277af654e5f32a37baf458c878d480627a8d5d8b0ece5af494f"},"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":"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":"ab9f102f3ca3e64eed77e9ba5c480a8cf0d1abff3d96511adb5391c9c8549fc3"},"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":"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":"a37ac2c032e07f026b856ba20d13556d0ae99eecd68f8e8746d698c94cacf3f7"},"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":"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":"634c003445adc8685e9f2f293d9ab40f132187cb77f09c25dfc4e6d9bf24d1c8"},"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":"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":"5be03ab325ce0dd57044d4e411f1428508ecf7870bea56774afff406be2e7ce3"},"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":"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":"dcd1e2dcb2fd739db1a6722eff1fbc3a2f9a75dde34e7ca8982dde7b0003fe11"},"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":"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":"24b517431b3e919e9b5a5d58c41a27d01de9d35e82a6358b67430bedc30b9569"},"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":"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":"6819b36024d45f5f0e1d43e74427f1e72c7d8dae5d09101e0f966a51bf6829ab"},"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":"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":"75369c09bb288495c1ec96550eb2aa9585bb73f2d0abcdd876376a94900b52cc"},"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":"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":"e6b04ceabd48b850b4e88aa2e1d9437334d08e2b59fbb9597a5d1c093db92f18"},"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":"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":"b9b269771de87508f93bcb7c5cbe1611e1659661ed32a64ae654ecfae8b161cc"},"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":"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":"ae59d5e9dd2c30e110a21be3f2f3e4339df91ffb4154cfcf5f17bedb858ec684"},"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":"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":"1de4e8df69f8ea88743a72dc79ebdff0df14ccb12667fe14ae5c33266501ddc5"},"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":"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":"5a0307a0e95589e470722eaa1f6edefde899ff9d045423b92eaede73ef396b02"},"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":"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":"64478662fa5e1544368a8d37a73d78bfc90ea789fe52460bc2794d70b8e273b3"},"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":"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":"3643ff687baaf09e4fa86f24721b381bb8ec583e4fb1bc9174a893ca376bdfb1"},"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":"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":"59bdb5a1e8e9e2536fc49c741fcb4259a61a8678fc811d3adeb596662203897f"},"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":"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":"957b150e90b8de065e3fab913d6db8aa84cc38085b4826b482eaabde0c4cf347"},"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":"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":"865c1256b0af6cac7fabd52ec1703a6840a81e82c2cc09619e5e78e47af02756"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"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":"6a640690ecc804b2580a5ad00d82bd2c8cb77565bac8225ff28a399258b20c0b"},"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":"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":"738ea069bc72d631cb451ad622c2d999dbfa10fd4d4ffade45a83c09127c5619"},"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":"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":"b758aefbd0c209c54867a1b142710162cc9b11956363006ffb36126a9a213ada"},"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":"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":"b1e2ec1ea17052432d4381445c06e97e2770d723eed83a3fdde05592b24cfcd2"},"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":"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":"ba5e766ee87e0ace085b4015615bc5bdfabc9a1b2026fe3085efaa5e60556ff9"},"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":"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":"666773e89671b71961c2202455bcfd784f52b7ed7b9273ca162eeb55fd6c1418"},"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":"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":"2e657e58017c2856fc791dbdb9e196cdf1628b21edd4622d97ddf227e2885181"},"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":"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":"b5867d5d5a1c7ff920458833d9a76c004b7d66c68365aa3102698a18f50d4756"},"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":"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":"36b1def9115b70d62b202b84d06c1bedbc999575588c390667809d422c0595fa"},"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":"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":"84b7bb1ae97607c519a4ae46c22034302874b0fc30e7f2d51dd1c23ab1e62bf0"},"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":"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":"8f8f6475c71e057e6aeb25477548b39bf674371f3500982722e65818cc7243b4"},"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":"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":"ef9c3d91c8335ee2de4f9739aaecb526df19c8d8d260b21e70c3f27620e4256f"},"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":"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":"9ec6e09ea8256988f4ada27670ac9fd6a571f478d818a0f9d2e1759084684f3b"},"taxa":[{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"424e8d7a8cdc87e7ec86636148b1b14a9480be502e3eedbc4a0b623eff34457b"},"taxa":[{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"aee2a96ab0f8cf9c8c749976e0987526e5f68918b60c92aa2f823bf9fb6415d6"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"abd69a55c368213d60ebbfd11e3420b85f8a4fa5ac8df856c9f81419bea8e836"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"3bc72d21844de42180a1c35d125dfb05a34943ce27d99b360c855b692cba3c43"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"d1c7d917b0c4cb476fd7b606e5ba8a6e99b32bc0bdf666de38fdef27b4065bd0"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"9aafcd3573c03572d9691877bb9ef3b8fe5797d9ba6a9208c4c4a9a82724265c"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"5f218b7fece9ed3c425111d817dcb83ff06e054890116aeb3d7570ec7d46ea02"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"b1e20b4c1e918c4101fc15188433404a868d1ab7a2878742d874ddc35f5866d6"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"a732e84895aabe03fa18568fc516335ddcefca0ac148dea8716b484d7d8a536c"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"9320f892077adb1a59aa8cd4f0d3e4487ff065eabdbb413df94692996d65b2c1"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","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":"63778fa624412affc09bbae17ed4e235deee47c1e8fbbd49594e08c2f223c987"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-552","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","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":"da720f948a30948ca2c5beb3980465633e6d54d6bccda646905692e9b380ee28"},"taxa":[{"id":"CWE-570","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-571","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","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":"089bb1f1247b4d16abbed6df2c55e88d62b66d102405fe69fd48d3fc47dc9cc1"},"taxa":[{"id":"CWE-570","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-571","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D30","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":"be1612ee109837b66e079ef50184ddc22217fd876a928f721a7f0d59dfb8ad28"},"properties":{"dependency":{"package":"quinn-proto","version":"0.11.13","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","RUSTSEC-2026-0037","RUSTSEC-2026-0185","RUSTSEC-2026-0338","RUSTSEC-2026-0339","RUSTSEC-2026-0340","RUSTSEC-2026-0342"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","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":"2482c67acaa16e8d2ececd30a6b398ac640494fd6727529010870d9140cf8d59"},"properties":{"dependency":{"package":"rustls-webpki","version":"0.103.7","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","GO-2026-6809","RUSTSEC-2026-0049","RUSTSEC-2026-0098","RUSTSEC-2026-0099","RUSTSEC-2026-0104","RUSTSEC-2026-0381","RUSTSEC-2026-0382","RUSTSEC-2026-0383"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"fcfae627f5ab02c709f8be2fec58d2ef8c6d0ecc80269a739245441826f2bc62"},"properties":{"dependency":{"package":"bytes","version":"1.10.1","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","RUSTSEC-2026-0007"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"0f4b8ccc681b1672672b8e72c23110d23706ff07c8717fcdac81bbd4a41c8c9e"},"properties":{"dependency":{"package":"time","version":"0.3.44","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","RUSTSEC-2026-0009"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"c4ab56c0e623562177bf3fc98f3ad3cc9b6b578418b2fadc757c1412a19ab72f"},"properties":{"dependency":{"package":"webpki-roots","version":"1.0.2","advisory":"RUSTSEC-2026-0381","aliases":["[CVE redacted]","GO-2026-6809","RUSTSEC-2026-0382","RUSTSEC-2026-0383"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"2fc116b222ae23c8dbd16889d7c1035e67c607244d6fb5326e217bd4e3004cd9"},"properties":{"dependency":{"package":"unsafe-libyaml","version":"0.2.11","advisory":"RUSTSEC-2024-0449","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"56f19fbdeb5e71a9d53f267b1023bd2cdd2a76289a3284b68574a878dead3856"},"properties":{"dependency":{"package":"number_prefix","version":"0.4.0","advisory":"RUSTSEC-2025-0119","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"514a71d81e0c99a2a24285fc9002725f3d708f36071ef8108797e9b5b4b91639"},"properties":{"dependency":{"package":"rand","version":"0.8.5","advisory":"RUSTSEC-2026-0097","aliases":["[GHSA redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"312cb234928c2b624a6ee8f2e83e56cfef99002204ffa0b47b3b397203349602"},"properties":{"dependency":{"package":"rand","version":"0.9.2","advisory":"RUSTSEC-2026-0097","aliases":["[GHSA redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"aa92114692fa14a8856610f437bb4e3185c169f30a6c12b83b2e7887a75fed16"},"properties":{"dependency":{"package":"anyhow","version":"1.0.100","advisory":"RUSTSEC-2026-0190","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"d58c90b4dcd1d2f53d1b60714a03af5bb596c7bda6c893a57b08f0bd2d325e8e"},"properties":{"dependency":{"package":"scc","version":"2.4.0","advisory":"RUSTSEC-2026-0205","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"1d007e73231db72420af79063b73d31f2bb00597d4ed7b327f7ba64f9c2eac50"},"properties":{"dependency":{"package":"lru","version":"0.16.3","advisory":"RUSTSEC-2026-0253","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"46a9a2b1fca1f48d4cb1ae80513408cd7eb1e83ad54d0c7c248276e619e88bcd"},"properties":{"dependency":{"package":"tokio","version":"1.47.1","advisory":"RUSTSEC-2026-0386","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"aa73c54e765b45a3f2128655416d01dde8df96daa810aa0feb8ded533be262d2"},"properties":{"dependency":{"package":"zstd-safe","version":"7.2.4","advisory":"RUSTSEC-2026-0395","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"d5873d0ce6dbeeee40bbcea4a80d4eb6bbe9c6cb3879f42905c4c8c03532b5e5"},"properties":{"dependency":{"package":"zstd-safe","version":"7.2.4","advisory":"RUSTSEC-2026-0396","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"6fd61d1e9f2a29998293f475d33704bcade398d414b026902bf20269dd63400c"},"properties":{"dependency":{"package":"zstd-safe","version":"7.2.4","advisory":"RUSTSEC-2026-0397","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"7a6e08ec5ff49b4687a1558fd23a5be44ccd90eb5d7b2ebe42377ce00167eedf"},"properties":{"dependency":{"package":"zstd-safe","version":"7.2.4","advisory":"RUSTSEC-2026-0399","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"74ef70636f15d7ea80f9e754c33a1353b14975487522bc0839096e3c7d7f479b"},"properties":{"dependency":{"package":"zstd-safe","version":"7.2.4","advisory":"RUSTSEC-2026-0400","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"2e2ae2417fcfe301a84cefa5d8f8ebef81daed9ee197711396febf99a2092c51"},"properties":{"dependency":{"package":"zstd-safe","version":"7.2.4","advisory":"RUSTSEC-2026-0401","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"c56f64ce9ffa1320e106eff9b87a871351394dd632bee98d875dc357f52b3d80"},"properties":{"dependency":{"package":"zstd-safe","version":"7.2.4","advisory":"RUSTSEC-2026-0402","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"b15b5c0a64ed29abe153c097b6571bd65341d6e488578417af0e4024f9a1a4e7"},"properties":{"dependency":{"package":"zstd-safe","version":"7.2.4","advisory":"RUSTSEC-2026-0404","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"b5966febf7b83d54d42183f103ad989350f5e5faeeb425bf27950d5e8fbf3a99"},"properties":{"dependency":{"package":"zstd-safe","version":"7.2.4","advisory":"RUSTSEC-2026-0405","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"d1533f8da8988901db52b626008e88cbb214b3e4445c031f56889016e485f9a6"},"properties":{"dependency":{"package":"zstd-safe","version":"7.2.4","advisory":"RUSTSEC-2026-0406","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"5b2ef2cf3c8eabf225138bc21001811e8a7225843389975153af4efe45c215bd"},"properties":{"dependency":{"package":"rustls","version":"0.23.32","advisory":"[GHSA redacted]","aliases":["[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","RUSTSEC-2026-0285","RUSTSEC-2026-0346","RUSTSEC-2026-0348","RUSTSEC-2026-0349"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"bc49677326840d5a66474ad6b84f78ba31d49dc5078cde4e429c5961ff23ae71"},"properties":{"dependency":{"package":"tar","version":"0.4.44","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","RUSTSEC-2026-0067","RUSTSEC-2026-0068"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"0a3d6ad2e0c3a756d2b569db85fe2596a38a31b04ebf3416652093f326d1d433"},"properties":{"dependency":{"package":"block-buffer","version":"0.10.4","advisory":"[GHSA redacted]","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"09268fa64b4b651a07a938d4049303ea65f00f13fd20fbc3891fbbccf9a59fee"},"properties":{"dependency":{"package":"rkyv","version":"0.7.46","advisory":"RUSTSEC-2026-0235","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"f517f532eee860192185b6ef21517080594282777732dc0adc79370bbd7575e7"},"properties":{"dependency":{"package":"h2","version":"0.4.13","advisory":"RUSTSEC-2026-0258","aliases":["[GHSA redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"6986aff019e62e08bc4e45f05ea99240e8fa7d27ab0075cf34d4b87038c11930"},"properties":{"dependency":{"package":"zip","version":"2.4.2","advisory":"RUSTSEC-2026-0367","aliases":["[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","RUSTSEC-2026-0368","RUSTSEC-2026-0369"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"524b21b534c92c68b75cee706e50fcccdb96590a839a7ca375f076f28b4760ed"},"properties":{"dependency":{"package":"zstd","version":"0.13.3","advisory":"RUSTSEC-2026-0391","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"04bdea8ca51aea49ffd2a715e7c6ae25b8360e1c0c52cfa90e99fa339e4e3a6f"},"properties":{"dependency":{"package":"zstd-safe","version":"7.2.4","advisory":"RUSTSEC-2026-0398","aliases":["RUSTSEC-2026-0403"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","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":"8daaec8e55daca7612f75049b34412a477cb7b04670a2b5dd1adce6bf992a652"},"properties":{"dependency":{"package":"zstd-sys","version":"2.0.16\u002Bzstd.1.5.7","advisory":"RUSTSEC-2026-0410","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","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":"aadcfc0ebf52a7fd07020d7fdcdde081671241eb16d6109f39ae861a88a57cb5"},"properties":{"dependency":{"package":"rpassword","version":"7.4.0","advisory":"[GHSA redacted]","reachability":{"kind":"unknown"}}}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned files with no living knowledge: 12 of 347 analysed file(s) have no living knowledge left \u2014 their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 347 of the 390 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each \u2014 most significant first: src-tauri/src/claude_mcp.rs, src-tauri/src/daemon/ipc/server.rs, src-tauri/src/daemon/restart.rs, src-tauri/src/daemon/ipc/client.rs, src-tauri/src/deeplink/mcp.rs, src-tauri/src/daemon/logging.rs, src-tauri/src/services/env_checker.rs, src-tauri/src/provider_defaults.rs (and 4 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/claude_mcp.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1845910f6e875eda31618e3b09a77e008e6eb4a50bde60988f28ddb831fd0026"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/daemon/ipc/server.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"021abf3c1f5b4a7d2f2aa8c3a58b5667fdb34973ed4714aa1e15c0ea47e53901"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/daemon/restart.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4b67e0cffe8496b91b456de8472c68f4ef8a78f07ffe1d0035bebc11fadf834"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/daemon/ipc/client.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4991bd0c95adf73940c0a3293c2f59e95bc0611ad2061157bcf24f532a72bfb6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/deeplink/mcp.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e2f08ab87a1e10aa819cdde75b6d732ab27b820928008760e41ebc5d9c0cec5"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/daemon/logging.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"78a900b633a1f6338790e2a2e13478ad060f67224159eb761d6a502544eab908"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/env_checker.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c20f9d38e49411900883b758c73266bf8d50a5286f410db8510c566433eb4ccf"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/provider_defaults.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"df07845f9f672fe026fc00b15b13aaef556cacb05f5df5870e292c23a46f0e20"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/deeplink.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"78d702df32cd6d0419ba4f9a9709800f4a624cb6c8b8cf27ab38f1e69c11fb27"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/claude_plugin.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a45a30b6d683636c7eea05b8c28b5faa31d4abdbad39dcfafa67324750fa601a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/error.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec9522af09580ff6443c6a10688c16436266dd6999ed6a4e397ed6d83962a9c4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/deeplink/prompt.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"33e59b8ee18fecd3c11cd0292ca40c8f2768391e0b8a47e38b00dd8d7e0e3fc6"}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: tests.rs \u2192 basic.rs, pickers.rs, render.rs: \u0060src-tauri/src/cli/tui/app/tests.rs\u0060 changes together with 3 other files \u2014 \u0060src-tauri/src/cli/tui/ui/overlay/basic.rs\u0060, \u0060src-tauri/src/cli/tui/ui/overlay/pickers.rs\u0060, \u0060src-tauri/src/cli/tui/ui/overlay/render.rs\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 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 3."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/tests.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"02dc3a44212b18c5bb8787034303d080adc6ce3019c2aefacc75e0bac6c80fe9"}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: i18n.rs \u2192 types.rs, form.rs, provider.rs, main_page.rs, basic.rs, pickers.rs, render.rs: \u0060src-tauri/src/cli/i18n.rs\u0060 changes together with 7 other files \u2014 \u0060src-tauri/src/cli/tui/app/types.rs\u0060, \u0060src-tauri/src/cli/tui/form.rs\u0060, \u0060src-tauri/src/cli/tui/ui/forms/provider.rs\u0060, \u0060src-tauri/src/cli/tui/ui/main_page.rs\u0060, \u0060src-tauri/src/cli/tui/ui/overlay/basic.rs\u0060, \u0060src-tauri/src/cli/tui/ui/overlay/pickers.rs\u0060, \u0060src-tauri/src/cli/tui/ui/overlay/render.rs\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 7 separate couplings, not 7 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 7."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/i18n.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"60362f7871fc8e52ab399cd64bd3c17c17f76aced69d51e8e919578c564aade3"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: basic.rs \u2194 tests.rs: \u0060src-tauri/src/cli/tui/ui/overlay/basic.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/tests.rs\u0060 change together 79% of the time (11 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) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are \u00601902fca8\u0060 fix(tui): deduplicate action hints; \u006003094473\u0060 feat(codex): align unified session history; \u0060241c387a\u0060 fix(tui): word-wrap dialog messages and size overlays to content \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/overlay/basic.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fffbb7aa5dea1fce9b20776fd2406ca1f5f749cb6674dfb0909cf3c69039341"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: pickers.rs \u2194 tests.rs: \u0060src-tauri/src/cli/tui/ui/overlay/pickers.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/tests.rs\u0060 change together 73% of the time (11 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) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are \u0060addeb1b5\u0060 fix(codex-oauth): isolate shared workspace accounts (#509); \u00608a5614db\u0060 feat(tui): configure per-model Codex reasoning levels (#442); \u00603c9a916f\u0060 feat(tui): expose Skills sync method setting (#430) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a620fe6a254fb8500f89875b8efff1d6760686011e5e6a07841bcdcc8c67f555"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: handlers.rs \u2194 workers.rs: \u0060src-tauri/src/cli/tui/runtime_systems/handlers.rs\u0060 and \u0060src-tauri/src/cli/tui/runtime_systems/workers.rs\u0060 change together 60% of the time (9 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) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module \u2014 a sibling reference still needs an import \u2014 so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are \u0060e6842167\u0060 fix(tui): refresh sessions on entry; \u006097b67bbd\u0060 perf(tui): move managed proxy refresh off UI thread; \u006003094473\u0060 feat(codex): align unified session history \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/runtime_systems/handlers.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d85250f177a85ffef893941941b09aec6e26cb2ea84ecf98f33d2cdff39ed0a5"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: dialogs.rs \u2194 basic.rs: \u0060src-tauri/src/cli/tui/app/overlay_handlers/dialogs.rs\u0060 and \u0060src-tauri/src/cli/tui/ui/overlay/basic.rs\u0060 change together 57% of the time (8 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) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither 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 \u006003094473\u0060 feat(codex): align unified session history; \u0060edbe0403\u0060 refactor: remove switch-path live-conflict surfacing; \u00608c208420\u0060 feat(tui): add Codex OAuth account manager (#243) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/overlay_handlers/dialogs.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d4a1f60f49f02de95ffe812430711ec73bf22903696151608e61c21bdcd6346"}},{"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":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"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":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","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":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"},"taxa":[{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","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":"c6eb5a94052c328a9f9d4f3228923a5f2d4d56700f96d3ddbb1b358415402983"},"taxa":[{"id":"CICD-SEC-5","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"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":"C2","level":"note","message":{"text":"No named authorization policies: Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) \u2014 this is NOT a claim that endpoints are unprotected. What\u0027s missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can\u0027t be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"b048fdf3fa524ac68c7874fdfcdb4c49d5f010013f2cb22a0bd84cb12ceb951f"}},{"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":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add cargo-audit / cargo-deny (or clippy) (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 26952 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":"P4","level":"note","message":{"text":"No release approval gate: The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY\u0027S PIPELINE FILES. What was read: every file under \u0060.github/workflows/\u0060, \u0060.forgejo/workflows/\u0060, \u0060.gitea/workflows/\u0060, \u0060.azuredevops/\u0060 and \u0060.azure-pipelines/\u0060, plus \u0060.gitlab-ci*\u0060 and \u0060azure-pipelines*\u0060 \u2014 with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab\u0027s \u0060when: manual\u0060, CircleCI\u0027s \u0060type: approval\u0060, an Azure \u0060ManualValidation@\u0060 task or an \u0060approvals:\u0060 block, a Jenkins \u0060input\u0060 step, a \u0060uses:\u0060 step naming an approval action, an \u0060environment:\u0060 paired with \u0060reviewers\u0060 / \u0060required_reviewers\u0060 / \u0060protection\u0060 / \u0060wait-timer\u0060 / \u0060deployment_branch_policy\u0060, a draft-release step, a \u0060workflow_dispatch\u0060 promotion, or a release-event gate. \u2605 What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy \u2014 all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6c11e2dbd483b4b423b95ac61bfcc7af1d55351b28a20d2b1105b31cfe38cc60"}},{"ruleId":"P7","level":"warning","message":{"text":"Outbound HTTP without resilience: \u0060Client::builder()\u0060 makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service\u0027s request, thread or connection until the call gives up on its own \u2014 or never, for a client with no default timeout."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/stream_check/provider_extract.rs"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"692b6a2932afbb6da6d56c64868e5a060b1bc8c818546e7f920cfea4ab7c7624"}},{"ruleId":"S1","level":"note","message":{"text":"No security response headers detected: None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, \u2026) is set on a response this repository\u0027s Rust server sends \u2014 defense in depth, even when a proxy could set them. (\u22122.0 on this card.) The server: \u0060axum::serve(\u0060 (src-tauri/src/proxy/server.rs:274)."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"bd19c680309417e132c0be93c2002123f0664b42afe6172b1319da65a6a57ba7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!mcp.server_type.is_remote() \u0026\u0026 mcp.command.is_blank()\u0060 appears character-identically in 2 files \u2014 src-tauri/src/cli/tui/app/form_handlers/mcp.rs, src-tauri/src/cli/tui/app/form_handlers/mod.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/form_handlers/mcp.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"60b645ff41c80f3fd94221415bc01f2f3e50ff4804425ff3afa9bae8b1bb910d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!root.is_empty() \u0026\u0026 root.contains(\u0022://\u0022)\u0060 appears character-identically in 2 files \u2014 src-tauri/src/cli/tui/runtime_systems/types.rs, src-tauri/src/services/provider/models.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/runtime_systems/types.rs"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ceac53034b32a68c7d0582dd5f10194480cc8e9c1b3840a976f3f71fe4c0f0c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!self.include_common_config || common_snippet.trim().is_empty()\u0060 appears character-identically in 2 files \u2014 src-tauri/src/cli/tui/form/provider_json.rs, src-tauri/src/cli/tui/form/provider_state.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/form/provider_json.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"183c71b9e83afb85eddb4e59ac9d6d1e3720c08006054f8bbbfbf93d570b0e4c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!trimmed.is_empty() \u0026\u0026 !trimmed.eq_ignore_ascii_case(\u0022default\u0022)\u0060 appears character-identically in 2 files \u2014 src-tauri/src/cli/provider_quota.rs, src-tauri/src/cli/tui/ui/shared.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/provider_quota.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"beed1c34f6e71473008c7eed8dc012ea7a7e032dd4d5c2d732397333ea22e50f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(ch.is_whitespace() \u0026\u0026 ch != \u0027 \u0027) || ch.is_control()\u0060 appears character-identically in 2 files \u2014 src-tauri/src/cli/tui/ui/overlay/pickers.rs, src-tauri/src/cli/tui/ui/shared.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/overlay/pickers.rs"},"region":{"startLine":1998}}}],"partialFingerprints":{"codehealthFindingId/v1":"61b985ab23e8f71ee204b8b1528ae22f5e96b779be925b11f352aa2df7da83a0"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060attribution.get(\u0022commit\u0022).and_then(Value::as_str) == Some(\u0022\u0022) \u0026\u0026 attribution.get(\u0022pr\u0022).and_then(Value::as_str) == Some(\u0022\u0022)\u0060 appears character-identically in 2 files \u2014 src-tauri/src/cli/commands/provider_input.rs, src-tauri/src/cli/tui/form/provider_json.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":4202}}}],"partialFingerprints":{"codehealthFindingId/v1":"84289c3ae5ac99521d5630026e1f56e7843f7f9016ab9fe4ec3947d760173752"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060base.ends_with(\u0022/v1\u0022) || base.ends_with(\u0022/v1beta\u0022)\u0060 appears character-identically in 2 files \u2014 src-tauri/src/cli/tui/runtime_systems/types.rs, src-tauri/src/services/provider/models.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/runtime_systems/types.rs"},"region":{"startLine":884}}}],"partialFingerprints":{"codehealthFindingId/v1":"53d72495517c6aa28926a8ba43e66efae2965cb9259a36d921a408eb09149f6f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060base.scope_epoch == scope_epoch \u0026\u0026 base.scope == scope \u0026\u0026 base.generation == base_generation\u0060 appears character-identically in 2 files \u2014 src-tauri/src/cli/tui/app/types.rs, src-tauri/src/cli/tui/runtime_systems/handlers.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/types.rs"},"region":{"startLine":2709}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e38ed97c9d19b7faea95552375358b22f7cf83ddb18e67103a6fe932e6cd219"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060body.get(\u0022type\u0022).and_then(Value::as_str) == Some(\u0022error\u0022) || body.get(\u0022error\u0022).is_some()\u0060 appears character-identically in 2 files \u2014 src-tauri/src/proxy/providers/streaming_codex_anthropic.rs, src-tauri/src/proxy/providers/transform_codex_anthropic.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/providers/streaming_codex_anthropic.rs"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0c2c134bc93bd37e1fe718c137e3e1d59082c417daa05d138b1653045660bd1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060c.is_alphanumeric() || c == \u0027-\u0027 || c == \u0027_\u0027\u0060 appears character-identically in 2 files \u2014 src-tauri/src/cli/commands/provider_input.rs, src-tauri/src/services/prompt.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/provider_input.rs"},"region":{"startLine":3700}}}],"partialFingerprints":{"codehealthFindingId/v1":"15ba1c19aeb0815144b8a9153d70dd586b34869406f3893bff26c5ff18844e64"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060connect_host.contains(\u0027:\u0027) \u0026\u0026 !connect_host.starts_with(\u0027[\u0027)\u0060 appears character-identically in 2 files \u2014 src-tauri/src/daemon/supervisor.rs, src-tauri/src/services/proxy.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/daemon/supervisor.rs"},"region":{"startLine":1260}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fd7a2176649e68aaae9ab450409bd685c30c3daee7bb22833f6d57f249daa09"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060data.trim().is_empty() || data.trim() == \u0022[DONE]\u0022\u0060 appears character-identically in 2 files \u2014 src-tauri/src/proxy/providers/codex_chat_history.rs, src-tauri/src/proxy/providers/transform_codex_anthropic.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/providers/codex_chat_history.rs"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc08988f0de7a05f0f11b45f83d2f6b0494fa39902cdc69366f67ef0767aea8b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060editing \u0026\u0026 matches!(focus, FormFocus::Fields)\u0060 appears character-identically in 2 files \u2014 src-tauri/src/cli/tui/ui/forms/mcp.rs, src-tauri/src/cli/tui/ui/forms/shared.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cd7afce1e5f03a815e3e73a74072d42c6debdf63b547416f2ae7ea5a0495929"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060err.to_string().contains(\u0022\u7B26\u53F7\u94FE\u63A5\u0022) || err.to_string().contains(\u0022symlink\u0022)\u0060 appears character-identically in 3 files \u2014 src-tauri/src/codex_history_migration.rs, src-tauri/src/config.rs, src-tauri/src/database/tests.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/codex_history_migration.rs"},"region":{"startLine":2749}}}],"partialFingerprints":{"codehealthFindingId/v1":"051f126ab5120433ff0ecf734355739a35614443c21f4affdbc0d1a5c4ca9788"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060error.is_timeout() || error.is_connect()\u0060 appears character-identically in 2 files \u2014 src-tauri/src/proxy/error.rs, src-tauri/src/proxy/forwarder.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/error.rs"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"93719ddc5ebb9d707fa2d04aef4f42d1c2714149e63e4346708b7f77842f51ab"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060key.starts_with(\u0022ya29.\u0022) || key.starts_with(\u0027{\u0027)\u0060 appears character-identically in 3 files \u2014 src-tauri/src/proxy/providers/claude.rs, src-tauri/src/proxy/providers/gemini.rs, src-tauri/src/proxy/providers/mod.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/providers/claude.rs"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"80ee56a8afd214a1db6309271e2570868d1de5d0330f1c757d0ae70bc92356ec"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060matches!(key.code, KeyCode::BackTab) || (matches!(key.code, KeyCode::Tab) \u0026\u0026 key.modifiers.contains(KeyModifiers::SHIFT))\u0060 appears character-identically in 2 files \u2014 src-tauri/src/cli/tui/app/content_usage.rs, src-tauri/src/cli/tui/app/form_handlers/tab.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/content_usage.rs"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a6431e5e4651cb35a96fe4c772f95453a788f557c0079e9a86570345a5ebba1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060mcp.server_type.is_remote() \u0026\u0026 mcp.url.is_blank()\u0060 appears character-identically in 2 files \u2014 src-tauri/src/cli/tui/app/form_handlers/mcp.rs, src-tauri/src/cli/tui/app/form_handlers/mod.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/form_handlers/mcp.rs"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"91e0cd44a930c1bec153b6a3a75deaac5dd23ab252ad2e6d3f4f33d09b2e4168"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060media_type == \u0022application/json\u0022 || media_type.ends_with(\u0022\u002Bjson\u0022)\u0060 appears character-identically in 2 files \u2014 src-tauri/src/proxy/forwarder.rs, src-tauri/src/proxy/handlers.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/forwarder.rs"},"region":{"startLine":1206}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e6584540894d66778511f6f4c5f083621d9492b96e9d79ae972081a456e982d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060metadata.file_type().is_symlink() || !metadata.is_dir()\u0060 appears character-identically in 2 files \u2014 src-tauri/src/services/skill.rs, src-tauri/src/session_manager/transcript.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/skill.rs"},"region":{"startLine":1741}}}],"partialFingerprints":{"codehealthFindingId/v1":"5195fb103a6c21b4728f952f11de600135d5d37ea880b0925c749eb8cfb120f4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060normalized == \u0022true\u0022 || normalized == \u00221\u0022\u0060 appears character-identically in 3 files \u2014 src-tauri/src/cli/commands/provider.rs, src-tauri/src/cli/tui/form/provider_state_loading.rs, src-tauri/src/proxy/providers/claude.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/commands/provider.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaf75c87911161ce3d08a565bd253c6b525c72d18a4aa417ac584a43c7ac6926"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060provider_id == \u0022hermes\u0022 \u0026\u0026 source_path.starts_with(\u0022sqlite:\u0022)\u0060 appears character-identically in 2 files \u2014 src-tauri/src/session_manager/mod.rs, src-tauri/src/session_manager/transcript.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/session_manager/mod.rs"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"acff3cc31dfd12b694e7462a75b71c97ded2de4c50da350963ab7ce9b7651f7b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060provider_id == \u0022opencode\u0022 \u0026\u0026 source_path.starts_with(\u0022sqlite:\u0022)\u0060 appears character-identically in 2 files \u2014 src-tauri/src/session_manager/mod.rs, src-tauri/src/session_manager/transcript.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/session_manager/mod.rs"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6d2c194ee1e3ec212491adc66fb337f27960e4d249a0e1ccd667867e6fdc3c2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060rc == 0 || std::io::Error::last_os_error().raw_os_error() == Some(libc::EPERM)\u0060 appears character-identically in 3 files \u2014 src-tauri/src/daemon/supervisor.rs, src-tauri/src/services/proxy.rs, src-tauri/src/test_support.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/daemon/supervisor.rs"},"region":{"startLine":1250}}}],"partialFingerprints":{"codehealthFindingId/v1":"063b5343d4af4e007bff5f5f4b020e2cfd1df1b3606792049e090a06b31e92b8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060repo.owner.to_lowercase().contains(q) || repo.name.to_lowercase().contains(q) || repo.branch.to_lowercase().contains(q)\u0060 appears character-identically in 2 files \u2014 src-tauri/src/cli/tui/app/helpers.rs, src-tauri/src/cli/tui/ui/skills/repos.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/helpers.rs"},"region":{"startLine":1644}}}],"partialFingerprints":{"codehealthFindingId/v1":"eceebdef212ab9631c687d74d555cbb3b543ecfaa9ca12524547843ebe6820d6"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"176a81be612ac35dccc3fb996238cd9d42da9b9675e2009e58031832e07df6f1"}},{"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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":927}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e63f96abc2837b3827280faa079e4a79652c9d35d40365b0db6218fe1abf465"}},{"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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":985}}}],"partialFingerprints":{"codehealthFindingId/v1":"30e01164acd270d2d53ae8252ba655394dd43cf0390e150bd547b1adf38270ed"}},{"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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":1172}}}],"partialFingerprints":{"codehealthFindingId/v1":"a731cd92e769d5e5eeb76fdf530d24cd439434b532af4da33472bdc55ef019c5"}},{"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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":2000}}}],"partialFingerprints":{"codehealthFindingId/v1":"095d26cea3e00bd040c8cec5848d01a7338c227d8b6c199a87f0965bd10b8ac5"}},{"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":"scripts/benchmark_cc_switch.py"},"region":{"startLine":2079}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f52860986e017e23b53e1573442f9783ec30b4a160bac3e7bbd41df7e5099cf"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060read_json\u0060 swallows every exception into \u0060return {}\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/benchmark_cc_switch.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"60d2d3a5b96f3444e944a10e2bdf833c5f6624d3d7b5668033a1a40287ae1c70"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060open_openclaw_editor\u0060 turns every \u0060Err\u0060 into \u0060\u0022{}\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\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 on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/app/content_config.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"b65cccb179857ed8393e9cb7db3aaf2275d8e086110a5252d1ee79db5f397447"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060openclaw_models_editor_text\u0060 turns every \u0060Err\u0060 into \u0060\u0022[]\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\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 on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/form/provider_state.rs"},"region":{"startLine":3121}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dd2a78e6b54ffbfee0d60592f9d3750402a35b50b2a433bdf39fc9976ba818f"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060format_local_proxy_header_overrides\u0060 turns every \u0060Err\u0060 into \u0060\u0022{}\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\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 on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/form/provider_request_overrides.rs"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"e049f4fcb66dd856a710f5d22eb3a4f0c24d52f306f93d5b56274203af975664"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060format_local_proxy_body_override\u0060 turns every \u0060Err\u0060 into \u0060\u0022{}\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\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 on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/form/provider_request_overrides.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"58f1b9b8076f1af7ac893c723d0353a7b8fc89b8a59c52e274ffcd84a8d5a776"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060mcp_args_summary\u0060 turns every \u0060Err\u0060 into \u0060\u0022\\\u0022\\\u0022\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\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 on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/forms/mcp.rs"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"b48c32ba5973f73fbf0649c2e092cf80701f34f04e50f48243e7701709df57ce"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060codex_auth_preview_text\u0060 turns every \u0060Err\u0060 into \u0060\u0022{}\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\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 on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/cli/tui/ui/forms/provider.rs"},"region":{"startLine":811}}}],"partialFingerprints":{"codehealthFindingId/v1":"024fc440ccf846c67143d15d9c202d73e7a5c8a619aaa6fdf40ec831f03a3a78"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060trusted_legacy_codex_model_provider_ids_from_config\u0060 turns every \u0060Err\u0060 into \u0060BTreeSet::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\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 on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/codex_history_migration.rs"},"region":{"startLine":842}}}],"partialFingerprints":{"codehealthFindingId/v1":"04c39018edf8aa69fd9d1ef28d85de6e99cff21ebcd4ce387876314ce72d8d12"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060chat_error_to_response_error\u0060 turns every \u0060Err\u0060 into \u0060\u0022Upstream error\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\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 on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/providers/transform_codex_chat.rs"},"region":{"startLine":2026}}}],"partialFingerprints":{"codehealthFindingId/v1":"8205f288dad7e6b53e2d869ee28b4f566df41c04593938e6e2317e24c28dcbc2"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060strip_media_from_tool_value_at_depth\u0060 turns every \u0060Err\u0060 into \u00600\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\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 on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/tool_media.rs"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0509d997c1e92c78a9d19b1e6f8b45a1b8cba031475f7ad6a1532ca3a7186a3"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060parse_agents_lock\u0060 turns every \u0060Err\u0060 into \u0060HashMap::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\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 on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/skill.rs"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"e275bea953bf59dfdc438063fad722e948e92d601fc25fea54863dbf16e5f808"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060url.contains(\u0022open.bigmodel.cn\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060url.contains(\u0022open.bigmodel.cn\u0022)\u0060 also satisfies \u0060url.contains(\u0022bigmodel.cn\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/services/coding_plan.rs"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eaa97b4ca83f489c2ac189424f82ca4a1d28192a1625a7ace51a732ee56a933"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060path.ends_with(\u0022/v1beta/openai/chat/completions\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060path.ends_with(\u0022/v1beta/openai/chat/completions\u0022)\u0060 also satisfies \u0060path.ends_with(\u0022/openai/chat/completions\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/gemini_url.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6004a5e814f4f9ffa3673a0c34d5582012dcb0c2998628449445e41e2e53d73"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060path.ends_with(\u0022/v1beta/openai/responses\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060path.ends_with(\u0022/v1beta/openai/responses\u0022)\u0060 also satisfies \u0060path.ends_with(\u0022/openai/responses\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/gemini_url.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"42b1671c775eb186e52bb5a65077101f04bc186954ef3c87afbe5466664995f5"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060path.ends_with(\u0022/v1/openai/chat/completions\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060path.ends_with(\u0022/v1/openai/chat/completions\u0022)\u0060 also satisfies \u0060path.ends_with(\u0022/openai/chat/completions\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/gemini_url.rs"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"257fa18fad08f89c54859ebb1d1bd78aaa0ff861ffd50d222a5bd67bdcd495a7"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060path.ends_with(\u0022/v1/openai/responses\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060path.ends_with(\u0022/v1/openai/responses\u0022)\u0060 also satisfies \u0060path.ends_with(\u0022/openai/responses\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/gemini_url.rs"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bc187762c9127ed4391ade964b9720edbcc74b1f8b1bcece8a132ac36acf7e7"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060path.ends_with(\u0022/v1beta/models\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060path.ends_with(\u0022/v1beta/models\u0022)\u0060 also satisfies \u0060path.ends_with(\u0022/models\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/gemini_url.rs"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b0ca901094c2940fa804155d1e894130c4b803f10655defafd89aeec6dc7997"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060path.ends_with(\u0022/v1beta/openai\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060path.ends_with(\u0022/v1beta/openai\u0022)\u0060 also satisfies \u0060path.ends_with(\u0022/openai\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/gemini_url.rs"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3b607fec5beff9a794e6a099f22c1e5aec4ea46807863f55962b26dcc829c5e"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060path.ends_with(\u0022/v1/models\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060path.ends_with(\u0022/v1/models\u0022)\u0060 also satisfies \u0060path.ends_with(\u0022/models\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/gemini_url.rs"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a81236f96a75f7aeb71de55ff5f9d3f1661fda62a244c19369e3ce78ffa9268"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060path.ends_with(\u0022/v1/openai\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060path.ends_with(\u0022/v1/openai\u0022)\u0060 also satisfies \u0060path.ends_with(\u0022/openai\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/gemini_url.rs"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"47afd629705972a45fea435cf6f31ea86e1e32e418c672f2c4c39bef29fa265d"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.contains(\u0022redacted_thinking\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.contains(\u0022redacted_thinking\u0022)\u0060 also satisfies \u0060lower.contains(\u0022thinking\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/thinking_rectifier.rs"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad57b5d36afa6710c4158ae6dcaa01ddb29b49c72c16ec8aeb9547dbbb48fa00"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.contains(\u0022redacted_thinking\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.contains(\u0022redacted_thinking\u0022)\u0060 also satisfies \u0060lower.contains(\u0022thinking\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src-tauri/src/proxy/thinking_rectifier.rs"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"95ec61033050b1312384a3c6724b35ae29b578383bab68e51f88766038cfee38"}}],"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-522","guid":"71fb233e-ce6a-ae57-9419-ef8373540b09","name":"Insufficiently Protected Credentials","shortDescription":{"text":"Insufficiently Protected Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/522.html"},{"id":"CWE-552","guid":"3492436b-eca2-9c54-9ba3-5dade427c903","name":"Files or Directories Accessible to External Parties","shortDescription":{"text":"Files or Directories Accessible to External Parties"},"helpUri":"https://cwe.mitre.org/data/definitions/552.html"},{"id":"CWE-570","guid":"1c94c05a-8663-e95c-b750-8a0329b22647","name":"CWE-570","shortDescription":{"text":"CWE-570"},"helpUri":"https://cwe.mitre.org/data/definitions/570.html"},{"id":"CWE-571","guid":"c0fe8265-1b68-da53-9217-4ebb9a96d5f7","name":"CWE-571","shortDescription":{"text":"CWE-571"},"helpUri":"https://cwe.mitre.org/data/definitions/571.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-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"Inclusion of Functionality from Untrusted Control Sphere","shortDescription":{"text":"Inclusion of Functionality from Untrusted Control Sphere"},"helpUri":"https://cwe.mitre.org/data/definitions/829.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":"A06:2025","guid":"491554d7-b8e4-9652-91a9-53700dc92ece","name":"Insecure Design","shortDescription":{"text":"Insecure Design"},"helpUri":"https://top10.owasp.org/2025/A06_2025-Insecure_Design/"},{"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"},{"id":"CICD-SEC-5","guid":"cc7f4610-8859-e654-9029-d5f97d992220","name":"Insufficient PBAC (Pipeline-Based Access Controls)","shortDescription":{"text":"Insufficient PBAC (Pipeline-Based Access Controls)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-05-Insufficient-PBAC"},{"id":"CICD-SEC-6","guid":"f2ee2486-b260-2952-a41f-6b67fa713940","name":"Insufficient Credential Hygiene","shortDescription":{"text":"Insufficient Credential Hygiene"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-06-Insufficient-Credential-Hygiene"},{"id":"CICD-SEC-8","guid":"b6b2dacf-a168-4957-876e-a8c73ee00eb0","name":"Ungoverned Usage of 3rd Party Services","shortDescription":{"text":"Ungoverned Usage of 3rd Party Services"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-08-Ungoverned-Usage-of-3rd-Party-Services"},{"id":"CICD-SEC-9","guid":"b3d36727-0395-5b51-94c4-5e173d62eab3","name":"Improper Artifact Integrity Validation","shortDescription":{"text":"Improper Artifact Integrity Validation"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-09-Improper-Artifact-Integrity-Validation"}]}],"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":91,"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."]}]}