MCPcopy Create free account

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

Functions4,075 in github.com/alibaba/open-code-review

↓ 16 callersMethoddisplayModels
()
cmd/opencodereview/provider_tui.go:2548
↓ 16 callersMethodexecuteToolCall
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:444
↓ 16 callersFunctionokAttempt
()
internal/llm/retry_report_test.go:34
↓ 16 callersFunctionparseScanFlags
parseScanFlags provides test compatibility: parses args through a fresh cobra command instance and returns the resulting scanOptions.
cmd/opencodereview/compat_test.go:38
↓ 16 callersFunctionrunGitTest
runGitTest runs a git command in dir and fails the test on error.
internal/diff/git_test.go:19
↓ 15 callersFunctionIsEnabled
IsEnabled returns true when telemetry has been initialized with exporters.
internal/telemetry/provider.go:73
↓ 15 callersFunctionSessionFilePath
SessionFilePath returns the JSONL path for a persisted session.
internal/session/resume.go:81
↓ 15 callersFunctionbuild
(comments, **extra)
examples/gerrit_ci/post_review_test.py:43
↓ 15 callersMethodcurrentProvider
()
cmd/opencodereview/provider_tui.go:383
↓ 15 callersFunctiongetHeadCommit
(t *testing.T, dir string)
internal/tool/code_search_test.go:132
↓ 15 callersFunctionhttp_error
Build an HTTPError suitable for mocking urlopen.
examples/gitlab_ci/post_review_test.py:79
↓ 15 callersFunctionloadBackgroundFile
(path string)
cmd/opencodereview/background_file.go:49
↓ 15 callersFunctionnewAgentForTest
(t *testing.T, tpl template.ScanTemplate)
internal/scan/agent_test.go:18
↓ 15 callersFunctionstripANSI
stripANSI removes ANSI escape sequences from a string so tests can assert against plain text content.
cmd/opencodereview/provider_tui_test.go:2609
↓ 15 callersFunctiontruncate
(s string, maxLen int)
internal/config/rules/system_rules_test.go:232
↓ 14 callersFunctionNewCommentWorkerPool
NewCommentWorkerPool creates a pool with the given concurrency limit. workerCount <= 0 defaults to 8.
internal/llmloop/pool.go:52
↓ 14 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:495
↓ 14 callersFunctionResolveEndpointWithOptions
ResolveEndpointWithOptions resolves an endpoint by first honoring an explicit provider selection. Otherwise it processes config, environment, then she
internal/llm/resolver.go:83
↓ 14 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:463
↓ 14 callersFunctionanthropicClient
(url string, c *RetryCollector, extra map[string]string)
internal/llm/retry_observer_test.go:71
↓ 14 callersFunctionmockManifest
(state session.TerminalState)
cmd/opencodereview/emit_run_result_test.go:56
↓ 14 callersFunctionmodelIdxForName
(t *testing.T, m providerTUIModel, name string)
cmd/opencodereview/provider_tui_test.go:1568
↓ 14 callersFunctionreviewItemFingerprint
(mode string, d model.Diff)
internal/agent/agent.go:819
↓ 14 callersFunctionrightKey
()
cmd/opencodereview/provider_tui_test.go:30
↓ 14 callersFunctionwriteTestFile
(t *testing.T, dir, name, content string)
internal/tool/file_read_test.go:17
↓ 13 callersFunctionCountTokens
(text string)
internal/llm/client.go:334
↓ 13 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
↓ 13 callersMethodValidateOptions
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 callersFunctioncollectCustomProviders
(cfg *Config)
cmd/opencodereview/provider_tui.go:221
↓ 13 callersMethodset
(key: string, value: string)
extensions/vscode/src/extension/services/ConfigService.ts:88
↓ 13 callersFunctionuseTranslation
()
pages/src/i18n/context.tsx:66
↓ 13 callersFunctionwriteResolverConfig
(t *testing.T, cfg configFile)
internal/llm/resolver_test.go:276
↓ 12 callersMethodGetDiff
GetDiff returns all changes as parsed model.Diff structs.
internal/diff/git.go:173
↓ 12 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:187
↓ 12 callersFunctionNormalizeAuthHeader
NormalizeAuthHeader normalizes an auth header value to a canonical form. It returns an error for unrecognized values.
internal/llm/resolver.go:639
↓ 12 callersMethodOutput
Output executes a git command and returns stdout only.
internal/gitcmd/runner.go:60
↓ 12 callersMethodRead
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 callersFunctioncloneProviderEntry
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:1184
↓ 12 callersFunctionerrAttempt
(class ErrorClass, phase FailurePhase, status int)
internal/llm/retry_report_test.go:30
↓ 12 callersFunctionlog
(msg)
scripts/github-actions/post-review-comments.js:88
↓ 12 callersFunctionlog
(msg)
examples/gitlab_ci/post_review.py:54
↓ 12 callersFunctionmodelTUIIdxForName
(t *testing.T, m modelTUIModel, name string)
cmd/opencodereview/provider_tui_funcs_test.go:1072
↓ 12 callersFunctionmustUnmarshal
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:23
↓ 12 callersFunctionnewModelTUI
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:2491
↓ 12 callersFunctionresolveLocale
(raw: string)
extensions/vscode/src/shared/i18n.ts:330
↓ 12 callersFunctionwriteFile
(t *testing.T, root, rel string, content []byte)
internal/scan/provider_test.go:105
↓ 11 callersMethodAwait
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 callersMethodCompletionTokenLimit
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:54
↓ 11 callersMethodResolveDetail
(path string)
internal/config/rules/system_rules.go:123
↓ 11 callersFunctionSetAttr
SetAttr sets a single attribute on a span.
internal/telemetry/span.go:66
↓ 11 callersMethodSetResponse
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:407
↓ 11 callersMethodWarnings
()
cmd/opencodereview/shared.go:326
↓ 11 callersMethodapplyResumeLine
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 callersFunctioncm
(path, content string)
internal/tool/comment_collector_test.go:12
↓ 11 callersFunctiongenerateUUID
()
internal/session/persist.go:63
↓ 11 callersFunctionhttp_error
(code, body=b"", reason="error")
examples/gerrit_ci/post_review_test.py:271
↓ 11 callersFunctionmustJSON
--- helpers ---
internal/session/resume_test.go:736
↓ 11 callersFunctionofficialConfigModelTUI
(t *testing.T, configPath string, extraModels []string)
cmd/opencodereview/provider_tui_funcs_test.go:987
↓ 11 callersFunctionoutputSARIF
outputSARIF writes a SARIF v2.1.0 document to stdout. The document always contains a single run with the 8 built-in category rules, one result per Llm
cmd/opencodereview/sarif.go:131
↓ 11 callersMethodpost
(msg: HostToWebview)
extensions/vscode/src/extension/providers/SidebarProvider.ts:56
↓ 11 callersFunctionrenderTemplate
(w http.ResponseWriter, name string, data any)
internal/viewer/server.go:299
↓ 11 callersFunctionretryReportFixture
retryReportFixture is the report used by most rendering assertions: one request recovered after two errors, one request that never succeeded, and a to
cmd/opencodereview/retry_report_render_test.go:22
↓ 11 callersFunctionuseResponsive
()
pages/src/hooks/useResponsive.ts:12
↓ 10 callersFunctionLoadDefault
LoadDefault parses the embedded system_rules.json and resolves rule file references.
internal/config/rules/system_rules.go:90
↓ 10 callersFunctionNewFileRead
(fr *FileReader)
internal/tool/file_read.go:19
↓ 10 callersFunctionNewManifestBuilder
NewManifestBuilder creates a builder for a run identified by runID (the canonical session ID) and operation ("review" or "scan").
internal/session/manifest.go:351
↓ 10 callersFunctionNewProvider
NewProvider creates a Provider that enumerates the repository at repoDir. If paths is non-empty each element must be a repo-relative path (file or dir
internal/scan/provider.go:54
↓ 10 callersFunctionNewWorkspaceProvider
NewWorkspaceProvider creates a Provider for workspace mode (current uncommitted changes).
internal/diff/git.go:87
↓ 10 callersMethodRecordReviewItemFailed
RecordReviewItemFailed persists an incomplete file-level checkpoint.
internal/session/history.go:295
↓ 10 callersMethodRestore
Restore re-enables stdout. Safe to call multiple times.
cmd/opencodereview/shared.go:307
↓ 10 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:51
↓ 10 callersMethodToolCalls
()
cmd/opencodereview/shared.go:331
↓ 10 callersMethodbeginAPIKeyReplace
beginAPIKeyReplace switches from the fixed-length mask placeholder to edit mode so the next keystroke or paste fully replaces the saved key. While edi
cmd/opencodereview/provider_tui.go:867
↓ 10 callersMethodbuildGrepArgs
(searchText string, caseSensitive bool, usePerlRegexp bool, noIndex bool, pathspec []string)
internal/tool/code_search.go:58
↓ 10 callersFunctiondefaultConfigPath
Default config file location: ~/.opencodereview/config.json
cmd/opencodereview/config_cmd.go:91
↓ 10 callersFunctionexpandBraces
expandBraces turns "{a,b,c}" style patterns into individual strings. e.g. "*.go.{java,kotlin}" → ["*.go.java", "*.go.kotlin"]. If no braces exist, ret
internal/config/rules/system_rules.go:172
↓ 10 callersFunctiongitCommitFile
gitCommitFile writes a file and commits it, returning after the commit lands.
cmd/opencodereview/delegate_exec_test.go:41
↓ 10 callersFunctioninitTestRepo
(t *testing.T)
internal/scan/provider_test.go:84
↓ 10 callersFunctionloadCommonContext
loadCommonContext validates the working directory, loads the embedded template, raises MaxToolRequestTimes when maxTools exceeds the default, resolves
cmd/opencodereview/shared.go:72
↓ 10 callersFunctionmakeDiff
()
internal/diff/relocation_test.go:44
↓ 10 callersFunctionmatchConsecutive
matchConsecutive scans sideLines for a consecutive run matching all targetLines.
internal/diff/resolver.go:151
↓ 10 callersFunctionnewTestClient
(name string, tools []*mcp.Tool)
internal/mcp/provider_test.go:14
↓ 10 callersFunctionreadWorkspaceFileForDiff
(repoDir, relPath string)
internal/diff/workspace_file.go:14
↓ 10 callersFunctionresolveUsage
resolveUsage parses raw JSON bytes into a map and extracts token usage by probing configured paths sequentially. Returns nil if no total_tokens found.
internal/llm/usage_resolver.go:76
↓ 10 callersFunctionsilenceStdout
silenceStdout redirects os.Stdout to /dev/null for the duration of fn so the delegate commands' Printf output does not clutter test logs.
cmd/opencodereview/delegate_exec_test.go:56
↓ 10 callersFunctiontaskDoneResponse
()
internal/llmloop/loop_test.go:62
↓ 10 callersMethodwhyExcluded
whyExcluded applies the filter algorithm as shouldReview but returns the specific reason a file is excluded.
internal/agent/preview.go:34
↓ 10 callersFunctionwriteTempFile
writeTempFile writes content to a temporary file and returns its path.
cmd/opencodereview/background_file_test.go:15
↓ 10 callersFunctionyKey
()
cmd/opencodereview/provider_tui_test.go:1142
↓ 9 callersMethodCompletionsWithCtx
CompletionsWithCtx sends a chat completion request with context support. The deferred finalizeRequest is this client's boundary for the retry report;
internal/llm/client.go:794
↓ 9 callersFunctionDynamic
Dynamic creates a Tool with the given name for dynamically discovered tools (e.g. MCP).
internal/tool/definitions.go:51
↓ 9 callersMethodEnumerate
Enumerate returns one ScanItem per reviewable file. Binaries are emitted with empty Content + IsBinary=true so previews can show them as excluded.
internal/scan/provider.go:80
↓ 9 callersFunctionEvent
Event emits a structured event as a span with immediate end.
internal/telemetry/events.go:23
↓ 9 callersFunctionNewCommitProvider
NewCommitProvider creates a Provider for commit mode: show changes introduced by a single commit.
internal/diff/git.go:77
↓ 9 callersFunctionNewFileFind
(fr *FileReader)
internal/tool/file_find.go:28
↓ 9 callersFunctionNewLLMClient
--- Factory --- NewLLMClient creates the appropriate client based on the resolved endpoint protocol. protocol dispatch (canonical names from protocol.
internal/llm/client.go:268
↓ 9 callersFunctionNormalizeProtocol
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:37
↓ 9 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:33
↓ 9 callersMethodResolveInput
ResolveInput freezes this run's commit endpoints by asking git, following the input-mode matrix: - range: base = merge-base(from,to); head = the
internal/diff/git.go:124
↓ 9 callersMethodSetRunFailure
SetRunFailure records why the whole run stopped. It rejects an invalid class (so an unclassifiable stop is never silently downgraded) and a change of
internal/session/manifest.go:415
← previousnext →101–200 of 4,075, ranked by callers