MCPcopy Create free account

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

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

↓ 6 callersFunctionparseBpeData
parseBpeData parses the base64-encoded BPE data format. Each line: <base64-token> <rank>
internal/llm/embedded_loader.go:56
↓ 6 callersMethodread
()
extensions/vscode/src/extension/services/ConfigService.ts:20
↓ 6 callersFunctionreadRuleFileSafe
readRuleFileSafe reads and validates a rule file: extension whitelist, 512 KB cap, and symlink resolution. When confineRoot is non-empty, the resolved
internal/config/rules/system_rules.go:636
↓ 6 callersFunctionreadme
(headings)
scripts/github-actions/check-translation-sync.test.js:32
↓ 6 callersFunctionrunActionScript
(source, { github, context, core, env })
scripts/github-actions/post-review-comments.test.js:4147
↓ 6 callersFunctionrunConfig
runConfig provides test compatibility: dispatches config subcommands through a fresh cobra command tree that mirrors the production config command, so
cmd/opencodereview/compat_test.go:142
↓ 6 callersFunctionrunConfigUnset
(key string)
cmd/opencodereview/config_cmd.go:149
↓ 6 callersFunctionrunGitCmd
(repoDir string, args ...string)
cmd/opencodereview/git.go:12
↓ 6 callersMethodrunRaw
运行任意参数,流式回调日志,结束返回 stdout 全文。退出码非 0 时 reject,并带上 CLI 报错文本。
extensions/vscode/src/extension/services/CliService.ts:108
↓ 6 callersFunctionrunRulesCheck
(filePath string)
cmd/opencodereview/rules_cmd.go:45
↓ 6 callersFunctionscriptCore
()
scripts/github-actions/post-review-comments.test.js:4165
↓ 6 callersFunctionseedParentManifest
seedParentManifest gives a hand-built ResumeState the parent manifest a real resume always has, matching the identity a already resolved. Without one
internal/agent/manifest_integration_test.go:119
↓ 6 callersFunctionsel
(id string)
internal/session/manifest_test.go:16
↓ 6 callersFunctionsetupFileFindRepo
(t *testing.T)
internal/tool/file_find_test.go:92
↓ 6 callersMethodtrace
(msg: string)
extensions/vscode/src/extension/services/GitService.ts:20
↓ 6 callersMethodtryApplyPendingCompression
tryApplyPendingCompression checks whether a background compression has completed and swaps the rebuilt messages into place. Returns true if applied.
internal/llmloop/compression.go:347
↓ 6 callersFunctionunwritableConfigPath
unwritableConfigPath returns a config path that is itself a directory, so any saveConfig / loadOrCreateConfig against it fails. This is the lever used
cmd/opencodereview/provider_tui_savefail_test.go:24
↓ 6 callersFunctionupKey
()
cmd/opencodereview/provider_tui_funcs_test.go:382
↓ 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 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 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 callersFunctionbuildAllowedHosts
buildAllowedHosts returns the default-deny allowlist used by the host guard. The set always includes the standard loopback names. If bindHost is a con
internal/viewer/hostguard.go:61
↓ 5 callersFunctionbuildConcatenatedDiffs
buildConcatenatedDiffs formats all diffs in the group as per-file XML elements.
internal/agent/agent.go:1565
↓ 5 callersMethodcancelPendingCompression
cancelPendingCompression aborts the conversation's in-flight background compression, if any.
internal/llmloop/compression.go:382
↓ 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:1343
↓ 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:1999
↓ 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 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:1068
↓ 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:1097
↓ 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 callersFunctionopenBrowserCandidates
openBrowserCandidates tries each candidate in turn. Every failure is reported, not just the first: with $BROWSER set to something uninstalled and no p
internal/viewer/browser.go:211
↓ 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 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
← previousnext →401–500 of 4,688, ranked by callers