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
↓ 6 callers
Method
Validate
()
internal/config/template/template.go:211
↓ 6 callers
Function
agentTaskDoneResponse
()
internal/agent/agent_test.go:38
↓ 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:255
↓ 6 callers
Function
applyCustomProviderConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:155
↓ 6 callers
Method
assert_line
(self, c, want_line)
examples/gerrit_ci/post_review_test.py:56
↓ 6 callers
Function
charKey
(c rune)
cmd/opencodereview/provider_tui_test.go:42
↓ 6 callers
Function
compareReadmeStructures
(files)
scripts/github-actions/check-translation-sync.js:127
↓ 6 callers
Method
config
(self)
examples/gitlab_ci/post_review_test.py:536
↓ 6 callers
Function
describeStatus
(s session.Summary)
cmd/opencodereview/session_cmd.go:394
↓ 6 callers
Function
effectivePath
(d model.Diff)
internal/agent/preview.go:114
↓ 6 callers
Function
ensureMetrics
()
internal/telemetry/metrics.go:32
↓ 6 callers
Method
enterEditCustomProvider
()
cmd/opencodereview/provider_tui.go:1020
↓ 6 callers
Function
executeDelegatePreview
(opts delegateOptions)
cmd/opencodereview/delegate_cmd.go:166
↓ 6 callers
Function
extractHeadings
(markdown)
scripts/github-actions/check-translation-sync.js:59
↓ 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:120
↓ 6 callers
Function
getPrDiffHunks
({ github, owner, repo, prNumber, commitSha, log, cache })
scripts/github-actions/post-review-comments.js:2041
↓ 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:45
↓ 6 callers
Function
handleRepos
(w http.ResponseWriter, r *http.Request, root string)
internal/viewer/handler.go:12
↓ 6 callers
Function
initBareRepo
initBareRepo creates an empty (unborn) git repository with identity configured but no commits, returning the repo dir.
internal/diff/git_resolve_test.go:30
↓ 6 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:48
↓ 6 callers
Function
listCursorPrefix
(isCursor bool)
cmd/opencodereview/provider_tui.go:1939
↓ 6 callers
Function
loadPackageJSON
(t *testing.T)
internal/release/asset_naming_test.go:34
↓ 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:505
↓ 6 callers
Function
maskedSecretPlaceholder
()
cmd/opencodereview/provider_tui.go:850
↓ 6 callers
Function
max
(a, b int)
internal/suggestdiff/diff.go:73
↓ 6 callers
Function
metaFactory
metaFactory builds the same closure internal/agent injects, so these tests exercise the review wiring rather than a test-only shape.
internal/llmloop/retry_identity_test.go:65
↓ 6 callers
Function
newCustomModelTUI
newCustomModelTUI builds a modelTUIModel backed by a custom provider with a writable config path, so add/delete/persist operations exercise the save p
cmd/opencodereview/provider_tui_modeltui_test.go:16
↓ 6 callers
Function
newOpenAITestServer
newOpenAITestServer returns an httptest server that captures each request's headers and JSON body and responds with a minimal valid chat completion.
internal/llm/client_test.go:1337
↓ 6 callers
Function
parseBpeData
parseBpeData parses the base64-encoded BPE data format. Each line: <base64-token> <rank>
internal/llm/embedded_loader.go:56
↓ 6 callers
Method
read
()
extensions/vscode/src/extension/services/ConfigService.ts:20
↓ 6 callers
Function
readme
(headings)
scripts/github-actions/check-translation-sync.test.js:32
↓ 6 callers
Method
requests
()
internal/llmloop/retry_identity_test.go:49
↓ 6 callers
Function
runConfig
runConfig provides test compatibility: dispatches config subcommands through a fresh cobra command tree that mirrors the production config command, so
cmd/opencodereview/compat_test.go:134
↓ 6 callers
Function
runConfigUnset
(key string)
cmd/opencodereview/config_cmd.go:140
↓ 6 callers
Function
runGitCmd
(repoDir string, args ...string)
cmd/opencodereview/git.go:12
↓ 6 callers
Method
runRaw
运行任意参数,流式回调日志,结束返回 stdout 全文。退出码非 0 时 reject,并带上 CLI 报错文本。
extensions/vscode/src/extension/services/CliService.ts:108
↓ 6 callers
Function
sanitizeMarkdown
(s string)
cmd/opencodereview/background_file.go:99
↓ 6 callers
Function
sanitizeTerminal
(s string)
cmd/opencodereview/output.go:233
↓ 6 callers
Function
scanItemFingerprint
(it model.ScanItem)
internal/scan/agent.go:288
↓ 6 callers
Function
seedParentManifest
seedParentManifest gives a hand-built ResumeState the parent manifest a real resume always has, matching the identity a already resolved. Without one
internal/agent/manifest_integration_test.go:96
↓ 6 callers
Function
sel
(id string)
internal/session/manifest_test.go:16
↓ 6 callers
Method
trace
(msg: string)
extensions/vscode/src/extension/services/GitService.ts:20
↓ 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:336
↓ 6 callers
Function
unmarshalResponsesBody
--- helpers ---
internal/llm/responses_client_test.go:669
↓ 6 callers
Function
unwritableConfigPath
unwritableConfigPath returns a config path whose parent is a regular file, so any saveConfig / loadOrCreateConfig against it fails (ENOTDIR). This is
cmd/opencodereview/provider_tui_savefail_test.go:16
↓ 6 callers
Function
upKey
()
cmd/opencodereview/provider_tui_funcs_test.go:318
↓ 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:22
↓ 5 callers
Method
BudgetExceeded
BudgetExceeded reports whether the aggregate token budget gate stopped the run before all files were reviewed. It is a diagnostic signal only — it fee
cmd/opencodereview/shared.go:343
↓ 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:99
↓ 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:35
↓ 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:69
↓ 5 callers
Method
FilesReviewed
()
cmd/opencodereview/shared.go:320
↓ 5 callers
Method
Frozen
Frozen reports whether Finalize has already run.
internal/session/manifest.go:718
↓ 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:32
↓ 5 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:109
↓ 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:27
↓ 5 callers
Function
LoadAppConfig
LoadAppConfig loads config from path. Returns nil, nil if file does not exist.
cmd/opencodereview/config_cmd.go:362
↓ 5 callers
Function
RecordCommentsGenerated
(ctx context.Context, n int64)
internal/telemetry/metrics.go:97
↓ 5 callers
Function
RecordReviewDuration
(ctx context.Context, dur time.Duration)
internal/telemetry/metrics.go:77
↓ 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:82
↓ 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:62
↓ 5 callers
Method
Run
Run executes a git command and returns the combined stdout+stderr output.
internal/gitcmd/runner.go:47
↓ 5 callers
Method
ServeHTTP
(w http.ResponseWriter, r *http.Request)
cmd/opencodereview/retry_fake_llm_test.go:81
↓ 5 callers
Function
SessionKeyFromContext
SessionKeyFromContext returns the session key carried by ctx, or "" when none was set.
internal/llm/sessionkey.go:64
↓ 5 callers
Function
SessionsDir
SessionsDir returns the on-disk directory that holds JSONL session files for a given repository. It does not create the directory.
internal/session/list.go:98
↓ 5 callers
Method
SetExecution
SetExecution sets the non-secret execution provenance.
internal/session/manifest.go:398
↓ 5 callers
Method
SetRepository
SetRepository sets the redacted repository identity.
internal/session/manifest.go:373
↓ 5 callers
Function
StartLLMSpan
StartLLMSpan creates a span for an LLM request with standard attributes.
internal/telemetry/span.go:109
↓ 5 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:94
↓ 5 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:63
↓ 5 callers
Method
Tools
()
internal/mcp/client.go:155
↓ 5 callers
Method
TotalInputTokens
TotalInputTokens returns the accumulated input/prompt tokens from all LLM calls.
internal/llmloop/loop.go:119
↓ 5 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:48
↓ 5 callers
Function
WithRequestMeta
WithRequestMeta attaches m to ctx so the retry observer can associate every HTTP attempt made under that context with one logical request. It is the o
internal/llm/retry_meta.go:132
↓ 5 callers
Method
apiKeyStepCanConfirm
()
cmd/opencodereview/provider_tui.go:917
↓ 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:965
↓ 5 callers
Function
applyManualConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:101
↓ 5 callers
Function
applyModelDeleteToEntry
(entry ProviderEntry, name string)
cmd/opencodereview/provider_tui.go:434
↓ 5 callers
Function
applyOfficialProviderConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:230
↓ 5 callers
Function
assertContains
(t *testing.T, args []string, val string)
internal/tool/code_search_test.go:304
↓ 5 callers
Function
assertNotContains
(t *testing.T, args []string, val string)
internal/tool/code_search_test.go:311
↓ 5 callers
Method
assert_unresolved
(self, severity, want)
examples/gerrit_ci/post_review_test.py:89
↓ 5 callers
Method
cancelPendingCompression
cancelPendingCompression aborts the conversation's in-flight background compression, if any.
internal/llmloop/compression.go:371
↓ 5 callers
Function
clearCfgActiveModelIfDeleted
(cfg *Config, providerName, name string)
cmd/opencodereview/provider_tui.go:442
↓ 5 callers
Function
commentKey
(rc)
scripts/github-actions/post-review-comments.test.js:78
↓ 5 callers
Function
completeEnum
(values ...string)
cmd/opencodereview/shared_flags.go:68
↓ 5 callers
Function
contentToText
(contents []mcp.Content)
internal/mcp/client.go:180
↓ 5 callers
Function
copyLlmComments
(in []model.LlmComment)
internal/session/resume.go:353
↓ 5 callers
Method
customListCount
()
cmd/opencodereview/provider_tui.go:599
↓ 5 callers
Method
describe
describe renders m for internal construction errors raised by RetryCollector.Freeze. Those errors reach the user through runErr, and with --concurren
internal/llm/retry_meta.go:115
↓ 5 callers
Method
ensureApi
()
extensions/vscode/src/extension/services/GitService.ts:24
↓ 5 callers
Function
ensureModelInList
ensureModelInList appends model to the end when missing; never reorders existing entries.
cmd/opencodereview/config_cmd.go:660
↓ 5 callers
Function
exactArgs
Positional-argument validators that replace Cobra's raw count message ("accepts 2 arg(s), received 1") with an actionable one built from metadata the
cmd/opencodereview/arg_errors.go:23
↓ 5 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:706
↓ 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:1181
↓ 5 callers
Function
extractFilenameFromURL
extractFilenameFromURL returns the filename part (last path segment) of a URL pattern.
internal/release/asset_naming_test.go:57
↓ 5 callers
Method
filterDiffs
filterDiffs drops diffs that should not be reviewed based on user-configured include/exclude patterns and default extension/path filters.
internal/agent/agent.go:1516
↓ 5 callers
Function
finalizeRequest
finalizeRequest is the shared body of the client-boundary defer: correct the last attempt if the error only became visible after the SDK returned, the
internal/llm/retry_boundary.go:129
↓ 5 callers
Method
findCustomIdx
(name string)
cmd/opencodereview/provider_tui.go:1299
↓ 5 callers
Function
findMissingTranslations
(changedFiles)
scripts/github-actions/check-translation-sync.js:183
← previous
next →
301–400 of 4,075, ranked by callers