Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
4,075 in github.com/alibaba/open-code-review
⨍
Functions
4,075
◇
Types & classes
386
↓ 5 callers
Function
getChangedFiles
(env, exec = execFileSync)
scripts/github-actions/check-translation-sync.js:224
↓ 5 callers
Function
getCommitMessage
(repoDir, commit string)
cmd/opencodereview/git.go:27
↓ 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:986
↓ 5 callers
Function
initRepo
(t *testing.T)
internal/gitcmd/runner_test.go:17
↓ 5 callers
Function
isConfigReady
(config: OcrConfig | null)
extensions/vscode/src/shared/configUtils.ts:81
↓ 5 callers
Method
isUserAddedModel
(name string)
cmd/opencodereview/provider_tui.go:2563
↓ 5 callers
Method
isUserAddedOfficialModel
(name string)
cmd/opencodereview/provider_tui.go:467
↓ 5 callers
Function
loadDelegateContext
(opts delegateOptions)
cmd/opencodereview/delegate_cmd.go:95
↓ 5 callers
Method
loadDiffs
loadDiffs populates the diff-related fields.
internal/agent/agent.go:493
↓ 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:1015
↓ 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:880
↓ 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:802
↓ 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:37
↓ 5 callers
Method
modelCount
()
cmd/opencodereview/provider_tui.go:595
↓ 5 callers
Method
officialProviderActiveModel
(p llm.Provider)
cmd/opencodereview/provider_tui.go:210
↓ 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:572
↓ 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
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:581
↓ 5 callers
Function
reviewModeFromOptions
(opts reviewOptions)
cmd/opencodereview/review_cmd.go:420
↓ 5 callers
Function
runSessionCommentsCompat
runSessionCommentsCompat provides test compatibility for old-style runSessionComments([]string{...}) calls.
cmd/opencodereview/compat_test.go:90
↓ 5 callers
Function
sleep
(ms)
scripts/github-actions/post-review-comments.js:1055
↓ 5 callers
Function
splitPaths
(raw string)
cmd/opencodereview/scan_cmd.go:93
↓ 5 callers
Function
unsetCustomProvider
(configPath, name string)
cmd/opencodereview/config_cmd.go:212
↓ 5 callers
Function
unsetMCPServer
(configPath, name string)
cmd/opencodereview/config_cmd.go:235
↓ 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:141
↓ 4 callers
Method
CanonicalConfig
()
internal/config/rules/canonical_config_test.go:17
↓ 4 callers
Function
DefaultConfig
DefaultConfig returns a disabled default configuration.
internal/telemetry/config.go:32
↓ 4 callers
Method
Diffs
()
cmd/opencodereview/shared.go:319
↓ 4 callers
Method
HasInclude
HasInclude reports whether any include patterns are configured.
internal/config/rules/system_rules.go:217
↓ 4 callers
Method
HasPersistence
HasPersistence reports whether this session has a JSONL writer. A false value means no resumable session file exists, even though the run still has it
internal/session/history.go:224
↓ 4 callers
Function
IsReserved
IsReserved reports whether name matches any built-in tool name (including Unknown).
internal/tool/definitions.go:41
↓ 4 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
↓ 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:17
↓ 4 callers
Function
NewRemoteClient
NewRemoteClient connects to a remote MCP server via Streamable HTTP transport. Header values may contain $ENV_VAR references which are expanded at run
internal/mcp/client.go:71
↓ 4 callers
Function
NewResumeLineage
NewResumeLineage builds the lineage for an accepted resume of parent. It returns nil when there is nothing to record — no parent, or a parent with no
internal/session/resume_identity.go:168
↓ 4 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:72
↓ 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:668
↓ 4 callers
Function
PrintTraceSummary
PrintTraceSummary prints a one-line summary of the review to stdout.
internal/telemetry/events.go:72
↓ 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:330
↓ 4 callers
Function
RecordFilesReviewed
(ctx context.Context, n int64)
internal/telemetry/metrics.go:87
↓ 4 callers
Function
RecordToolResult
RecordToolResult sets the outcome of a tool execution on the span.
internal/telemetry/span.go:93
↓ 4 callers
Method
RecordWarning
RecordWarning adds a non-fatal warning.
internal/llmloop/loop.go:145
↓ 4 callers
Method
ResumeInfo
ResumeInfo returns resume metadata for output. Nil means this was not a resume run.
internal/scan/agent.go:189
↓ 4 callers
Method
SessionID
SessionID returns the current scan's persisted session ID. It returns an empty string when no session file exists.
internal/scan/agent.go:176
↓ 4 callers
Method
SessionID
SessionID returns the persisted session identifier so callers can show it in JSON output or failure diagnostics. Returns "" when no session was create
cmd/opencodereview/shared.go:335
↓ 4 callers
Method
SetParentRunID
SetParentRunID links this run to the session it resumed from. It only records the direct parent; the parent's input is never copied into this run.
internal/session/manifest.go:361
↓ 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:15
↓ 4 callers
Function
ToToolDef
ToToolDef converts an MCP tool definition to an llm.ToolDef.
internal/mcp/provider.go:70
↓ 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:11
↓ 4 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
↓ 4 callers
Function
WithinBase
WithinBase reports whether target is base itself or contained under base.
internal/pathutil/path.go:22
↓ 4 callers
Method
_retry
(self, endpoint, data=None, method="GET")
examples/gitlab_ci/post_review.py:824
↓ 4 callers
Method
_versions
(self, *triples)
examples/gitlab_ci/post_review_test.py:1306
↓ 4 callers
Method
acquire
(ctx context.Context)
internal/gitcmd/runner.go:32
↓ 4 callers
Function
addRepoFlag
(cmd *cobra.Command, target *string)
cmd/opencodereview/shared_flags.go:13
↓ 4 callers
Function
batchPaths
(b [][]model.ScanItem)
internal/scan/batch_test.go:21
↓ 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:61
↓ 4 callers
Function
buildBadgeImage
(comment)
scripts/github-actions/post-review-comments.js:1437
↓ 4 callers
Function
buildPolicy
({ severityThreshold, categories } = {})
scripts/github-actions/post-review-comments.js:1468
↓ 4 callers
Function
buildToolRegistry
(collector *tool.CommentCollector, fr *tool.FileReader)
cmd/opencodereview/review_cmd.go:569
↓ 4 callers
Method
cancel
()
extensions/vscode/src/extension/services/CliService.ts:161
↓ 4 callers
Function
captureConfigStderr
(t *testing.T, fn func())
cmd/opencodereview/config_cmd_test.go:1108
↓ 4 callers
Function
cmt
(path, content string)
internal/scan/dedup_test.go:13
↓ 4 callers
Function
computeRetryDelayMs
(error, attempt)
scripts/github-actions/post-review-comments.js:1082
↓ 4 callers
Method
config
(self)
examples/gitlab_ci/post_review_test.py:716
↓ 4 callers
Method
confirmDeleteCustomProviderModel
()
cmd/opencodereview/provider_tui.go:2811
↓ 4 callers
Method
confirmDeleteOfficialModel
()
cmd/opencodereview/provider_tui.go:2849
↓ 4 callers
Method
customProviderActiveModel
(cp customProviderListItem)
cmd/opencodereview/provider_tui.go:202
↓ 4 callers
Method
dedupEnabled
()
internal/scan/agent.go:88
↓ 4 callers
Function
defaultAuthHeader
(protocol string)
internal/llm/resolver.go:618
↓ 4 callers
Function
describeStart
(s session.Summary)
cmd/opencodereview/session_cmd.go:412
↓ 4 callers
Function
ensureMessagesSuffix
ensureMessagesSuffix appends /v1/messages to base URLs that lack a versioned path.
internal/llm/resolver.go:732
↓ 4 callers
Function
estimateCost
(items []model.ScanItem, planEnabled, dedupEnabled, summaryEnabled bool)
internal/scan/estimate.go:62
↓ 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:55
↓ 4 callers
Method
executePlanPhase
executePlanPhase runs the plan task for a single file, sending template messages with resolved placeholders and collecting the LLM response as plan gu
internal/agent/agent.go:1555
↓ 4 callers
Function
expandSessionKeyInBody
expandSessionKeyInBody returns a copy of body with SessionKeyTemplateVar replaced by key in every string value, recursing into nested maps and slices.
internal/llm/sessionkey.go:101
↓ 4 callers
Function
expandSessionKeyInHeaders
expandSessionKeyInHeaders returns a copy of headers with every occurrence of SessionKeyTemplateVar in the values replaced by key. The input map is nev
internal/llm/sessionkey.go:87
↓ 4 callers
Function
fencedBlock
(content, language = "")
scripts/github-actions/post-review-comments.js:1684
↓ 4 callers
Method
filterLargeScans
filterLargeScans drops items whose content exceeds 80% of MaxTokens.
internal/scan/agent.go:444
↓ 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:1150
↓ 4 callers
Function
firstLine
firstLine returns the first non-empty trimmed line of git output, so a stray trailing newline or an unexpected second line never pollutes a resolved S
internal/diff/git.go:549
↓ 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:1023
↓ 4 callers
Function
getShellEnv
()
extensions/vscode/src/extension/services/shellEnv.ts:29
↓ 4 callers
Function
handleSession
(w http.ResponseWriter, r *http.Request, root, repo, sessionID string)
internal/viewer/handler.go:64
↓ 4 callers
Function
handleSessions
(w http.ResponseWriter, r *http.Request, root, repo string)
internal/viewer/handler.go:35
↓ 4 callers
Function
humanTokens
humanTokens formats a token count as e.g. "1.2M" / "850K" / "420".
internal/scan/estimate.go:114
↓ 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:101
↓ 4 callers
Function
initPreviewRepo
(t *testing.T)
internal/agent/preview_run_test.go:14
↓ 4 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:290
↓ 4 callers
Function
isSubtaskErrorType
(warningType string)
cmd/opencodereview/output.go:62
↓ 4 callers
Function
isUserEditMsg
isUserEditMsg reports whether msg represents user text input (typing or paste).
cmd/opencodereview/provider_tui.go:855
↓ 4 callers
Function
itemList
(paths ...string)
internal/scan/batch_test.go:13
↓ 4 callers
Function
loadReviewResumeState
(repoDir string, opts reviewOptions)
cmd/opencodereview/review_cmd.go:332
↓ 4 callers
Function
loadTestTemplate
loadTestTemplate returns a validated default template for runtime tests.
cmd/opencodereview/shared_llmruntime_test.go:17
↓ 4 callers
Function
makeTask
()
internal/diff/relocation_test.go:35
↓ 4 callers
Function
manifestMessage
(manifest *session.RunManifest, findings int)
cmd/opencodereview/output.go:445
← previous
next →
401–500 of 4,075, ranked by callers