MCPcopy Create free account

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

Functions3,271 in github.com/alibaba/open-code-review

↓ 13 callersMethodset
(key: string, value: string)
extensions/vscode/src/extension/services/ConfigService.ts:85
↓ 13 callersFunctionuseTranslation
()
pages/src/i18n/context.tsx:63
↓ 12 callersMethodGetDiff
GetDiff returns all changes as parsed model.Diff structs.
internal/diff/git.go:171
↓ 12 callersFunctionNewAnthropicClient
NewAnthropicClient creates a new Anthropic Messages API client.
internal/llm/client.go:582
↓ 12 callersFunctionNewCommentWorkerPool
NewCommentWorkerPool creates a pool with the given concurrency limit. workerCount <= 0 defaults to 8.
internal/llmloop/pool.go:49
↓ 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:68
↓ 12 callersFunctionlog
(msg)
scripts/github-actions/post-review-comments.js:85
↓ 12 callersFunctionmodelTUIIdxForName
(t *testing.T, m modelTUIModel, name string)
cmd/opencodereview/provider_tui_funcs_test.go:1024
↓ 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:2481
↓ 12 callersFunctionnewTestDeps
(client llm.LLMClient)
internal/llmloop/loop_test.go:88
↓ 12 callersFunctionparseScanFlags
parseScanFlags provides test compatibility: parses args through a fresh cobra command instance and returns the resulting scanOptions.
cmd/opencodereview/compat_test.go:35
↓ 12 callersFunctionresolveLocale
(raw: string)
extensions/vscode/src/shared/i18n.ts:327
↓ 11 callersMethodCompletionsWithCtx
CompletionsWithCtx sends a chat completion request with context support for cancellation and timeout.
internal/llm/client.go:339
↓ 11 callersFunctionModelListContains
ModelListContains reports whether target matches any entry in models (trimmed).
internal/llm/resolver.go:568
↓ 11 callersFunctionNormalizeAuthHeader
NormalizeAuthHeader normalizes an auth header value to a canonical form. It returns an error for unrecognized values.
internal/llm/resolver.go:580
↓ 11 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:492
↓ 11 callersMethodResolveDetail
(path string)
internal/config/rules/system_rules.go:120
↓ 11 callersFunctionSetAttr
SetAttr sets a single attribute on a span.
internal/telemetry/span.go:63
↓ 11 callersMethodWarnings
()
cmd/opencodereview/shared.go:280
↓ 11 callersFunctioncm
(path, content string)
internal/tool/comment_collector_test.go:9
↓ 11 callersFunctioncollectCustomProviders
(cfg *Config)
cmd/opencodereview/provider_tui.go:218
↓ 11 callersFunctionhttp_error
(code, body=b"", reason="error")
examples/gerrit_ci/post_review_test.py:271
↓ 11 callersFunctionofficialConfigModelTUI
(t *testing.T, configPath string, extraModels []string)
cmd/opencodereview/provider_tui_funcs_test.go:939
↓ 11 callersMethodpost
(msg: HostToWebview)
extensions/vscode/src/extension/providers/SidebarProvider.ts:53
↓ 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:126
↓ 10 callersFunctionLoadDefault
LoadDefault parses the embedded system_rules.json and resolves rule file references.
internal/config/rules/system_rules.go:87
↓ 10 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:172
↓ 10 callersFunctionNewFileRead
(fr *FileReader)
internal/tool/file_read.go:16
↓ 10 callersFunctionNewWorkspaceProvider
NewWorkspaceProvider creates a Provider for workspace mode (current uncommitted changes).
internal/diff/git.go:85
↓ 10 callersMethodOutput
Output executes a git command and returns stdout only.
internal/gitcmd/runner.go:57
↓ 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 callersFunctionSessionFilePath
SessionFilePath returns the JSONL path for a persisted session.
internal/session/resume.go:56
↓ 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:381
↓ 10 callersMethodapplyResumeLine
(line []byte)
internal/session/resume.go:105
↓ 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 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:169
↓ 10 callersFunctiongenerateUUID
()
internal/session/persist.go:58
↓ 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 callersFunctionreviewItemFingerprint
(mode string, d model.Diff)
internal/agent/agent.go:739
↓ 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:1139
↓ 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 callersFunctionLoadResumeState
LoadResumeState replays a previous session JSONL into a fingerprint index.
internal/session/resume.go:68
↓ 9 callersFunctionNewFileFind
(fr *FileReader)
internal/tool/file_find.go:25
↓ 9 callersFunctionNewManifestBuilder
NewManifestBuilder creates a builder for a run identified by runID (the canonical session ID) and operation ("review" or "scan").
internal/session/manifest.go:348
↓ 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 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
↓ 9 callersMethodRestore
Restore re-enables stdout. Safe to call multiple times.
cmd/opencodereview/shared.go:261
↓ 9 callersMethodToolCalls
()
cmd/opencodereview/shared.go:285
↓ 9 callersMethodTotalInputTokens
()
cmd/opencodereview/shared.go:275
↓ 9 callersMethodTotalTokensUsed
()
cmd/opencodereview/shared.go:277
↓ 9 callersFunctiondownKey
()
cmd/opencodereview/provider_tui_test.go:31
↓ 9 callersFunctioninitTestGitRepo
(t *testing.T)
cmd/opencodereview/git_test.go:11
↓ 9 callersFunctionmakeComments
(n)
scripts/github-actions/post-review-comments.test.js:1396
↓ 9 callersFunctionofficialDashscopeModelTUI
(t *testing.T, configPath string, extraModels []string)
cmd/opencodereview/provider_tui_test.go:1510
↓ 9 callersFunctionpost
(discussion)
examples/gitlab_ci/post_review.py:349
↓ 9 callersFunctionrenderTemplate
(w http.ResponseWriter, name string, data any)
internal/viewer/server.go:218
↓ 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:86
↓ 9 callersFunctionrunGit
(cwd: string, args: string[])
extensions/vscode/src/extension/services/GitService.ts:493
↓ 9 callersFunctionwriteFile
(t *testing.T, root, rel string, content []byte)
internal/scan/provider_test.go:102
↓ 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:234
↓ 8 callersFunctionNewCommitProvider
NewCommitProvider creates a Provider for commit mode: show changes introduced by a single commit.
internal/diff/git.go:75
↓ 8 callersFunctionNewDiffMap
NewDiffMap creates a frozen, read-only DiffMap from a plain map.
internal/tool/file_read_diff.go:15
↓ 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:237
↓ 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 callersMethodTool
Tool returns which tool this provider implements.
internal/tool/definitions.go:70
↓ 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 callersFunctiondefaultConfigPath
Default config file location: ~/.opencodereview/config.json
cmd/opencodereview/config_cmd.go:84
↓ 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:597
↓ 8 callersFunctionmustJSON
--- helpers ---
internal/session/resume_test.go:639
↓ 8 callersFunctionnewQuietHandle
newQuietHandle silences stdout when outputFormat=="json" or audience=="agent"; otherwise the returned handle is a no-op restorer.
cmd/opencodereview/shared.go:252
↓ 8 callersFunctionsanitizeReason
sanitizeReason is the single, best-effort redaction+truncation floor applied to every reason the builder stores, so no caller path can write an unreda
internal/session/manifest.go:659
↓ 8 callersFunctionwriteOpenAISSE
(t *testing.T, w http.ResponseWriter, events ...string)
internal/llm/client_test.go:512
↓ 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:38
↓ 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 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 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:122
↓ 7 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:412
↓ 7 callersMethodTotalCacheReadTokens
()
cmd/opencodereview/shared.go:278
↓ 7 callersMethodTotalCacheWriteTokens
()
cmd/opencodereview/shared.go:279
↓ 7 callersMethodTotalOutputTokens
()
cmd/opencodereview/shared.go:276
↓ 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:570
↓ 7 callersFunctionclassifyCommentAgainstDiff
(item, diff)
scripts/github-actions/post-review-comments.js:1913
← previousnext →101–200 of 3,271, ranked by callers