MCPcopy Create free account

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

Functions3,747 in github.com/alibaba/open-code-review

↓ 8 callersMethoddispatchSubtasks
dispatchSubtasks groups items into batches per the configured strategy, then processes batches sequentially while running files within each batch conc
internal/scan/agent.go:499
↓ 8 callersMethoddispose
()
extensions/vscode/src/extension/providers/CommentProvider.ts:326
↓ 8 callersFunctionentry_of
(ri, path="main.go")
examples/gerrit_ci/post_review_test.py:49
↓ 8 callersFunctionmergeModelLists
(lists ...[]string)
cmd/opencodereview/config_cmd.go:651
↓ 8 callersFunctionmustJSON
--- helpers ---
internal/session/resume_test.go:643
↓ 8 callersFunctionnewModelTUIConfig
(cfg modelTUIConfig)
cmd/opencodereview/provider_tui.go:2507
↓ 8 callersFunctionnewQuietHandle
newQuietHandle silences stdout when outputFormat=="json" or audience=="agent"; otherwise the returned handle is a no-op restorer.
cmd/opencodereview/shared.go:272
↓ 8 callersMethodread
(self)
examples/gitlab_ci/post_review_test.py:94
↓ 8 callersFunctionsanitizeReason
sanitizeReason is the single, best-effort redaction+truncation floor applied to every reason the builder stores, so no caller path can write an unreda
internal/session/manifest.go:662
↓ 8 callersFunctionwriteOpenAISSE
(t *testing.T, w http.ResponseWriter, events ...string)
internal/llm/client_test.go:756
↓ 7 callersFunctionAnyToAttr
AnyToAttr converts an arbitrary value to an OTel attribute.KeyValue.
internal/telemetry/span.go:132
↓ 7 callersMethodCommentsForPath
CommentsForPath returns a copy of comments whose Path matches the given path.
internal/tool/comment_collector.go:41
↓ 7 callersMethodCompletionsWithCtx
CompletionsWithCtx sends a chat completion request with context support.
internal/llm/client.go:696
↓ 7 callersFunctionDiscoverRepos
DiscoverRepos walks the sessions root and returns one entry per subdirectory.
internal/viewer/store.go:41
↓ 7 callersFunctionErrorEvent
ErrorEvent emits an error event with error status.
internal/telemetry/events.go:39
↓ 7 callersMethodFinalize
Finalize performs the hard-validated close of the run and returns the immutable manifest. In order it: sweeps any item still selected into failed (col
internal/session/manifest.go:742
↓ 7 callersFunctionIsPathExcluded
IsPathExcluded returns true when relPath matches any of the supplied gitignore-style patterns or any default excluded directory prefix (see ExcludedDi
internal/diff/gitignore.go:25
↓ 7 callersFunctionRecordLLMResult
RecordLLMResult sets the outcome of an LLM request on the span.
internal/telemetry/span.go:115
↓ 7 callersMethodRecordUsage
RecordUsage adds the prompt/completion/cache tokens reported by an LLM response to the runner's aggregate counters. Used by callers (plan phase in age
internal/llmloop/loop.go:126
↓ 7 callersMethodResolveInput
ResolveInput freezes this run's commit endpoints by asking git, following the input-mode matrix: - range: base = merge-base(from,to); head = the
internal/diff/git.go:124
↓ 7 callersMethodSetPendingFailureCause
SetPendingFailureCause records the classification Finalize must use when it sweeps items that never received a Mark*. It records no run_failure and tr
internal/session/manifest.go:460
↓ 7 callersMethodTotalCacheReadTokens
()
cmd/opencodereview/shared.go:298
↓ 7 callersMethodTotalCacheWriteTokens
()
cmd/opencodereview/shared.go:299
↓ 7 callersMethodTotalOutputTokens
()
cmd/opencodereview/shared.go:296
↓ 7 callersFunctionValidateProtocol
ValidateProtocol accepts the three canonical protocol names and rejects everything else.
internal/llm/protocol.go:55
↓ 7 callersFunctionactiveModelForProvider
(cfg *Config, providerName string, entry ProviderEntry)
cmd/opencodereview/config_cmd.go:624
↓ 7 callersMethodapplySessionStart
(rec resumeRecord)
internal/session/resume.go:145
↓ 7 callersFunctionclassifyCommentAgainstDiff
(item, diff)
scripts/github-actions/post-review-comments.js:1916
↓ 7 callersFunctioncustomConfigModelTUI
(t *testing.T, configPath string, models []string)
cmd/opencodereview/provider_tui_funcs_test.go:1017
↓ 7 callersMethodcustomProviderEntry
(name string, fallback ProviderEntry)
cmd/opencodereview/provider_tui.go:568
↓ 7 callersFunctionencodeRepoPath
(p string)
internal/session/persist.go:76
↓ 7 callersFunctionfinishManifestFlow
(t *testing.T, a *Agent)
internal/agent/manifest_integration_test.go:84
↓ 7 callersFunctionmakeDiff
()
internal/diff/relocation_test.go:42
↓ 7 callersMethodmapResponsesResponse
mapResponsesResponse converts the SDK Response into the shared ChatResponse. Text output is read via the SDK's OutputText() helper (it walks all outpu
internal/llm/responses_client.go:208
↓ 7 callersFunctionnewManifestFlowAgent
(t *testing.T, diffs []model.Diff, resume *session.ResumeState)
internal/agent/manifest_integration_test.go:44
↓ 7 callersFunctionparseTemplate
(name string)
internal/viewer/server.go:175
↓ 7 callersFunctionpeekSession
peekSession reads the first record, all review_item records (for comment count), and the last record of a JSONL file.
internal/viewer/store.go:140
↓ 7 callersMethodrecordWarning
recordWarning adds a non-fatal warning to the agent's warning list.
internal/agent/agent.go:430
↓ 7 callersFunctionrenderComment
(comment model.LlmComment)
cmd/opencodereview/output.go:89
↓ 7 callersMethodrepoRoot
()
extensions/vscode/src/extension/services/GitService.ts:254
↓ 7 callersFunctionretryCodesMiddleware
retryCodesMiddleware returns an HTTP middleware that forces the SDK to retry responses whose status code is in the given set, by injecting the x-shoul
internal/llm/client.go:215
↓ 7 callersMethodrunCompression
runCompression performs three-zone memory compression on the given messages, summarizing the compress zone while preserving the active zone intact. Re
internal/llmloop/compression.go:212
↓ 7 callersMethodrunGit
(ctx context.Context, args ...string)
internal/diff/git.go:631
↓ 7 callersMethodselectedCustomProvider
()
cmd/opencodereview/provider_tui.go:390
↓ 7 callersMethodsyncSessionModelSelection
()
cmd/opencodereview/provider_tui.go:577
↓ 7 callersFunctiontaskDoneResponse
()
internal/llmloop/loop_test.go:59
↓ 7 callersFunctionvalidateReviewRefs
validateReviewRefs rejects ref-option injection (#112): any --from/--to/ --commit value must be a real commit ref and must not start with '-'.
cmd/opencodereview/review_cmd.go:350
↓ 6 callersFunctionCanonicalPath
CanonicalPath returns an absolute path with symlinks resolved.
internal/pathutil/path.go:13
↓ 6 callersMethodIsUserExcluded
IsUserExcluded reports whether the given path matches any user exclude pattern.
internal/config/rules/system_rules.go:222
↓ 6 callersFunctionLoadDetail
LoadDetail returns the summary plus per-file item records for one session.
internal/session/list.go:140
↓ 6 callersMethodMarkReused
MarkReused records that the item was reused from a parent session checkpoint.
internal/session/manifest.go:696
↓ 6 callersMethodMarkWaived
MarkWaived records that the user explicitly waived this selected item, which must still be in the pre-terminal (selected) state. reason is required an
internal/session/manifest.go:713
↓ 6 callersFunctionNewFileReadDiff
(dm DiffMap)
internal/tool/file_read_diff.go:37
↓ 6 callersFunctionNewLLMClient
--- Factory --- NewLLMClient creates the appropriate client based on the resolved endpoint protocol. protocol dispatch (canonical names from protocol.
internal/llm/client.go:246
↓ 6 callersFunctionNewProvider
NewProvider creates a Provider for range mode: from..to (via merge-base).
internal/diff/git.go:66
↓ 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 callersMethodRecordReviewItemReused
RecordReviewItemReused records that this run reused a checkpoint from another session.
internal/session/history.go:268
↓ 6 callersMethodRunManifest
RunManifest returns the frozen v1 coverage result for review runs. Scan remains legacy and returns nil.
cmd/opencodereview/shared.go:320
↓ 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:238
↓ 6 callersFunctionapplyCustomProviderConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:155
↓ 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 callersMethodconfig
(self)
examples/gitlab_ci/post_review_test.py:536
↓ 6 callersFunctiondescribeStatus
(s session.Summary)
cmd/opencodereview/session_cmd.go:372
↓ 6 callersFunctioneffectivePath
(d model.Diff)
internal/agent/preview.go:114
↓ 6 callersFunctionensureMetrics
()
internal/telemetry/metrics.go:32
↓ 6 callersMethodenterEditCustomProvider
()
cmd/opencodereview/provider_tui.go:1020
↓ 6 callersFunctionexecuteDelegatePreview
(opts delegateOptions)
cmd/opencodereview/delegate_cmd.go:166
↓ 6 callersMethodexecuteReviewFilter
executeReviewFilter runs the REVIEW_FILTER_TASK to remove comments that are provably incorrect based solely on the diff. Errors are logged and silentl
internal/agent/agent.go:1231
↓ 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:120
↓ 6 callersFunctiongetPrDiffHunks
({ github, owner, repo, prNumber, commitSha, log, cache })
scripts/github-actions/post-review-comments.js:1974
↓ 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:1939
↓ 6 callersFunctionloadLLMRuntime
loadLLMRuntime loads tool defs from toolConfigPath, reads the app config from the user's default config path (applying the configured language to tpl
cmd/opencodereview/shared.go:173
↓ 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:503
↓ 6 callersFunctionmaskedSecretPlaceholder
()
cmd/opencodereview/provider_tui.go:850
↓ 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 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 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:134
↓ 6 callersFunctionrunConfigUnset
(key string)
cmd/opencodereview/config_cmd.go:140
↓ 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 callersFunctionscanItemFingerprint
(it model.ScanItem)
internal/scan/agent.go:285
↓ 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:321
← previousnext →201–300 of 3,747, ranked by callers