MCPcopy Create free account

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

Functions2,775 in github.com/alibaba/open-code-review

↓ 11 callersMethodpost
(msg: HostToWebview)
extensions/vscode/src/extension/providers/SidebarProvider.ts:53
↓ 11 callersFunctionrunGitTest
runGitTest runs a git command in dir and fails the test on error.
internal/diff/git_test.go:16
↓ 11 callersFunctionuseResponsive
()
pages/src/hooks/useResponsive.ts:9
↓ 10 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:127
↓ 10 callersMethodFreeze
Freeze prevents further mutations. Call once setup is complete.
internal/tool/definitions.go:101
↓ 10 callersFunctionNewFileRead
(fr *FileReader)
internal/tool/file_read.go:16
↓ 10 callersFunctionResolveEndpointWithModelOverride
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 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:279
↓ 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:864
↓ 10 callersMethodbuildGrepArgs
(searchText string, caseSensitive bool, usePerlRegexp bool, noIndex bool, pathspec []string)
internal/tool/code_search.go:55
↓ 10 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:1181
↓ 10 callersFunctiongenerateUUID
()
internal/session/persist.go:58
↓ 10 callersFunctionlog
(msg)
scripts/github-actions/post-review-comments.js:42
↓ 10 callersFunctionmatchConsecutive
matchConsecutive scans sideLines for a consecutive run matching all targetLines.
internal/diff/resolver.go:148
↓ 10 callersFunctionnewTestClient
(name string, tools []*mcp.Tool)
internal/mcp/provider_test.go:11
↓ 10 callersFunctionreadWorkspaceFileForDiff
(repoDir, relPath string)
internal/diff/workspace_file.go:11
↓ 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:73
↓ 10 callersMethodwhyExcluded
whyExcluded applies the filter algorithm as shouldReview but returns the specific reason a file is excluded.
internal/agent/preview.go:31
↓ 10 callersFunctionwriteTempFile
writeTempFile writes content to a temporary file and returns its path.
cmd/opencodereview/background_file_test.go:12
↓ 10 callersFunctionyKey
()
cmd/opencodereview/provider_tui_test.go:1083
↓ 9 callersMethodCompletionsWithCtx
(ctx context.Context, req ChatRequest)
internal/llm/client.go:36
↓ 9 callersFunctionEvent
Event emits a structured event as a span with immediate end.
internal/telemetry/events.go:20
↓ 9 callersFunctionLoadDefault
LoadDefault parses the embedded system_rules.json and resolves rule file references.
internal/config/rules/system_rules.go:87
↓ 9 callersFunctionNewFileFind
(fr *FileReader)
internal/tool/file_find.go:25
↓ 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:34
↓ 9 callersMethodOutput
Output executes a git command and returns stdout only.
internal/gitcmd/runner.go:57
↓ 9 callersMethodRestore
Restore re-enables stdout. Safe to call multiple times.
cmd/opencodereview/shared.go:229
↓ 9 callersMethodStringVar
(p *string, name string, value string, usage string)
cmd/opencodereview/flags.go:45
↓ 9 callersFunctiondownKey
()
cmd/opencodereview/provider_tui_test.go:31
↓ 9 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:156
↓ 9 callersFunctioninitTestGitRepo
(t *testing.T)
cmd/opencodereview/git_test.go:11
↓ 9 callersFunctionnewOcrFlagSet
(name string)
cmd/opencodereview/flags.go:18
↓ 9 callersFunctionofficialDashscopeModelTUI
(t *testing.T, configPath string, extraModels []string)
cmd/opencodereview/provider_tui_test.go:1454
↓ 9 callersFunctionparseConfigArgs
(args []string)
cmd/opencodereview/flags.go:260
↓ 9 callersFunctionrenderTemplate
(w http.ResponseWriter, name string, data any)
internal/viewer/server.go:148
↓ 9 callersFunctionresolveWorkingDir
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 callersFunctionrunGit
(cwd: string, args: string[])
extensions/vscode/src/extension/services/GitService.ts:492
↓ 8 callersMethodApplyLanguage
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 callersMethodIsUserIncluded
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 callersFunctionNewDiffMap
NewDiffMap creates a frozen, read-only DiffMap from a plain map.
internal/tool/file_read_diff.go:15
↓ 8 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:30
↓ 8 callersFunctionPromptTokenLimit
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 callersMethodRecordReviewItemDone
RecordReviewItemDone persists the file-level checkpoint used by resume.
internal/session/history.go:155
↓ 8 callersFunctionRegisterAll
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 callersMethodRunPerFile
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 callersMethodTool
Tool returns which tool this provider implements.
internal/tool/definitions.go:70
↓ 8 callersMethodToolCalls
()
cmd/opencodereview/shared.go:253
↓ 8 callersMethodTotalInputTokens
()
cmd/opencodereview/shared.go:243
↓ 8 callersMethodWarnings
()
cmd/opencodereview/shared.go:248
↓ 8 callersMethodbuildResponsesParams
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 callersMethoddispatchSubtasks
dispatchSubtasks runs the Plan + Main phases for each changed file concurrently.
internal/agent/agent.go:351
↓ 8 callersMethoddispose
()
extensions/vscode/src/extension/providers/CommentProvider.ts:323
↓ 8 callersFunctionentry_of
(ri, path="main.go")
examples/gerrit_ci/post_review_test.py:49
↓ 8 callersFunctionmergeModelLists
(lists ...[]string)
cmd/opencodereview/config_cmd.go:498
↓ 8 callersFunctionnewQuietHandle
newQuietHandle silences stdout when outputFormat=="json" or audience=="agent"; otherwise the returned handle is a no-op restorer.
cmd/opencodereview/shared.go:220
↓ 8 callersFunctionwriteFile
(t *testing.T, root, rel string, content []byte)
internal/scan/provider_test.go:102
↓ 8 callersFunctionwriteOpenAISSE
(t *testing.T, w http.ResponseWriter, events ...string)
internal/llm/client_test.go:511
↓ 7 callersFunctionAnyToAttr
AnyToAttr converts an arbitrary value to an OTel attribute.KeyValue.
internal/telemetry/span.go:129
↓ 7 callersFunctionDiscoverRepos
DiscoverRepos walks the sessions root and returns one entry per subdirectory.
internal/viewer/store.go:34
↓ 7 callersFunctionErrorEvent
ErrorEvent emits an error event with error status.
internal/telemetry/events.go:36
↓ 7 callersFunctionLoadDefault
LoadDefault parses the embedded task_template.json and resolves prompt file references.
internal/config/template/template.go:100
↓ 7 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:51
↓ 7 callersFunctionNewWorkspaceProvider
NewWorkspaceProvider creates a Provider for workspace mode (current uncommitted changes).
internal/diff/git.go:82
↓ 7 callersFunctionRecordLLMResult
RecordLLMResult sets the outcome of an LLM request on the span.
internal/telemetry/span.go:112
↓ 7 callersMethodRecordUsage
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 callersMethodResolveDetail
(path string)
internal/config/rules/system_rules.go:120
↓ 7 callersMethodTotalTokensUsed
()
cmd/opencodereview/shared.go:245
↓ 7 callersFunctionValidateProtocol
ValidateProtocol accepts the three canonical protocol names and rejects everything else.
internal/llm/protocol.go:52
↓ 7 callersFunctionactiveModelForProvider
(cfg *Config, providerName string, entry ProviderEntry)
cmd/opencodereview/config_cmd.go:471
↓ 7 callersFunctioncustomConfigModelTUI
(t *testing.T, configPath string, models []string)
cmd/opencodereview/provider_tui_funcs_test.go:969
↓ 7 callersMethodcustomProviderEntry
(name string, fallback ProviderEntry)
cmd/opencodereview/provider_tui.go:565
↓ 7 callersFunctiondispatch
dispatch routes top-level subcommands or global flags.
cmd/opencodereview/main.go:31
↓ 7 callersFunctioninitTestRepo
(t *testing.T)
internal/scan/provider_test.go:81
↓ 7 callersFunctionmakeDiff
()
internal/diff/relocation_test.go:40
↓ 7 callersMethodmapResponsesResponse
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 callersFunctionnewTestDeps
(client llm.LLMClient)
internal/llmloop/loop_test.go:84
↓ 7 callersMethodrepoRoot
()
extensions/vscode/src/extension/services/GitService.ts:250
↓ 7 callersMethodrunCompression
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 callersFunctionrunConfig
(args []string)
cmd/opencodereview/config_cmd.go:33
↓ 7 callersMethodselectedCustomProvider
()
cmd/opencodereview/provider_tui.go:387
↓ 7 callersMethodsyncSessionModelSelection
()
cmd/opencodereview/provider_tui.go:574
↓ 7 callersFunctionvalidateReviewRefs
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 callersMethodwriteRecordLocked
(rec map[string]any)
internal/session/persist.go:120
↓ 6 callersFunctionCanonicalPath
CanonicalPath returns an absolute path with symlinks resolved.
internal/pathutil/path.go:10
↓ 6 callersMethodCommentsForPath
CommentsForPath returns a copy of comments whose Path matches the given path.
internal/tool/comment_collector.go:38
↓ 6 callersFunctionDynamic
Dynamic creates a Tool with the given name for dynamically discovered tools (e.g. MCP).
internal/tool/definitions.go:48
↓ 6 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:77
↓ 6 callersMethodIsUserExcluded
IsUserExcluded reports whether the given path matches any user exclude pattern.
internal/config/rules/system_rules.go:206
↓ 6 callersFunctionNewFileReadDiff
(dm DiffMap)
internal/tool/file_read_diff.go:34
↓ 6 callersFunctionNewLLMClient
--- Factory --- NewLLMClient creates the appropriate client based on the resolved endpoint protocol. protocol dispatch (canonical names from protocol.
internal/llm/client.go:205
↓ 6 callersFunctionNewStub
(t Tool)
internal/tool/stub.go:11
↓ 6 callersFunctionParseComments
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 callersFunctionParseHunks
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 callersFunctionStripMarkdownFences
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 callersMethodTotalCacheReadTokens
()
cmd/opencodereview/shared.go:246
↓ 6 callersMethodTotalCacheWriteTokens
()
cmd/opencodereview/shared.go:247
↓ 6 callersMethodTotalOutputTokens
()
cmd/opencodereview/shared.go:244
↓ 6 callersMethodValidate
()
internal/config/template/template.go:188
↓ 6 callersFunctionapplyCLIExcludes
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 callersFunctionapplyCustomProviderConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:152
← previousnext →101–200 of 2,775, ranked by callers