Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
4,649 in github.com/alibaba/open-code-review
⨍
Functions
4,649
◇
Types & classes
422
↓ 17 callers
Method
CompletedCount
CompletedCount returns the number of file-level checkpoints replay recovered. Review reuse is narrower — see ReusableItem — while scan, having no mani
internal/session/resume.go:211
↓ 17 callers
Function
ContextWithSessionKey
ContextWithSessionKey returns a context carrying the given session key. Review and scan runs bind their session history's SessionID at the top of Run
internal/llm/sessionkey.go:42
↓ 17 callers
Method
Finalize
Finalize decides the request-level outcome for m exactly once. The three inputs are the recorded attempts, the error the logical request returned to
internal/llm/retry_report.go:432
↓ 17 callers
Function
ModelListContains
ModelListContains reports whether target matches any entry in models (trimmed).
internal/llm/resolver.go:810
↓ 17 callers
Method
ReadLines
ReadLines returns a window of lines from the file plus the total line count. startLine is 1-based; maxLines is the maximum number of lines to collect.
internal/tool/filereader.go:142
↓ 17 callers
Method
SetInput
SetInput sets the frozen, resolved input identity (including the mandatory Mode). Finalize rejects an invalid or missing Mode.
internal/session/manifest.go:386
↓ 17 callers
Method
currentProvider
()
cmd/opencodereview/provider_tui.go:414
↓ 17 callers
Function
escKey
()
cmd/opencodereview/provider_tui_test.go:18
↓ 17 callers
Function
inputValues
(overrides = {})
scripts/github-actions/action-contract.test.js:158
↓ 17 callers
Function
makeFixture
()
scripts/github-actions/action-contract.test.js:211
↓ 17 callers
Function
newTestRunner
(client llm.LLMClient, tpl template.Template)
internal/llmloop/runner_test.go:84
↓ 17 callers
Function
removeFixture
(fixture)
scripts/github-actions/action-contract.test.js:263
↓ 17 callers
Function
runGitTest
runGitTest runs a git command in dir and fails the test on error.
internal/diff/git_test.go:19
↓ 16 callers
Method
GetDiff
GetDiff returns all changes as parsed model.Diff structs.
internal/diff/git.go:174
↓ 16 callers
Function
LoadResumeState
LoadResumeState replays a previous session JSONL into a fingerprint index. A record that cannot be parsed fails the load: with nothing to arbitrate co
internal/session/resume.go:97
↓ 16 callers
Function
LoadSession
LoadSession fully parses a JSONL file into a ViewSession.
internal/viewer/store.go:322
↓ 16 callers
Method
MarkFailed
MarkFailed records that the item failed. class must be a valid, specific failure class — an empty or unknown-string class is rejected rather than down
internal/session/manifest.go:704
↓ 16 callers
Function
SessionFilePath
SessionFilePath returns the JSONL path for a persisted session.
internal/session/resume.go:81
↓ 16 callers
Method
SetError
SetError records an error for this task record, writes an llm_error entry to the JSONL stream, and increments the session-level LLM failure counter.
internal/session/history.go:490
↓ 16 callers
Function
ckComment
({ payload, login = "github-actions[bot]", body } = {})
scripts/github-actions/post-review-comments.test.js:3365
↓ 16 callers
Function
ckGithub
({ comments, login = "github-actions[bot]", listThrows = false, authThrows = false } = {})
scripts/github-actions/post-review-comments.test.js:3375
↓ 16 callers
Method
displayModels
()
cmd/opencodereview/provider_tui.go:2722
↓ 16 callers
Method
executeToolCall
executeToolCall dispatches a single tool call from the LLM response and records the result in session history. code_comment handling includes optional
internal/llmloop/loop.go:516
↓ 16 callers
Function
okAttempt
()
internal/llm/retry_report_test.go:34
↓ 16 callers
Function
resultDescription
(result)
scripts/github-actions/action-contract.test.js:293
↓ 16 callers
Function
reviewItemFingerprint
(mode string, d model.Diff)
internal/agent/agent.go:901
↓ 16 callers
Function
runStep
(step, values, fixture, extraEnv = {}, options = {})
scripts/github-actions/action-contract.test.js:283
↓ 16 callers
Function
writeConfigJSON
(t *testing.T, cfg configFile)
internal/llm/resolver_keycmd_test.go:20
↓ 15 callers
Function
IsEnabled
IsEnabled returns true when telemetry has been initialized with exporters.
internal/telemetry/provider.go:73
↓ 15 callers
Function
SessionTaskKey
SessionTaskKey derives the prompt-cache affinity key for one task conversation within a session. Prompt caches match on prefixes, and OCR's task types
internal/llm/sessionkey.go:65
↓ 15 callers
Method
SetResponse
SetResponse records the LLM response in the most recent TaskRecord of the given type. It uses actual token usage from the API response when available,
internal/session/history.go:432
↓ 15 callers
Method
ToolCalls
()
cmd/opencodereview/shared.go:606
↓ 15 callers
Function
build
(comments, **extra)
examples/gerrit_ci/post_review_test.py:43
↓ 15 callers
Function
getHeadCommit
(t *testing.T, dir string)
internal/tool/code_search_test.go:132
↓ 15 callers
Function
http_error
Build an HTTPError suitable for mocking urlopen.
examples/gitlab_ci/post_review_test.py:79
↓ 15 callers
Function
newAgentForTest
(t *testing.T, tpl template.ScanTemplate)
internal/scan/agent_test.go:23
↓ 14 callers
Method
Close
Close closes the underlying file. It is a no-op when the file was never created (no output produced), so failure paths cannot leave a fresh empty file
cmd/opencodereview/shared.go:558
↓ 14 callers
Function
NewCommentWorkerPool
NewCommentWorkerPool creates a pool with the given concurrency limit. workerCount <= 0 defaults to 8.
internal/llmloop/pool.go:52
↓ 14 callers
Method
RegisterSelected
RegisterSelected records an item in the selected set (the coverage denominator). It must be called once per item during the pre-dispatch pass, after f
internal/session/manifest.go:495
↓ 14 callers
Function
ResolveEndpointWithOptions
ResolveEndpointWithOptions resolves an endpoint by first honoring an explicit provider selection. Otherwise it processes config, environment, then she
internal/llm/resolver.go:96
↓ 14 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
↓ 14 callers
Function
anthropicClient
(url string, c *RetryCollector, extra map[string]string)
internal/llm/retry_observer_test.go:71
↓ 14 callers
Function
groupDiffs
groupDiffs calls the LLM with file metadata (no diff content) to produce semantic groups. Falls back to one-file-per-group on any error.
internal/agent/grouping.go:63
↓ 14 callers
Function
log
(msg)
scripts/github-actions/post-review-comments.js:106
↓ 14 callers
Function
mockManifest
(state session.TerminalState)
cmd/opencodereview/emit_run_result_test.go:56
↓ 14 callers
Function
modelIdxForName
(t *testing.T, m providerTUIModel, name string)
cmd/opencodereview/provider_tui_test.go:1568
↓ 14 callers
Function
newModelTUI
newModelTUI builds a model-only TUI for tests. It has no config path or existing config, so add/delete/persist operations are unavailable — use newMod
cmd/opencodereview/provider_tui.go:2665
↓ 14 callers
Function
rightKey
()
cmd/opencodereview/provider_tui_test.go:30
↓ 14 callers
Function
stepNamed
(name)
scripts/github-actions/action-contract.test.js:196
↓ 14 callers
Function
useTranslation
()
pages/src/i18n/context.tsx:67
↓ 14 callers
Function
writeTestFile
(t *testing.T, dir, name, content string)
internal/tool/file_read_test.go:17
↓ 13 callers
Function
CountTokens
(text string)
internal/llm/client.go:460
↓ 13 callers
Method
Manifest
Manifest returns the run's coverage builder, or nil for legacy/scan sessions that did not opt in via SessionOptions.Operation. Callers must be nil-saf
internal/session/history.go:190
↓ 13 callers
Function
NewToolCallMessage
NewToolCallMessage creates an assistant history message. Use this instead of NewTextMessage("assistant", ...) to preserve native replay state and reas
internal/llm/client.go:166
↓ 13 callers
Method
Output
Output executes a git command and returns stdout only.
internal/gitcmd/runner.go:60
↓ 13 callers
Method
ResolveDetail
(path string)
internal/config/rules/system_rules.go:143
↓ 13 callers
Method
ValidateOptions
ValidateOptions verifies that this session can be resumed in the requested review mode at all. It deliberately does not compare the ref text the user
internal/session/resume.go:274
↓ 13 callers
Method
buildAnthropicParams
buildAnthropicParams converts the shared ChatRequest into Anthropic SDK parameters.
internal/llm/client.go:1240
↓ 13 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:410
↓ 13 callers
Function
ckManifest
(over = {})
scripts/github-actions/post-review-comments.test.js:3694
↓ 13 callers
Function
ckRunOptions
(over = {})
scripts/github-actions/post-review-comments.test.js:3701
↓ 13 callers
Function
cloneProviderEntry
cloneProviderEntry deep-copies a ProviderEntry so callers (rollback paths, map cloning) can safely mutate the returned value without aliasing the orig
cmd/opencodereview/provider_tui.go:1289
↓ 13 callers
Function
collectCustomProviders
(cfg *Config)
cmd/opencodereview/provider_tui.go:252
↓ 13 callers
Function
loadBackgroundFile
(path string)
cmd/opencodereview/background_file.go:66
↓ 13 callers
Function
resolveCheckpointRange
({ github, owner, repo, prNumber, enabled = false, sticky = true, fullReview = false, // githu
scripts/github-actions/post-review-comments.js:2481
↓ 13 callers
Method
set
(key: string, value: string)
extensions/vscode/src/extension/services/ConfigService.ts:88
↓ 13 callers
Function
writeFile
(t *testing.T, root, rel string, content []byte)
internal/scan/provider_test.go:105
↓ 13 callers
Function
writeResolverConfig
(t *testing.T, cfg configFile)
internal/llm/resolver_test.go:284
↓ 12 callers
Method
CompletionTokenLimit
CompletionTokenLimit returns the output cap for LLM requests. Runtime prompt-limit overrides must not silently expand the model's output budget.
internal/config/template/template.go:141
↓ 12 callers
Function
Event
Event emits a structured event as a span with immediate end.
internal/telemetry/events.go:23
↓ 12 callers
Function
NewCommitProvider
NewCommitProvider creates a Provider for commit mode: show changes introduced by a single commit.
internal/diff/git.go:78
↓ 12 callers
Function
NormalizeAuthHeader
NormalizeAuthHeader normalizes an auth header value to a canonical form. It returns an error for unrecognized values.
internal/llm/resolver.go:822
↓ 12 callers
Function
NormalizeProtocol
NormalizeProtocol canonicalizes protocol names. It is case-insensitive and trims whitespace. Empty string is returned as-is (the caller decides the de
internal/llm/protocol.go:45
↓ 12 callers
Method
Read
Read returns the full content of a file path (relative to RepoDir), resolved according to the active review mode. - Workspace: reads directly from the
internal/tool/filereader.go:71
↓ 12 callers
Method
String
String names the stop for diagnostics — telemetry attributes, log lines and test failure messages. Without it a MainLoopStop formats as a bare integer
internal/llmloop/loop.go:234
↓ 12 callers
Function
ckArgs
(over = {})
scripts/github-actions/post-review-comments.test.js:3394
↓ 12 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:515
↓ 12 callers
Function
errAttempt
(class ErrorClass, phase FailurePhase, status int)
internal/llm/retry_report_test.go:30
↓ 12 callers
Function
finishManifestFlow
(t *testing.T, a *Agent)
internal/agent/manifest_integration_test.go:142
↓ 12 callers
Function
lastSummaryBody
(gh)
scripts/github-actions/post-review-comments.test.js:3715
↓ 12 callers
Function
log
(msg)
examples/gitlab_ci/post_review.py:54
↓ 12 callers
Function
modelTUIIdxForName
(t *testing.T, m modelTUIModel, name string)
cmd/opencodereview/provider_tui_funcs_test.go:1136
↓ 12 callers
Function
mustUnmarshal
mustUnmarshal is a test helper that unmarshals SARIF output and fails the test on error, so malformed output produces a clear failure instead of a nil
cmd/opencodereview/sarif_test.go:24
↓ 12 callers
Function
resolveLocale
(raw: string)
extensions/vscode/src/shared/i18n.ts:330
↓ 12 callers
Function
resolveOutputWriter
resolveOutputWriter resolves the --output target into a writer plus a cleanup function. - "" or "-" → os.Stdout with a no-op cleanup (colors pres
cmd/opencodereview/shared.go:575
↓ 11 callers
Method
Await
Await blocks until all submitted work has completed and returns aggregated results from every Submit call so far. A panic in submitted work is recove
internal/llmloop/pool.go:129
↓ 11 callers
Method
CompletionsWithCtx
The deferred finalizeRequest is this client's boundary for the retry report; see the OpenAI counterpart for why it is deferred and why the results are
internal/llm/client.go:1174
↓ 11 callers
Function
NewFileFind
(fr *FileReader)
internal/tool/file_find.go:28
↓ 11 callers
Function
NewWorkspaceProvider
NewWorkspaceProvider creates a Provider for workspace mode (current uncommitted changes).
internal/diff/git.go:88
↓ 11 callers
Method
Resolve
(path string)
internal/config/rules/sniffer.go:27
↓ 11 callers
Function
ResolveEndpointWithModelOverride
ResolveEndpointWithModelOverride is a compatibility wrapper around ResolveEndpointWithOptions for callers that only override the model.
internal/llm/resolver.go:89
↓ 11 callers
Function
SetAttr
SetAttr sets a single attribute on a span.
internal/telemetry/span.go:66
↓ 11 callers
Method
Warnings
()
cmd/opencodereview/shared.go:601
↓ 11 callers
Function
actionStepBlock
(name)
scripts/github-actions/post-review-comments.test.js:4118
↓ 11 callers
Method
applyResumeLine
applyResumeLine folds one record into the index. It reports an unparseable line to the caller, which decides whether that is fatal.
internal/session/resume.go:150
↓ 11 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:172
↓ 11 callers
Function
cm
(path, content string)
internal/tool/comment_collector_test.go:12
↓ 11 callers
Function
generateUUID
()
internal/session/persist.go:63
↓ 11 callers
Function
http_error
(code, body=b"", reason="error")
examples/gerrit_ci/post_review_test.py:271
↓ 11 callers
Function
initTestRepo
(t *testing.T)
internal/scan/provider_test.go:84
← previous
next →
101–200 of 4,649, ranked by callers