Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
7,390 in github.com/alibaba/open-code-review
⨍
Functions
7,390
◇
Types & classes
806
↓ 27 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:229
↓ 27 callers
Function
NewWorkspaceProvider
NewWorkspaceProvider creates a Provider for workspace mode (current uncommitted changes).
internal/diff/git.go:121
↓ 27 callers
Method
append
(observation Observation)
internal/behaviortask/observation.go:79
↓ 27 callers
Function
metaCtx
metaCtx attaches identity the way the review path will in P4.
internal/llm/retry_observer_test.go:67
↓ 27 callers
Method
result
()
cmd/opencodereview/provider_tui.go:1997
↓ 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
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
Function
NewRawHolder
()
internal/llm/raw.go:128
↓ 26 callers
Method
ToolCalls
()
cmd/opencodereview/shared.go:779
↓ 26 callers
Function
renderTemplate
(w http.ResponseWriter, name string, data any)
internal/viewer/server.go:486
↓ 26 callers
Function
run_publish
Helper: run publish() with a Recorder and no-op sleep.
examples/gitlab_ci/post_review_test.py:217
↓ 25 callers
Method
GetDiff
GetDiff returns the changes available to a review as parsed model.Diff structs.
internal/diff/git.go:207
↓ 25 callers
Method
Item
Item returns a copy of the checkpoint for fingerprint.
internal/session/resume.go:223
↓ 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
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
Function
CountTokens
(text string)
internal/llm/client.go:572
↓ 24 callers
Function
ckPayload
(over = {})
scripts/github-actions/post-review-comments.test.js:3981
↓ 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
↓ 24 callers
Function
testTask
()
internal/llmloop/task_test.go:35
↓ 23 callers
Method
Bytes
()
internal/gitcmd/runner.go:257
↓ 23 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
↓ 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:1191
↓ 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:6177
↓ 23 callers
Method
call
Drive a poster method over a sequence of fake urlopen outcomes.
examples/gitlab_ci/post_review_test.py:869
↓ 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
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
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
↓ 21 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
↓ 21 callers
Function
git
(test *testing.T, directory string, args ...string)
internal/behaviortask/runner_test.go:34
↓ 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:346
↓ 21 callers
Function
writeTestFile
(t *testing.T, dir, name, content string)
internal/tool/file_read_test.go:18
↓ 20 callers
Method
Len
Keep the buffer private so io.Copy cannot bypass Write via Buffer.ReadFrom.
acp/internal/orchestrator/resolve.go:192
↓ 20 callers
Function
LoadSession
LoadSession fully parses a JSONL file into a ViewSession.
internal/viewer/store.go:468
↓ 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
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
↓ 20 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:104
↓ 20 callers
Function
ckGithub
({ comments, login = "github-actions[bot]", listThrows = false, authThrows = false } = {})
scripts/github-actions/post-review-comments.test.js:4008
↓ 20 callers
Function
initRepo
(t *testing.T)
internal/gitcmd/runner_test.go:18
↓ 20 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:748
↓ 20 callers
Function
retryTestRepo
retryTestRepo builds a repo with one reviewable commit range (HEAD~1..HEAD), each file carrying its own marker in the second commit only. The file se
cmd/opencodereview/retry_fake_llm_test.go:251
↓ 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
writeResolverConfig
(t *testing.T, cfg configFile)
internal/llm/resolver_test.go:288
↓ 19 callers
Function
ModelListContains
ModelListContains reports whether target matches any entry in models (trimmed).
internal/llm/resolver.go:853
↓ 19 callers
Function
NewCommitProvider
NewCommitProvider creates a Provider for commit mode: show changes introduced by a single commit.
internal/diff/git.go:111
↓ 19 callers
Function
NewDiffMap
NewDiffMap creates a frozen, read-only DiffMap from a plain map.
internal/tool/file_read_diff.go:25
↓ 19 callers
Function
NewFileRead
(fr *FileReader)
internal/tool/file_read.go:35
↓ 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
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
↓ 19 callers
Function
ckManifest
(over = {})
scripts/github-actions/post-review-comments.test.js:4386
↓ 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
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
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
Method
Resolve
(path string)
internal/config/rules/system_rules.go:23
↓ 18 callers
Method
ResolveDetail
(path string)
internal/config/rules/system_rules.go:142
↓ 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:242
↓ 18 callers
Method
Write
(p []byte)
cmd/opencodereview/shared.go:444
↓ 18 callers
Function
ckComment
({ payload, login = "github-actions[bot]", body } = {})
scripts/github-actions/post-review-comments.test.js:3998
↓ 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
(test *testing.T, input Input, client fakeClient, configure func(*Deps))
internal/behaviortask/runner_test.go:83
↓ 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
renderMarkdown
(markdown string, width int)
cmd/opencodereview/markdown.go:38
↓ 18 callers
Function
saveTest
(t *testing.T, s Store, a Auth)
internal/chatgptauth/auth_test.go:33
↓ 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
Function
IsEnabled
IsEnabled returns true when telemetry has been initialized with exporters.
internal/telemetry/provider.go:73
↓ 17 callers
Function
LoadDefault
LoadDefault parses the embedded tool definitions shipped with this build.
internal/config/toolsconfig/toolsconfig.go:26
← previous
next →
101–200 of 7,390, ranked by callers