Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
7,169 in github.com/alibaba/open-code-review
⨍
Functions
7,169
◇
Types & classes
774
↓ 6 callers
Function
extractSideLines
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 callers
Function
fileGroupKey
fileGroupKey returns a deterministic key for a file group: sorted paths joined by comma.
internal/agent/grouping.go:370
↓ 6 callers
Method
finalizeManifest
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 callers
Function
formatWarnings
(warnings)
scripts/github-actions/post-review-comments.js:2494
↓ 6 callers
Function
fsIsCaseInsensitive
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 callers
Function
getPrDiffHunks
({ github, owner, repo, prNumber, commitSha, log, cache })
scripts/github-actions/post-review-comments.js:2897
↓ 6 callers
Function
groupBatches
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 callers
Function
initRepo
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 callers
Function
interruptContextWithForcedExit
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 callers
Function
isConfigReady
(config: OcrConfig | null)
extensions/frontend/src/shared/configUtils.ts:85
↓ 6 callers
Function
lineSpan
(c)
scripts/github-actions/post-review-comments.js:1432
↓ 6 callers
Function
listCursorPrefix
(isCursor bool)
cmd/opencodereview/provider_tui.go:2107
↓ 6 callers
Method
loadDiffs
loadDiffs populates the diff-related fields used by normal review runs.
internal/agent/agent.go:588
↓ 6 callers
Function
loadPackageJSON
(t *testing.T)
internal/release/asset_naming_test.go:34
↓ 6 callers
Function
loadReviewResumeState
(repoDir string, opts reviewOptions)
cmd/opencodereview/review_cmd.go:413
↓ 6 callers
Function
loadTestTemplate
loadTestTemplate returns a validated default template for runtime tests.
cmd/opencodereview/shared_llmruntime_test.go:350
↓ 6 callers
Function
loadToolDefs
(names []string)
cmd/opencodereview/shared.go:338
↓ 6 callers
Function
looksLikeFilePath
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 callers
Method
manifestItemID
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 callers
Method
mapOpenAIResponse
mapOpenAIResponse converts the SDK response into ChatResponse.
internal/llm/client.go:1078
↓ 6 callers
Function
maskedSecretPlaceholder
()
cmd/opencodereview/provider_tui.go:882
↓ 6 callers
Function
metaFactory
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 callers
Function
newCompressionRunner
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 callers
Function
newCustomModelTUI
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 callers
Function
newError
(kind ErrorKind, format string, args ...any)
acp/internal/orchestrator/types.go:138
↓ 6 callers
Function
newOpenAITestServer
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 callers
Method
observe
()
pages/src/pages/DocsPage.test.tsx:160
↓ 6 callers
Function
parseBpeData
parseBpeData parses the base64-encoded BPE data format. Each line: <base64-token> <rank>
internal/llm/embedded_loader.go:67
↓ 6 callers
Function
parseFrontmatter
(content)
scripts/github-actions/check-plugin-contract.js:370
↓ 6 callers
Method
read
()
extensions/vscode/src/extension/services/ConfigService.ts:20
↓ 6 callers
Function
readRuleFileSafe
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 callers
Function
readme
(headings)
scripts/github-actions/check-translation-sync.test.js:32
↓ 6 callers
Function
registerReviewFlags
registerReviewFlags registers all review command flags on cmd, binding to opts.
cmd/opencodereview/shared_flags.go:209
↓ 6 callers
Function
registerScanFlags
registerScanFlags registers all scan command flags on cmd, binding to opts.
cmd/opencodereview/shared_flags.go:229
↓ 6 callers
Function
request
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 callers
Function
resolveArgs
(gh, core, over = {})
scripts/github-actions/post-review-comments.test.js:6189
↓ 6 callers
Function
resolveDeclaredPath
(manifestFile, base, value)
scripts/github-actions/check-plugin-contract.js:499
↓ 6 callers
Function
resolveRepoDir
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 callers
Method
resolvedModel
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 callers
Function
responseStreamEvents
--- helpers ---
internal/llm/responses_client_test.go:1072
↓ 6 callers
Function
run
()
cmd/opencodereview/main.go:21
↓ 6 callers
Function
runActionScript
(source, { github, context, core, env })
scripts/github-actions/post-review-comments.test.js:5056
↓ 6 callers
Function
runChatGPTStatus
(out io.Writer)
cmd/opencodereview/chatgpt_auth.go:53
↓ 6 callers
Function
runConfig
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 callers
Function
runConfigUnset
(key string)
cmd/opencodereview/config_cmd.go:140
↓ 6 callers
Function
runGitCmd
(repoDir string, args ...string)
cmd/opencodereview/git.go:12
↓ 6 callers
Method
runRaw
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 callers
Function
runReview
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 callers
Function
runRulesCheck
(filePath string)
cmd/opencodereview/rules_cmd.go:45
↓ 6 callers
Function
sanitizeRenderedMarkdown
(rendered string)
cmd/opencodereview/markdown.go:186
↓ 6 callers
Function
scanTaskDoneResponse
()
internal/scan/coverage_test.go:1357
↓ 6 callers
Function
scriptCore
()
scripts/github-actions/post-review-comments.test.js:5074
↓ 6 callers
Function
seedParentManifest
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 callers
Method
selected
(id string)
internal/chatgptauth/store.go:71
↓ 6 callers
Function
sendCallback
(q url.Values, id string)
internal/chatgptauth/recovery_test.go:86
↓ 6 callers
Function
sleep
(ms)
scripts/github-actions/post-review-comments.js:1899
↓ 6 callers
Method
submit
(f func() ([]model.LlmComment, error), kwg *sync.WaitGroup)
internal/reviewtask/pool.go:75
↓ 6 callers
Method
tryApplyPendingCompression
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 callers
Function
unwritableConfigPath
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 callers
Function
upKey
()
cmd/opencodereview/provider_tui_funcs_test.go:386
↓ 6 callers
Function
validateAuthProvider
()
cmd/opencodereview/chatgpt_auth.go:28
↓ 5 callers
Method
AsDiff
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 callers
Method
AwaitKey
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 callers
Method
BudgetExceeded
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 callers
Function
CollectToolDefs
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 callers
Function
ComputeLineDiff
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 callers
Function
ContextWithTraceParentFromEnv
ContextWithTraceParentFromEnv extracts W3C traceparent from the TRACEPARENT environment variable and returns a context carrying the upstream span cont
internal/telemetry/span.go:35
↓ 5 callers
Method
Error
()
internal/gitcmd/version.go:43
↓ 5 callers
Method
EstimatedTokens
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 callers
Function
ExportSession
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 callers
Method
FilesReviewed
()
cmd/opencodereview/shared.go:763
↓ 5 callers
Function
FormatResult
FormatResult renders OCR findings with safe local navigation when root is set.
acp/internal/adapter/presentation/report.go:18
↓ 5 callers
Method
Frozen
Frozen reports whether Finalize has already run.
internal/session/manifest.go:777
↓ 5 callers
Function
IsReserved
IsReserved reports whether name matches any built-in tool name (including Unknown).
internal/tool/definitions.go:41
↓ 5 callers
Function
Kill
Kill forcibly terminates the managed process tree, including descendants.
acp/internal/orchestrator/process/process_unix.go:38
↓ 5 callers
Function
LoadComments
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 callers
Method
Logout
(ctx context.Context, s Store, account string)
internal/chatgptauth/oauth.go:649
↓ 5 callers
Function
NewClient
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 callers
Function
NewConnection
NewConnection binds notifications before any request can acquire the agent lock.
acp/internal/adapter/connection.go:17
↓ 5 callers
Function
NewSessionKey
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 callers
Function
ParseReviewMode
ParseReviewMode returns the correct ReviewMode based on provided flag values.
internal/tool/filereader.go:35
↓ 5 callers
Function
RecordCommentsGenerated
(ctx context.Context, n int64)
internal/telemetry/metrics.go:103
↓ 5 callers
Function
RecordLLMRequest
(ctx context.Context, model string, dur time.Duration, totalTokens int64, status string)
internal/telemetry/metrics.go:113
↓ 5 callers
Function
RecordReviewDuration
(ctx context.Context, dur time.Duration)
internal/telemetry/metrics.go:83
↓ 5 callers
Function
RelocateAcrossFiles
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 callers
Method
ReplaceSince
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 callers
Method
ResolveWorkspaceComparison
(ctx context.Context)
internal/diff/workspace.go:22
↓ 5 callers
Method
RoundTrip
(r *http.Request)
internal/chatgptauth/lifecycle_test.go:222
↓ 5 callers
Method
SetDiffMap
SetDiffMap replaces the diff snapshot. Must be called before concurrent access begins.
internal/tool/file_read_diff.go:60
↓ 5 callers
Method
Stream
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 callers
Method
Submit
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 callers
Method
TotalOutputTokens
TotalOutputTokens returns the accumulated completion tokens from all LLM calls.
internal/llmloop/loop.go:107
↓ 5 callers
Method
TotalTokensUsed
TotalTokensUsed returns input + output.
internal/llmloop/loop.go:116
↓ 5 callers
Function
TraceIDFromContext
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 callers
Function
UseTestSessions
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 callers
Function
WithComparisonSides
(definitions []llm.ToolDef)
internal/config/toolsconfig/comparison.go:15
↓ 5 callers
Method
abort
()
acp/cmd/ocr-acp/stdio_windows.go:227
↓ 5 callers
Function
applyConfigEntries
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 callers
Function
applyManualConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:103
↓ 5 callers
Function
applyModelDeleteToEntry
(entry ProviderEntry, name string)
cmd/opencodereview/provider_tui.go:466
← previous
next →
601–700 of 7,169, ranked by callers