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
↓ 9 callers
Method
TotalInputTokens
()
cmd/opencodereview/shared.go:321
↓ 9 callers
Method
TotalTokensUsed
()
cmd/opencodereview/shared.go:323
↓ 9 callers
Method
buildAnthropicParams
buildAnthropicParams converts the shared ChatRequest into Anthropic SDK parameters.
internal/llm/client.go:842
↓ 9 callers
Function
downKey
()
cmd/opencodereview/provider_tui_test.go:34
↓ 9 callers
Function
finishManifestFlow
(t *testing.T, a *Agent)
internal/agent/manifest_integration_test.go:119
↓ 9 callers
Function
gitCommit
(t *testing.T, repo, msg string)
internal/scan/provider_test.go:116
↓ 9 callers
Function
makeComments
(n)
scripts/github-actions/post-review-comments.test.js:1400
↓ 9 callers
Function
newManifestFlowAgent
(t *testing.T, diffs []model.Diff, resume *session.ResumeState)
internal/agent/manifest_integration_test.go:45
↓ 9 callers
Function
newQuietHandle
newQuietHandle silences stdout for machine-readable formats (json, sarif) or when audience=="agent"; otherwise the returned handle is a no-op restorer
cmd/opencodereview/shared.go:298
↓ 9 callers
Function
officialDashscopeModelTUI
(t *testing.T, configPath string, extraModels []string)
cmd/opencodereview/provider_tui_test.go:1513
↓ 9 callers
Function
open
()
extensions/vscode/src/webview/components/CommentCard.tsx:18
↓ 9 callers
Function
outputRetryReportText
outputRetryReportText renders the frozen retry report as the terminal summary. It is a run result, not a warning, so it goes to the same writer as the
cmd/opencodereview/output.go:397
↓ 9 callers
Method
post_note
(self, body)
examples/gitlab_ci/post_review_test.py:139
↓ 9 callers
Function
resolveWorkingDir
resolveWorkingDir returns (absPath, isGitRepo, err). When requireGit is true, returns an error if the directory is not a git repo. When false, returns
cmd/opencodereview/shared.go:107
↓ 9 callers
Method
runCompression
runCompression performs three-zone memory compression on the given messages, summarizing the compress zone while preserving the active zone intact. Re
internal/llmloop/compression.go:212
↓ 9 callers
Function
runGit
(cwd: string, args: string[])
extensions/vscode/src/extension/services/GitService.ts:496
↓ 8 callers
Method
ApplyLanguage
ApplyLanguage injects a language directive into all system-role messages across MAIN_TASK, PLAN_TASK (if set), and MEMORY_COMPRESSION_TASK.
internal/config/template/template.go:184
↓ 8 callers
Method
CommentsForPath
CommentsForPath returns a copy of comments whose Path matches the given path.
internal/tool/comment_collector.go:41
↓ 8 callers
Method
IsUserIncluded
IsUserIncluded reports whether the given path matches any user include pattern. The check is case-insensitive: both path and pattern are lowercased. R
internal/config/rules/system_rules.go:239
↓ 8 callers
Function
LoadDefault
LoadDefault parses the embedded task_template.json and resolves prompt file references.
internal/config/template/template.go:123
↓ 8 callers
Function
LoadScanDefault
LoadScanDefault parses the embedded scan_template.json.
internal/config/template/template.go:157
↓ 8 callers
Function
NewDiffMap
NewDiffMap creates a frozen, read-only DiffMap from a plain map.
internal/tool/file_read_diff.go:18
↓ 8 callers
Function
PromptTokenLimit
PromptTokenLimit returns tokenWarningThreshold (80%) of maxTokens. It is shared by the agent and scan pre-flight gates, their large-input filters, and
internal/llmloop/compression.go:29
↓ 8 callers
Method
RecordAttempt
RecordAttempt appends one observed HTTP attempt for m. startedAt and endedAt bracket the real HTTP call: the observer takes them immediately before a
internal/llm/retry_report.go:289
↓ 8 callers
Function
RegisterAll
RegisterAll registers tools from the MCP client into the tool registry. When allowedTools is non-empty, only tools whose names appear in the list are
internal/mcp/provider.go:33
↓ 8 callers
Function
RequestMetaFromContext
RequestMetaFromContext returns the RequestMeta attached to ctx, if any. It is exported so the packages that stamp identity — internal/llmloop and int
internal/llm/retry_meta.go:148
↓ 8 callers
Function
ResolveEndpointWithModelOverride
ResolveEndpointWithModelOverride is a compatibility wrapper around ResolveEndpointWithOptions for callers that only override the model.
internal/llm/resolver.go:76
↓ 8 callers
Method
SealSelected
SealSelected closes the selected set. After it returns, RegisterSelected fails and the coverage denominator is fixed; per-item Mark* calls continue to
internal/session/manifest.go:531
↓ 8 callers
Method
Tool
Tool returns which tool this provider implements.
internal/tool/definitions.go:73
↓ 8 callers
Method
ValidateScanOptions
ValidateScanOptions verifies that the previous session was a full-file scan.
internal/session/resume.go:294
↓ 8 callers
Method
applyEditCustomProviderSave
()
cmd/opencodereview/provider_tui.go:1229
↓ 8 callers
Method
buildResponsesParams
buildResponsesParams converts the shared ChatRequest into Responses API parameters. Mapping notes: - Multiple system messages are concatenated into I
internal/llm/responses_client.go:171
↓ 8 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:509
↓ 8 callers
Method
dispose
()
extensions/vscode/src/extension/providers/CommentProvider.ts:326
↓ 8 callers
Function
entry_of
(ri, path="main.go")
examples/gerrit_ci/post_review_test.py:49
↓ 8 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:1315
↓ 8 callers
Function
fileReadToolCallResponse
(callID, args string)
internal/llmloop/loop_test.go:66
↓ 8 callers
Function
freezeOne
freezeOne freezes c and returns the single listed request.
internal/llm/retry_boundary_test.go:47
↓ 8 callers
Function
mergeModelLists
(lists ...[]string)
cmd/opencodereview/config_cmd.go:651
↓ 8 callers
Function
newFakeLLM
newFakeLLM returns a server that succeeds on the first attempt for every file. rateLimitOnce and hardFail are set by the caller before use.
cmd/opencodereview/retry_fake_llm_test.go:47
↓ 8 callers
Function
newModelTUIConfig
(cfg modelTUIConfig)
cmd/opencodereview/provider_tui.go:2507
↓ 8 callers
Method
read
(self)
examples/gitlab_ci/post_review_test.py:94
↓ 8 callers
Function
retryTestRepo
retryTestRepo builds a two-file repo with one reviewable commit range (HEAD~1..HEAD), each file carrying its own marker in the second commit only.
cmd/opencodereview/retry_fake_llm_test.go:142
↓ 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
startFakeLLM
startFakeLLM starts srv and points the OCR_LLM_* endpoint resolution at it, with HOME/XDG_CONFIG_HOME redirected so the developer's real config and se
cmd/opencodereview/retry_fake_llm_test.go:169
↓ 8 callers
Function
writeOpenAISSE
(t *testing.T, w http.ResponseWriter, events ...string)
internal/llm/client_test.go:756
↓ 7 callers
Function
AnyToAttr
AnyToAttr converts an arbitrary value to an OTel attribute.KeyValue.
internal/telemetry/span.go:132
↓ 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
NewProvider
NewProvider creates a Provider for range mode: from..to (via merge-base).
internal/diff/git.go:66
↓ 7 callers
Function
RecordLLMResult
RecordLLMResult sets the outcome of an LLM request on the span.
internal/telemetry/span.go:115
↓ 7 callers
Method
RecordUsage
RecordUsage adds the prompt/completion/cache tokens reported by an LLM response to the runner's aggregate counters. Used by callers (plan phase in age
internal/llmloop/loop.go:179
↓ 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:346
↓ 7 callers
Method
SetPendingFailureCause
SetPendingFailureCause records the classification Finalize must use when it sweeps items that never received a Mark*. It records no run_failure and tr
internal/session/manifest.go:460
↓ 7 callers
Method
TotalCacheReadTokens
()
cmd/opencodereview/shared.go:324
↓ 7 callers
Method
TotalCacheWriteTokens
()
cmd/opencodereview/shared.go:325
↓ 7 callers
Method
TotalOutputTokens
()
cmd/opencodereview/shared.go:322
↓ 7 callers
Function
ValidateProtocol
ValidateProtocol accepts the three canonical protocol names and rejects everything else.
internal/llm/protocol.go:55
↓ 7 callers
Function
activeModelForProvider
(cfg *Config, providerName string, entry ProviderEntry)
cmd/opencodereview/config_cmd.go:624
↓ 7 callers
Method
applySessionStart
(rec resumeRecord)
internal/session/resume.go:189
↓ 7 callers
Function
captureStderr
captureStderr captures everything written to os.Stderr during fn. Mirrors captureStdout; used to assert structured usage emitted on the failure path.
cmd/opencodereview/output_helpers_test.go:401
↓ 7 callers
Function
classifyCommentAgainstDiff
(item, diff)
scripts/github-actions/post-review-comments.js:1983
↓ 7 callers
Function
customConfigModelTUI
(t *testing.T, configPath string, models []string)
cmd/opencodereview/provider_tui_funcs_test.go:1017
↓ 7 callers
Method
customProviderEntry
(name string, fallback ProviderEntry)
cmd/opencodereview/provider_tui.go:568
↓ 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:513
↓ 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:1469
↓ 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:187
↓ 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:243
↓ 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
recordWarning
recordWarning adds a non-fatal warning to the agent's warning list.
internal/agent/agent.go:488
↓ 7 callers
Function
renderComment
(comment model.LlmComment)
cmd/opencodereview/output.go:91
↓ 7 callers
Method
repoRoot
()
extensions/vscode/src/extension/services/GitService.ts:254
↓ 7 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:233
↓ 7 callers
Method
runGit
(ctx context.Context, args ...string)
internal/diff/git.go:631
↓ 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
Method
selectedCustomProvider
()
cmd/opencodereview/provider_tui.go:390
↓ 7 callers
Method
syncSessionModelSelection
()
cmd/opencodereview/provider_tui.go:577
↓ 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:454
↓ 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:223
↓ 6 callers
Function
LoadDetail
LoadDetail returns the summary plus per-file item records for one session.
internal/session/list.go:151
↓ 6 callers
Function
LoadSummary
LoadSummary loads a single session's Summary. Errors when the session file is missing or unreadable.
internal/session/list.go:142
↓ 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
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:74
↓ 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
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:268
↓ 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
SetFinalManifest
SetFinalManifest stores the frozen manifest the agent produced. It is embedded into session_end by Finalize and returned to the CLI via FinalManifest.
internal/session/history.go:197
↓ 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
← previous
next →
201–300 of 4,075, ranked by callers