Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
7,169 in github.com/alibaba/open-code-review
⨍
Functions
7,169
◇
Types & classes
774
↓ 27 callers
Function
testStore
(t *testing.T)
internal/chatgptauth/auth_test.go:29
↓ 27 callers
Function
writeFile
(t *testing.T, root, rel string, content []byte)
internal/scan/provider_test.go:100
↓ 26 callers
Method
CompletionsWithCtx
(ctx context.Context, req ChatRequest)
internal/llm/client.go:93
↓ 26 callers
Function
ListProviders
ListProviders returns all built-in providers sorted by provider name. Each returned Provider has its own copy of the Models slice in registry order.
internal/llm/providers.go:528
↓ 26 callers
Method
ToolCalls
()
cmd/opencodereview/shared.go:774
↓ 26 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/config/rules/test_home_test.go:13
↓ 25 callers
Method
Item
Item returns a copy of the checkpoint for fingerprint.
internal/session/resume.go:223
↓ 25 callers
Function
NewRawHolder
()
internal/llm/raw.go:128
↓ 25 callers
Function
StartSpan
StartSpan creates a new span from the given context. When telemetry is not enabled, it returns a no-op span so callers can safely defer .End().
internal/telemetry/span.go:25
↓ 25 callers
Function
fixture
(t *testing.T)
internal/chatgptauth/auth_test.go:134
↓ 25 callers
Function
initTestRepo
(t *testing.T)
internal/scan/provider_test.go:79
↓ 25 callers
Method
parse
extensions/idea/src/test/kotlin/com/alibaba/opencodereview/idea/messages/HostMessagesTest.kt:40
↓ 25 callers
Function
ping
(ctx context.Context, client LLMClient)
internal/llm/retry_observer_test.go:59
↓ 25 callers
Function
renderTemplate
(w http.ResponseWriter, name string, data any)
internal/viewer/server.go:486
↓ 25 callers
Function
str
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/messages/WebviewMessages.kt:90
↓ 24 callers
Method
CompletionsWithCtx
CompletionsWithCtx sends a chat completion request with context support for cancellation and timeout. The deferred finalizeRequest is the client boun
internal/llm/client.go:663
↓ 24 callers
Method
GetDiff
GetDiff returns the changes available to a review as parsed model.Diff structs.
internal/diff/git.go:207
↓ 24 callers
Function
NewRunner
NewRunner returns a Runner bound to the given dependencies.
internal/llmloop/loop.go:78
↓ 24 callers
Function
ckPayload
(over = {})
scripts/github-actions/post-review-comments.test.js:3977
↓ 24 callers
Function
dKey
--- Delete custom provider tests ---
cmd/opencodereview/provider_tui_test.go:1138
↓ 24 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/reviewtask/tools.go:27
↓ 24 callers
Function
testAuth
()
internal/chatgptauth/auth_test.go:30
↓ 24 callers
Function
testGitDir
(t *testing.T)
acp/internal/adapter/locations_test.go:21
↓ 23 callers
Method
Err
()
acp/internal/orchestrator/termination_test.go:114
↓ 23 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
↓ 23 callers
Function
NewAnthropicClient
NewAnthropicClient creates a new Anthropic Messages API client. The Anthropic API manages prompt-cache affinity server-side, so unlike the OpenAI clie
internal/llm/client.go:1175
↓ 23 callers
Method
Output
Output executes a git command and returns stdout only.
internal/gitcmd/runner.go:293
↓ 23 callers
Method
Pending
Pending returns a deep copy of the pending clarification, or nil.
acp/internal/intent/state.go:32
↓ 23 callers
Method
Prompt
(ctx context.Context, p acp.PromptRequest)
acp/internal/adapter/prompt.go:20
↓ 23 callers
Function
SessionFilePath
SessionFilePath returns the JSONL path for a persisted session.
internal/session/resume.go:81
↓ 23 callers
Method
String
()
acp/internal/orchestrator/streams.go:50
↓ 23 callers
Function
botThread
(over = {})
scripts/github-actions/post-review-comments.test.js:6173
↓ 23 callers
Method
call
Drive a poster method over a sequence of fake urlopen outcomes.
examples/gitlab_ci/post_review_test.py:842
↓ 23 callers
Function
newRawMiddleware
newRawMiddleware builds the SDK middleware that captures raw request/response bodies into the writer held by holder. It sits inside the SDK retry loop
internal/llm/raw.go:187
↓ 23 callers
Function
parseScanFlags
parseScanFlags provides test compatibility: parses args through a fresh cobra command instance and returns the resulting scanOptions.
cmd/opencodereview/compat_test.go:46
↓ 23 callers
Function
run_publish
Helper: run publish() with a Recorder and no-op sleep.
examples/gitlab_ci/post_review_test.py:217
↓ 23 callers
Function
useT
()
extensions/frontend/src/webview/I18nProvider.tsx:10
↓ 22 callers
Function
Install
Install copies the stub into directory as name and optionally writes a sidecar config.
acp/internal/testutil/stub.go:112
↓ 22 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:103
↓ 22 callers
Function
gitCommit
(t *testing.T, repo, msg string)
internal/scan/provider_test.go:111
↓ 22 callers
Function
intentCall
intentCall marshals a raw JSON intent object into a submit_intent ToolCall.
acp/internal/intent/fake_test.go:52
↓ 22 callers
Method
loadExistingAPIKey
()
cmd/opencodereview/provider_tui.go:1963
↓ 22 callers
Function
resolveRuleEntries
resolveRuleEntries reads file references in each rule entry and replaces them with the file content. confineRoot is the canonical repo root for the un
internal/config/rules/system_rules.go:575
↓ 22 callers
Method
t
Look up a string and replace `{param}` placeholders. Fall back to English, then the key itself, matching the frontend. */
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/model/HostStrings.kt:145
↓ 21 callers
Method
gitGrep
(ctx context.Context, searchText string, caseSensitive bool, usePerlRegexp bool, pathspec []string)
internal/tool/code_search.go:151
↓ 21 callers
Function
truncate
(s string, maxLen int)
internal/config/rules/system_rules_test.go:332
↓ 21 callers
Function
writeTestFile
(t *testing.T, dir, name, content string)
internal/tool/file_read_test.go:18
↓ 20 callers
Function
LoadSession
LoadSession fully parses a JSONL file into a ViewSession.
internal/viewer/store.go:487
↓ 20 callers
Function
NewClient
NewClient validates that the resolved endpoint can be served and returns the client. Unsupported protocols are an explicit, actionable error.
acp/internal/intent/llm/client.go:40
↓ 20 callers
Function
ckGithub
({ comments, login = "github-actions[bot]", listThrows = false, authThrows = false } = {})
scripts/github-actions/post-review-comments.test.js:4004
↓ 20 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:256
↓ 20 callers
Function
testTask
()
internal/llmloop/task_test.go:35
↓ 20 callers
Function
writeResolverConfig
(t *testing.T, cfg configFile)
internal/llm/resolver_test.go:288
↓ 19 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:71
↓ 19 callers
Function
CountTokens
(text string)
internal/llm/client.go:572
↓ 19 callers
Function
ModelListContains
ModelListContains reports whether target matches any entry in models (trimmed).
internal/llm/resolver.go:853
↓ 19 callers
Function
NewFileRead
(fr *FileReader)
internal/tool/file_read.go:35
↓ 19 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:33
↓ 19 callers
Method
Selected
(id string)
internal/chatgptauth/store.go:126
↓ 19 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:406
↓ 19 callers
Function
attemptsFor
Every test below reaches Freeze without finalizing anything itself: the client boundary in CompletionsWithCtx does it. That is deliberate — Freeze ref
internal/llm/retry_observer_test.go:48
↓ 19 callers
Function
ckManifest
(over = {})
scripts/github-actions/post-review-comments.test.js:4382
↓ 19 callers
Function
comment
One OCR comment as `ocr review --format json` emits it.
examples/gerrit_ci/post_review_test.py:35
↓ 19 callers
Method
currentProvider
()
cmd/opencodereview/provider_tui.go:415
↓ 19 callers
Function
initRepo
(t *testing.T)
internal/gitcmd/runner_test.go:17
↓ 19 callers
Function
parseCliResult
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/CliParse.kt:156
↓ 19 callers
Function
readJsonLines
(file)
scripts/github-actions/action-contract.test.js:310
↓ 19 callers
Function
recordUntimed
recordUntimed records an attempt with zero timestamps. These tests are about numbering, outcome and aggregation, where the derived durations are nois
internal/llm/retry_report_test.go:26
↓ 19 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:743
↓ 19 callers
Method
run_main
(self, argv=(), env=BASE_ENV, result=SAMPLE_RESULT, outcomes=None, input_args=None)
examples/gerrit_ci/post_review_test.py:308
↓ 19 callers
Function
stripANSI
stripANSI removes ANSI escape sequences from a string so tests can assert against plain text content.
cmd/opencodereview/provider_tui_test.go:2613
↓ 18 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:215
↓ 18 callers
Method
Error
()
acp/internal/intent/llm/diagnostics.go:61
↓ 18 callers
Function
NewDiffMap
NewDiffMap creates a frozen, read-only DiffMap from a plain map.
internal/tool/file_read_diff.go:25
↓ 18 callers
Function
ParseDiffText
ParseDiffText splits the unified diff text into per-file Diff structs. ref, if non-empty, is a git ref used to read new-file content via git show inst
internal/diff/parser.go:98
↓ 18 callers
Method
Resolve
(path string)
internal/config/rules/system_rules.go:23
↓ 18 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:240
↓ 18 callers
Method
Write
(p []byte)
cmd/opencodereview/shared.go:439
↓ 18 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:514
↓ 18 callers
Function
ckComment
({ payload, login = "github-actions[bot]", body } = {})
scripts/github-actions/post-review-comments.test.js:3994
↓ 18 callers
Function
escKey
()
cmd/opencodereview/provider_tui_test.go:18
↓ 18 callers
Function
getHeadCommit
(t *testing.T, dir string)
internal/tool/code_search_test.go:133
↓ 18 callers
Function
newTestRunner
(client llm.LLMClient, task Task)
internal/llmloop/runner_test.go:81
↓ 18 callers
Method
one
(t *testing.T)
internal/llm/raw_test.go:42
↓ 18 callers
Function
rawRequest
rawRequest builds an *http.Request with the given body and context for middleware tests.
internal/llm/raw_test.go:69
↓ 18 callers
Function
saveTest
(t *testing.T, s Store, a Auth)
internal/chatgptauth/auth_test.go:33
↓ 17 callers
Method
Bytes
()
internal/gitcmd/runner.go:155
↓ 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
IsEnabled
IsEnabled returns true when telemetry has been initialized with exporters.
internal/telemetry/provider.go:73
↓ 17 callers
Method
Len
Keep the buffer private so io.Copy cannot bypass Write via Buffer.ReadFrom.
acp/internal/orchestrator/resolve.go:192
↓ 17 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:763
↓ 17 callers
Function
NewCommitProvider
NewCommitProvider creates a Provider for commit mode: show changes introduced by a single commit.
internal/diff/git.go:111
↓ 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:145
↓ 17 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:519
↓ 17 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
↓ 17 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
↓ 17 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:539
↓ 17 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
↓ 17 callers
Function
ckRunOptions
(over = {})
scripts/github-actions/post-review-comments.test.js:4389
← previous
next →
101–200 of 7,169, ranked by callers