Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
4,688 in github.com/alibaba/open-code-review
⨍
Functions
4,688
◇
Types & classes
423
↓ 8 callers
Function
newModelTUIConfig
(cfg modelTUIConfig)
cmd/opencodereview/provider_tui.go:2681
↓ 8 callers
Function
newQuietHandle
newQuietHandle routes [ocr] progress lines away from stdout so they cannot corrupt a structured output document. What it does depends on why stdout ne
cmd/opencodereview/shared.go:338
↓ 8 callers
Function
parseCheckpointMarker
(body)
scripts/github-actions/post-review-comments.js:2319
↓ 8 callers
Method
read
(self)
examples/gitlab_ci/post_review_test.py:94
↓ 8 callers
Function
retryCodesMiddleware
retryCodesMiddleware returns an HTTP middleware that forces the SDK to retry responses whose status code is in the given set, by injecting the x-shoul
internal/llm/client.go:355
↓ 8 callers
Function
runBrowserCmd
runBrowserCmd starts one opener and reports whether it worked. Checking only Start() is not enough: it returns as soon as fork/exec succeeds, while xd
internal/viewer/browser.go:165
↓ 8 callers
Function
sanitizeReason
sanitizeReason is the single, best-effort redaction+truncation floor applied to every reason the builder stores, so no caller path can write an unreda
internal/session/manifest.go:662
↓ 8 callers
Function
sanitizeTerminal
(s string)
cmd/opencodereview/output.go:239
↓ 8 callers
Function
writeOpenAISSE
(t *testing.T, w http.ResponseWriter, events ...string)
internal/llm/client_test.go:756
↓ 7 callers
Function
BuildReLocationMessages
BuildReLocationMessages renders the re-location prompt for cm against d. Returns nil when the task template is absent or empty, which the caller treat
internal/diff/relocation.go:28
↓ 7 callers
Function
DiscoverRepos
DiscoverRepos walks the sessions root and returns one entry per subdirectory.
internal/viewer/store.go:41
↓ 7 callers
Function
ErrorEvent
ErrorEvent emits an error event with error status.
internal/telemetry/events.go:39
↓ 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
Method
Native
Native extracts the replay state of the first choice, if any.
internal/llm/client.go:294
↓ 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
Function
Swap
Swap replaces the stdout writer with replacement and returns a restore function. It lets tests capture output written through Writer(), and lets calle
internal/stdout/stdout.go:57
↓ 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
Method
VisibleContent
VisibleContent extracts visible text only, never falling back to ReasoningContent. History builders must use this to avoid duplicating reasoning that
internal/llm/client.go:266
↓ 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
Method
buildOpenAIParams
buildOpenAIParams converts the shared ChatRequest into OpenAI SDK parameters.
internal/llm/client.go:722
↓ 7 callers
Function
classifyCommentAgainstDiff
(item, diff)
scripts/github-actions/post-review-comments.js:2101
↓ 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:1952
↓ 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
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:253
↓ 7 callers
Function
parseTemplate
(name string)
internal/viewer/server.go:231
↓ 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
unmarshalResponsesBody
--- helpers ---
internal/llm/responses_client_test.go:707
↓ 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
CountMessagesTokens
CountMessagesTokens returns the rough token count of msgs by summing the per-message token count. Exported because both review and scan top layers may
internal/llmloop/compression.go:75
↓ 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:234
↓ 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
ReasoningContent
ReasoningContent extracts the reasoning content of the first choice, if any.
internal/llm/client.go:286
↓ 6 callers
Method
RecordReviewItemReused
RecordReviewItemReused records that this run reused a checkpoint from another session.
internal/session/history.go:271
↓ 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
ServeHTTP
(w http.ResponseWriter, r *http.Request)
cmd/opencodereview/retry_fake_llm_test.go:142
↓ 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:168
↓ 6 callers
Method
Validate
()
internal/config/template/template.go:312
↓ 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:361
↓ 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:563
↓ 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:1459
← previous
next →
301–400 of 4,688, ranked by callers