Remove the dead visual-context summarize path#501
Merged
Conversation
Follow-up to #499 (which removed the OCR summarizer): deletes the now-unused runtime code it relied on - LlamaRuntimeManager.summarize, LlamaRuntimeCore.summarize, and the orphaned LlamaGenerationOptions.summary factory. No remaining callers; build-for-testing green.
8629d33 to
0c18ae4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #499 (which removed the OCR summarizer): deletes the now-unused runtime code it relied on,
LlamaRuntimeManager.summarize,LlamaRuntimeCore.summarize, and the orphanedLlamaGenerationOptions.summaryfactory. No remaining callers (grep-confirmed). build-for-testing BUILD SUCCEEDED, swiftlint clean.Greptile Summary
Removes the visual-context summarization path (
LlamaRuntimeManager.summarize,LlamaRuntimeCore.summarize, andLlamaGenerationOptions.summary) that became dead code after #499 removed the OCR summarizer.activeOperationCount,lifecycleCondition) and the KV-cache path are untouched, and thegenerate()/ autocomplete flow is unaffected.LlamaRuntimeCore.swiftstill reference the deletedsummarize()method (file overview,lifecycleConditionproperty doc, andshutdown()doc) — suggestions are inline.Confidence Score: 4/5
Safe to merge; the deletions are surgical and all three removed entry points are genuinely unreachable.
The change is a straightforward dead-code removal confirmed by grep. The only remaining work is updating three doc comments in LlamaRuntimeCore.swift that still refer to the deleted summarize() method.
Cotabby/Services/Runtime/LlamaRuntimeCore.swift — three stale doc comments reference the removed summarize() method.
Important Files Changed
summarize()method and its MARK section; three doc comments still reference the deleted method and should be updated.summarize()wrapper cleanly; no callers remain and no surrounding code is affected.LlamaGenerationOptions.summaryfactory; the struct and all other factories are untouched.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[LlamaRuntimeManager] -->|generate| B[LlamaRuntimeCore.generate] A -. "summarize removed" .-> C["LlamaRuntimeCore.summarize removed"] B --> D[CotabbyInferenceEngine] C -. "removed" .-> D E["LlamaGenerationOptions.summary factory removed"] -. "was used by" .-> CComments Outside Diff (3)
Cotabby/Services/Runtime/LlamaRuntimeCore.swift, line 10-15 (link)summarize()method: the file overview (lines 10–15), thelifecycleConditionproperty doc (lines 37–39), and theshutdown()doc (line 273). All three become misleading after this PR removes the only implementation of that method.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Cotabby/Services/Runtime/LlamaRuntimeCore.swift, line 37-39 (link)lifecycleConditionproperty comment still namessummarize()alongsidegenerate()as an operation that uses the active-count guard, butsummarize()no longer exists.Cotabby/Services/Runtime/LlamaRuntimeCore.swift, line 273 (link)shutdown()doc comment still listssummarize()as one of the operations it waits for, which is no longer true after this PR.Reviews (1): Last reviewed commit: "Remove the dead visual-context summarize..." | Re-trigger Greptile