Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
4,238 in github.com/alibaba/open-code-review
⨍
Functions
4,238
◇
Types & classes
393
↓ 6 callers
Function
NewFileReadDiff
(dm DiffMap)
internal/tool/file_read_diff.go:37
↓ 6 callers
Function
NewStub
(t Tool)
internal/tool/stub.go:14
↓ 6 callers
Function
ParseComments
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:74
↓ 6 callers
Function
ParseHunks
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:40
↓ 6 callers
Function
PrintTraceSummary
PrintTraceSummary prints a one-line summary of the review to stdout. If SessionID is non-empty, an "[ocr] Session: <id>" line follows the summary.
internal/telemetry/events.go:86
↓ 6 callers
Function
ReLocateComment
ReLocateComment calls the LLM to regenerate a precise existing_code snippet when text-based matching fails, then retries ResolveComment with the new s
internal/diff/relocation.go:49
↓ 6 callers
Method
RecordReviewItemReused
RecordReviewItemReused records that this run reused a checkpoint from another session.
internal/session/history.go:268
↓ 6 callers
Function
ResolveComment
ResolveComment attempts to resolve StartLine/EndLine for a single comment by matching ExistingCode against the diff. Returns true on success.
internal/diff/resolver.go:62
↓ 6 callers
Method
ReviseLastAttempt
ReviseLastAttempt rewrites the last attempt of m as an error. It is the client-boundary correction for what the observer cannot see: an error surfaci
internal/llm/retry_report.go:381
↓ 6 callers
Method
SetFinalManifest
SetFinalManifest stores the frozen manifest the agent produced. It is embedded into session_end by Finalize and returned to the CLI via FinalManifest.
internal/session/history.go:197
↓ 6 callers
Method
String
String renders a one-line human-readable estimate, matching scan.Estimate's format so diff and scan warnings read consistently. Money is intentionally
internal/agent/estimate.go:94
↓ 6 callers
Function
StripMarkdownFences
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:162
↓ 6 callers
Method
Validate
()
internal/config/template/template.go:211
↓ 6 callers
Function
applyCLIExcludes
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:255
↓ 6 callers
Function
applyCustomProviderConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:157
↓ 6 callers
Method
assert_line
(self, c, want_line)
examples/gerrit_ci/post_review_test.py:56
↓ 6 callers
Function
charKey
(c rune)
cmd/opencodereview/provider_tui_test.go:42
↓ 6 callers
Function
compareReadmeStructures
(files)
scripts/github-actions/check-translation-sync.js:127
↓ 6 callers
Function
completeEnum
(values ...string)
cmd/opencodereview/shared_flags.go:68
↓ 6 callers
Method
config
(self)
examples/gitlab_ci/post_review_test.py:536
↓ 6 callers
Function
describeStatus
(s session.Summary)
cmd/opencodereview/session_cmd.go:394
↓ 6 callers
Function
effectivePath
(d model.Diff)
internal/agent/preview.go:114
↓ 6 callers
Function
ensureMetrics
()
internal/telemetry/metrics.go:32
↓ 6 callers
Method
enterEditCustomProvider
()
cmd/opencodereview/provider_tui.go:1102
↓ 6 callers
Function
executeDelegatePreview
(opts delegateOptions)
cmd/opencodereview/delegate_cmd.go:166
↓ 6 callers
Function
extractHeadings
(markdown)
scripts/github-actions/check-translation-sync.js:59
↓ 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:186
↓ 6 callers
Function
getPrDiffHunks
({ github, owner, repo, prNumber, commitSha, log, cache })
scripts/github-actions/post-review-comments.js:2041
↓ 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
handleRepos
(w http.ResponseWriter, r *http.Request, root string)
internal/viewer/handler.go:12
↓ 6 callers
Function
initBareRepo
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 callers
Function
initRepoWithChange
initRepoWithChange creates a real git repository with one committed file and an uncommitted working-tree modification, returning the repo dir. There i
internal/diff/git_test.go:48
↓ 6 callers
Function
listCursorPrefix
(isCursor bool)
cmd/opencodereview/provider_tui.go:2073
↓ 6 callers
Function
loadPackageJSON
(t *testing.T)
internal/release/asset_naming_test.go:34
↓ 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:505
↓ 6 callers
Function
maskedSecretPlaceholder
()
cmd/opencodereview/provider_tui.go:881
↓ 6 callers
Function
max
(a, b int)
internal/suggestdiff/diff.go:73
↓ 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/llmloop/retry_identity_test.go:65
↓ 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
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:1337
↓ 6 callers
Function
parseBpeData
parseBpeData parses the base64-encoded BPE data format. Each line: <base64-token> <rank>
internal/llm/embedded_loader.go:56
↓ 6 callers
Method
read
()
extensions/vscode/src/extension/services/ConfigService.ts:20
↓ 6 callers
Function
readme
(headings)
scripts/github-actions/check-translation-sync.test.js:32
↓ 6 callers
Method
requests
()
internal/llmloop/retry_identity_test.go:49
↓ 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:142
↓ 6 callers
Function
runConfigUnset
(key string)
cmd/opencodereview/config_cmd.go:148
↓ 6 callers
Function
runGitCmd
(repoDir string, args ...string)
cmd/opencodereview/git.go:12
↓ 6 callers
Method
runRaw
运行任意参数,流式回调日志,结束返回 stdout 全文。退出码非 0 时 reject,并带上 CLI 报错文本。
extensions/vscode/src/extension/services/CliService.ts:108
↓ 6 callers
Function
sanitizeMarkdown
(s string)
cmd/opencodereview/background_file.go:99
↓ 6 callers
Function
sanitizeTerminal
(s string)
cmd/opencodereview/output.go:238
↓ 6 callers
Function
scanItemFingerprint
(it model.ScanItem)
internal/scan/agent.go:288
↓ 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:117
↓ 6 callers
Function
sel
(id string)
internal/session/manifest_test.go:16
↓ 6 callers
Method
trace
(msg: string)
extensions/vscode/src/extension/services/GitService.ts:20
↓ 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:336
↓ 6 callers
Function
unmarshalResponsesBody
--- helpers ---
internal/llm/responses_client_test.go:669
↓ 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:382
↓ 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
BudgetExceeded
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:355
↓ 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
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
Function
CountMessagesTokens
CountMessagesTokens returns the rough token count of msgs by summing the per-message text token count. Exported because both review and scan top layer
internal/llmloop/compression.go:69
↓ 5 callers
Method
FilesReviewed
()
cmd/opencodereview/shared.go:332
↓ 5 callers
Method
Frozen
Frozen reports whether Finalize has already run.
internal/session/manifest.go:718
↓ 5 callers
Function
Init
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 callers
Function
ListSessions
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 callers
Function
Load
Load parses the tools config file. When path is empty, falls back to the embedded default tools configuration.
internal/config/toolsconfig/toolsconfig.go:27
↓ 5 callers
Function
LoadAppConfig
LoadAppConfig loads config from path. Returns nil, nil if file does not exist.
cmd/opencodereview/config_cmd.go:382
↓ 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:72
↓ 5 callers
Function
RecordCommentsGenerated
(ctx context.Context, n int64)
internal/telemetry/metrics.go:97
↓ 5 callers
Function
RecordReviewDuration
(ctx context.Context, dur time.Duration)
internal/telemetry/metrics.go:77
↓ 5 callers
Method
RecordWarning
RecordWarning adds a non-fatal warning.
internal/llmloop/loop.go:154
↓ 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:100
↓ 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
Run
Run executes a git command and returns the combined stdout+stderr output.
internal/gitcmd/runner.go:47
↓ 5 callers
Method
ServeHTTP
(w http.ResponseWriter, r *http.Request)
cmd/opencodereview/retry_fake_llm_test.go:81
↓ 5 callers
Function
SessionKeyFromContext
SessionKeyFromContext returns the session key carried by ctx, or "" when none was set.
internal/llm/sessionkey.go:64
↓ 5 callers
Function
SessionsDir
SessionsDir returns the on-disk directory that holds JSONL session files for a given repository. It does not create the directory.
internal/session/list.go:98
↓ 5 callers
Method
SetExecution
SetExecution sets the non-secret execution provenance.
internal/session/manifest.go:398
↓ 5 callers
Method
SetRepository
SetRepository sets the redacted repository identity.
internal/session/manifest.go:373
↓ 5 callers
Function
StartLLMSpan
StartLLMSpan creates a span for an LLM request with standard attributes.
internal/telemetry/span.go:109
↓ 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/llmloop/pool.go:63
↓ 5 callers
Method
Tools
()
internal/mcp/client.go:155
↓ 5 callers
Method
TotalInputTokens
TotalInputTokens returns the accumulated input/prompt tokens from all LLM calls.
internal/llmloop/loop.go:128
↓ 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
Method
ValidateResume
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 callers
Function
WithRequestMeta
WithRequestMeta attaches m to ctx so the retry observer can associate every HTTP attempt made under that context with one logical request. It is the o
internal/llm/retry_meta.go:132
↓ 5 callers
Function
applyDedupGroups
applyDedupGroups parses the DEDUP_TASK output and returns the deduped comment slice. Returns (nil, false) when the response is malformed OR when the g
internal/scan/agent.go:968
↓ 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:465
↓ 5 callers
Function
assertContains
(t *testing.T, args []string, val string)
internal/tool/code_search_test.go:304
↓ 5 callers
Function
assertNotContains
(t *testing.T, args []string, val string)
internal/tool/code_search_test.go:311
↓ 5 callers
Method
assert_unresolved
(self, severity, want)
examples/gerrit_ci/post_review_test.py:89
↓ 5 callers
Method
cancelPendingCompression
cancelPendingCompression aborts the conversation's in-flight background compression, if any.
internal/llmloop/compression.go:371
↓ 5 callers
Function
captureStdout
(t *testing.T, fn func())
internal/telemetry/events_test.go:129
↓ 5 callers
Method
clear
()
extensions/vscode/src/extension/providers/lineOffset.ts:20
↓ 5 callers
Function
clearCfgActiveModelIfDeleted
(cfg *Config, providerName, name string)
cmd/opencodereview/provider_tui.go:473
↓ 5 callers
Function
commentKey
(rc)
scripts/github-actions/post-review-comments.test.js:78
↓ 5 callers
Function
contentToText
(contents []mcp.Content)
internal/mcp/client.go:180
← previous
next →
301–400 of 4,238, ranked by callers