Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
4,917 in github.com/alibaba/open-code-review
⨍
Functions
4,917
◇
Types & classes
436
↓ 6 callers
Function
executeDelegatePreview
(opts delegateOptions)
cmd/opencodereview/delegate_cmd.go:157
↓ 6 callers
Function
extractHeadings
(markdown)
scripts/github-actions/check-translation-sync.js:59
↓ 6 callers
Function
extractSideLines
extractSideLines extracts one side of the diff from a hunk. When newSide is true, returns context+added lines with new-file line numbers. When newSide
internal/diff/resolver.go:186
↓ 6 callers
Function
fileGroupKey
fileGroupKey returns a deterministic key for a file group: sorted paths joined by comma.
internal/agent/grouping.go:361
↓ 6 callers
Function
getPrDiffHunks
({ github, owner, repo, prNumber, commitSha, log, cache })
scripts/github-actions/post-review-comments.js:2159
↓ 6 callers
Function
groupBatches
groupBatches partitions items according to strategy, then slices each natural group into BatchSize-sized chunks (when size > 0). Within a batch the in
internal/scan/batch.go:45
↓ 6 callers
Function
handleRepos
(w http.ResponseWriter, r *http.Request, root string)
internal/viewer/handler.go:12
↓ 6 callers
Function
initBareRepo
initBareRepo creates an empty (unborn) git repository with identity configured but no commits, returning the repo dir.
internal/diff/git_resolve_test.go:30
↓ 6 callers
Function
initRepo
initRepo creates a git repo with one commit containing the given files and returns the repo dir and the commit SHA.
internal/config/rules/sniffer_test.go:29
↓ 6 callers
Function
listCursorPrefix
(isCursor bool)
cmd/opencodereview/provider_tui.go:2073
↓ 6 callers
Function
loadPackageJSON
(t *testing.T)
internal/release/asset_naming_test.go:34
↓ 6 callers
Function
looksLikeFilePath
looksLikeFilePath returns true when s is likely a file path (not inline content). Heuristic: multi-line text is always inline; single-line text withou
internal/config/rules/system_rules.go:562
↓ 6 callers
Function
maskedSecretPlaceholder
()
cmd/opencodereview/provider_tui.go:881
↓ 6 callers
Function
max
(a, b int)
internal/suggestdiff/diff.go:73
↓ 6 callers
Function
newCustomModelTUI
newCustomModelTUI builds a modelTUIModel backed by a custom provider with a writable config path, so add/delete/persist operations exercise the save p
cmd/opencodereview/provider_tui_modeltui_test.go:16
↓ 6 callers
Function
newOpenAITestServer
newOpenAITestServer returns an httptest server that captures each request's headers and JSON body and responds with a minimal valid chat completion.
internal/llm/client_test.go:1459
↓ 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
Function
parseFrontmatter
(content)
scripts/github-actions/check-plugin-contract.js:326
↓ 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:635
↓ 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:656
↓ 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:632
↓ 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
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:89
↓ 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:321
↓ 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:179
↓ 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:66
↓ 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:153
↓ 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:361
↓ 5 callers
Function
assertNotContains
(t *testing.T, args []string, val string)
internal/tool/code_search_test.go:368
↓ 5 callers
Method
assert_unresolved
(self, severity, want)
examples/gerrit_ci/post_review_test.py:89
↓ 5 callers
Function
bindRawWriter
bindRawWriter opens the session's raw capture file and attaches it to the run's raw holder; defer the returned closer. A nil holder (capture off) or a
cmd/opencodereview/shared.go:277
↓ 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:1568
↓ 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
Function
checkPluginDeclarations
(specs, readJson)
scripts/github-actions/check-plugin-contract.js:474
↓ 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:1346
↓ 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:761
↓ 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:2002
↓ 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
handleSession
(w http.ResponseWriter, r *http.Request, root, repo, sessionID string)
internal/viewer/handler.go:64
↓ 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:1071
↓ 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
← previous
next →
401–500 of 4,917, ranked by callers