Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
2,775 in github.com/alibaba/open-code-review
⨍
Functions
2,775
◇
Types & classes
260
↓ 11 callers
Method
post
(msg: HostToWebview)
extensions/vscode/src/extension/providers/SidebarProvider.ts:53
↓ 11 callers
Function
runGitTest
runGitTest runs a git command in dir and fails the test on error.
internal/diff/git_test.go:16
↓ 11 callers
Function
useResponsive
()
pages/src/hooks/useResponsive.ts:9
↓ 10 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:127
↓ 10 callers
Method
Freeze
Freeze prevents further mutations. Call once setup is complete.
internal/tool/definitions.go:101
↓ 10 callers
Function
NewFileRead
(fr *FileReader)
internal/tool/file_read.go:16
↓ 10 callers
Function
ResolveEndpointWithModelOverride
ResolveEndpointWithModelOverride resolves an endpoint like ResolveEndpoint, but uses modelOverride as the request model when it is non-empty. The over
internal/llm/resolver.go:68
↓ 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:279
↓ 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:864
↓ 10 callers
Method
buildGrepArgs
(searchText string, caseSensitive bool, usePerlRegexp bool, noIndex bool, pathspec []string)
internal/tool/code_search.go:55
↓ 10 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:1181
↓ 10 callers
Function
generateUUID
()
internal/session/persist.go:58
↓ 10 callers
Function
log
(msg)
scripts/github-actions/post-review-comments.js:42
↓ 10 callers
Function
matchConsecutive
matchConsecutive scans sideLines for a consecutive run matching all targetLines.
internal/diff/resolver.go:148
↓ 10 callers
Function
newTestClient
(name string, tools []*mcp.Tool)
internal/mcp/provider_test.go:11
↓ 10 callers
Function
readWorkspaceFileForDiff
(repoDir, relPath string)
internal/diff/workspace_file.go:11
↓ 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:73
↓ 10 callers
Method
whyExcluded
whyExcluded applies the filter algorithm as shouldReview but returns the specific reason a file is excluded.
internal/agent/preview.go:31
↓ 10 callers
Function
writeTempFile
writeTempFile writes content to a temporary file and returns its path.
cmd/opencodereview/background_file_test.go:12
↓ 10 callers
Function
yKey
()
cmd/opencodereview/provider_tui_test.go:1083
↓ 9 callers
Method
CompletionsWithCtx
(ctx context.Context, req ChatRequest)
internal/llm/client.go:36
↓ 9 callers
Function
Event
Event emits a structured event as a span with immediate end.
internal/telemetry/events.go:20
↓ 9 callers
Function
LoadDefault
LoadDefault parses the embedded system_rules.json and resolves rule file references.
internal/config/rules/system_rules.go:87
↓ 9 callers
Function
NewFileFind
(fr *FileReader)
internal/tool/file_find.go:25
↓ 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:34
↓ 9 callers
Method
Output
Output executes a git command and returns stdout only.
internal/gitcmd/runner.go:57
↓ 9 callers
Method
Restore
Restore re-enables stdout. Safe to call multiple times.
cmd/opencodereview/shared.go:229
↓ 9 callers
Method
StringVar
(p *string, name string, value string, usage string)
cmd/opencodereview/flags.go:45
↓ 9 callers
Function
downKey
()
cmd/opencodereview/provider_tui_test.go:31
↓ 9 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:156
↓ 9 callers
Function
initTestGitRepo
(t *testing.T)
cmd/opencodereview/git_test.go:11
↓ 9 callers
Function
newOcrFlagSet
(name string)
cmd/opencodereview/flags.go:18
↓ 9 callers
Function
officialDashscopeModelTUI
(t *testing.T, configPath string, extraModels []string)
cmd/opencodereview/provider_tui_test.go:1454
↓ 9 callers
Function
parseConfigArgs
(args []string)
cmd/opencodereview/flags.go:260
↓ 9 callers
Function
renderTemplate
(w http.ResponseWriter, name string, data any)
internal/viewer/server.go:148
↓ 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:84
↓ 9 callers
Function
runGit
(cwd: string, args: string[])
extensions/vscode/src/extension/services/GitService.ts:492
↓ 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:161
↓ 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:221
↓ 8 callers
Function
NewDiffMap
NewDiffMap creates a frozen, read-only DiffMap from a plain map.
internal/tool/file_read_diff.go:15
↓ 8 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:30
↓ 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:26
↓ 8 callers
Method
RecordReviewItemDone
RecordReviewItemDone persists the file-level checkpoint used by resume.
internal/session/history.go:155
↓ 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:30
↓ 8 callers
Method
RunPerFile
RunPerFile drives the main LLM conversation loop for a single file. It sends messages with the configured tool definitions, executes any tool calls re
internal/llmloop/loop.go:149
↓ 8 callers
Method
Tool
Tool returns which tool this provider implements.
internal/tool/definitions.go:70
↓ 8 callers
Method
ToolCalls
()
cmd/opencodereview/shared.go:253
↓ 8 callers
Method
TotalInputTokens
()
cmd/opencodereview/shared.go:243
↓ 8 callers
Method
Warnings
()
cmd/opencodereview/shared.go:248
↓ 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:130
↓ 8 callers
Method
dispatchSubtasks
dispatchSubtasks runs the Plan + Main phases for each changed file concurrently.
internal/agent/agent.go:351
↓ 8 callers
Method
dispose
()
extensions/vscode/src/extension/providers/CommentProvider.ts:323
↓ 8 callers
Function
entry_of
(ri, path="main.go")
examples/gerrit_ci/post_review_test.py:49
↓ 8 callers
Function
mergeModelLists
(lists ...[]string)
cmd/opencodereview/config_cmd.go:498
↓ 8 callers
Function
newQuietHandle
newQuietHandle silences stdout when outputFormat=="json" or audience=="agent"; otherwise the returned handle is a no-op restorer.
cmd/opencodereview/shared.go:220
↓ 8 callers
Function
writeFile
(t *testing.T, root, rel string, content []byte)
internal/scan/provider_test.go:102
↓ 8 callers
Function
writeOpenAISSE
(t *testing.T, w http.ResponseWriter, events ...string)
internal/llm/client_test.go:511
↓ 7 callers
Function
AnyToAttr
AnyToAttr converts an arbitrary value to an OTel attribute.KeyValue.
internal/telemetry/span.go:129
↓ 7 callers
Function
DiscoverRepos
DiscoverRepos walks the sessions root and returns one entry per subdirectory.
internal/viewer/store.go:34
↓ 7 callers
Function
ErrorEvent
ErrorEvent emits an error event with error status.
internal/telemetry/events.go:36
↓ 7 callers
Function
LoadDefault
LoadDefault parses the embedded task_template.json and resolves prompt file references.
internal/config/template/template.go:100
↓ 7 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:51
↓ 7 callers
Function
NewWorkspaceProvider
NewWorkspaceProvider creates a Provider for workspace mode (current uncommitted changes).
internal/diff/git.go:82
↓ 7 callers
Function
RecordLLMResult
RecordLLMResult sets the outcome of an LLM request on the span.
internal/telemetry/span.go:112
↓ 7 callers
Method
RecordUsage
RecordUsage adds the prompt/completion/cache tokens reported by an LLM response to the runner's aggregate counters. Used by callers (plan phase in age
internal/llmloop/loop.go:123
↓ 7 callers
Method
ResolveDetail
(path string)
internal/config/rules/system_rules.go:120
↓ 7 callers
Method
TotalTokensUsed
()
cmd/opencodereview/shared.go:245
↓ 7 callers
Function
ValidateProtocol
ValidateProtocol accepts the three canonical protocol names and rejects everything else.
internal/llm/protocol.go:52
↓ 7 callers
Function
activeModelForProvider
(cfg *Config, providerName string, entry ProviderEntry)
cmd/opencodereview/config_cmd.go:471
↓ 7 callers
Function
customConfigModelTUI
(t *testing.T, configPath string, models []string)
cmd/opencodereview/provider_tui_funcs_test.go:969
↓ 7 callers
Method
customProviderEntry
(name string, fallback ProviderEntry)
cmd/opencodereview/provider_tui.go:565
↓ 7 callers
Function
dispatch
dispatch routes top-level subcommands or global flags.
cmd/opencodereview/main.go:31
↓ 7 callers
Function
initTestRepo
(t *testing.T)
internal/scan/provider_test.go:81
↓ 7 callers
Function
makeDiff
()
internal/diff/relocation_test.go:40
↓ 7 callers
Method
mapResponsesResponse
mapResponsesResponse converts the SDK Response into the shared ChatResponse. Text output is read via the SDK's OutputText() helper (it walks all outpu
internal/llm/responses_client.go:202
↓ 7 callers
Function
newTestDeps
(client llm.LLMClient)
internal/llmloop/loop_test.go:84
↓ 7 callers
Method
repoRoot
()
extensions/vscode/src/extension/services/GitService.ts:250
↓ 7 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:209
↓ 7 callers
Function
runConfig
(args []string)
cmd/opencodereview/config_cmd.go:33
↓ 7 callers
Method
selectedCustomProvider
()
cmd/opencodereview/provider_tui.go:387
↓ 7 callers
Method
syncSessionModelSelection
()
cmd/opencodereview/provider_tui.go:574
↓ 7 callers
Function
validateReviewRefs
validateReviewRefs rejects ref-option injection (#112): any --from/--to/ --commit value must be a real commit ref and must not start with '-'.
cmd/opencodereview/review_cmd.go:217
↓ 7 callers
Method
writeRecordLocked
(rec map[string]any)
internal/session/persist.go:120
↓ 6 callers
Function
CanonicalPath
CanonicalPath returns an absolute path with symlinks resolved.
internal/pathutil/path.go:10
↓ 6 callers
Method
CommentsForPath
CommentsForPath returns a copy of comments whose Path matches the given path.
internal/tool/comment_collector.go:38
↓ 6 callers
Function
Dynamic
Dynamic creates a Tool with the given name for dynamically discovered tools (e.g. MCP).
internal/tool/definitions.go:48
↓ 6 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:77
↓ 6 callers
Method
IsUserExcluded
IsUserExcluded reports whether the given path matches any user exclude pattern.
internal/config/rules/system_rules.go:206
↓ 6 callers
Function
NewFileReadDiff
(dm DiffMap)
internal/tool/file_read_diff.go:34
↓ 6 callers
Function
NewLLMClient
--- Factory --- NewLLMClient creates the appropriate client based on the resolved endpoint protocol. protocol dispatch (canonical names from protocol.
internal/llm/client.go:205
↓ 6 callers
Function
NewStub
(t Tool)
internal/tool/stub.go:11
↓ 6 callers
Function
ParseComments
ParseComments extracts LlmComment entries from tool call arguments without writing to the Collector. Returns parsed comments and an error message (emp
internal/tool/code_comment.go:71
↓ 6 callers
Function
ParseHunks
ParseHunks parses raw unified diff text for a single file into a slice of Hunks. Lines before the first @@ header (file-level headers like "diff --git
internal/diff/hunk.go:37
↓ 6 callers
Function
StripMarkdownFences
StripMarkdownFences removes ```json and ``` wrappers some models add around structured outputs. Exposed so callers (e.g. agent's review-filter post-st
internal/llmloop/compression.go:159
↓ 6 callers
Method
TotalCacheReadTokens
()
cmd/opencodereview/shared.go:246
↓ 6 callers
Method
TotalCacheWriteTokens
()
cmd/opencodereview/shared.go:247
↓ 6 callers
Method
TotalOutputTokens
()
cmd/opencodereview/shared.go:244
↓ 6 callers
Method
Validate
()
internal/config/template/template.go:188
↓ 6 callers
Function
applyCLIExcludes
applyCLIExcludes appends user-supplied --exclude patterns (already split into a []string) onto cc.FileFilter.Exclude. Creates the FileFilter if none w
cmd/opencodereview/shared.go:186
↓ 6 callers
Function
applyCustomProviderConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:152
← previous
next →
101–200 of 2,775, ranked by callers