Skip to content

Remove the dead visual-context summarize path#501

Merged
FuJacob merged 1 commit into
mainfrom
experimental/cleanup-and-opts
Jun 1, 2026
Merged

Remove the dead visual-context summarize path#501
FuJacob merged 1 commit into
mainfrom
experimental/cleanup-and-opts

Conversation

@FuJacob
Copy link
Copy Markdown
Owner

@FuJacob FuJacob commented Jun 1, 2026

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 (grep-confirmed). build-for-testing BUILD SUCCEEDED, swiftlint clean.

Greptile Summary

Removes the visual-context summarization path (LlamaRuntimeManager.summarize, LlamaRuntimeCore.summarize, and LlamaGenerationOptions.summary) that became dead code after #499 removed the OCR summarizer.

  • All three deletions are clean: grep confirms no remaining callers, the lifecycle machinery (activeOperationCount, lifecycleCondition) and the KV-cache path are untouched, and the generate() / autocomplete flow is unaffected.
  • Three doc comments in LlamaRuntimeCore.swift still reference the deleted summarize() method (file overview, lifecycleCondition property doc, and shutdown() 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

Filename Overview
Cotabby/Services/Runtime/LlamaRuntimeCore.swift Removes the summarize() method and its MARK section; three doc comments still reference the deleted method and should be updated.
Cotabby/Services/Runtime/LlamaRuntimeManager.swift Removes the public summarize() wrapper cleanly; no callers remain and no surrounding code is affected.
Cotabby/Models/LlamaRuntimeModels.swift Removes the LlamaGenerationOptions.summary factory; 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" .-> C
Loading

Comments Outside Diff (3)

  1. Cotabby/Services/Runtime/LlamaRuntimeCore.swift, line 10-15 (link)

    P2 Three doc comments still mention the now-deleted summarize() method: the file overview (lines 10–15), the lifecycleCondition property doc (lines 37–39), and the shutdown() 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!

    Fix in Codex Fix in Claude Code

  2. Cotabby/Services/Runtime/LlamaRuntimeCore.swift, line 37-39 (link)

    P2 The lifecycleCondition property comment still names summarize() alongside generate() as an operation that uses the active-count guard, but summarize() no longer exists.

    Fix in Codex Fix in Claude Code

  3. Cotabby/Services/Runtime/LlamaRuntimeCore.swift, line 273 (link)

    P2 The shutdown() doc comment still lists summarize() as one of the operations it waits for, which is no longer true after this PR.

    Fix in Codex Fix in Claude Code

Fix All in Codex Fix All in Claude Code

Reviews (1): Last reviewed commit: "Remove the dead visual-context summarize..." | Re-trigger Greptile

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.
@FuJacob FuJacob force-pushed the experimental/cleanup-and-opts branch from 8629d33 to 0c18ae4 Compare June 1, 2026 08:28
@FuJacob FuJacob merged commit a163093 into main Jun 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant