MCPcopy Create free account

hub / github.com/alibaba/open-code-review / functions

Functions7,128 in github.com/alibaba/open-code-review

↓ 26 callersMethodCompletionsWithCtx
(ctx context.Context, req ChatRequest)
internal/llm/client.go:93
↓ 26 callersFunctionListProviders
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 callersFunctionNewToolCallMessage
NewToolCallMessage creates an assistant history message. Use this instead of NewTextMessage("assistant", ...) to preserve native replay state and reas
internal/llm/client.go:229
↓ 26 callersMethodToolCalls
()
cmd/opencodereview/shared.go:774
↓ 26 callersFunctionsetTestHome
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 callersMethodItem
Item returns a copy of the checkpoint for fingerprint.
internal/session/resume.go:223
↓ 25 callersFunctionNewRawHolder
()
internal/llm/raw.go:128
↓ 25 callersFunctionStartSpan
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 callersFunctioninitTestRepo
(t *testing.T)
internal/scan/provider_test.go:79
↓ 25 callersMethodparse
extensions/idea/src/test/kotlin/com/alibaba/opencodereview/idea/messages/HostMessagesTest.kt:40
↓ 25 callersFunctionping
(ctx context.Context, client LLMClient)
internal/llm/retry_observer_test.go:59
↓ 25 callersFunctionrenderTemplate
(w http.ResponseWriter, name string, data any)
internal/viewer/server.go:486
↓ 25 callersFunctionstr
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/messages/WebviewMessages.kt:90
↓ 24 callersMethodCompletionsWithCtx
CompletionsWithCtx sends a chat completion request with context support for cancellation and timeout. The deferred finalizeRequest is the client boun
internal/llm/client.go:652
↓ 24 callersMethodGetDiff
GetDiff returns the changes available to a review as parsed model.Diff structs.
internal/diff/git.go:207
↓ 24 callersFunctionckPayload
(over = {})
scripts/github-actions/post-review-comments.test.js:3977
↓ 24 callersFunctiondKey
--- Delete custom provider tests ---
cmd/opencodereview/provider_tui_test.go:1138
↓ 24 callersMethodexecuteToolCall
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 callersFunctionfixture
(t *testing.T)
internal/chatgptauth/auth_test.go:134
↓ 24 callersFunctionmsg
(role, text string)
internal/llmloop/compression_test.go:13
↓ 24 callersFunctiontestAuth
()
internal/chatgptauth/auth_test.go:30
↓ 24 callersFunctiontestGitDir
(t *testing.T)
acp/internal/adapter/locations_test.go:21
↓ 23 callersMethodErr
()
acp/internal/orchestrator/termination_test.go:114
↓ 23 callersFunctionLoadResumeState
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 callersFunctionNewAnthropicClient
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:1164
↓ 23 callersMethodOutput
Output executes a git command and returns stdout only.
internal/gitcmd/runner.go:293
↓ 23 callersMethodPending
Pending returns a deep copy of the pending clarification, or nil.
acp/internal/intent/state.go:32
↓ 23 callersMethodPrompt
(ctx context.Context, p acp.PromptRequest)
acp/internal/adapter/prompt.go:20
↓ 23 callersFunctionSessionFilePath
SessionFilePath returns the JSONL path for a persisted session.
internal/session/resume.go:81
↓ 23 callersMethodString
()
acp/internal/orchestrator/streams.go:50
↓ 23 callersFunctionbotThread
(over = {})
scripts/github-actions/post-review-comments.test.js:6173
↓ 23 callersMethodcall
Drive a poster method over a sequence of fake urlopen outcomes.
examples/gitlab_ci/post_review_test.py:842
↓ 23 callersFunctionnewRawMiddleware
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 callersFunctionparseScanFlags
parseScanFlags provides test compatibility: parses args through a fresh cobra command instance and returns the resulting scanOptions.
cmd/opencodereview/compat_test.go:46
↓ 23 callersFunctionrun_publish
Helper: run publish() with a Recorder and no-op sleep.
examples/gitlab_ci/post_review_test.py:217
↓ 23 callersFunctionuseT
()
extensions/frontend/src/webview/I18nProvider.tsx:10
↓ 22 callersFunctionInstall
Install copies the stub into directory as name and optionally writes a sidecar config.
acp/internal/testutil/stub.go:112
↓ 22 callersFunctionResolveEndpointWithOptions
ResolveEndpointWithOptions resolves an endpoint by first honoring an explicit provider selection. Otherwise it processes config, environment, then she
internal/llm/resolver.go:103
↓ 22 callersFunctiongitCommit
(t *testing.T, repo, msg string)
internal/scan/provider_test.go:111
↓ 22 callersFunctionintentCall
intentCall marshals a raw JSON intent object into a submit_intent ToolCall.
acp/internal/intent/fake_test.go:52
↓ 22 callersMethodloadExistingAPIKey
()
cmd/opencodereview/provider_tui.go:1963
↓ 22 callersFunctionresolveRuleEntries
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 callersMethodt
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 callersMethodgitGrep
(ctx context.Context, searchText string, caseSensitive bool, usePerlRegexp bool, pathspec []string)
internal/tool/code_search.go:151
↓ 21 callersFunctiontruncate
(s string, maxLen int)
internal/config/rules/system_rules_test.go:332
↓ 21 callersFunctionwriteTestFile
(t *testing.T, dir, name, content string)
internal/tool/file_read_test.go:18
↓ 20 callersFunctionLoadSession
LoadSession fully parses a JSONL file into a ViewSession.
internal/viewer/store.go:487
↓ 20 callersFunctionNewClient
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 callersFunctionckGithub
({ comments, login = "github-actions[bot]", listThrows = false, authThrows = false } = {})
scripts/github-actions/post-review-comments.test.js:4004
↓ 20 callersFunctionwriteResolverConfig
(t *testing.T, cfg configFile)
internal/llm/resolver_test.go:288
↓ 19 callersFunctionModelListContains
ModelListContains reports whether target matches any entry in models (trimmed).
internal/llm/resolver.go:853
↓ 19 callersFunctionNewFileRead
(fr *FileReader)
internal/tool/file_read.go:35
↓ 19 callersMethodSelected
(id string)
internal/chatgptauth/store.go:126
↓ 19 callersMethodSetInput
SetInput sets the frozen, resolved input identity (including the mandatory Mode). Finalize rejects an invalid or missing Mode.
internal/session/manifest.go:406
↓ 19 callersFunctionattemptsFor
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 callersFunctionckManifest
(over = {})
scripts/github-actions/post-review-comments.test.js:4382
↓ 19 callersFunctioncomment
One OCR comment as `ocr review --format json` emits it.
examples/gerrit_ci/post_review_test.py:35
↓ 19 callersMethodcurrentProvider
()
cmd/opencodereview/provider_tui.go:415
↓ 19 callersFunctioninitRepo
(t *testing.T)
internal/gitcmd/runner_test.go:17
↓ 19 callersFunctionparseCliResult
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/CliParse.kt:156
↓ 19 callersFunctionreadJsonLines
(file)
scripts/github-actions/action-contract.test.js:310
↓ 19 callersFunctionrecordUntimed
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 callersFunctionresolveOutputWriter
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 callersMethodrun_main
(self, argv=(), env=BASE_ENV, result=SAMPLE_RESULT, outcomes=None, input_args=None)
examples/gerrit_ci/post_review_test.py:308
↓ 19 callersFunctionstripANSI
stripANSI removes ANSI escape sequences from a string so tests can assert against plain text content.
cmd/opencodereview/provider_tui_test.go:2613
↓ 18 callersMethodCompletedCount
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 callersMethodError
()
acp/internal/intent/llm/diagnostics.go:61
↓ 18 callersFunctionNewDiffMap
NewDiffMap creates a frozen, read-only DiffMap from a plain map.
internal/tool/file_read_diff.go:25
↓ 18 callersFunctionParseDiffText
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 callersMethodResolve
(path string)
internal/config/rules/system_rules.go:23
↓ 18 callersMethodWrite
(p []byte)
cmd/opencodereview/shared.go:439
↓ 18 callersFunctioncaptureStderr
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 callersFunctionckComment
({ payload, login = "github-actions[bot]", body } = {})
scripts/github-actions/post-review-comments.test.js:3994
↓ 18 callersFunctionescKey
()
cmd/opencodereview/provider_tui_test.go:18
↓ 18 callersFunctiongetHeadCommit
(t *testing.T, dir string)
internal/tool/code_search_test.go:133
↓ 18 callersFunctionnewTestRunner
(client llm.LLMClient, task Task)
internal/llmloop/runner_test.go:81
↓ 18 callersMethodone
(t *testing.T)
internal/llm/raw_test.go:42
↓ 18 callersFunctionrawRequest
rawRequest builds an *http.Request with the given body and context for middleware tests.
internal/llm/raw_test.go:69
↓ 18 callersFunctionsaveTest
(t *testing.T, s Store, a Auth)
internal/chatgptauth/auth_test.go:33
↓ 17 callersMethodBytes
()
internal/gitcmd/runner.go:155
↓ 17 callersFunctionContextWithSessionKey
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 callersMethodFinalize
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 callersFunctionIsEnabled
IsEnabled returns true when telemetry has been initialized with exporters.
internal/telemetry/provider.go:73
↓ 17 callersMethodMarkFailed
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 callersFunctionNewCommitProvider
NewCommitProvider creates a Provider for commit mode: show changes introduced by a single commit.
internal/diff/git.go:111
↓ 17 callersMethodReadLines
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 callersMethodRegisterSelected
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 callersFunctionSessionTaskKey
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 callersFunctionSessionsDir
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 callersMethodSetError
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 callersMethodString
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
↓ 17 callersMethodString
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 callersFunctionckRunOptions
(over = {})
scripts/github-actions/post-review-comments.test.js:4389
↓ 17 callersMethoddisplayModels
()
cmd/opencodereview/provider_tui.go:2756
↓ 17 callersFunctionfileReadToolCallResponse
(callID, args string)
internal/reviewtask/loop_test.go:66
↓ 17 callersFunctionlog
(msg)
scripts/github-actions/post-review-comments.js:133
↓ 17 callersFunctionreviewItemFingerprint
(mode string, d model.Diff)
internal/agent/agent.go:938
↓ 17 callersMethodstr
extensions/idea/src/test/kotlin/com/alibaba/opencodereview/idea/services/ConfigDraftTest.kt:72
↓ 16 callersMethodManifest
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:196
↓ 16 callersMethodNative
Native extracts the replay state of the first choice, if any.
internal/llm/client.go:378
← previousnext →101–200 of 7,128, ranked by callers