Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
3,271 in github.com/alibaba/open-code-review
⨍
Functions
3,271
◇
Types & classes
309
↓ 5 callers
Function
assertContains
(t *testing.T, args []string, val string)
internal/tool/code_search_test.go:288
↓ 5 callers
Function
assertNotContains
(t *testing.T, args []string, val string)
internal/tool/code_search_test.go:295
↓ 5 callers
Method
assert_unresolved
(self, severity, want)
examples/gerrit_ci/post_review_test.py:89
↓ 5 callers
Method
buildAnthropicParams
buildAnthropicParams converts the shared ChatRequest into Anthropic SDK parameters.
internal/llm/client.go:663
↓ 5 callers
Method
cancelPendingCompression
cancelPendingCompression aborts the conversation's in-flight background compression, if any.
internal/llmloop/compression.go:353
↓ 5 callers
Function
commentKey
(rc)
scripts/github-actions/post-review-comments.test.js:74
↓ 5 callers
Function
contentToText
(contents []mcp.Content)
internal/mcp/client.go:177
↓ 5 callers
Function
copyLlmComments
(in []model.LlmComment)
internal/session/resume.go:202
↓ 5 callers
Method
customListCount
()
cmd/opencodereview/provider_tui.go:596
↓ 5 callers
Function
describeStatus
(s session.Summary)
cmd/opencodereview/session_cmd.go:242
↓ 5 callers
Method
dispatchSubtasks
dispatchSubtasks groups items into batches per the configured strategy, then processes batches sequentially while running files within each batch conc
internal/scan/agent.go:415
↓ 5 callers
Method
ensureApi
()
extensions/vscode/src/extension/services/GitService.ts:21
↓ 5 callers
Function
ensureModelInList
ensureModelInList appends model to the end when missing; never reorders existing entries.
cmd/opencodereview/config_cmd.go:606
↓ 5 callers
Method
executeSubtask
executeSubtask performs the Plan Phase + Main Loop for a single file. It returns (completed, stop, err): a hard Go error (err) for provider/config/ctx
internal/agent/agent.go:1097
↓ 5 callers
Function
extractFilenameFromURL
extractFilenameFromURL returns the filename part (last path segment) of a URL pattern.
internal/release/asset_naming_test.go:54
↓ 5 callers
Function
findMissingTranslations
(changedFiles)
scripts/github-actions/check-translation-sync.js:180
↓ 5 callers
Function
getChangedFiles
(env, exec = execFileSync)
scripts/github-actions/check-translation-sync.js:221
↓ 5 callers
Function
getCommitMessage
(repoDir, commit string)
cmd/opencodereview/git.go:24
↓ 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:14
↓ 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:902
↓ 5 callers
Function
initRepo
(t *testing.T)
internal/gitcmd/runner_test.go:14
↓ 5 callers
Function
isConfigReady
(config: OcrConfig | null)
extensions/vscode/src/shared/configUtils.ts:78
↓ 5 callers
Method
isUserAddedModel
(name string)
cmd/opencodereview/provider_tui.go:2553
↓ 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:931
↓ 5 callers
Function
mergeBackground
mergeBackground combines the inline --background value (or an auto-populated commit message) with the content read from --background-file, separated b
cmd/opencodereview/background_file.go:34
↓ 5 callers
Method
modelCount
()
cmd/opencodereview/provider_tui.go:592
↓ 5 callers
Method
officialProviderActiveModel
(p llm.Provider)
cmd/opencodereview/provider_tui.go:207
↓ 5 callers
Function
open
()
extensions/vscode/src/webview/components/CommentCard.tsx:15
↓ 5 callers
Function
outputPreviewText
(p *agent.DiffPreview)
cmd/opencodereview/output.go:468
↓ 5 callers
Function
parseShellRC
(path, modelOverride string)
internal/llm/resolver.go:513
↓ 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:76
↓ 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
Method
read
(self)
examples/gitlab_ci/post_review_test.py:87
↓ 5 callers
Function
readRuleFileSafe
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:576
↓ 5 callers
Function
runConfigUnset
(key string)
cmd/opencodereview/config_cmd.go:133
↓ 5 callers
Function
sanitizeTerminal
(s string)
cmd/opencodereview/output.go:228
↓ 5 callers
Function
sleep
(ms)
scripts/github-actions/post-review-comments.js:1052
↓ 5 callers
Function
splitPaths
(raw string)
cmd/opencodereview/scan_cmd.go:79
↓ 4 callers
Method
AwaitKey
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:138
↓ 4 callers
Method
CanonicalConfig
()
internal/config/rules/canonical_config_test.go:14
↓ 4 callers
Function
DefaultConfig
DefaultConfig returns a disabled default configuration.
internal/telemetry/config.go:29
↓ 4 callers
Method
Diffs
()
cmd/opencodereview/shared.go:273
↓ 4 callers
Method
HasInclude
HasInclude reports whether any include patterns are configured.
internal/config/rules/system_rules.go:214
↓ 4 callers
Function
IsReserved
IsReserved reports whether name matches any built-in tool name (including Unknown).
internal/tool/definitions.go:38
↓ 4 callers
Function
LoadAppConfig
LoadAppConfig loads config from path. Returns nil, nil if file does not exist.
cmd/opencodereview/config_cmd.go:334
↓ 4 callers
Function
LoadGitignorePatterns
LoadGitignorePatterns reads and parses .gitignore patterns from the given repository root. Returns nil if the file is missing or unreadable.
internal/diff/gitignore.go:14
↓ 4 callers
Function
LoadSummary
LoadSummary loads a single session's Summary. Errors when the session file is missing or unreadable.
internal/session/list.go:128
↓ 4 callers
Function
ParseExtraHeaders
ParseExtraHeaders parses a string of comma-separated key=value pairs into a dictionary. Values may be double-quoted to include commas, e.g. X-Forwarde
internal/llm/resolver.go:609
↓ 4 callers
Function
PrintTraceSummary
PrintTraceSummary prints a one-line summary of the review to stdout.
internal/telemetry/events.go:69
↓ 4 callers
Method
ProjectSummary
ProjectSummary is the markdown project-level summary produced by scan's PROJECT_SUMMARY_TASK. Empty for review mode and for scans that skipped / faile
cmd/opencodereview/shared.go:284
↓ 4 callers
Function
RecordFilesReviewed
(ctx context.Context, n int64)
internal/telemetry/metrics.go:84
↓ 4 callers
Function
RecordToolResult
RecordToolResult sets the outcome of a tool execution on the span.
internal/telemetry/span.go:90
↓ 4 callers
Method
RecordWarning
RecordWarning adds a non-fatal warning.
internal/llmloop/loop.go:89
↓ 4 callers
Method
SetFinalManifest
SetFinalManifest stores the frozen manifest the agent produced. It is embedded into session_end by Finalize and returned to the CLI via FinalManifest.
internal/session/history.go:182
↓ 4 callers
Function
Shutdown
Shutdown flushes and shuts down all initialized providers. It should be called before process exit to ensure buffered data is exported.
internal/telemetry/shutdown.go:12
↓ 4 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:60
↓ 4 callers
Function
ToToolDef
ToToolDef converts an MCP tool definition to an llm.ToolDef.
internal/mcp/provider.go:67
↓ 4 callers
Method
TotalInputTokens
TotalInputTokens returns the accumulated input/prompt tokens from all LLM calls.
internal/llmloop/loop.go:63
↓ 4 callers
Function
UseTestSessions
UseTestSessions redirects session persistence to the "test-sessions" subdirectory so that test runs do not pollute the real sessions store. It must b
internal/session/testing.go:8
↓ 4 callers
Function
WithinBase
WithinBase reports whether target is base itself or contained under base.
internal/pathutil/path.go:19
↓ 4 callers
Method
acquire
(ctx context.Context)
internal/gitcmd/runner.go:29
↓ 4 callers
Function
addRepoFlag
(cmd *cobra.Command, target *string)
cmd/opencodereview/shared_flags.go:10
↓ 4 callers
Function
applyModelDeleteToEntry
(entry ProviderEntry, name string)
cmd/opencodereview/provider_tui.go:431
↓ 4 callers
Function
applyOfficialProviderConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:227
↓ 4 callers
Function
batchPaths
(b [][]model.ScanItem)
internal/scan/batch_test.go:18
↓ 4 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:58
↓ 4 callers
Function
buildPolicy
({ severityThreshold, categories } = {})
scripts/github-actions/post-review-comments.js:1398
↓ 4 callers
Function
clearCfgActiveModelIfDeleted
(cfg *Config, providerName, name string)
cmd/opencodereview/provider_tui.go:439
↓ 4 callers
Function
cmt
(path, content string)
internal/scan/dedup_test.go:10
↓ 4 callers
Function
computeRetryDelayMs
(error, attempt)
scripts/github-actions/post-review-comments.js:1079
↓ 4 callers
Method
customProviderActiveModel
(cp customProviderListItem)
cmd/opencodereview/provider_tui.go:199
↓ 4 callers
Method
dedupEnabled
()
internal/scan/agent.go:80
↓ 4 callers
Function
defaultAuthHeader
(protocol string)
internal/llm/resolver.go:559
↓ 4 callers
Function
emitFailureUsage
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:429
↓ 4 callers
Function
ensureMessagesSuffix
ensureMessagesSuffix appends /v1/messages to base URLs that lack a versioned path.
internal/llm/resolver.go:673
↓ 4 callers
Function
estimateCost
(items []model.ScanItem, planEnabled, dedupEnabled, summaryEnabled bool)
internal/scan/estimate.go:59
↓ 4 callers
Function
estimateDiffFileTokens
estimateDiffFileTokens projects the input+output token cost of reviewing a single diff (PLAN + MAIN_TASK rounds). It mirrors scan.estimateFileTokens b
internal/agent/estimate.go:52
↓ 4 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:565
↓ 4 callers
Function
fencedBlock
(content, language = "")
scripts/github-actions/post-review-comments.js:1614
↓ 4 callers
Method
filterLargeDiffs
filterLargeDiffs drops diffs whose diff content alone consumes more than 80% of MaxTokens.
internal/agent/agent.go:1376
↓ 4 callers
Method
filterLargeScans
filterLargeScans drops items whose content exceeds 80% of MaxTokens.
internal/scan/agent.go:350
↓ 4 callers
Method
finalizeManifest
finalizeManifest freezes the run's coverage builder and stores the immutable manifest on the session for persistence and CLI consumption. Nil-safe. A
internal/agent/agent.go:1066
↓ 4 callers
Method
findCustomIdx
(name string)
cmd/opencodereview/provider_tui.go:1289
↓ 4 callers
Function
formatPlanGuidance
formatPlanGuidance parses the PLAN_TASK JSON output into a markdown snippet suitable for embedding in MAIN_TASK. On parse failure it returns the raw c
internal/scan/agent.go:876
↓ 4 callers
Function
getShellEnv
()
extensions/vscode/src/extension/services/shellEnv.ts:26
↓ 4 callers
Function
handleSession
(w http.ResponseWriter, r *http.Request, root, repo, sessionID string)
internal/viewer/handler.go:61
↓ 4 callers
Function
handleSessions
(w http.ResponseWriter, r *http.Request, root, repo string)
internal/viewer/handler.go:32
↓ 4 callers
Function
humanTokens
humanTokens formats a token count as e.g. "1.2M" / "850K" / "420".
internal/scan/estimate.go:111
↓ 4 callers
Function
humanTokens
humanTokens formats a token count as e.g. "1.2M" / "850K" / "420". Mirrors internal/scan/estimate.go; kept here so agent has no scan import.
internal/agent/estimate.go:98
↓ 4 callers
Method
isUserAddedOfficialModel
(name string)
cmd/opencodereview/provider_tui.go:464
↓ 4 callers
Function
itemList
(paths ...string)
internal/scan/batch_test.go:10
↓ 4 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:735
↓ 4 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:659
↓ 4 callers
Function
mockManifest
(state session.TerminalState)
cmd/opencodereview/emit_run_result_test.go:52
↓ 4 callers
Method
modelProviderName
()
cmd/opencodereview/provider_tui.go:394
↓ 4 callers
Function
nKey
()
cmd/opencodereview/provider_tui_test.go:1143
↓ 4 callers
Function
newModelTUIConfig
(cfg modelTUIConfig)
cmd/opencodereview/provider_tui.go:2497
↓ 4 callers
Function
normalizeLine
normalizeLine removes leading/trailing whitespace and strips any leading '+' or '-' diff marker.
internal/diff/resolver.go:232
↓ 4 callers
Function
outputJSONWithWarnings
(comments []model.LlmComment, warnings []agent.AgentWarning, filesReviewed, inputTokens, outputTokens, totalT
cmd/opencodereview/output.go:300
↓ 4 callers
Function
outputTextWithWarnings
(comments []model.LlmComment, warnings []agent.AgentWarning, manifest *session.RunManifest)
cmd/opencodereview/output.go:61
← previous
next →
301–400 of 3,271, ranked by callers