MCPcopy Create free account
hub / github.com/alibaba/open-code-review / Deps

Struct Deps

internal/llmloop/loop.go:28–42  ·  view source on GitHub ↗

Deps bundles all per-call dependencies the Runner needs. Both internal/agent (diff review) and internal/scan (full-file scan) build a Deps from their own state and hand it to NewRunner.

Source from the content-addressed store, hash-verified

26// internal/agent (diff review) and internal/scan (full-file scan) build a
27// Deps from their own state and hand it to NewRunner.
28type Deps struct {
29 LLMClient llm.LLMClient
30 Model string
31 Template template.Template
32 Tools *tool.Registry
33 MainToolDefs []llm.ToolDef
34 CommentCollector *tool.CommentCollector
35 CommentWorkerPool *CommentWorkerPool
36 Session *session.SessionHistory
37 // DiffLookup is consulted by the code_comment tool path to resolve
38 // line numbers against the file's diff (or against full file content
39 // in scan mode — scan adapters return a synthetic Diff whose
40 // NewFileContent is the whole file and Diff is empty).
41 DiffLookup func(path string) *model.Diff
42}
43
44// Runner is a per-session (across files) executor of the LLM tool-use
45// loop. Token counters and warnings are aggregated across every RunPerFile

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected