MCPcopy Create free account

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

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

↓ 6 callersFunctionexecuteDelegatePreview
(opts delegateOptions)
cmd/opencodereview/delegate_cmd.go:157
↓ 6 callersFunctionextractHeadings
(markdown)
scripts/github-actions/check-translation-sync.js:59
↓ 6 callersFunctionextractSideLines
extractSideLines extracts one side of the diff from a hunk. When newSide is true, returns context+added lines with new-file line numbers. When newSide
internal/diff/resolver.go:186
↓ 6 callersFunctionfileGroupKey
fileGroupKey returns a deterministic key for a file group: sorted paths joined by comma.
internal/agent/grouping.go:361
↓ 6 callersFunctiongetPrDiffHunks
({ github, owner, repo, prNumber, commitSha, log, cache })
scripts/github-actions/post-review-comments.js:2159
↓ 6 callersFunctiongroupBatches
groupBatches partitions items according to strategy, then slices each natural group into BatchSize-sized chunks (when size > 0). Within a batch the in
internal/scan/batch.go:45
↓ 6 callersFunctionhandleRepos
(w http.ResponseWriter, r *http.Request, root string)
internal/viewer/handler.go:12
↓ 6 callersFunctioninitBareRepo
initBareRepo creates an empty (unborn) git repository with identity configured but no commits, returning the repo dir.
internal/diff/git_resolve_test.go:30
↓ 6 callersFunctioninitRepo
initRepo creates a git repo with one commit containing the given files and returns the repo dir and the commit SHA.
internal/config/rules/sniffer_test.go:29
↓ 6 callersFunctionlistCursorPrefix
(isCursor bool)
cmd/opencodereview/provider_tui.go:2073
↓ 6 callersFunctionloadPackageJSON
(t *testing.T)
internal/release/asset_naming_test.go:34
↓ 6 callersFunctionlooksLikeFilePath
looksLikeFilePath returns true when s is likely a file path (not inline content). Heuristic: multi-line text is always inline; single-line text withou
internal/config/rules/system_rules.go:562
↓ 6 callersFunctionmaskedSecretPlaceholder
()
cmd/opencodereview/provider_tui.go:881
↓ 6 callersFunctionmax
(a, b int)
internal/suggestdiff/diff.go:73
↓ 6 callersFunctionnewCustomModelTUI
newCustomModelTUI builds a modelTUIModel backed by a custom provider with a writable config path, so add/delete/persist operations exercise the save p
cmd/opencodereview/provider_tui_modeltui_test.go:16
↓ 6 callersFunctionnewOpenAITestServer
newOpenAITestServer returns an httptest server that captures each request's headers and JSON body and responds with a minimal valid chat completion.
internal/llm/client_test.go:1459
↓ 6 callersFunctionparseBpeData
parseBpeData parses the base64-encoded BPE data format. Each line: <base64-token> <rank>
internal/llm/embedded_loader.go:56
↓ 6 callersFunctionparseFrontmatter
(content)
scripts/github-actions/check-plugin-contract.js:326
↓ 6 callersMethodread
()
extensions/vscode/src/extension/services/ConfigService.ts:20
↓ 6 callersFunctionreadRuleFileSafe
readRuleFileSafe reads and validates a rule file: extension whitelist, 512 KB cap, and symlink resolution. When confineRoot is non-empty, the resolved
internal/config/rules/system_rules.go:635
↓ 6 callersFunctionreadme
(headings)
scripts/github-actions/check-translation-sync.test.js:32
↓ 6 callersFunctionrunActionScript
(source, { github, context, core, env })
scripts/github-actions/post-review-comments.test.js:4147
↓ 6 callersFunctionrunConfig
runConfig provides test compatibility: dispatches config subcommands through a fresh cobra command tree that mirrors the production config command, so
cmd/opencodereview/compat_test.go:142
↓ 6 callersFunctionrunConfigUnset
(key string)
cmd/opencodereview/config_cmd.go:149
↓ 6 callersFunctionrunGitCmd
(repoDir string, args ...string)
cmd/opencodereview/git.go:12
↓ 6 callersMethodrunRaw
运行任意参数,流式回调日志,结束返回 stdout 全文。退出码非 0 时 reject,并带上 CLI 报错文本。
extensions/vscode/src/extension/services/CliService.ts:108
↓ 6 callersFunctionrunRulesCheck
(filePath string)
cmd/opencodereview/rules_cmd.go:45
↓ 6 callersFunctionscriptCore
()
scripts/github-actions/post-review-comments.test.js:4165
↓ 6 callersFunctionseedParentManifest
seedParentManifest gives a hand-built ResumeState the parent manifest a real resume always has, matching the identity a already resolved. Without one
internal/agent/manifest_integration_test.go:119
↓ 6 callersFunctionsel
(id string)
internal/session/manifest_test.go:16
↓ 6 callersFunctionsetupFileFindRepo
(t *testing.T)
internal/tool/file_find_test.go:92
↓ 6 callersMethodtrace
(msg: string)
extensions/vscode/src/extension/services/GitService.ts:20
↓ 6 callersMethodtryApplyPendingCompression
tryApplyPendingCompression checks whether a background compression has completed and swaps the rebuilt messages into place. Returns true if applied.
internal/llmloop/compression.go:347
↓ 6 callersFunctionunwritableConfigPath
unwritableConfigPath returns a config path that is itself a directory, so any saveConfig / loadOrCreateConfig against it fails. This is the lever used
cmd/opencodereview/provider_tui_savefail_test.go:24
↓ 6 callersFunctionupKey
()
cmd/opencodereview/provider_tui_funcs_test.go:382
↓ 5 callersMethodAsDiff
AsDiff returns a Diff suitable for handing to code that expects the diff-based shape (line-number resolver, file_read_diff tool). The Diff field stays
internal/model/scan.go:22
↓ 5 callersMethodBudgetExceeded
BudgetExceeded reports whether the aggregate token budget gate stopped the run before all files were reviewed. It is a diagnostic signal only — it fee
cmd/opencodereview/shared.go:656
↓ 5 callersFunctionCollectToolDefs
CollectToolDefs gathers tool definitions from MCP clients, filtering out tools that conflict with built-in tools or were not successfully registered.
internal/mcp/provider.go:99
↓ 5 callersFunctionContextWithTraceParentFromEnv
ContextWithTraceParentFromEnv extracts W3C traceparent from the TRACEPARENT environment variable and returns a context carrying the upstream span cont
internal/telemetry/span.go:35
↓ 5 callersMethodFilesReviewed
()
cmd/opencodereview/shared.go:632
↓ 5 callersMethodFrozen
Frozen reports whether Finalize has already run.
internal/session/manifest.go:718
↓ 5 callersFunctionInit
Init initializes global TracerProvider and MeterProvider based on environment variables and optional config file. Returns true when enabled. Safe to c
internal/telemetry/provider.go:32
↓ 5 callersFunctionListSessions
ListSessions enumerates all persisted sessions for the given repository directory, sorted by StartTime descending (most recent first). Missing directo
internal/session/list.go:109
↓ 5 callersFunctionLoadAppConfig
LoadAppConfig loads config from path. Returns nil, nil if file does not exist.
cmd/opencodereview/config_cmd.go:402
↓ 5 callersFunctionLoadComments
LoadComments replays one session's JSONL and returns every review comment recorded in it, in file-completion order. It mirrors resume replay semantics
internal/session/comments.go:17
↓ 5 callersFunctionNewSessionKey
NewSessionKey returns a fresh UUIDv4 session key. Clients use it as a per-client fallback for requests whose context carries no session key (e.g. `ocr
internal/llm/sessionkey.go:93
↓ 5 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:89
↓ 5 callersMethodReason
Reason is the safe, human-facing sentence for a stop, and the single source of truth for it: the diff-review manifest reason and the scan subtask warn
internal/llmloop/loop.go:321
↓ 5 callersFunctionRecordCommentsGenerated
(ctx context.Context, n int64)
internal/telemetry/metrics.go:97
↓ 5 callersFunctionRecordReviewDuration
(ctx context.Context, dur time.Duration)
internal/telemetry/metrics.go:77
↓ 5 callersMethodRecordWarning
RecordWarning adds a non-fatal warning.
internal/llmloop/loop.go:179
↓ 5 callersFunctionRelocateAcrossFiles
RelocateAcrossFiles handles the comment whose ExistingCode belongs to a different file than the one it was filed against. The reviewing Agent reads r
internal/diff/resolver.go:100
↓ 5 callersMethodReplaceSince
ReplaceSince replaces comments[start:] with the given replacements. Useful for batch-level dedup: take a Snapshot, run a batch, dedup the new comments
internal/tool/comment_collector.go:82
↓ 5 callersMethodRun
Run executes a git command and returns the combined stdout+stderr output.
internal/gitcmd/runner.go:47
↓ 5 callersFunctionSessionKeyFromContext
SessionKeyFromContext returns the session key carried by ctx, or "" when none was set.
internal/llm/sessionkey.go:85
↓ 5 callersMethodSetExecution
SetExecution sets the non-secret execution provenance.
internal/session/manifest.go:398
↓ 5 callersMethodSetRepository
SetRepository sets the redacted repository identity.
internal/session/manifest.go:373
↓ 5 callersMethodSubmit
Submit runs f in a background goroutine bounded by the semaphore. When f completes its return value is collected internally.
internal/llmloop/pool.go:66
↓ 5 callersMethodTools
()
internal/mcp/client.go:155
↓ 5 callersMethodTotalInputTokens
TotalInputTokens returns the accumulated input/prompt tokens from all LLM calls.
internal/llmloop/loop.go:153
↓ 5 callersFunctionTraceIDFromContext
TraceIDFromContext returns the hex-encoded trace ID of the span carried by ctx, or "" if ctx carries no valid span (e.g. telemetry is disabled).
internal/telemetry/span.go:48
↓ 5 callersMethodValidateResume
ValidateResume reports whether req may reuse this parent's checkpoints. A mismatch on any input field rejects the whole resume rather than degrading
internal/session/resume_identity.go:50
↓ 5 callersFunctionapplyManualConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:103
↓ 5 callersFunctionapplyModelDeleteToEntry
(entry ProviderEntry, name string)
cmd/opencodereview/provider_tui.go:465
↓ 5 callersFunctionassertContains
(t *testing.T, args []string, val string)
internal/tool/code_search_test.go:361
↓ 5 callersFunctionassertNotContains
(t *testing.T, args []string, val string)
internal/tool/code_search_test.go:368
↓ 5 callersMethodassert_unresolved
(self, severity, want)
examples/gerrit_ci/post_review_test.py:89
↓ 5 callersFunctionbindRawWriter
bindRawWriter opens the session's raw capture file and attaches it to the run's raw holder; defer the returned closer. A nil holder (capture off) or a
cmd/opencodereview/shared.go:277
↓ 5 callersFunctionbuildAllowedHosts
buildAllowedHosts returns the default-deny allowlist used by the host guard. The set always includes the standard loopback names. If bindHost is a con
internal/viewer/hostguard.go:61
↓ 5 callersFunctionbuildConcatenatedDiffs
buildConcatenatedDiffs formats all diffs in the group as per-file XML elements.
internal/agent/agent.go:1568
↓ 5 callersMethodcancelPendingCompression
cancelPendingCompression aborts the conversation's in-flight background compression, if any.
internal/llmloop/compression.go:382
↓ 5 callersFunctioncaptureStdout
(t *testing.T, fn func())
internal/telemetry/events_test.go:129
↓ 5 callersFunctioncheckPluginDeclarations
(specs, readJson)
scripts/github-actions/check-plugin-contract.js:474
↓ 5 callersMethodclear
()
extensions/vscode/src/extension/providers/lineOffset.ts:20
↓ 5 callersFunctionclearCfgActiveModelIfDeleted
(cfg *Config, providerName, name string)
cmd/opencodereview/provider_tui.go:473
↓ 5 callersFunctioncommentKey
(rc)
scripts/github-actions/post-review-comments.test.js:78
↓ 5 callersFunctionconfigOperations
(fixture)
scripts/github-actions/action-contract.test.js:330
↓ 5 callersFunctioncontentToText
(contents []mcp.Content)
internal/mcp/client.go:180
↓ 5 callersFunctioncopyLlmComments
(in []model.LlmComment)
internal/session/resume.go:353
↓ 5 callersMethodcustomListCount
()
cmd/opencodereview/provider_tui.go:630
↓ 5 callersMethoddescribe
describe renders m for internal construction errors raised by RetryCollector.Freeze. Those errors reach the user through runErr, and with --concurren
internal/llm/retry_meta.go:115
↓ 5 callersFunctiondescribeRange
(s session.Summary)
cmd/opencodereview/session_cmd.go:509
↓ 5 callersFunctiondisplayMode
(m string)
cmd/opencodereview/session_cmd.go:502
↓ 5 callersMethodensureApi
()
extensions/vscode/src/extension/services/GitService.ts:24
↓ 5 callersFunctionensureModelInList
ensureModelInList appends model to the end when missing; never reorders existing entries.
cmd/opencodereview/config_cmd.go:777
↓ 5 callersFunctionexactArgs
Positional-argument validators that replace Cobra's raw count message ("accepts 2 arg(s), received 1") with an actionable one built from metadata the
cmd/opencodereview/arg_errors.go:23
↓ 5 callersMethodexecuteGroupSubtask
executeGroupSubtask performs the Plan Phase + Main Loop for a file group. It returns (completed, stop, err): a hard Go error (err) for provider/config
internal/agent/agent.go:1346
↓ 5 callersMethodexecuteSubtask
executeSubtask runs the scan pipeline for one file: 1. Optional PLAN_TASK: produce a JSON checklist of focus areas. 2. MAIN_TASK: review the file with
internal/scan/agent.go:761
↓ 5 callersFunctionextractFilenameFromURL
extractFilenameFromURL returns the filename part (last path segment) of a URL pattern.
internal/release/asset_naming_test.go:57
↓ 5 callersMethodfilterDiffs
filterDiffs drops diffs that should not be reviewed based on user-configured include/exclude patterns and default extension/path filters.
internal/agent/agent.go:2002
↓ 5 callersFunctionfinalizeRequest
finalizeRequest is the shared body of the client-boundary defer: correct the last attempt if the error only became visible after the SDK returned, the
internal/llm/retry_boundary.go:129
↓ 5 callersMethodfindCustomIdx
(name string)
cmd/opencodereview/provider_tui.go:1412
↓ 5 callersFunctionfindMissingTranslations
(changedFiles)
scripts/github-actions/check-translation-sync.js:183
↓ 5 callersFunctiongetChangedFiles
(env, exec = execFileSync)
scripts/github-actions/check-translation-sync.js:224
↓ 5 callersFunctiongitOut
gitOut runs a git command in dir and returns its trimmed stdout, failing the test on error. Used to capture the SHAs a ResolveInput result must match.
internal/diff/git_resolve_test.go:17
↓ 5 callersFunctionhandleSession
(w http.ResponseWriter, r *http.Request, root, repo, sessionID string)
internal/viewer/handler.go:64
↓ 5 callersFunctionhashFields
hashFields folds a sequence of string fields into one SHA-256 digest, writing an unambiguous 8-byte big-endian length prefix before each field so no t
internal/agent/agent.go:1071
↓ 5 callersFunctioninitRepo
(t *testing.T)
internal/gitcmd/runner_test.go:17
↓ 5 callersFunctionisCheckpointAuthorOurs
(comment, appSlug = "")
scripts/github-actions/post-review-comments.js:2395
↓ 5 callersFunctionisConfigReady
(config: OcrConfig | null)
extensions/vscode/src/shared/configUtils.ts:81
← previousnext →401–500 of 4,917, ranked by callers