Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
4,576 in github.com/alibaba/open-code-review
⨍
Functions
4,576
◇
Types & classes
417
↓ 7 callers
Method
Finalize
Finalize performs the hard-validated close of the run and returns the immutable manifest. In order it: sweeps any item still selected into failed (col
internal/session/manifest.go:742
↓ 7 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:25
↓ 7 callers
Function
LoadSummary
LoadSummary loads a single session's Summary. Errors when the session file is missing or unreadable.
internal/session/list.go:142
↓ 7 callers
Function
NewProvider
NewProvider creates a Provider for range mode: from..to (via merge-base).
internal/diff/git.go:67
↓ 7 callers
Function
ResolveIdentity
ResolveIdentity computes the identity a review with these args would record, without creating anything: no session, manifest, runner or LLM call. Resu
internal/agent/identity.go:45
↓ 7 callers
Method
RunManifest
RunManifest returns the frozen v1 coverage result for review runs. Scan remains legacy and returns nil.
cmd/opencodereview/shared.go:621
↓ 7 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:177
↓ 7 callers
Method
TotalCacheReadTokens
()
cmd/opencodereview/shared.go:599
↓ 7 callers
Method
TotalCacheWriteTokens
()
cmd/opencodereview/shared.go:600
↓ 7 callers
Method
TotalOutputTokens
()
cmd/opencodereview/shared.go:597
↓ 7 callers
Function
activeModelForProvider
(cfg *Config, providerName string, entry ProviderEntry)
cmd/opencodereview/config_cmd.go:741
↓ 7 callers
Function
agentTaskDoneResponse
()
internal/agent/agent_test.go:41
↓ 7 callers
Method
applySessionStart
(rec resumeRecord)
internal/session/resume.go:189
↓ 7 callers
Function
buildCheckpointMarker
(payload)
scripts/github-actions/post-review-comments.js:2287
↓ 7 callers
Function
classifyCommentAgainstDiff
(item, diff)
scripts/github-actions/post-review-comments.js:2101
↓ 7 callers
Function
completeEnum
(values ...string)
cmd/opencodereview/shared_flags.go:77
↓ 7 callers
Function
configValues
(calls)
scripts/github-actions/action-contract.test.js:318
↓ 7 callers
Function
customConfigModelTUI
(t *testing.T, configPath string, models []string)
cmd/opencodereview/provider_tui_funcs_test.go:1081
↓ 7 callers
Function
emitFailureUsage
emitFailureUsage writes a best-effort structured usage record to stderr when a review fails, so the outer caller still sees the cost of the failed att
cmd/opencodereview/output.go:650
↓ 7 callers
Function
encodeRepoPath
(p string)
internal/session/persist.go:76
↓ 7 callers
Method
filterLargeDiffs
filterLargeDiffs drops diffs whose diff content alone consumes more than 80% of MaxTokens.
internal/agent/agent.go:1947
↓ 7 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
↓ 7 callers
Function
loadLLMRuntime
loadLLMRuntime loads tool defs from toolConfigPath, reads the app config from the user's default config path (applying the configured language to tpl
cmd/opencodereview/shared.go:213
↓ 7 callers
Method
mapResponsesResponse
mapResponsesResponse converts the SDK Response into the shared ChatResponse. Text output is read via the SDK's OutputText() helper (it walks all outpu
internal/llm/responses_client.go:249
↓ 7 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:72
↓ 7 callers
Function
outputPreviewText
(p *agent.DiffPreview, out io.Writer)
cmd/opencodereview/output.go:719
↓ 7 callers
Function
parseGroupingResponse
(content string, diffs []model.Diff)
internal/agent/grouping.go:166
↓ 7 callers
Function
parseTemplate
(name string)
internal/viewer/server.go:175
↓ 7 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:140
↓ 7 callers
Method
repoRoot
()
extensions/vscode/src/extension/services/GitService.ts:261
↓ 7 callers
Method
requests
()
internal/llmloop/retry_identity_test.go:56
↓ 7 callers
Function
runReviewCapturingBoth
End-to-end coverage of the #368 P5 wiring: a real review run against the fake Anthropic server, driven through runReview so review_cmd.go's own Freeze
cmd/opencodereview/retry_report_e2e_test.go:25
↓ 7 callers
Function
setTestHome
setTestHome redirects the user home resolved by os.UserHomeDir() to dir for the duration of the test. Setting HOME alone is NOT enough on Windows: os.
internal/agent/test_home_test.go:13
↓ 7 callers
Method
syncSessionModelSelection
()
cmd/opencodereview/provider_tui.go:608
↓ 7 callers
Function
validateReviewRefs
validateReviewRefs rejects ref-option injection (#112): any --from/--to/ --commit value must be a real commit ref and must not start with '-'.
cmd/opencodereview/review_cmd.go:461
↓ 7 callers
Method
writeRecordLocked
(rec map[string]any)
internal/session/persist.go:125
↓ 6 callers
Function
CanonicalPath
CanonicalPath returns an absolute path with symlinks resolved.
internal/pathutil/path.go:13
↓ 6 callers
Method
IsUserExcluded
IsUserExcluded reports whether the given path matches any user exclude pattern. The check is case-insensitive: both path and pattern are lowercased.
internal/config/rules/system_rules.go:233
↓ 6 callers
Function
LoadDetail
LoadDetail returns the summary plus per-file item records for one session.
internal/session/list.go:151
↓ 6 callers
Method
MarkReused
MarkReused records that the item was reused from a parent session checkpoint.
internal/session/manifest.go:696
↓ 6 callers
Method
MarkWaived
MarkWaived records that the user explicitly waived this selected item, which must still be in the pre-terminal (selected) state. reason is required an
internal/session/manifest.go:713
↓ 6 callers
Function
NewFileReadDiff
(dm DiffMap)
internal/tool/file_read_diff.go:37
↓ 6 callers
Function
NewStub
(t Tool)
internal/tool/stub.go:14
↓ 6 callers
Function
ParseEffort
ParseEffort validates a user-supplied effort value.
internal/config/template/effort.go:41
↓ 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:40
↓ 6 callers
Function
PrintTraceSummary
PrintTraceSummary prints a one-line summary of the review to stdout. If SessionID is non-empty, an "[ocr] Session: <id>" line follows the summary.
internal/telemetry/events.go:86
↓ 6 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:49
↓ 6 callers
Method
RecordReviewItemReused
RecordReviewItemReused records that this run reused a checkpoint from another session.
internal/session/history.go:269
↓ 6 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
↓ 6 callers
Method
ReviseLastAttempt
ReviseLastAttempt rewrites the last attempt of m as an error. It is the client-boundary correction for what the observer cannot see: an error surfaci
internal/llm/retry_report.go:381
↓ 6 callers
Method
Session
Session returns the session history associated with this Agent.
internal/scan/agent.go:173
↓ 6 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
↓ 6 callers
Function
StartLLMSpan
StartLLMSpan creates a span for an LLM request with standard attributes.
internal/telemetry/span.go:109
↓ 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:162
↓ 6 callers
Method
Validate
()
internal/config/template/template.go:250
↓ 6 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
↓ 6 callers
Function
actionScriptSource
(stepName)
scripts/github-actions/post-review-comments.test.js:4130
↓ 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:281
↓ 6 callers
Function
applyCustomProviderConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:157
↓ 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:547
↓ 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:1102
↓ 6 callers
Function
executeDelegatePreview
(opts delegateOptions)
cmd/opencodereview/delegate_cmd.go:157
↓ 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:186
↓ 6 callers
Function
fileGroupKey
fileGroupKey returns a deterministic key for a file group: sorted paths joined by comma.
internal/agent/grouping.go:274
↓ 6 callers
Function
getPrDiffHunks
({ github, owner, repo, prNumber, commitSha, log, cache })
scripts/github-actions/post-review-comments.js:2159
↓ 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
initRepo
initRepo creates a git repo with one commit containing the given files and returns the repo dir and the commit SHA.
internal/config/rules/sniffer_test.go:29
↓ 6 callers
Function
listCursorPrefix
(isCursor bool)
cmd/opencodereview/provider_tui.go:2073
↓ 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:545
↓ 6 callers
Function
maskedSecretPlaceholder
()
cmd/opencodereview/provider_tui.go:881
↓ 6 callers
Function
max
(a, b int)
internal/suggestdiff/diff.go:73
↓ 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
Function
runActionScript
(source, { github, context, core, env })
scripts/github-actions/post-review-comments.test.js:4147
↓ 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:142
↓ 6 callers
Function
runConfigUnset
(key string)
cmd/opencodereview/config_cmd.go:149
↓ 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
runRulesCheck
(filePath string)
cmd/opencodereview/rules_cmd.go:45
↓ 6 callers
Function
scriptCore
()
scripts/github-actions/post-review-comments.test.js:4165
↓ 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:119
↓ 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:707
↓ 6 callers
Function
unwritableConfigPath
unwritableConfigPath returns a config path that is itself a directory, so any saveConfig / loadOrCreateConfig against it fails. This is the lever used
cmd/opencodereview/provider_tui_savefail_test.go:24
↓ 6 callers
Function
upKey
()
cmd/opencodereview/provider_tui_funcs_test.go:382
← previous
next →
301–400 of 4,576, ranked by callers