MCPcopy Create free account

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

Functions7,169 in github.com/alibaba/open-code-review

↓ 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:199
↓ 6 callersFunctionfileGroupKey
fileGroupKey returns a deterministic key for a file group: sorted paths joined by comma.
internal/agent/grouping.go:370
↓ 6 callersMethodfinalizeManifest
finalizeManifest freezes the run's coverage builder and stores the immutable manifest on the session for persistence and CLI consumption. Nil-safe. A
internal/agent/agent.go:1316
↓ 6 callersFunctionformatWarnings
(warnings)
scripts/github-actions/post-review-comments.js:2494
↓ 6 callersFunctionfsIsCaseInsensitive
fsIsCaseInsensitive reports whether the filesystem holding dir folds case, by asking it: one probe name spelled two ways must resolve to one file. Win
internal/scan/provider_paths_test.go:155
↓ 6 callersFunctiongetPrDiffHunks
({ github, owner, repo, prNumber, commitSha, log, cache })
scripts/github-actions/post-review-comments.js:2897
↓ 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 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 callersFunctioninterruptContextWithForcedExit
interruptContextWithForcedExit returns a child of parent that is canceled by the first os.Interrupt or syscall.SIGTERM, together with a stop function
cmd/opencodereview/interrupt.go:42
↓ 6 callersFunctionisConfigReady
(config: OcrConfig | null)
extensions/frontend/src/shared/configUtils.ts:85
↓ 6 callersFunctionlineSpan
(c)
scripts/github-actions/post-review-comments.js:1432
↓ 6 callersFunctionlistCursorPrefix
(isCursor bool)
cmd/opencodereview/provider_tui.go:2107
↓ 6 callersMethodloadDiffs
loadDiffs populates the diff-related fields used by normal review runs.
internal/agent/agent.go:588
↓ 6 callersFunctionloadPackageJSON
(t *testing.T)
internal/release/asset_naming_test.go:34
↓ 6 callersFunctionloadReviewResumeState
(repoDir string, opts reviewOptions)
cmd/opencodereview/review_cmd.go:413
↓ 6 callersFunctionloadTestTemplate
loadTestTemplate returns a validated default template for runtime tests.
cmd/opencodereview/shared_llmruntime_test.go:350
↓ 6 callersFunctionloadToolDefs
(names []string)
cmd/opencodereview/shared.go:338
↓ 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 callersMethodmanifestItemID
manifestItemID derives the content-independent item_id for a diff, keyed on operation, input mode and the normalized old/new paths. RegisterSelected a
internal/agent/agent.go:1146
↓ 6 callersMethodmapOpenAIResponse
mapOpenAIResponse converts the SDK response into ChatResponse.
internal/llm/client.go:1078
↓ 6 callersFunctionmaskedSecretPlaceholder
()
cmd/opencodereview/provider_tui.go:882
↓ 6 callersFunctionmetaFactory
metaFactory builds the same closure internal/agent injects, so these tests exercise the review wiring rather than a test-only shape.
internal/reviewtask/retry_identity_test.go:72
↓ 6 callersFunctionnewCompressionRunner
newCompressionRunner returns a Runner whose template forces runCompression to issue a request, plus the message slice to feed it.
internal/llmloop/retry_identity_test.go:91
↓ 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 callersFunctionnewError
(kind ErrorKind, format string, args ...any)
acp/internal/orchestrator/types.go:138
↓ 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:1657
↓ 6 callersMethodobserve
()
pages/src/pages/DocsPage.test.tsx:160
↓ 6 callersFunctionparseBpeData
parseBpeData parses the base64-encoded BPE data format. Each line: <base64-token> <rank>
internal/llm/embedded_loader.go:67
↓ 6 callersFunctionparseFrontmatter
(content)
scripts/github-actions/check-plugin-contract.js:370
↓ 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 callersFunctionregisterReviewFlags
registerReviewFlags registers all review command flags on cmd, binding to opts.
cmd/opencodereview/shared_flags.go:209
↓ 6 callersFunctionregisterScanFlags
registerScanFlags registers all scan command flags on cmd, binding to opts.
cmd/opencodereview/shared_flags.go:229
↓ 6 callersFunctionrequest
request is a resume of parentState with the same provider and model, which is the accepted baseline every case below deviates from.
internal/session/resume_identity_test.go:54
↓ 6 callersFunctionresolveArgs
(gh, core, over = {})
scripts/github-actions/post-review-comments.test.js:6189
↓ 6 callersFunctionresolveDeclaredPath
(manifestFile, base, value)
scripts/github-actions/check-plugin-contract.js:499
↓ 6 callersFunctionresolveRepoDir
resolveRepoDir resolves the repo dir for `ocr rules check`. It delegates to resolveWorkingDir(requireGit=true) so it anchors at the git top-level just
cmd/opencodereview/review_cmd.go:513
↓ 6 callersMethodresolvedModel
resolvedModel returns the model to persist, falling back to the in-session pick for the provider being finalized when result.model is empty.
cmd/opencodereview/provider_tui.go:100
↓ 6 callersFunctionresponseStreamEvents
--- helpers ---
internal/llm/responses_client_test.go:1072
↓ 6 callersFunctionrun
()
cmd/opencodereview/main.go:21
↓ 6 callersFunctionrunActionScript
(source, { github, context, core, env })
scripts/github-actions/post-review-comments.test.js:5056
↓ 6 callersFunctionrunChatGPTStatus
(out io.Writer)
cmd/opencodereview/chatgpt_auth.go:53
↓ 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:144
↓ 6 callersFunctionrunConfigUnset
(key string)
cmd/opencodereview/config_cmd.go:140
↓ 6 callersFunctionrunGitCmd
(repoDir string, args ...string)
cmd/opencodereview/git.go:12
↓ 6 callersMethodrunRaw
Run arbitrary arguments, stream logs via a callback, and return stdout on completion. Reject nonzero exits with the CLI error text.
extensions/vscode/src/extension/services/CliService.ts:114
↓ 6 callersFunctionrunReview
runReview provides test compatibility for the pre-cobra runReview(args) entry point: parse flags, then execute the review.
cmd/opencodereview/compat_test.go:36
↓ 6 callersFunctionrunRulesCheck
(filePath string)
cmd/opencodereview/rules_cmd.go:45
↓ 6 callersFunctionsanitizeRenderedMarkdown
(rendered string)
cmd/opencodereview/markdown.go:186
↓ 6 callersFunctionscanTaskDoneResponse
()
internal/scan/coverage_test.go:1357
↓ 6 callersFunctionscriptCore
()
scripts/github-actions/post-review-comments.test.js:5074
↓ 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:123
↓ 6 callersMethodselected
(id string)
internal/chatgptauth/store.go:71
↓ 6 callersFunctionsendCallback
(q url.Values, id string)
internal/chatgptauth/recovery_test.go:86
↓ 6 callersFunctionsleep
(ms)
scripts/github-actions/post-review-comments.js:1899
↓ 6 callersMethodsubmit
(f func() ([]model.LlmComment, error), kwg *sync.WaitGroup)
internal/reviewtask/pool.go:75
↓ 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:427
↓ 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:386
↓ 6 callersFunctionvalidateAuthProvider
()
cmd/opencodereview/chatgpt_auth.go:28
↓ 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 callersMethodAwaitKey
AwaitKey blocks until every unit submitted under key so far has completed. It never touches the pool-wide WaitGroup, so it is safe to call while other
internal/reviewtask/pool.go:127
↓ 5 callersMethodBudgetExceeded
BudgetExceeded reports whether the aggregate token budget gate stopped dispatch before every file was reviewed. Diagnostic only: scan still returns it
internal/scan/agent.go:248
↓ 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 callersFunctionComputeLineDiff
ComputeLineDiff returns a line-level diff between oldLines and newLines. Uses Myers-style LCS to find common subsequences, then emits context/added/de
internal/suggestdiff/diff.go:27
↓ 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 callersMethodError
()
internal/gitcmd/version.go:43
↓ 5 callersMethodEstimatedTokens
EstimatedTokens returns a rough token estimate for the portion of Message not already counted by ExtractText() (thinking blocks, reasoning items, and
internal/llm/client.go:192
↓ 5 callersFunctionExportSession
ExportSession renders one persisted session as a single self-contained HTML document and writes it to out. It is the offline counterpart of the viewer
internal/viewer/export.go:32
↓ 5 callersMethodFilesReviewed
()
cmd/opencodereview/shared.go:763
↓ 5 callersFunctionFormatResult
FormatResult renders OCR findings with safe local navigation when root is set.
acp/internal/adapter/presentation/report.go:18
↓ 5 callersMethodFrozen
Frozen reports whether Finalize has already run.
internal/session/manifest.go:777
↓ 5 callersFunctionIsReserved
IsReserved reports whether name matches any built-in tool name (including Unknown).
internal/tool/definitions.go:41
↓ 5 callersFunctionKill
Kill forcibly terminates the managed process tree, including descendants.
acp/internal/orchestrator/process/process_unix.go:38
↓ 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 callersMethodLogout
(ctx context.Context, s Store, account string)
internal/chatgptauth/oauth.go:649
↓ 5 callersFunctionNewClient
NewClient starts an MCP server subprocess (stdio transport), initializes the connection, and caches the list of available tools. The context governs t
internal/mcp/client.go:43
↓ 5 callersFunctionNewConnection
NewConnection binds notifications before any request can acquire the agent lock.
acp/internal/adapter/connection.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 callersFunctionParseReviewMode
ParseReviewMode returns the correct ReviewMode based on provided flag values.
internal/tool/filereader.go:35
↓ 5 callersFunctionRecordCommentsGenerated
(ctx context.Context, n int64)
internal/telemetry/metrics.go:103
↓ 5 callersFunctionRecordLLMRequest
(ctx context.Context, model string, dur time.Duration, totalTokens int64, status string)
internal/telemetry/metrics.go:113
↓ 5 callersFunctionRecordReviewDuration
(ctx context.Context, dur time.Duration)
internal/telemetry/metrics.go:83
↓ 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:101
↓ 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 callersMethodResolveWorkspaceComparison
(ctx context.Context)
internal/diff/workspace.go:22
↓ 5 callersMethodRoundTrip
(r *http.Request)
internal/chatgptauth/lifecycle_test.go:222
↓ 5 callersMethodSetDiffMap
SetDiffMap replaces the diff snapshot. Must be called before concurrent access begins.
internal/tool/file_read_diff.go:60
↓ 5 callersMethodStream
Stream acquires the semaphore, starts a git command, and passes its stdout as an io.Reader to consume. The semaphore is held for the full duration. c
internal/gitcmd/runner.go:325
↓ 5 callersMethodSubmit
Submit runs f in a background goroutine bounded by the semaphore. When f completes its return value is collected internally.
internal/reviewtask/pool.go:47
↓ 5 callersMethodTotalOutputTokens
TotalOutputTokens returns the accumulated completion tokens from all LLM calls.
internal/llmloop/loop.go:107
↓ 5 callersMethodTotalTokensUsed
TotalTokensUsed returns input + output.
internal/llmloop/loop.go:116
↓ 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 callersFunctionUseTestSessions
UseTestSessions redirects session persistence to the "test-sessions" subdirectory and raw captures to "test-raw", so that test runs do not pollute the
internal/session/testing.go:12
↓ 5 callersFunctionWithComparisonSides
(definitions []llm.ToolDef)
internal/config/toolsconfig/comparison.go:15
↓ 5 callersMethodabort
()
acp/cmd/ocr-acp/stdio_windows.go:227
↓ 5 callersFunctionapplyConfigEntries
Merges the config set entries into the raw config in memory (nothing is written to disk). */
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/ConfigDraft.kt:196
↓ 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:466
← previousnext →601–700 of 7,169, ranked by callers