MCPcopy Create free account

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

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

↓ 5 callersMethodAsDiff
AsDiff returns a Diff suitable for handing to code that expects the diff-based shape (line-number resolver, file_read_diff tool). The Diff field stays
internal/model/scan.go:22
↓ 5 callersMethodBudgetExceeded
BudgetExceeded reports whether the aggregate token budget gate stopped the run before all files were reviewed. It is a diagnostic signal only — it fee
cmd/opencodereview/shared.go:618
↓ 5 callersFunctionCollectToolDefs
CollectToolDefs gathers tool definitions from MCP clients, filtering out tools that conflict with built-in tools or were not successfully registered.
internal/mcp/provider.go:99
↓ 5 callersFunctionContextWithTraceParentFromEnv
ContextWithTraceParentFromEnv extracts W3C traceparent from the TRACEPARENT environment variable and returns a context carrying the upstream span cont
internal/telemetry/span.go:35
↓ 5 callersFunctionCountMessagesTokens
CountMessagesTokens returns the rough token count of msgs by summing the per-message text token count. Exported because both review and scan top layer
internal/llmloop/compression.go:69
↓ 5 callersMethodFilesReviewed
()
cmd/opencodereview/shared.go:595
↓ 5 callersMethodFrozen
Frozen reports whether Finalize has already run.
internal/session/manifest.go:718
↓ 5 callersFunctionInit
Init initializes global TracerProvider and MeterProvider based on environment variables and optional config file. Returns true when enabled. Safe to c
internal/telemetry/provider.go:32
↓ 5 callersFunctionListSessions
ListSessions enumerates all persisted sessions for the given repository directory, sorted by StartTime descending (most recent first). Missing directo
internal/session/list.go:109
↓ 5 callersFunctionLoad
Load parses the tools config file. When path is empty, falls back to the embedded default tools configuration.
internal/config/toolsconfig/toolsconfig.go:27
↓ 5 callersFunctionLoadAppConfig
LoadAppConfig loads config from path. Returns nil, nil if file does not exist.
cmd/opencodereview/config_cmd.go:402
↓ 5 callersFunctionLoadComments
LoadComments replays one session's JSONL and returns every review comment recorded in it, in file-completion order. It mirrors resume replay semantics
internal/session/comments.go:17
↓ 5 callersFunctionNewSessionKey
NewSessionKey returns a fresh UUIDv4 session key. Clients use it as a per-client fallback for requests whose context carries no session key (e.g. `ocr
internal/llm/sessionkey.go:93
↓ 5 callersFunctionParseComments
ParseComments extracts LlmComment entries from tool call arguments without writing to the Collector. Returns parsed comments and an error message (emp
internal/tool/code_comment.go:81
↓ 5 callersMethodReason
Reason is the safe, human-facing sentence for a stop, and the single source of truth for it: the diff-review manifest reason and the scan subtask warn
internal/llmloop/loop.go:263
↓ 5 callersFunctionRecordCommentsGenerated
(ctx context.Context, n int64)
internal/telemetry/metrics.go:97
↓ 5 callersFunctionRecordReviewDuration
(ctx context.Context, dur time.Duration)
internal/telemetry/metrics.go:77
↓ 5 callersMethodRecordWarning
RecordWarning adds a non-fatal warning.
internal/llmloop/loop.go:154
↓ 5 callersFunctionRelocateAcrossFiles
RelocateAcrossFiles handles the comment whose ExistingCode belongs to a different file than the one it was filed against. The reviewing Agent reads r
internal/diff/resolver.go:100
↓ 5 callersMethodReplaceSince
ReplaceSince replaces comments[start:] with the given replacements. Useful for batch-level dedup: take a Snapshot, run a batch, dedup the new comments
internal/tool/comment_collector.go:82
↓ 5 callersMethodRun
Run executes a git command and returns the combined stdout+stderr output.
internal/gitcmd/runner.go:47
↓ 5 callersMethodServeHTTP
(w http.ResponseWriter, r *http.Request)
cmd/opencodereview/retry_fake_llm_test.go:81
↓ 5 callersFunctionSessionKeyFromContext
SessionKeyFromContext returns the session key carried by ctx, or "" when none was set.
internal/llm/sessionkey.go:85
↓ 5 callersMethodSetExecution
SetExecution sets the non-secret execution provenance.
internal/session/manifest.go:398
↓ 5 callersMethodSetRepository
SetRepository sets the redacted repository identity.
internal/session/manifest.go:373
↓ 5 callersMethodSubmit
Submit runs f in a background goroutine bounded by the semaphore. When f completes its return value is collected internally.
internal/llmloop/pool.go:63
↓ 5 callersMethodTools
()
internal/mcp/client.go:155
↓ 5 callersMethodTotalInputTokens
TotalInputTokens returns the accumulated input/prompt tokens from all LLM calls.
internal/llmloop/loop.go:128
↓ 5 callersFunctionTraceIDFromContext
TraceIDFromContext returns the hex-encoded trace ID of the span carried by ctx, or "" if ctx carries no valid span (e.g. telemetry is disabled).
internal/telemetry/span.go:48
↓ 5 callersMethodValidateResume
ValidateResume reports whether req may reuse this parent's checkpoints. A mismatch on any input field rejects the whole resume rather than degrading
internal/session/resume_identity.go:50
↓ 5 callersFunctionapplyManualConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:103
↓ 5 callersFunctionapplyModelDeleteToEntry
(entry ProviderEntry, name string)
cmd/opencodereview/provider_tui.go:465
↓ 5 callersFunctionassertContains
(t *testing.T, args []string, val string)
internal/tool/code_search_test.go:304
↓ 5 callersFunctionassertNotContains
(t *testing.T, args []string, val string)
internal/tool/code_search_test.go:311
↓ 5 callersMethodassert_unresolved
(self, severity, want)
examples/gerrit_ci/post_review_test.py:89
↓ 5 callersFunctionbuildConcatenatedDiffs
buildConcatenatedDiffs formats all diffs in the group as per-file XML elements.
internal/agent/agent.go:1566
↓ 5 callersMethodcancelPendingCompression
cancelPendingCompression aborts the conversation's in-flight background compression, if any.
internal/llmloop/compression.go:371
↓ 5 callersFunctioncaptureStdout
(t *testing.T, fn func())
internal/telemetry/events_test.go:129
↓ 5 callersMethodclear
()
extensions/vscode/src/extension/providers/lineOffset.ts:20
↓ 5 callersFunctionclearCfgActiveModelIfDeleted
(cfg *Config, providerName, name string)
cmd/opencodereview/provider_tui.go:473
↓ 5 callersFunctioncommentKey
(rc)
scripts/github-actions/post-review-comments.test.js:78
↓ 5 callersFunctionconfigOperations
(fixture)
scripts/github-actions/action-contract.test.js:330
↓ 5 callersFunctioncontentToText
(contents []mcp.Content)
internal/mcp/client.go:180
↓ 5 callersFunctioncopyLlmComments
(in []model.LlmComment)
internal/session/resume.go:353
↓ 5 callersMethodcustomListCount
()
cmd/opencodereview/provider_tui.go:630
↓ 5 callersMethoddescribe
describe renders m for internal construction errors raised by RetryCollector.Freeze. Those errors reach the user through runErr, and with --concurren
internal/llm/retry_meta.go:115
↓ 5 callersFunctiondescribeRange
(s session.Summary)
cmd/opencodereview/session_cmd.go:509
↓ 5 callersFunctiondisplayMode
(m string)
cmd/opencodereview/session_cmd.go:502
↓ 5 callersMethodensureApi
()
extensions/vscode/src/extension/services/GitService.ts:24
↓ 5 callersFunctionensureModelInList
ensureModelInList appends model to the end when missing; never reorders existing entries.
cmd/opencodereview/config_cmd.go:777
↓ 5 callersFunctionexactArgs
Positional-argument validators that replace Cobra's raw count message ("accepts 2 arg(s), received 1") with an actionable one built from metadata the
cmd/opencodereview/arg_errors.go:23
↓ 5 callersMethodexecuteGroupSubtask
executeGroupSubtask performs the Plan Phase + Main Loop for a file group. It returns (completed, stop, err): a hard Go error (err) for provider/config
internal/agent/agent.go:1344
↓ 5 callersMethodexecuteSubtask
executeSubtask runs the scan pipeline for one file: 1. Optional PLAN_TASK: produce a JSON checklist of focus areas. 2. MAIN_TASK: review the file with
internal/scan/agent.go:758
↓ 5 callersFunctionextractFilenameFromURL
extractFilenameFromURL returns the filename part (last path segment) of a URL pattern.
internal/release/asset_naming_test.go:57
↓ 5 callersMethodfilterDiffs
filterDiffs drops diffs that should not be reviewed based on user-configured include/exclude patterns and default extension/path filters.
internal/agent/agent.go:1994
↓ 5 callersFunctionfinalizeRequest
finalizeRequest is the shared body of the client-boundary defer: correct the last attempt if the error only became visible after the SDK returned, the
internal/llm/retry_boundary.go:129
↓ 5 callersMethodfindCustomIdx
(name string)
cmd/opencodereview/provider_tui.go:1412
↓ 5 callersFunctionfindMissingTranslations
(changedFiles)
scripts/github-actions/check-translation-sync.js:183
↓ 5 callersFunctiongetChangedFiles
(env, exec = execFileSync)
scripts/github-actions/check-translation-sync.js:224
↓ 5 callersFunctiongitOut
gitOut runs a git command in dir and returns its trimmed stdout, failing the test on error. Used to capture the SHAs a ResolveInput result must match.
internal/diff/git_resolve_test.go:17
↓ 5 callersFunctiongroupDiffs
groupDiffs calls the LLM with file metadata (no diff content) to produce semantic groups. Falls back to one-file-per-group on any error.
internal/agent/grouping.go:57
↓ 5 callersFunctionhashFields
hashFields folds a sequence of string fields into one SHA-256 digest, writing an unambiguous 8-byte big-endian length prefix before each field so no t
internal/agent/agent.go:1071
↓ 5 callersFunctioninitRepo
(t *testing.T)
internal/gitcmd/runner_test.go:17
↓ 5 callersFunctionisCheckpointAuthorOurs
(comment, appSlug = "")
scripts/github-actions/post-review-comments.js:2395
↓ 5 callersFunctionisConfigReady
(config: OcrConfig | null)
extensions/vscode/src/shared/configUtils.ts:81
↓ 5 callersFunctionisMachineReadable
isMachineReadable reports whether the output format writes a structured document to stdout that must not be interleaved with progress text. Both json
cmd/opencodereview/shared.go:317
↓ 5 callersMethodisUserAddedModel
(name string)
cmd/opencodereview/provider_tui.go:2737
↓ 5 callersMethodisUserAddedOfficialModel
(name string)
cmd/opencodereview/provider_tui.go:498
↓ 5 callersFunctionloadDelegateContext
(opts delegateOptions)
cmd/opencodereview/delegate_cmd.go:96
↓ 5 callersMethodloadDiffs
loadDiffs populates the diff-related fields.
internal/agent/agent.go:513
↓ 5 callersMethodlogicalRequestID
logicalRequestID computes the canonical logical_request_id for m under runID. Fields are NUL-terminated in a fixed order rather than concatenated, be
internal/llm/retry_meta.go:91
↓ 5 callersMethodmanifestItemID
manifestItemID derives the content-independent item_id for a diff, keyed on operation, input mode and the normalized old/new paths. RegisterSelected a
internal/agent/agent.go:1100
↓ 5 callersMethodmaybeRunDedup
maybeRunDedup, when the template has a DedupTask and the batch produced at least DedupMinComments comments, invokes the DEDUP_TASK LLM to merge near-d
internal/scan/agent.go:941
↓ 5 callersMethodmaybeRunProjectSummary
maybeRunProjectSummary runs the post-batch PROJECT_SUMMARY_TASK over the union of all collected comments. Best-effort: any error / empty input no-temp
internal/scan/agent.go:861
↓ 5 callersMethodmodelCount
()
cmd/opencodereview/provider_tui.go:626
↓ 5 callersMethodofficialProviderActiveModel
(p llm.Provider)
cmd/opencodereview/provider_tui.go:241
↓ 5 callersFunctionparentState
parentState builds a resumable parent: a v1 review manifest whose identity is parentIdentity, run on anthropic/claude, with one selected item. mutate
internal/session/resume_identity_test.go:25
↓ 5 callersFunctionparseShellRC
(path, modelOverride string)
internal/llm/resolver.go:755
↓ 5 callersMethodplanEnabled
planEnabled / dedupEnabled / summaryEnabled report whether each optional phase will actually run: template must define it AND the corresponding --no-*
internal/scan/agent.go:84
↓ 5 callersMethodpost_seq
Drive post() over a sequence of per-call fake_urlopen outcomes. Each outcome is either the raw response body (bytes, returned) or an
examples/gerrit_ci/post_review_test.py:561
↓ 5 callersFunctionpreserveCheckpointMarker
(newBody, oldBody)
scripts/github-actions/post-review-comments.js:2307
↓ 5 callersFunctionreadCheckpointComment
({ github, owner, repo, prNumber, appSlug = "", log })
scripts/github-actions/post-review-comments.js:2422
↓ 5 callersFunctionreadRuleFileSafe
readRuleFileSafe reads and validates a rule file. It enforces extension whitelist (.md / .txt / .markdown), a 512 KB size cap, and resolves symlinks b
internal/config/rules/system_rules.go:621
↓ 5 callersFunctionresolveWorkingDirForSession
resolveWorkingDirForSession accepts an explicit --repo flag value and falls back to the current working directory. Unlike resolveRepoDir it does not r
cmd/opencodereview/session_cmd.go:398
↓ 5 callersMethodresolvedModel
resolvedModel returns the model to persist, falling back to the in-session pick for the provider being finalized when result.model is empty.
cmd/opencodereview/provider_tui.go:99
↓ 5 callersMethodreviewMode
()
internal/agent/agent.go:897
↓ 5 callersFunctionreviewModeFromOptions
(opts reviewOptions)
cmd/opencodereview/review_cmd.go:427
↓ 5 callersMethodrunGit
(ctx context.Context, args ...string)
internal/diff/git.go:641
↓ 5 callersFunctionrunSessionCommentsCompat
runSessionCommentsCompat provides test compatibility for old-style runSessionComments([]string{...}) calls.
cmd/opencodereview/compat_test.go:98
↓ 5 callersFunctionsanitizeMarkdown
(s string)
cmd/opencodereview/background_file.go:116
↓ 5 callersFunctionsetProviderValue
(cfg *Config, key, value string)
cmd/opencodereview/config_cmd.go:789
↓ 5 callersFunctionsleep
(ms)
scripts/github-actions/post-review-comments.js:1173
↓ 5 callersFunctionsplitPaths
(raw string)
cmd/opencodereview/scan_cmd.go:96
↓ 5 callersFunctionunsetCustomProvider
(configPath, name string)
cmd/opencodereview/config_cmd.go:239
↓ 5 callersFunctionunsetMCPServer
(configPath, name string)
cmd/opencodereview/config_cmd.go:262
↓ 5 callersFunctionuserAgent
(provider string)
internal/llm/client.go:45
↓ 4 callersMethodAwaitKey
AwaitKey blocks until every unit submitted under key so far has completed. It never touches the pool-wide WaitGroup, so it is safe to call while other
internal/llmloop/pool.go:141
↓ 4 callersMethodCanonicalConfig
()
internal/config/rules/sniffer.go:29
↓ 4 callersFunctionCompare
Compare buckets the findings of an earlier run (before) against a later one (after). Matching is a multiset match on findingKey, so N identical findin
internal/session/compare.go:34
↓ 4 callersFunctionDefaultConfig
DefaultConfig returns a disabled default configuration.
internal/telemetry/config.go:32
← previousnext →401–500 of 4,576, ranked by callers