MCPcopy Create free account

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

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

↓ 4 callersFunctioncaptureConfigStderr
(t *testing.T, fn func())
cmd/opencodereview/config_cmd_test.go:1179
↓ 4 callersFunctioncaptureStderr
captureStderr swaps os.Stderr for a pipe around fn and returns what was written. Output here is tiny, so reading after the writer is closed avoids any
internal/llm/resolver_keycmd_test.go:154
↓ 4 callersFunctioncmt
(path, content string)
internal/scan/dedup_test.go:13
↓ 4 callersFunctioncolorize
colorize wraps s in seq and a reset, or returns s untouched when color is off. Every escape sequence in the text output path is gated through here or
cmd/opencodereview/color.go:78
↓ 4 callersFunctioncomputeRetryDelayMs
(error, attempt)
scripts/github-actions/post-review-comments.js:1082
↓ 4 callersMethodconfig
(self)
examples/gitlab_ci/post_review_test.py:716
↓ 4 callersMethodconfirmDeleteCustomProviderModel
()
cmd/opencodereview/provider_tui.go:2985
↓ 4 callersMethodconfirmDeleteOfficialModel
()
cmd/opencodereview/provider_tui.go:3023
↓ 4 callersMethodcustomProviderActiveModel
(cp customProviderListItem)
cmd/opencodereview/provider_tui.go:233
↓ 4 callersMethoddedupEnabled
()
internal/scan/agent.go:88
↓ 4 callersFunctiondefaultAuthHeader
(protocol string)
internal/llm/resolver.go:801
↓ 4 callersFunctiondescribeStart
(s session.Summary)
cmd/opencodereview/session_cmd.go:412
↓ 4 callersFunctiondiffsFixture
()
internal/diff/relocate_across_files_test.go:36
↓ 4 callersFunctionensureMessagesSuffix
ensureMessagesSuffix appends /v1/messages to base URLs that lack a versioned path.
internal/llm/resolver.go:915
↓ 4 callersFunctionestimateCost
(items []model.ScanItem, planEnabled, dedupEnabled, summaryEnabled bool)
internal/scan/estimate.go:62
↓ 4 callersFunctionestimateDiffFileTokens
estimateDiffFileTokens projects the input+output token cost of reviewing a single diff (PLAN + MAIN_TASK rounds). It mirrors scan.estimateFileTokens b
internal/agent/estimate.go:55
↓ 4 callersMethodexecuteGroupPlanPhase
executeGroupPlanPhase runs the plan phase for a file group.
internal/agent/agent.go:1683
↓ 4 callersFunctionexpandSessionKeyInBody
expandSessionKeyInBody returns a copy of body with SessionKeyTemplateVar replaced by key in every string value, recursing into nested maps and slices.
internal/llm/sessionkey.go:101
↓ 4 callersFunctionexpandSessionKeyInHeaders
expandSessionKeyInHeaders returns a copy of headers with every occurrence of SessionKeyTemplateVar in the values replaced by key. The input map is nev
internal/llm/sessionkey.go:87
↓ 4 callersMethodexplainError
explainError translates a Bedrock rejection into the action that fixes it. Two of these are actively misleading as the service words them: the API-key
internal/llm/client.go:977
↓ 4 callersFunctionfencedBlock
(content, language = "")
scripts/github-actions/post-review-comments.js:1684
↓ 4 callersMethodfilterLargeScans
filterLargeScans drops items whose content exceeds 80% of MaxTokens.
internal/scan/agent.go:450
↓ 4 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:1239
↓ 4 callersFunctionfirstLine
firstLine returns the first non-empty trimmed line of git output, so a stray trailing newline or an unexpected second line never pollutes a resolved S
internal/diff/git.go:556
↓ 4 callersFunctionformatPlanGuidance
formatPlanGuidance parses the PLAN_TASK JSON output into a markdown snippet suitable for embedding in MAIN_TASK. On parse failure it returns the raw c
internal/scan/agent.go:1107
↓ 4 callersFunctiongetShellEnv
()
extensions/vscode/src/extension/services/shellEnv.ts:29
↓ 4 callersFunctionhandleSession
(w http.ResponseWriter, r *http.Request, root, repo, sessionID string)
internal/viewer/handler.go:64
↓ 4 callersFunctionhandleSessions
(w http.ResponseWriter, r *http.Request, root, repo string)
internal/viewer/handler.go:35
↓ 4 callersFunctionhumanTokens
humanTokens formats a token count as e.g. "1.2M" / "850K" / "420".
internal/scan/estimate.go:114
↓ 4 callersFunctionhumanTokens
humanTokens formats a token count as e.g. "1.2M" / "850K" / "420". Mirrors internal/scan/estimate.go; kept here so agent has no scan import.
internal/agent/estimate.go:101
↓ 4 callersFunctioninitPreviewRepo
(t *testing.T)
internal/agent/preview_run_test.go:14
↓ 4 callersFunctionisSubtaskErrorType
(warningType string)
cmd/opencodereview/output.go:63
↓ 4 callersFunctionisUserEditMsg
isUserEditMsg reports whether msg represents user text input (typing or paste).
cmd/opencodereview/provider_tui.go:886
↓ 4 callersFunctionitemList
(paths ...string)
internal/scan/batch_test.go:13
↓ 4 callersFunctionloadReviewResumeState
(repoDir string, opts reviewOptions)
cmd/opencodereview/review_cmd.go:338
↓ 4 callersFunctionloadTestTemplate
loadTestTemplate returns a validated default template for runtime tests.
cmd/opencodereview/shared_llmruntime_test.go:17
↓ 4 callersFunctionmakeTask
()
internal/diff/relocation_test.go:35
↓ 4 callersFunctionmanifestMessage
(manifest *session.RunManifest, findings int)
cmd/opencodereview/output.go:581
↓ 4 callersMethodmaybeRunPlan
maybeRunPlan invokes PLAN_TASK on the file and returns a human-readable guidance string suitable for {{plan_guidance}} substitution. Returns "(no pre-
internal/scan/agent.go:813
↓ 4 callersMethodmodelProviderName
()
cmd/opencodereview/provider_tui.go:428
↓ 4 callersFunctionmustGetResult
mustGetResult extracts the first result from a SARIF document, failing the test if the structure is wrong.
cmd/opencodereview/sarif_test.go:35
↓ 4 callersFunctionnKey
()
cmd/opencodereview/provider_tui_test.go:1146
↓ 4 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:173
↓ 4 callersFunctionnewManifestFlowAgentWithClient
(t *testing.T, diffs []model.Diff, resume *session.ResumeState, client llm.LLMClient)
internal/agent/manifest_integration_test.go:72
↓ 4 callersFunctionnewMockResponse
(content string)
internal/diff/relocation_test.go:27
↓ 4 callersFunctionnewRetryObserver
newRetryObserver builds the middleware that feeds collector. It sits inside the SDK retry loop, so it runs once per real HTTP attempt and sees neithe
internal/llm/retry_observer.go:30
↓ 4 callersFunctionnormalizeLine
normalizeLine removes leading/trailing whitespace and strips any leading '+' or '-' diff marker.
internal/diff/resolver.go:301
↓ 4 callersFunctionopenAIClient
The four blind spots share one shape: the observer sees HTTP 200, the failure surfaces afterwards, and nothing downstream would notice the omission —
internal/llm/retry_boundary_test.go:27
↓ 4 callersFunctionoutputJSONWithWarnings
(comments []model.LlmComment, warnings []agent.AgentWarning, filesReviewed, inputTokens, outputTokens, totalT
cmd/opencodereview/output.go:323
↓ 4 callersFunctionoutputTextWithWarnings
(comments []model.LlmComment, warnings []agent.AgentWarning, manifest *session.RunManifest, out io.Writer)
cmd/opencodereview/output.go:67
↓ 4 callersFunctionparseNameStatus
(output: string)
extensions/vscode/src/extension/services/gitMap.ts:161
↓ 4 callersFunctionparseNonNegInt
(val, defaultVal)
scripts/github-actions/post-review-comments.js:1064
↓ 4 callersFunctionpartitionMessages
partitionMessages divides messages into frozen, compress, and active zones. Frozen zone is always messages[0:2]. Active zone preserves the K most rece
internal/llmloop/compression.go:126
↓ 4 callersMethodpost
(msg: ConfigPanelHostToWebview)
extensions/vscode/src/extension/providers/ConfigPanelProvider.ts:61
↓ 4 callersMethodpost_discussion
(self, discussion, comment_id=None)
examples/gitlab_ci/post_review_test.py:186
↓ 4 callersFunctionprintVersion
()
cmd/opencodereview/version.go:28
↓ 4 callersMethodread
(self)
examples/gerrit_ci/post_review_test.py:514
↓ 4 callersFunctionreadAllPages
(tag, pageFn, log, maxPages = 50)
scripts/github-actions/post-review-comments.js:1230
↓ 4 callersFunctionreadJSONLRecords
(t *testing.T, path string)
internal/session/persist_test.go:113
↓ 4 callersMethodrelease
()
internal/gitcmd/runner.go:44
↓ 4 callersMethodreloadConfigAfterSaveFailure
reloadConfigAfterSaveFailure reloads on-disk config and refreshes derived provider TUI state so the UI matches persisted data after a failed save. Ret
cmd/opencodereview/provider_tui.go:1699
↓ 4 callersMethodreloadConfigAfterSaveFailure
reloadConfigAfterSaveFailure reloads on-disk config so in-memory state matches persisted data after a failed save. Returns false when reload could not
cmd/opencodereview/provider_tui.go:2774
↓ 4 callersFunctionrenderListName
(name string, isCursor bool)
cmd/opencodereview/provider_tui.go:2090
↓ 4 callersFunctionresolveBackground
resolveBackground determines the effective background from the flag combination. --background-file wins over --background; the commit-message fallback
cmd/opencodereview/background_file.go:50
↓ 4 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:440
↓ 4 callersFunctionresolveWorkingDirForSession
resolveWorkingDirForSession accepts an explicit --repo flag value and falls back to the current working directory. Unlike resolveRepoDir it does not r
cmd/opencodereview/session_cmd.go:245
↓ 4 callersFunctionreviewModeString
(from, to, commit string)
internal/agent/util.go:147
↓ 4 callersFunctionreviseAttempt
reviseAttempt applies a client-boundary correction to the last attempt of the logical request identified by ctx. Requests without identity (scan, llm
internal/llm/retry_boundary.go:102
↓ 4 callersFunctionrollbackCfgActiveModel
(cfg *Config, providerName, prevModel string)
cmd/opencodereview/provider_tui.go:479
↓ 4 callersMethodruleConfigSHA256
ruleConfigSHA256 is the deterministic identity of the resolved rule configuration this run operates with: the resolver's effective rule-text layers (c
internal/agent/agent.go:1027
↓ 4 callersFunctionrunConfigSet
(key, value string)
cmd/opencodereview/config_cmd.go:110
↓ 4 callersFunctionrunLLMTest
()
cmd/opencodereview/llm_cmd.go:53
↓ 4 callersFunctionrunScanPreview
(cc *commonContext, scanTpl *template.ScanTemplate, scanPaths []string, outputFormat string, out io.Writer)
cmd/opencodereview/scan_cmd.go:266
↓ 4 callersMethodrun_main_with_captured_poster
(self, env_overrides, result=None)
examples/gitlab_ci/post_review_test.py:1515
↓ 4 callersMethodrun_with_urlopen
(self, fake_urlopen, config=None, discussion=None)
examples/gitlab_ci/post_review_test.py:1090
↓ 4 callersFunctionsarifInvocationFromRun
sarifInvocationFromRun builds the run.invocations entry from the manifest's terminal state and any warnings collected during the review. executionSuc
cmd/opencodereview/sarif.go:314
↓ 4 callersFunctionsarifResultFromComment
sarifResultFromComment maps a single LlmComment to a SARIF result. Field mapping follows FR-3 in the requirements spec: - Path → locations[].
cmd/opencodereview/sarif.go:228
↓ 4 callersMethodscanItemFingerprint
(it model.ScanItem)
internal/scan/agent.go:248
↓ 4 callersFunctionscanTaskDoneResponse
()
internal/scan/coverage_test.go:849
↓ 4 callersMethodselectedModel
()
cmd/opencodereview/provider_tui.go:3067
↓ 4 callersMethodselectedModelFromState
()
cmd/opencodereview/provider_tui.go:1952
↓ 4 callersFunctionsessionJSONLPath
(t *testing.T, repoDir, sessionID string)
internal/session/persist_test.go:133
↓ 4 callersFunctionsetupFileFindRepo
(t *testing.T)
internal/tool/file_find_test.go:92
↓ 4 callersMethodsourceArtifactSHA256
sourceArtifactSHA256 is the deterministic content identity of this run's selected input: for every non-deleted diff (the same set registerCoverage sea
internal/agent/agent.go:995
↓ 4 callersFunctionstatusBadge
statusBadge renders the per-file status tag. The letter carries the meaning, so with color disabled the bare "[A]"/"[M]"/... form is still unambiguous
cmd/opencodereview/output.go:771
↓ 4 callersMethodsummaryEnabled
()
internal/scan/agent.go:92
↓ 4 callersFunctiontaskDoneResponseWithArguments
(arguments string)
internal/llmloop/loop_test.go:41
↓ 4 callersMethodtransition
transition moves a selected item to a terminal state through the single coverage entry point. Unknown item_id, an invalid failed classification, an em
internal/session/manifest.go:559
↓ 4 callersMethodtriggerAsyncCompression
triggerAsyncCompression kicks off a background compression job for the conversation owning st. A no-op when a job is already pending — the check-and-s
internal/llmloop/compression.go:291
↓ 4 callersFunctionunquoteGitPath
(path: string)
extensions/vscode/src/extension/services/gitMap.ts:130
↓ 4 callersMethodupdateManualForm
(key string, msg tea.KeyPressMsg)
cmd/opencodereview/provider_tui.go:1469
↓ 4 callersFunctionuseSectionTitleStyle
()
pages/src/hooks/useResponsiveStyle.ts:15
↓ 4 callersMethodvalid
valid reports whether c is one of the fixed attempt error classes.
internal/llm/retry_report.go:38
↓ 4 callersMethodvalid
valid reports whether c is one of the fixed item failure classes.
internal/session/manifest.go:67
↓ 4 callersFunctionvalidateTimeoutSec
validateTimeoutSec converts a config-file timeout (in seconds) to time.Duration. Returns 0 for zero input (use default). Rejects negative values and o
internal/llm/resolver.go:221
↓ 4 callersFunctionwriteCommit
writeCommit writes content to name, stages it, and commits with msg.
internal/diff/git_resolve_test.go:41
↓ 4 callersFunctionwriteOutError
writeOutError surfaces deferred write errors from writers that record them (lazyFileWriter); plain writers such as os.Stdout report nil.
cmd/opencodereview/shared.go:536
↓ 3 callersMethodCallTool
CallTool invokes a tool on the MCP server and returns the text result.
internal/mcp/client.go:158
↓ 3 callersMethodCollectPendingComments
CollectPendingComments awaits any async comment-processing workers and returns the aggregated comments from the collector. Safe to call once per sessi
internal/llmloop/loop.go:201
↓ 3 callersMethodCompletionsWithCtx
CompletionsWithCtx sends a Responses API request and maps the result back to the shared ChatResponse shape. The deferred finalizeRequest is this clie
internal/llm/responses_client.go:90
← previousnext →501–600 of 4,381, ranked by callers