Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
4,688 in github.com/alibaba/open-code-review
⨍
Functions
4,688
◇
Types & classes
423
↓ 6 callers
Function
parseBpeData
parseBpeData parses the base64-encoded BPE data format. Each line: <base64-token> <rank>
internal/llm/embedded_loader.go:56
↓ 6 callers
Method
read
()
extensions/vscode/src/extension/services/ConfigService.ts:20
↓ 6 callers
Function
readRuleFileSafe
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 callers
Function
readme
(headings)
scripts/github-actions/check-translation-sync.test.js:32
↓ 6 callers
Function
runActionScript
(source, { github, context, core, env })
scripts/github-actions/post-review-comments.test.js:4147
↓ 6 callers
Function
runConfig
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 callers
Function
runConfigUnset
(key string)
cmd/opencodereview/config_cmd.go:149
↓ 6 callers
Function
runGitCmd
(repoDir string, args ...string)
cmd/opencodereview/git.go:12
↓ 6 callers
Method
runRaw
运行任意参数,流式回调日志,结束返回 stdout 全文。退出码非 0 时 reject,并带上 CLI 报错文本。
extensions/vscode/src/extension/services/CliService.ts:108
↓ 6 callers
Function
runRulesCheck
(filePath string)
cmd/opencodereview/rules_cmd.go:45
↓ 6 callers
Function
scriptCore
()
scripts/github-actions/post-review-comments.test.js:4165
↓ 6 callers
Function
seedParentManifest
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 callers
Function
sel
(id string)
internal/session/manifest_test.go:16
↓ 6 callers
Function
setupFileFindRepo
(t *testing.T)
internal/tool/file_find_test.go:92
↓ 6 callers
Method
trace
(msg: string)
extensions/vscode/src/extension/services/GitService.ts:20
↓ 6 callers
Method
tryApplyPendingCompression
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 callers
Function
unwritableConfigPath
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 callers
Function
upKey
()
cmd/opencodereview/provider_tui_funcs_test.go:382
↓ 5 callers
Method
AsDiff
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 callers
Method
BudgetExceeded
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 callers
Function
CollectToolDefs
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 callers
Function
ContextWithTraceParentFromEnv
ContextWithTraceParentFromEnv extracts W3C traceparent from the TRACEPARENT environment variable and returns a context carrying the upstream span cont
internal/telemetry/span.go:35
↓ 5 callers
Method
FilesReviewed
()
cmd/opencodereview/shared.go:595
↓ 5 callers
Method
Frozen
Frozen reports whether Finalize has already run.
internal/session/manifest.go:718
↓ 5 callers
Function
Init
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 callers
Function
ListSessions
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 callers
Function
Load
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 callers
Function
LoadAppConfig
LoadAppConfig loads config from path. Returns nil, nil if file does not exist.
cmd/opencodereview/config_cmd.go:402
↓ 5 callers
Function
LoadComments
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 callers
Function
NewSessionKey
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 callers
Function
ParseComments
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 callers
Method
Reason
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 callers
Function
RecordCommentsGenerated
(ctx context.Context, n int64)
internal/telemetry/metrics.go:97
↓ 5 callers
Function
RecordReviewDuration
(ctx context.Context, dur time.Duration)
internal/telemetry/metrics.go:77
↓ 5 callers
Method
RecordWarning
RecordWarning adds a non-fatal warning.
internal/llmloop/loop.go:154
↓ 5 callers
Function
RelocateAcrossFiles
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 callers
Method
ReplaceSince
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 callers
Method
Run
Run executes a git command and returns the combined stdout+stderr output.
internal/gitcmd/runner.go:47
↓ 5 callers
Function
SessionKeyFromContext
SessionKeyFromContext returns the session key carried by ctx, or "" when none was set.
internal/llm/sessionkey.go:85
↓ 5 callers
Method
SetExecution
SetExecution sets the non-secret execution provenance.
internal/session/manifest.go:398
↓ 5 callers
Method
SetRepository
SetRepository sets the redacted repository identity.
internal/session/manifest.go:373
↓ 5 callers
Method
Submit
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 callers
Method
Tools
()
internal/mcp/client.go:155
↓ 5 callers
Method
TotalInputTokens
TotalInputTokens returns the accumulated input/prompt tokens from all LLM calls.
internal/llmloop/loop.go:128
↓ 5 callers
Function
TraceIDFromContext
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 callers
Method
ValidateResume
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 callers
Function
applyManualConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:103
↓ 5 callers
Function
applyModelDeleteToEntry
(entry ProviderEntry, name string)
cmd/opencodereview/provider_tui.go:465
↓ 5 callers
Function
assertContains
(t *testing.T, args []string, val string)
internal/tool/code_search_test.go:304
↓ 5 callers
Function
assertNotContains
(t *testing.T, args []string, val string)
internal/tool/code_search_test.go:311
↓ 5 callers
Method
assert_unresolved
(self, severity, want)
examples/gerrit_ci/post_review_test.py:89
↓ 5 callers
Function
buildAllowedHosts
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 callers
Function
buildConcatenatedDiffs
buildConcatenatedDiffs formats all diffs in the group as per-file XML elements.
internal/agent/agent.go:1565
↓ 5 callers
Method
cancelPendingCompression
cancelPendingCompression aborts the conversation's in-flight background compression, if any.
internal/llmloop/compression.go:382
↓ 5 callers
Function
captureStdout
(t *testing.T, fn func())
internal/telemetry/events_test.go:129
↓ 5 callers
Method
clear
()
extensions/vscode/src/extension/providers/lineOffset.ts:20
↓ 5 callers
Function
clearCfgActiveModelIfDeleted
(cfg *Config, providerName, name string)
cmd/opencodereview/provider_tui.go:473
↓ 5 callers
Function
commentKey
(rc)
scripts/github-actions/post-review-comments.test.js:78
↓ 5 callers
Function
configOperations
(fixture)
scripts/github-actions/action-contract.test.js:330
↓ 5 callers
Function
contentToText
(contents []mcp.Content)
internal/mcp/client.go:180
↓ 5 callers
Function
copyLlmComments
(in []model.LlmComment)
internal/session/resume.go:353
↓ 5 callers
Method
customListCount
()
cmd/opencodereview/provider_tui.go:630
↓ 5 callers
Method
describe
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 callers
Function
describeRange
(s session.Summary)
cmd/opencodereview/session_cmd.go:509
↓ 5 callers
Function
displayMode
(m string)
cmd/opencodereview/session_cmd.go:502
↓ 5 callers
Method
ensureApi
()
extensions/vscode/src/extension/services/GitService.ts:24
↓ 5 callers
Function
ensureModelInList
ensureModelInList appends model to the end when missing; never reorders existing entries.
cmd/opencodereview/config_cmd.go:777
↓ 5 callers
Function
exactArgs
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 callers
Method
executeGroupSubtask
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 callers
Method
executeSubtask
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 callers
Function
extractFilenameFromURL
extractFilenameFromURL returns the filename part (last path segment) of a URL pattern.
internal/release/asset_naming_test.go:57
↓ 5 callers
Method
filterDiffs
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 callers
Function
finalizeRequest
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 callers
Method
findCustomIdx
(name string)
cmd/opencodereview/provider_tui.go:1412
↓ 5 callers
Function
findMissingTranslations
(changedFiles)
scripts/github-actions/check-translation-sync.js:183
↓ 5 callers
Function
getChangedFiles
(env, exec = execFileSync)
scripts/github-actions/check-translation-sync.js:224
↓ 5 callers
Function
gitOut
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 callers
Function
hashFields
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 callers
Function
initRepo
(t *testing.T)
internal/gitcmd/runner_test.go:17
↓ 5 callers
Function
isCheckpointAuthorOurs
(comment, appSlug = "")
scripts/github-actions/post-review-comments.js:2395
↓ 5 callers
Function
isConfigReady
(config: OcrConfig | null)
extensions/vscode/src/shared/configUtils.ts:81
↓ 5 callers
Function
isMachineReadable
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 callers
Method
isUserAddedModel
(name string)
cmd/opencodereview/provider_tui.go:2737
↓ 5 callers
Method
isUserAddedOfficialModel
(name string)
cmd/opencodereview/provider_tui.go:498
↓ 5 callers
Function
loadDelegateContext
(opts delegateOptions)
cmd/opencodereview/delegate_cmd.go:96
↓ 5 callers
Method
loadDiffs
loadDiffs populates the diff-related fields.
internal/agent/agent.go:513
↓ 5 callers
Method
logicalRequestID
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 callers
Method
manifestItemID
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 callers
Method
maybeRunDedup
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 callers
Method
maybeRunProjectSummary
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 callers
Method
modelCount
()
cmd/opencodereview/provider_tui.go:626
↓ 5 callers
Method
officialProviderActiveModel
(p llm.Provider)
cmd/opencodereview/provider_tui.go:241
↓ 5 callers
Function
openBrowserCandidates
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 callers
Function
parentState
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 callers
Function
parseShellRC
(path, modelOverride string)
internal/llm/resolver.go:755
↓ 5 callers
Method
planEnabled
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 callers
Method
post_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 callers
Function
preserveCheckpointMarker
(newBody, oldBody)
scripts/github-actions/post-review-comments.js:2307
↓ 5 callers
Function
readCheckpointComment
({ github, owner, repo, prNumber, appSlug = "", log })
scripts/github-actions/post-review-comments.js:2422
↓ 5 callers
Function
resolveWorkingDirForSession
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
← previous
next →
401–500 of 4,688, ranked by callers