Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
3,747 in github.com/alibaba/open-code-review
⨍
Functions
3,747
◇
Types & classes
340
↓ 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:83
↓ 14 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:452
↓ 14 callers
Function
build
(comments, **extra)
examples/gerrit_ci/post_review_test.py:43
↓ 14 callers
Function
modelIdxForName
(t *testing.T, m providerTUIModel, name string)
cmd/opencodereview/provider_tui_test.go:1568
↓ 14 callers
Function
rightKey
()
cmd/opencodereview/provider_tui_test.go:30
↓ 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:311
↓ 13 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
↓ 13 callers
Method
ValidateOptions
ValidateOptions verifies that the requested review range matches the prior session.
internal/session/resume.go:186
↓ 13 callers
Function
collectCustomProviders
(cfg *Config)
cmd/opencodereview/provider_tui.go:221
↓ 13 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:314
↓ 13 callers
Function
newTestDeps
(client llm.LLMClient)
internal/llmloop/loop_test.go:93
↓ 13 callers
Method
set
(key: string, value: string)
extensions/vscode/src/extension/services/ConfigService.ts:88
↓ 13 callers
Function
useTranslation
()
pages/src/i18n/context.tsx:66
↓ 13 callers
Function
writeResolverConfig
(t *testing.T, cfg configFile)
internal/llm/resolver_test.go:276
↓ 12 callers
Method
GetDiff
GetDiff returns all changes as parsed model.Diff structs.
internal/diff/git.go:173
↓ 12 callers
Function
LoadResumeState
LoadResumeState replays a previous session JSONL into a fingerprint index.
internal/session/resume.go:76
↓ 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:639
↓ 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
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:1184
↓ 12 callers
Function
log
(msg)
scripts/github-actions/post-review-comments.js:88
↓ 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:1072
↓ 12 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:2491
↓ 12 callers
Function
resolveLocale
(raw: string)
extensions/vscode/src/shared/i18n.ts:330
↓ 12 callers
Function
writeFile
(t *testing.T, root, rel string, content []byte)
internal/scan/provider_test.go:105
↓ 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
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:187
↓ 11 callers
Method
ResolveDetail
(path string)
internal/config/rules/system_rules.go:123
↓ 11 callers
Function
SessionFilePath
SessionFilePath returns the JSONL path for a persisted session.
internal/session/resume.go:64
↓ 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:300
↓ 11 callers
Function
cm
(path, content string)
internal/tool/comment_collector_test.go:12
↓ 11 callers
Function
http_error
(code, body=b"", reason="error")
examples/gerrit_ci/post_review_test.py:271
↓ 11 callers
Function
officialConfigModelTUI
(t *testing.T, configPath string, extraModels []string)
cmd/opencodereview/provider_tui_funcs_test.go:987
↓ 11 callers
Method
post
(msg: HostToWebview)
extensions/vscode/src/extension/providers/SidebarProvider.ts:56
↓ 11 callers
Function
renderTemplate
(w http.ResponseWriter, name string, data any)
internal/viewer/server.go:299
↓ 11 callers
Function
useResponsive
()
pages/src/hooks/useResponsive.ts:12
↓ 10 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:54
↓ 10 callers
Function
LoadDefault
LoadDefault parses the embedded system_rules.json and resolves rule file references.
internal/config/rules/system_rules.go:90
↓ 10 callers
Function
NewFileRead
(fr *FileReader)
internal/tool/file_read.go:19
↓ 10 callers
Function
NewManifestBuilder
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 callers
Function
NewProvider
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 callers
Function
NewWorkspaceProvider
NewWorkspaceProvider creates a Provider for workspace mode (current uncommitted changes).
internal/diff/git.go:87
↓ 10 callers
Method
Output
Output executes a git command and returns stdout only.
internal/gitcmd/runner.go:60
↓ 10 callers
Method
RecordReviewItemFailed
RecordReviewItemFailed persists an incomplete file-level checkpoint.
internal/session/history.go:284
↓ 10 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:396
↓ 10 callers
Method
applyResumeLine
(line []byte)
internal/session/resume.go:113
↓ 10 callers
Method
beginAPIKeyReplace
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 callers
Method
buildGrepArgs
(searchText string, caseSensitive bool, usePerlRegexp bool, noIndex bool, pathspec []string)
internal/tool/code_search.go:58
↓ 10 callers
Function
defaultConfigPath
Default config file location: ~/.opencodereview/config.json
cmd/opencodereview/config_cmd.go:91
↓ 10 callers
Function
expandBraces
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 callers
Function
generateUUID
()
internal/session/persist.go:63
↓ 10 callers
Function
gitCommitFile
gitCommitFile writes a file and commits it, returning after the commit lands.
cmd/opencodereview/delegate_exec_test.go:41
↓ 10 callers
Function
initTestRepo
(t *testing.T)
internal/scan/provider_test.go:84
↓ 10 callers
Function
matchConsecutive
matchConsecutive scans sideLines for a consecutive run matching all targetLines.
internal/diff/resolver.go:151
↓ 10 callers
Function
newTestClient
(name string, tools []*mcp.Tool)
internal/mcp/provider_test.go:14
↓ 10 callers
Function
readWorkspaceFileForDiff
(repoDir, relPath string)
internal/diff/workspace_file.go:14
↓ 10 callers
Function
resolveUsage
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 callers
Function
reviewItemFingerprint
(mode string, d model.Diff)
internal/agent/agent.go:739
↓ 10 callers
Function
silenceStdout
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 callers
Method
whyExcluded
whyExcluded applies the filter algorithm as shouldReview but returns the specific reason a file is excluded.
internal/agent/preview.go:34
↓ 10 callers
Function
writeTempFile
writeTempFile writes content to a temporary file and returns its path.
cmd/opencodereview/background_file_test.go:15
↓ 10 callers
Function
yKey
()
cmd/opencodereview/provider_tui_test.go:1142
↓ 9 callers
Method
CompletionsWithCtx
(ctx context.Context, req ChatRequest)
internal/llm/client.go:42
↓ 9 callers
Function
Dynamic
Dynamic creates a Tool with the given name for dynamically discovered tools (e.g. MCP).
internal/tool/definitions.go:51
↓ 9 callers
Method
Enumerate
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 callers
Function
Event
Event emits a structured event as a span with immediate end.
internal/telemetry/events.go:23
↓ 9 callers
Function
NewFileFind
(fr *FileReader)
internal/tool/file_find.go:28
↓ 9 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:37
↓ 9 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:33
↓ 9 callers
Method
Restore
Restore re-enables stdout. Safe to call multiple times.
cmd/opencodereview/shared.go:281
↓ 9 callers
Method
SetRunFailure
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
↓ 9 callers
Method
ToolCalls
()
cmd/opencodereview/shared.go:305
↓ 9 callers
Method
TotalInputTokens
()
cmd/opencodereview/shared.go:295
↓ 9 callers
Method
TotalTokensUsed
()
cmd/opencodereview/shared.go:297
↓ 9 callers
Method
buildAnthropicParams
buildAnthropicParams converts the shared ChatRequest into Anthropic SDK parameters.
internal/llm/client.go:728
↓ 9 callers
Function
downKey
()
cmd/opencodereview/provider_tui_test.go:34
↓ 9 callers
Function
gitCommit
(t *testing.T, repo, msg string)
internal/scan/provider_test.go:116
↓ 9 callers
Function
loadCommonContext
loadCommonContext validates the working directory, loads the embedded template, raises MaxToolRequestTimes when maxTools exceeds the default, resolves
cmd/opencodereview/shared.go:72
↓ 9 callers
Function
makeComments
(n)
scripts/github-actions/post-review-comments.test.js:1400
↓ 9 callers
Function
officialDashscopeModelTUI
(t *testing.T, configPath string, extraModels []string)
cmd/opencodereview/provider_tui_test.go:1513
↓ 9 callers
Function
open
()
extensions/vscode/src/webview/components/CommentCard.tsx:18
↓ 9 callers
Method
post_note
(self, body)
examples/gitlab_ci/post_review_test.py:139
↓ 9 callers
Function
resolveWorkingDir
resolveWorkingDir returns (absPath, isGitRepo, err). When requireGit is true, returns an error if the directory is not a git repo. When false, returns
cmd/opencodereview/shared.go:107
↓ 9 callers
Function
runGit
(cwd: string, args: string[])
extensions/vscode/src/extension/services/GitService.ts:496
↓ 8 callers
Method
ApplyLanguage
ApplyLanguage injects a language directive into all system-role messages across MAIN_TASK, PLAN_TASK (if set), and MEMORY_COMPRESSION_TASK.
internal/config/template/template.go:184
↓ 8 callers
Method
IsUserIncluded
IsUserIncluded reports whether the given path matches any user include pattern. Returns false when Include is empty (no user include restriction defin
internal/config/rules/system_rules.go:237
↓ 8 callers
Function
LoadDefault
LoadDefault parses the embedded task_template.json and resolves prompt file references.
internal/config/template/template.go:123
↓ 8 callers
Function
LoadScanDefault
LoadScanDefault parses the embedded scan_template.json.
internal/config/template/template.go:157
↓ 8 callers
Function
NewCommitProvider
NewCommitProvider creates a Provider for commit mode: show changes introduced by a single commit.
internal/diff/git.go:77
↓ 8 callers
Function
NewDiffMap
NewDiffMap creates a frozen, read-only DiffMap from a plain map.
internal/tool/file_read_diff.go:18
↓ 8 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:29
↓ 8 callers
Function
RegisterAll
RegisterAll registers tools from the MCP client into the tool registry. When allowedTools is non-empty, only tools whose names appear in the list are
internal/mcp/provider.go:33
↓ 8 callers
Function
ResolveEndpointWithModelOverride
ResolveEndpointWithModelOverride is a compatibility wrapper around ResolveEndpointWithOptions for callers that only override the model.
internal/llm/resolver.go:76
↓ 8 callers
Method
SealSelected
SealSelected closes the selected set. After it returns, RegisterSelected fails and the coverage denominator is fixed; per-item Mark* calls continue to
internal/session/manifest.go:531
↓ 8 callers
Method
Tool
Tool returns which tool this provider implements.
internal/tool/definitions.go:73
↓ 8 callers
Method
ValidateScanOptions
ValidateScanOptions verifies that the previous session was a full-file scan.
internal/session/resume.go:215
↓ 8 callers
Method
applyEditCustomProviderSave
()
cmd/opencodereview/provider_tui.go:1229
↓ 8 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:136
← previous
next →
101–200 of 3,747, ranked by callers