Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
2,775 in github.com/alibaba/open-code-review
⨍
Functions
2,775
◇
Types & classes
260
↓ 4 callers
Function
LoadResumeState
LoadResumeState replays a previous session JSONL into a fingerprint index.
internal/session/resume.go:68
↓ 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
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:61
↓ 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
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
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
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
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:385
↓ 4 callers
Function
estimateCost
(items []model.ScanItem, planEnabled, dedupEnabled, summaryEnabled bool)
internal/scan/estimate.go:59
↓ 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:535
↓ 4 callers
Function
fencedBlock
(content, language = "")
scripts/github-actions/post-review-comments.js:1145
↓ 4 callers
Method
filterLargeDiffs
filterLargeDiffs drops diffs whose diff content alone consumes more than 80% of MaxTokens.
internal/agent/agent.go:786
↓ 4 callers
Method
filterLargeScans
filterLargeScans drops items whose content exceeds 80% of MaxTokens.
internal/scan/agent.go:320
↓ 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:840
↓ 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
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:699
↓ 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:623
↓ 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 (mirrors Java's processTargetLineCode).
internal/diff/resolver.go:232
↓ 4 callers
Function
outputJSONWithWarnings
(comments []model.LlmComment, warnings []agent.AgentWarning, filesReviewed, inputTokens, outputTokens, totalT
cmd/opencodereview/output.go:267
↓ 4 callers
Function
outputTextWithWarnings
(comments []model.LlmComment, warnings []agent.AgentWarning)
cmd/opencodereview/output.go:35
↓ 4 callers
Function
parseNameStatus
(output: string)
extensions/vscode/src/extension/services/gitMap.ts:149
↓ 4 callers
Function
parseNonNegInt
(val, defaultVal)
scripts/github-actions/post-review-comments.js:733
↓ 4 callers
Function
parseViewerFlags
(args []string)
cmd/opencodereview/viewer_cmd.go:14
↓ 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 only the first and last record of a JSONL file.
internal/viewer/store.go:122
↓ 4 callers
Method
post
(msg: ConfigPanelHostToWebview)
extensions/vscode/src/extension/providers/ConfigPanelProvider.ts:58
↓ 4 callers
Function
readAllPages
(tag, pageFn, log, maxPages = 50)
scripts/github-actions/post-review-comments.js:899
↓ 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:197
↓ 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:340
↓ 4 callers
Function
runLLMTest
()
cmd/opencodereview/llm_cmd.go:31
↓ 4 callers
Function
runSessionList
(args []string)
cmd/opencodereview/session_cmd.go:33
↓ 4 callers
Function
runSessionShow
(args []string)
cmd/opencodereview/session_cmd.go:75
↓ 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:33
↓ 4 callers
Function
unquoteGitPath
(path: string)
extensions/vscode/src/extension/services/gitMap.ts:118
↓ 4 callers
Function
unsetCustomProvider
(configPath, name string)
cmd/opencodereview/config_cmd.go:116
↓ 4 callers
Function
unsetMCPServer
(configPath, name string)
cmd/opencodereview/config_cmd.go:139
↓ 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:67
↓ 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
↓ 3 callers
Method
Get
Get returns the diff text for path.
internal/tool/file_read_diff.go:24
↓ 3 callers
Function
ListSessions
ListSessions returns lightweight summaries for all sessions in a repo subdir.
internal/viewer/store.go:94
↓ 3 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:90
↓ 3 callers
Function
NewClient
NewClient starts an MCP server subprocess, initializes the connection, and caches the list of available tools. The context governs the initialization
internal/mcp/client.go:25
↓ 3 callers
Function
NewToolCallMessage
NewToolCallMessage creates an assistant message with text content and tool invocations.
internal/llm/client.go:67
↓ 3 callers
Function
Of
Of returns a checkpoint with data.
internal/tool/response_message.go:20
↓ 3 callers
Function
PrintToolCallStarted
PrintToolCallStarted prints a line when a tool begins execution. Args are summarized as key-value pairs (path, search terms, etc.). Example: [ocr] ▶
internal/telemetry/events.go:87
↓ 3 callers
Function
RecordLLMRequest
(ctx context.Context, model string, dur time.Duration, totalTokens int64, status string)
internal/telemetry/metrics.go:104
↓ 3 callers
Function
RecordToolCall
(ctx context.Context, name string, dur time.Duration, ok bool)
internal/telemetry/metrics.go:124
↓ 3 callers
Method
RemoveByPathAndIndices
RemoveByPathAndIndices removes comments for a given path whose per-path index (0-based position among all comments with that path) is in the indices s
internal/tool/comment_collector.go:93
↓ 3 callers
Method
Resolve
Resolve returns the rule text for a given file path. Patterns with brace expansion like "*.{go,py}" are expanded into "*.go", "*.py". The first match
internal/config/rules/system_rules.go:127
↓ 3 callers
Function
ResolveConfig
ResolveConfig builds the final Config by merging defaults, JSON config, and env vars. Precedence: defaults < config.json < environment variables.
internal/telemetry/config.go:110
↓ 3 callers
Function
SessionFilePath
SessionFilePath returns the JSONL path for a persisted session.
internal/session/resume.go:56
↓ 3 callers
Method
SetDiffMap
SetDiffMap replaces the diff snapshot. Must be called before concurrent access begins.
internal/tool/file_read_diff.go:39
↓ 3 callers
Function
ShutdownWithTimeout
ShutdownWithTimeout creates a timeout context and calls Shutdown.
internal/telemetry/shutdown.go:33
↓ 3 callers
Method
Snapshot
Snapshot returns the current count of stored comments. Pair with Since / ReplaceSince to operate on the comments added between two points in time (e.g
internal/tool/comment_collector.go:53
↓ 3 callers
Method
StringVarP
StringVarP registers --name with optional short form -s.
cmd/opencodereview/flags.go:26
↓ 3 callers
Method
SubmitFor
SubmitFor is Submit plus registration under key, so AwaitKey can wait for exactly the units submitted under that key instead of the whole pool. Calle
internal/llmloop/pool.go:72
↓ 3 callers
Method
TotalOutputTokens
TotalOutputTokens returns the accumulated completion tokens from all LLM calls.
internal/llmloop/loop.go:66
↓ 3 callers
Method
TotalTokensUsed
TotalTokensUsed / TotalInputTokens / ... delegate to the underlying runner.
internal/scan/agent.go:180
↓ 3 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:45
↓ 3 callers
Method
ValidateOptions
ValidateOptions verifies that the requested review range matches the prior session.
internal/session/resume.go:174
↓ 3 callers
Function
agentTaskDoneResponse
()
internal/agent/agent_test.go:35
↓ 3 callers
Function
applyProviderDeletions
(configPath string, cfg *Config, names []string)
cmd/opencodereview/provider_cmd.go:64
← previous
next →
301–400 of 2,775, ranked by callers