MCPcopy Create free account

hub / github.com/alibaba/open-code-review / functions

Functions4,238 in github.com/alibaba/open-code-review

↓ 10 callersMethodwhyExcluded
whyExcluded applies the filter algorithm as shouldReview but returns the specific reason a file is excluded.
internal/agent/preview.go:34
↓ 10 callersFunctionwriteTempFile
writeTempFile writes content to a temporary file and returns its path.
cmd/opencodereview/background_file_test.go:16
↓ 10 callersFunctionyKey
()
cmd/opencodereview/provider_tui_test.go:1142
↓ 9 callersMethodCompletionsWithCtx
CompletionsWithCtx sends a chat completion request with context support. The deferred finalizeRequest is this client's boundary for the retry report;
internal/llm/client.go:1041
↓ 9 callersFunctionDynamic
Dynamic creates a Tool with the given name for dynamically discovered tools (e.g. MCP).
internal/tool/definitions.go:51
↓ 9 callersMethodEnumerate
Enumerate returns one ScanItem per reviewable file. Binaries are emitted with empty Content + IsBinary=true so previews can show them as excluded.
internal/scan/provider.go:80
↓ 9 callersFunctionNewCommitProvider
NewCommitProvider creates a Provider for commit mode: show changes introduced by a single commit.
internal/diff/git.go:77
↓ 9 callersFunctionNewFileFind
(fr *FileReader)
internal/tool/file_find.go:28
↓ 9 callersMethodResolveInput
ResolveInput freezes this run's commit endpoints by asking git, following the input-mode matrix: - range: base = merge-base(from,to); head = the
internal/diff/git.go:124
↓ 9 callersMethodRestore
Restore re-enables stdout. Safe to call multiple times.
cmd/opencodereview/shared.go:319
↓ 9 callersMethodTotalInputTokens
()
cmd/opencodereview/shared.go:333
↓ 9 callersMethodTotalTokensUsed
()
cmd/opencodereview/shared.go:335
↓ 9 callersFunctionValidateProtocol
ValidateProtocol accepts the four canonical protocol names and rejects everything else.
internal/llm/protocol.go:65
↓ 9 callersMethodbuildAnthropicParams
buildAnthropicParams converts the shared ChatRequest into Anthropic SDK parameters.
internal/llm/client.go:1093
↓ 9 callersMethoddispatchSubtasks
dispatchSubtasks groups items into batches per the configured strategy, then processes batches sequentially while running files within each batch conc
internal/scan/agent.go:509
↓ 9 callersFunctiondownKey
()
cmd/opencodereview/provider_tui_test.go:34
↓ 9 callersFunctiongitCommit
(t *testing.T, repo, msg string)
internal/scan/provider_test.go:116
↓ 9 callersFunctionmakeComments
(n)
scripts/github-actions/post-review-comments.test.js:1400
↓ 9 callersFunctionnewManifestFlowAgent
(t *testing.T, diffs []model.Diff, resume *session.ResumeState)
internal/agent/manifest_integration_test.go:66
↓ 9 callersFunctionofficialDashscopeModelTUI
(t *testing.T, configPath string, extraModels []string)
cmd/opencodereview/provider_tui_test.go:1513
↓ 9 callersFunctionopen
()
extensions/vscode/src/webview/components/CommentCard.tsx:18
↓ 9 callersFunctionoutputRetryReportText
outputRetryReportText renders the frozen retry report as the terminal summary. It is a run result, not a warning, so it goes to the same writer as the
cmd/opencodereview/output.go:402
↓ 9 callersMethodpost_note
(self, body)
examples/gitlab_ci/post_review_test.py:139
↓ 9 callersFunctionrenderComment
(comment model.LlmComment)
cmd/opencodereview/output.go:91
↓ 9 callersFunctionresolveWorkingDir
resolveWorkingDir returns (absPath, isGitRepo, err). When requireGit is true, returns an error if the directory is not a git repo. When false, returns
cmd/opencodereview/shared.go:107
↓ 9 callersMethodrunCompression
runCompression performs three-zone memory compression on the given messages, summarizing the compress zone while preserving the active zone intact. Re
internal/llmloop/compression.go:212
↓ 9 callersFunctionrunGit
(cwd: string, args: string[])
extensions/vscode/src/extension/services/GitService.ts:496
↓ 9 callersMethodselectedCustomProvider
()
cmd/opencodereview/provider_tui.go:421
↓ 9 callersFunctionwriteConfig
writeConfig writes an OCR config file to a temp dir and returns its path.
internal/llm/bedrock_test.go:16
↓ 8 callersMethodApplyLanguage
ApplyLanguage injects a language directive into all system-role messages across MAIN_TASK, PLAN_TASK (if set), and MEMORY_COMPRESSION_TASK.
internal/config/template/template.go:184
↓ 8 callersMethodCommentsForPath
CommentsForPath returns a copy of comments whose Path matches the given path.
internal/tool/comment_collector.go:41
↓ 8 callersMethodIsUserIncluded
IsUserIncluded reports whether the given path matches any user include pattern. The check is case-insensitive: both path and pattern are lowercased. R
internal/config/rules/system_rules.go:239
↓ 8 callersFunctionLoadDefault
LoadDefault parses the embedded task_template.json and resolves prompt file references.
internal/config/template/template.go:123
↓ 8 callersFunctionLoadScanDefault
LoadScanDefault parses the embedded scan_template.json.
internal/config/template/template.go:157
↓ 8 callersFunctionNewDiffMap
NewDiffMap creates a frozen, read-only DiffMap from a plain map.
internal/tool/file_read_diff.go:18
↓ 8 callersFunctionPromptTokenLimit
PromptTokenLimit returns tokenWarningThreshold (80%) of maxTokens. It is shared by the agent and scan pre-flight gates, their large-input filters, and
internal/llmloop/compression.go:29
↓ 8 callersMethodRecordAttempt
RecordAttempt appends one observed HTTP attempt for m. startedAt and endedAt bracket the real HTTP call: the observer takes them immediately before a
internal/llm/retry_report.go:289
↓ 8 callersFunctionRegisterAll
RegisterAll registers tools from the MCP client into the tool registry. When allowedTools is non-empty, only tools whose names appear in the list are
internal/mcp/provider.go:33
↓ 8 callersFunctionRequestMetaFromContext
RequestMetaFromContext returns the RequestMeta attached to ctx, if any. It is exported so the packages that stamp identity — internal/llmloop and int
internal/llm/retry_meta.go:148
↓ 8 callersMethodSealSelected
SealSelected closes the selected set. After it returns, RegisterSelected fails and the coverage denominator is fixed; per-item Mark* calls continue to
internal/session/manifest.go:531
↓ 8 callersMethodSetPendingFailureCause
SetPendingFailureCause records the classification Finalize must use when it sweeps items that never received a Mark*. It records no run_failure and tr
internal/session/manifest.go:460
↓ 8 callersMethodTool
Tool returns which tool this provider implements.
internal/tool/definitions.go:73
↓ 8 callersMethodValidateScanOptions
ValidateScanOptions verifies that the previous session was a full-file scan.
internal/session/resume.go:294
↓ 8 callersMethodapplyEditCustomProviderSave
()
cmd/opencodereview/provider_tui.go:1337
↓ 8 callersFunctionapplyOfficialProviderConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:260
↓ 8 callersMethodbuildResponsesParams
buildResponsesParams converts the shared ChatRequest into Responses API parameters. Mapping notes: - Multiple system messages are concatenated into I
internal/llm/responses_client.go:172
↓ 8 callersMethodcustomProviderEntry
(name string, fallback ProviderEntry)
cmd/opencodereview/provider_tui.go:599
↓ 8 callersMethoddispose
()
extensions/vscode/src/extension/providers/CommentProvider.ts:326
↓ 8 callersFunctionentry_of
(ri, path="main.go")
examples/gerrit_ci/post_review_test.py:49
↓ 8 callersMethodexecuteReviewFilter
executeReviewFilter runs the REVIEW_FILTER_TASK to remove comments that are provably incorrect based solely on the diff. Errors are logged and silentl
internal/agent/agent.go:1399
↓ 8 callersFunctionfileReadToolCallResponse
(callID, args string)
internal/llmloop/loop_test.go:66
↓ 8 callersFunctionfreezeOne
freezeOne freezes c and returns the single listed request.
internal/llm/retry_boundary_test.go:47
↓ 8 callersFunctionisolateLLMConnectionTest
isolateLLMConnectionTest keeps the "Testing connection..." step that ends every apply*Config call away from the developer's own machine. Without it re
cmd/opencodereview/provider_cmd_test.go:25
↓ 8 callersFunctionmergeModelLists
(lists ...[]string)
cmd/opencodereview/config_cmd.go:741
↓ 8 callersFunctionnewModelTUIConfig
(cfg modelTUIConfig)
cmd/opencodereview/provider_tui.go:2681
↓ 8 callersFunctionnewQuietHandle
newQuietHandle routes [ocr] progress lines away from stdout so they cannot corrupt a structured output document. What it does depends on why stdout ne
cmd/opencodereview/shared.go:307
↓ 8 callersMethodread
(self)
examples/gitlab_ci/post_review_test.py:94
↓ 8 callersMethodrecordWarning
recordWarning adds a non-fatal warning to the agent's warning list.
internal/agent/agent.go:490
↓ 8 callersFunctionretryCodesMiddleware
retryCodesMiddleware returns an HTTP middleware that forces the SDK to retry responses whose status code is in the given set, by injecting the x-shoul
internal/llm/client.go:251
↓ 8 callersFunctionsanitizeReason
sanitizeReason is the single, best-effort redaction+truncation floor applied to every reason the builder stores, so no caller path can write an unreda
internal/session/manifest.go:662
↓ 8 callersFunctionwriteOpenAISSE
(t *testing.T, w http.ResponseWriter, events ...string)
internal/llm/client_test.go:756
↓ 7 callersFunctionAnyToAttr
AnyToAttr converts an arbitrary value to an OTel attribute.KeyValue.
internal/telemetry/span.go:132
↓ 7 callersFunctionBuildReLocationMessages
BuildReLocationMessages renders the re-location prompt for cm against d. Returns nil when the task template is absent or empty, which the caller treat
internal/diff/relocation.go:28
↓ 7 callersFunctionDiscoverRepos
DiscoverRepos walks the sessions root and returns one entry per subdirectory.
internal/viewer/store.go:41
↓ 7 callersFunctionErrorEvent
ErrorEvent emits an error event with error status.
internal/telemetry/events.go:39
↓ 7 callersMethodFinalize
Finalize performs the hard-validated close of the run and returns the immutable manifest. In order it: sweeps any item still selected into failed (col
internal/session/manifest.go:742
↓ 7 callersFunctionIsPathExcluded
IsPathExcluded returns true when relPath matches any of the supplied gitignore-style patterns or any default excluded directory prefix (see ExcludedDi
internal/diff/gitignore.go:25
↓ 7 callersFunctionNewProvider
NewProvider creates a Provider for range mode: from..to (via merge-base).
internal/diff/git.go:66
↓ 7 callersFunctionRecordLLMResult
RecordLLMResult sets the outcome of an LLM request on the span.
internal/telemetry/span.go:115
↓ 7 callersMethodRecordUsage
RecordUsage adds the prompt/completion/cache tokens reported by an LLM response to the runner's aggregate counters. Used by callers (plan phase in age
internal/llmloop/loop.go:188
↓ 7 callersFunctionResolveIdentity
ResolveIdentity computes the identity a review with these args would record, without creating anything: no session, manifest, runner or LLM call. Resu
internal/agent/identity.go:45
↓ 7 callersMethodRunManifest
RunManifest returns the frozen v1 coverage result for review runs. Scan remains legacy and returns nil.
cmd/opencodereview/shared.go:358
↓ 7 callersMethodTotalCacheReadTokens
()
cmd/opencodereview/shared.go:336
↓ 7 callersMethodTotalCacheWriteTokens
()
cmd/opencodereview/shared.go:337
↓ 7 callersMethodTotalOutputTokens
()
cmd/opencodereview/shared.go:334
↓ 7 callersFunctionactiveModelForProvider
(cfg *Config, providerName string, entry ProviderEntry)
cmd/opencodereview/config_cmd.go:714
↓ 7 callersFunctionagentTaskDoneResponse
()
internal/agent/agent_test.go:41
↓ 7 callersMethodapplySessionStart
(rec resumeRecord)
internal/session/resume.go:189
↓ 7 callersFunctionclassifyCommentAgainstDiff
(item, diff)
scripts/github-actions/post-review-comments.js:1983
↓ 7 callersFunctioncustomConfigModelTUI
(t *testing.T, configPath string, models []string)
cmd/opencodereview/provider_tui_funcs_test.go:1081
↓ 7 callersFunctionemitFailureUsage
emitFailureUsage writes a best-effort structured usage record to stderr when a review fails, so the outer caller still sees the cost of the failed att
cmd/opencodereview/output.go:518
↓ 7 callersFunctionencodeRepoPath
(p string)
internal/session/persist.go:76
↓ 7 callersMethodfilterLargeDiffs
filterLargeDiffs drops diffs whose diff content alone consumes more than 80% of MaxTokens.
internal/agent/agent.go:1599
↓ 7 callersFunctionloadLLMRuntime
loadLLMRuntime loads tool defs from toolConfigPath, reads the app config from the user's default config path (applying the configured language to tpl
cmd/opencodereview/shared.go:187
↓ 7 callersMethodmapResponsesResponse
mapResponsesResponse converts the SDK Response into the shared ChatResponse. Text output is read via the SDK's OutputText() helper (it walks all outpu
internal/llm/responses_client.go:249
↓ 7 callersFunctionoutputPreviewText
(p *agent.DiffPreview)
cmd/opencodereview/output.go:584
↓ 7 callersFunctionparseTemplate
(name string)
internal/viewer/server.go:175
↓ 7 callersFunctionpeekSession
peekSession reads the first record, all review_item records (for comment count), and the last record of a JSONL file.
internal/viewer/store.go:140
↓ 7 callersMethodrepoRoot
()
extensions/vscode/src/extension/services/GitService.ts:254
↓ 7 callersMethodrunGit
(ctx context.Context, args ...string)
internal/diff/git.go:631
↓ 7 callersFunctionrunReviewCapturingBoth
End-to-end coverage of the #368 P5 wiring: a real review run against the fake Anthropic server, driven through runReview so review_cmd.go's own Freeze
cmd/opencodereview/retry_report_e2e_test.go:25
↓ 7 callersMethodsyncSessionModelSelection
()
cmd/opencodereview/provider_tui.go:608
↓ 7 callersFunctionvalidateReviewRefs
validateReviewRefs rejects ref-option injection (#112): any --from/--to/ --commit value must be a real commit ref and must not start with '-'.
cmd/opencodereview/review_cmd.go:457
↓ 7 callersMethodwriteRecordLocked
(rec map[string]any)
internal/session/persist.go:125
↓ 6 callersFunctionCanonicalPath
CanonicalPath returns an absolute path with symlinks resolved.
internal/pathutil/path.go:13
↓ 6 callersMethodIsUserExcluded
IsUserExcluded reports whether the given path matches any user exclude pattern. The check is case-insensitive: both path and pattern are lowercased.
internal/config/rules/system_rules.go:223
↓ 6 callersFunctionLoadDetail
LoadDetail returns the summary plus per-file item records for one session.
internal/session/list.go:151
↓ 6 callersFunctionLoadSummary
LoadSummary loads a single session's Summary. Errors when the session file is missing or unreadable.
internal/session/list.go:142
↓ 6 callersMethodMarkReused
MarkReused records that the item was reused from a parent session checkpoint.
internal/session/manifest.go:696
↓ 6 callersMethodMarkWaived
MarkWaived records that the user explicitly waived this selected item, which must still be in the pre-terminal (selected) state. reason is required an
internal/session/manifest.go:713
← previousnext →201–300 of 4,238, ranked by callers