Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
3,095 in github.com/alibaba/open-code-review
⨍
Functions
3,095
◇
Types & classes
288
↓ 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:75
↓ 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:533
↓ 5 callers
Function
reviewItemFingerprint
(mode string, d model.Diff)
internal/agent/agent.go:563
↓ 5 callers
Function
runConfigUnset
(key string)
cmd/opencodereview/config_cmd.go:133
↓ 5 callers
Function
sanitizeTerminal
(s string)
cmd/opencodereview/output.go:201
↓ 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
BudgetExceeded
BudgetExceeded reports whether a token/tool-call budget gate stopped the run before all files were reviewed. The run still returns partial comments; t
cmd/opencodereview/shared.go:262
↓ 4 callers
Function
DefaultConfig
DefaultConfig returns a disabled default configuration.
internal/telemetry/config.go:29
↓ 4 callers
Method
Diffs
()
cmd/opencodereview/shared.go:241
↓ 4 callers
Method
HasInclude
HasInclude reports whether any include patterns are configured.
internal/config/rules/system_rules.go:201
↓ 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
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:252
↓ 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
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
String
String renders a one-line human-readable estimate, matching scan.Estimate's format so diff and scan warnings read consistently. Money is intentionally
internal/agent/estimate.go:91
↓ 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
agentTaskDoneResponse
()
internal/agent/agent_test.go:35
↓ 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:79
↓ 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 (INV-4): the outer caller must still see the cost of the f
cmd/opencodereview/output.go:365
↓ 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:543
↓ 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:840
↓ 4 callers
Method
filterLargeScans
filterLargeScans drops items whose content exceeds 80% of MaxTokens.
internal/scan/agent.go:328
↓ 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:854
↓ 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:713
↓ 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:637
↓ 4 callers
Method
modelProviderName
()
cmd/opencodereview/provider_tui.go:394
↓ 4 callers
Function
nKey
()
cmd/opencodereview/provider_tui_test.go:1087
↓ 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:272
↓ 4 callers
Function
outputTextWithWarnings
(comments []model.LlmComment, warnings []agent.AgentWarning)
cmd/opencodereview/output.go:39
↓ 4 callers
Function
parseNameStatus
(output: string)
extensions/vscode/src/extension/services/gitMap.ts:158
↓ 4 callers
Function
parseNonNegInt
(val, defaultVal)
scripts/github-actions/post-review-comments.js:1061
↓ 4 callers
Function
partitionMessages
partitionMessages divides messages into frozen, compress, and active zones. Frozen zone is always messages[0:2]. Active zone preserves the K most rece
internal/llmloop/compression.go:123
↓ 4 callers
Function
peekSession
peekSession reads the first record, all review_item records (for comment count), and the last record of a JSONL file.
internal/viewer/store.go:125
↓ 4 callers
Method
post
(msg: ConfigPanelHostToWebview)
extensions/vscode/src/extension/providers/ConfigPanelProvider.ts:58
↓ 4 callers
Function
printVersion
()
cmd/opencodereview/version.go:24
↓ 4 callers
Method
read
(self)
examples/gerrit_ci/post_review_test.py:514
↓ 4 callers
Function
readAllPages
(tag, pageFn, log, maxPages = 50)
scripts/github-actions/post-review-comments.js:1227
↓ 4 callers
Method
release
()
internal/gitcmd/runner.go:41
↓ 4 callers
Function
renderListName
(name string, isCursor bool)
cmd/opencodereview/provider_tui.go:1946
↓ 4 callers
Function
resolveBackgroundFilePath
(repoDir, path string)
cmd/opencodereview/background_file.go:22
↓ 4 callers
Function
resolveRepoDir
resolveRepoDir resolves the repo dir for `ocr rules check`. It delegates to resolveWorkingDir(requireGit=true) so it anchors at the git top-level just
cmd/opencodereview/review_cmd.go:272
↓ 4 callers
Method
resolvedModel
resolvedModel returns the model to persist, falling back to the in-session pick for the provider being finalized when result.model is empty.
cmd/opencodereview/provider_tui.go:85
↓ 4 callers
Method
runGit
(ctx context.Context, args ...string)
internal/diff/git.go:394
↓ 4 callers
Function
runLLMTest
()
cmd/opencodereview/llm_cmd.go:44
↓ 4 callers
Method
selectedModel
()
cmd/opencodereview/provider_tui.go:2883
↓ 4 callers
Method
selectedModelFromState
()
cmd/opencodereview/provider_tui.go:1819
↓ 4 callers
Function
setupFileFindRepo
(t *testing.T)
internal/tool/file_find_test.go:89
↓ 4 callers
Method
summaryEnabled
()
internal/scan/agent.go:83
↓ 4 callers
Function
taskDoneResponse
()
internal/llmloop/loop_test.go:54
↓ 4 callers
Function
taskDoneResponseWithArguments
(arguments string)
internal/llmloop/loop_test.go:33
↓ 4 callers
Function
unquoteGitPath
(path: string)
extensions/vscode/src/extension/services/gitMap.ts:127
↓ 4 callers
Function
unsetCustomProvider
(configPath, name string)
cmd/opencodereview/config_cmd.go:187
↓ 4 callers
Function
unsetMCPServer
(configPath, name string)
cmd/opencodereview/config_cmd.go:210
↓ 4 callers
Function
useSectionTitleStyle
()
pages/src/hooks/useResponsiveStyle.ts:12
↓ 4 callers
Function
userAgent
(provider string)
internal/llm/client.go:26
↓ 4 callers
Function
validateTimeoutSec
validateTimeoutSec converts a config-file timeout (in seconds) to time.Duration. Returns 0 for zero input (use default). Rejects negative values and o
internal/llm/resolver.go:146
↓ 3 callers
Method
CallTool
CallTool invokes a tool on the MCP server and returns the text result.
internal/mcp/client.go:155
↓ 3 callers
Method
CompletionsWithCtx
CompletionsWithCtx sends a Responses API request and maps the result back to the shared ChatResponse shape.
internal/llm/responses_client.go:74
↓ 3 callers
Function
ComputeLineDiff
ComputeLineDiff returns a line-level diff between oldLines and newLines. Uses Myers-style LCS to find common subsequences, then emits context/added/de
internal/suggestdiff/diff.go:24
↓ 3 callers
Function
ContentLogging
ContentLogging returns true when content logging is enabled via OCR_CONTENT_LOGGING.
internal/telemetry/provider.go:75
← previous
next →
301–400 of 3,095, ranked by callers