MCPcopy Create free account

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

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

↓ 6 callersFunctionNewFileReadDiff
(dm DiffMap)
internal/tool/file_read_diff.go:37
↓ 6 callersFunctionNewStub
(t Tool)
internal/tool/stub.go:14
↓ 6 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:74
↓ 6 callersFunctionParseHunks
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 callersFunctionPrintTraceSummary
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 callersFunctionReLocateComment
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 callersMethodRecordReviewItemReused
RecordReviewItemReused records that this run reused a checkpoint from another session.
internal/session/history.go:268
↓ 6 callersFunctionResolveComment
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 callersMethodReviseLastAttempt
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 callersMethodSetFinalManifest
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 callersMethodString
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 callersFunctionStripMarkdownFences
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 callersMethodValidate
()
internal/config/template/template.go:211
↓ 6 callersFunctionapplyCLIExcludes
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 callersFunctionapplyCustomProviderConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:157
↓ 6 callersMethodassert_line
(self, c, want_line)
examples/gerrit_ci/post_review_test.py:56
↓ 6 callersFunctioncharKey
(c rune)
cmd/opencodereview/provider_tui_test.go:42
↓ 6 callersFunctioncompareReadmeStructures
(files)
scripts/github-actions/check-translation-sync.js:127
↓ 6 callersFunctioncompleteEnum
(values ...string)
cmd/opencodereview/shared_flags.go:68
↓ 6 callersMethodconfig
(self)
examples/gitlab_ci/post_review_test.py:536
↓ 6 callersFunctiondescribeStatus
(s session.Summary)
cmd/opencodereview/session_cmd.go:394
↓ 6 callersFunctioneffectivePath
(d model.Diff)
internal/agent/preview.go:114
↓ 6 callersFunctionensureMetrics
()
internal/telemetry/metrics.go:32
↓ 6 callersMethodenterEditCustomProvider
()
cmd/opencodereview/provider_tui.go:1102
↓ 6 callersFunctionexecuteDelegatePreview
(opts delegateOptions)
cmd/opencodereview/delegate_cmd.go:166
↓ 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 callersFunctiongetPrDiffHunks
({ github, owner, repo, prNumber, commitSha, log, cache })
scripts/github-actions/post-review-comments.js:2041
↓ 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 callersFunctioninitRepoWithChange
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 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:505
↓ 6 callersFunctionmaskedSecretPlaceholder
()
cmd/opencodereview/provider_tui.go:881
↓ 6 callersFunctionmax
(a, b int)
internal/suggestdiff/diff.go:73
↓ 6 callersFunctionmetaFactory
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 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:1337
↓ 6 callersFunctionparseBpeData
parseBpeData parses the base64-encoded BPE data format. Each line: <base64-token> <rank>
internal/llm/embedded_loader.go:56
↓ 6 callersMethodread
()
extensions/vscode/src/extension/services/ConfigService.ts:20
↓ 6 callersFunctionreadme
(headings)
scripts/github-actions/check-translation-sync.test.js:32
↓ 6 callersMethodrequests
()
internal/llmloop/retry_identity_test.go:49
↓ 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:148
↓ 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 callersFunctionsanitizeMarkdown
(s string)
cmd/opencodereview/background_file.go:99
↓ 6 callersFunctionsanitizeTerminal
(s string)
cmd/opencodereview/output.go:238
↓ 6 callersFunctionscanItemFingerprint
(it model.ScanItem)
internal/scan/agent.go:288
↓ 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:117
↓ 6 callersFunctionsel
(id string)
internal/session/manifest_test.go:16
↓ 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:336
↓ 6 callersFunctionunmarshalResponsesBody
--- helpers ---
internal/llm/responses_client_test.go:669
↓ 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:355
↓ 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 callersFunctionCountMessagesTokens
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 callersMethodFilesReviewed
()
cmd/opencodereview/shared.go:332
↓ 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 callersFunctionLoad
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 callersFunctionLoadAppConfig
LoadAppConfig loads config from path. Returns nil, nil if file does not exist.
cmd/opencodereview/config_cmd.go:382
↓ 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:72
↓ 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:154
↓ 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 callersMethodServeHTTP
(w http.ResponseWriter, r *http.Request)
cmd/opencodereview/retry_fake_llm_test.go:81
↓ 5 callersFunctionSessionKeyFromContext
SessionKeyFromContext returns the session key carried by ctx, or "" when none was set.
internal/llm/sessionkey.go:64
↓ 5 callersFunctionSessionsDir
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 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 callersFunctionStartLLMSpan
StartLLMSpan creates a span for an LLM request with standard attributes.
internal/telemetry/span.go:109
↓ 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:63
↓ 5 callersMethodTools
()
internal/mcp/client.go:155
↓ 5 callersMethodTotalInputTokens
TotalInputTokens returns the accumulated input/prompt tokens from all LLM calls.
internal/llmloop/loop.go:128
↓ 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 callersFunctionWithRequestMeta
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 callersFunctionapplyDedupGroups
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 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:304
↓ 5 callersFunctionassertNotContains
(t *testing.T, args []string, val string)
internal/tool/code_search_test.go:311
↓ 5 callersMethodassert_unresolved
(self, severity, want)
examples/gerrit_ci/post_review_test.py:89
↓ 5 callersMethodcancelPendingCompression
cancelPendingCompression aborts the conversation's in-flight background compression, if any.
internal/llmloop/compression.go:371
↓ 5 callersFunctioncaptureStdout
(t *testing.T, fn func())
internal/telemetry/events_test.go:129
↓ 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 callersFunctioncontentToText
(contents []mcp.Content)
internal/mcp/client.go:180
← previousnext →301–400 of 4,238, ranked by callers