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
↓ 7 callers
Method
writeRecordLocked
(rec map[string]any)
internal/session/persist.go:120
↓ 6 callers
Function
CanonicalPath
CanonicalPath returns an absolute path with symlinks resolved.
internal/pathutil/path.go:10
↓ 6 callers
Method
CommentsForPath
CommentsForPath returns a copy of comments whose Path matches the given path.
internal/tool/comment_collector.go:38
↓ 6 callers
Method
CompletionsWithCtx
CompletionsWithCtx sends a chat completion request with context support.
internal/llm/client.go:631
↓ 6 callers
Function
Dynamic
Dynamic creates a Tool with the given name for dynamically discovered tools (e.g. MCP).
internal/tool/definitions.go:48
↓ 6 callers
Method
Enumerate
Enumerate returns one ScanItem per reviewable file. Binaries are emitted with empty Content + IsBinary=true so previews can show them as excluded.
internal/scan/provider.go:77
↓ 6 callers
Function
IsPathExcluded
IsPathExcluded returns true when relPath matches any of the supplied gitignore-style patterns or any default excluded directory prefix (see ExcludedDi
internal/diff/gitignore.go:22
↓ 6 callers
Method
IsUserExcluded
IsUserExcluded reports whether the given path matches any user exclude pattern.
internal/config/rules/system_rules.go:206
↓ 6 callers
Function
NewFileReadDiff
(dm DiffMap)
internal/tool/file_read_diff.go:34
↓ 6 callers
Function
NewLLMClient
--- Factory --- NewLLMClient creates the appropriate client based on the resolved endpoint protocol. protocol dispatch (canonical names from protocol.
internal/llm/client.go:205
↓ 6 callers
Function
NewStub
(t Tool)
internal/tool/stub.go:11
↓ 6 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:71
↓ 6 callers
Function
ParseHunks
ParseHunks parses raw unified diff text for a single file into a slice of Hunks. Lines before the first @@ header (file-level headers like "diff --git
internal/diff/hunk.go:37
↓ 6 callers
Function
StripMarkdownFences
StripMarkdownFences removes ```json and ``` wrappers some models add around structured outputs. Exposed so callers (e.g. agent's review-filter post-st
internal/llmloop/compression.go:159
↓ 6 callers
Method
Validate
()
internal/config/template/template.go:188
↓ 6 callers
Function
applyCLIExcludes
applyCLIExcludes appends user-supplied --exclude patterns (already split into a []string) onto cc.FileFilter.Exclude. Creates the FileFilter if none w
cmd/opencodereview/shared.go:186
↓ 6 callers
Function
applyCustomProviderConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:152
↓ 6 callers
Method
applySessionStart
(rec resumeRecord)
internal/session/resume.go:137
↓ 6 callers
Method
assert_line
(self, c, want_line)
examples/gerrit_ci/post_review_test.py:56
↓ 6 callers
Function
compareReadmeStructures
(files)
scripts/github-actions/check-translation-sync.js:124
↓ 6 callers
Function
ensureMetrics
()
internal/telemetry/metrics.go:29
↓ 6 callers
Method
enterEditCustomProvider
()
cmd/opencodereview/provider_tui.go:1017
↓ 6 callers
Method
executeReviewFilter
executeReviewFilter runs the REVIEW_FILTER_TASK to remove comments that are provably incorrect based solely on the diff. Errors are logged and silentl
internal/agent/agent.go:695
↓ 6 callers
Function
extractHeadings
(markdown)
scripts/github-actions/check-translation-sync.js:56
↓ 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:117
↓ 6 callers
Function
getPrDiffHunks
({ github, owner, repo, prNumber, commitSha, log, cache })
scripts/github-actions/post-review-comments.js:1971
↓ 6 callers
Function
gitCommit
(t *testing.T, repo, msg string)
internal/scan/provider_test.go:113
↓ 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:42
↓ 6 callers
Function
handleRepos
(w http.ResponseWriter, r *http.Request, root string)
internal/viewer/handler.go:9
↓ 6 callers
Function
listCursorPrefix
(isCursor bool)
cmd/opencodereview/provider_tui.go:1929
↓ 6 callers
Function
loadPackageJSON
(t *testing.T)
internal/release/asset_naming_test.go:31
↓ 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:457
↓ 6 callers
Function
maskedSecretPlaceholder
()
cmd/opencodereview/provider_tui.go:847
↓ 6 callers
Function
parseBpeData
parseBpeData parses the base64-encoded BPE data format. Each line: <base64-token> <rank>
internal/llm/embedded_loader.go:53
↓ 6 callers
Function
parseTemplate
(name string)
internal/viewer/server.go:92
↓ 6 callers
Method
read
()
extensions/vscode/src/extension/services/ConfigService.ts:17
↓ 6 callers
Function
readme
(headings)
scripts/github-actions/check-translation-sync.test.js:28
↓ 6 callers
Function
renderComment
(comment model.LlmComment)
cmd/opencodereview/output.go:59
↓ 6 callers
Function
runConfig
runConfig provides test compatibility: dispatches config subcommands.
cmd/opencodereview/compat_test.go:136
↓ 6 callers
Function
runGitCmd
(repoDir string, args ...string)
cmd/opencodereview/git.go:9
↓ 6 callers
Method
runRaw
运行任意参数,流式回调日志,结束返回 stdout 全文。退出码非 0 时 reject,并带上 CLI 报错文本。
extensions/vscode/src/extension/services/CliService.ts:104
↓ 6 callers
Function
sanitizeMarkdown
(s string)
cmd/opencodereview/background_file.go:96
↓ 6 callers
Method
trace
(msg: string)
extensions/vscode/src/extension/services/GitService.ts:17
↓ 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:318
↓ 6 callers
Function
unmarshalResponsesBody
--- helpers ---
internal/llm/responses_client_test.go:666
↓ 6 callers
Function
upKey
()
cmd/opencodereview/provider_tui_funcs_test.go:270
↓ 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:19
↓ 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:96
↓ 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:32
↓ 5 callers
Function
CountMessagesTokens
CountMessagesTokens returns the rough token count of msgs by summing the per-message text token count. Exported because both review and scan top layer
internal/llmloop/compression.go:66
↓ 5 callers
Method
FilesReviewed
()
cmd/opencodereview/shared.go:242
↓ 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:29
↓ 5 callers
Function
Load
Load parses the tools config file. When path is empty, falls back to the embedded default tools configuration.
internal/config/toolsconfig/toolsconfig.go:24
↓ 5 callers
Function
LoadDetail
LoadDetail returns the summary plus per-file item records for one session.
internal/session/list.go:132
↓ 5 callers
Function
LoadScanDefault
LoadScanDefault parses the embedded scan_template.json.
internal/config/template/template.go:134
↓ 5 callers
Function
NewCommitProvider
NewCommitProvider creates a Provider for commit mode: show changes introduced by a single commit.
internal/diff/git.go:74
↓ 5 callers
Function
NewProvider
NewProvider creates a Provider for range mode: from..to (via merge-base).
internal/diff/git.go:63
↓ 5 callers
Method
Preview
Preview enumerates files and applies the standard reviewability filter without dispatching any LLM calls. Returns a *model.Preview ready for cmd/openc
internal/scan/preview.go:18
↓ 5 callers
Function
ReLocateComment
ReLocateComment calls the LLM to regenerate a precise existing_code snippet when text-based matching fails, then retries ResolveComment with the new s
internal/diff/relocation.go:20
↓ 5 callers
Function
RecordCommentsGenerated
(ctx context.Context, n int64)
internal/telemetry/metrics.go:94
↓ 5 callers
Function
RecordReviewDuration
(ctx context.Context, dur time.Duration)
internal/telemetry/metrics.go:74
↓ 5 callers
Method
RecordReviewItemFailed
RecordReviewItemFailed persists an incomplete file-level checkpoint.
internal/session/history.go:187
↓ 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:79
↓ 5 callers
Function
ResolveComment
ResolveComment attempts to resolve StartLine/EndLine for a single comment by matching ExistingCode against the diff. Returns true on success.
internal/diff/resolver.go:59
↓ 5 callers
Method
Run
Run executes a git command and returns the combined stdout+stderr output.
internal/gitcmd/runner.go:44
↓ 5 callers
Function
StartLLMSpan
StartLLMSpan creates a span for an LLM request with standard attributes.
internal/telemetry/span.go:106
↓ 5 callers
Method
Tools
()
internal/mcp/client.go:152
↓ 5 callers
Method
apiKeyStepCanConfirm
()
cmd/opencodereview/provider_tui.go:914
↓ 5 callers
Function
applyDedupGroups
applyDedupGroups parses the DEDUP_TASK output and returns the deduped comment slice. Returns (nil, false) when the response is malformed OR when the g
internal/scan/agent.go:796
↓ 5 callers
Method
applyEditCustomProviderSave
()
cmd/opencodereview/provider_tui.go:1219
↓ 5 callers
Function
applyManualConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:98
↓ 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
charKey
(c rune)
cmd/opencodereview/provider_tui_test.go:39
↓ 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
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:393
↓ 5 callers
Function
effectivePath
(d model.Diff)
internal/agent/preview.go:101
↓ 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:582
↓ 5 callers
Method
executeSubtask
executeSubtask performs the Plan Phase + Main Loop for a single file.
internal/agent/agent.go:576
↓ 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
initRepo
(t *testing.T)
internal/gitcmd/runner_test.go:14
↓ 5 callers
Function
initRepoWithChange
initRepoWithChange creates a real git repository with one committed file and an uncommitted working-tree modification, returning the repo dir. There i
internal/diff/git_test.go:45
↓ 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
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:404
↓ 5 callers
Function
parseShellRC
(path, modelOverride string)
internal/llm/resolver.go:513
← previous
next →
201–300 of 3,095, ranked by callers