Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
4,576 in github.com/alibaba/open-code-review
⨍
Functions
4,576
◇
Types & classes
417
↓ 4 callers
Method
Diffs
()
cmd/opencodereview/shared.go:594
↓ 4 callers
Method
HasInclude
HasInclude reports whether any include patterns are configured.
internal/config/rules/system_rules.go:227
↓ 4 callers
Method
HasPersistence
HasPersistence reports whether this session has a JSONL writer. A false value means no resumable session file exists, even though the run still has it
internal/session/history.go:225
↓ 4 callers
Function
IsReserved
IsReserved reports whether name matches any built-in tool name (including Unknown).
internal/tool/definitions.go:41
↓ 4 callers
Function
LoadGitignorePatterns
LoadGitignorePatterns reads and parses .gitignore patterns from the given repository root. Returns nil if the file is missing or unreadable.
internal/diff/gitignore.go:17
↓ 4 callers
Function
NewRemoteClient
NewRemoteClient connects to a remote MCP server via Streamable HTTP transport. Header values may contain $ENV_VAR references which are expanded at run
internal/mcp/client.go:71
↓ 4 callers
Function
NewResumeLineage
NewResumeLineage builds the lineage for an accepted resume of parent. It returns nil when there is nothing to record — no parent, or a parent with no
internal/session/resume_identity.go:168
↓ 4 callers
Function
ParseExtraHeaders
ParseExtraHeaders parses a string of comma-separated key=value pairs into a dictionary. Values may be double-quoted to include commas, e.g. X-Forwarde
internal/llm/resolver.go:851
↓ 4 callers
Function
ParseReviewMode
ParseReviewMode returns the correct ReviewMode based on provided flag values.
internal/tool/filereader.go:34
↓ 4 callers
Method
ProjectSummary
ProjectSummary is the markdown project-level summary produced by scan's PROJECT_SUMMARY_TASK. Empty for review mode and for scans that skipped / faile
cmd/opencodereview/shared.go:605
↓ 4 callers
Function
Quiet
Quiet replaces stdout with io.Discard and returns a cleanup function. Usage: defer stdout.Quiet()() WARNING: Quiet must ONLY be called from the mai
internal/stdout/stdout.go:33
↓ 4 callers
Function
RecordFilesReviewed
(ctx context.Context, n int64)
internal/telemetry/metrics.go:87
↓ 4 callers
Function
RecordLLMRequest
(ctx context.Context, model string, dur time.Duration, totalTokens int64, status string)
internal/telemetry/metrics.go:107
↓ 4 callers
Function
RecordToolResult
RecordToolResult sets the outcome of a tool execution on the span.
internal/telemetry/span.go:93
↓ 4 callers
Method
RefValue
RefValue returns the git ref that should be used for reading file contents in range or commit mode. Returns ("", false) for workspace mode.
internal/tool/filereader.go:46
↓ 4 callers
Method
ResumeInfo
ResumeInfo returns resume metadata for output. Nil means this was not a resume run.
internal/scan/agent.go:190
↓ 4 callers
Method
ReusableItem
ReusableItem returns the checkpoint for fingerprint only if the parent manifest also recorded that fingerprint as completed or reused. The manifest i
internal/session/resume.go:240
↓ 4 callers
Method
Session
Session returns the session history associated with this Agent.
internal/agent/agent.go:408
↓ 4 callers
Method
SessionID
SessionID returns the persisted session identifier so callers can show it in JSON output or failure diagnostics. Returns "" when no session was create
cmd/opencodereview/shared.go:610
↓ 4 callers
Method
SetParentRunID
SetParentRunID links this run to the session it resumed from. It only records the direct parent; the parent's input is never copied into this run.
internal/session/manifest.go:361
↓ 4 callers
Function
Shutdown
Shutdown flushes and shuts down all initialized providers. It should be called before process exit to ensure buffered data is exported.
internal/telemetry/shutdown.go:15
↓ 4 callers
Function
Swap
Swap replaces the stdout writer with replacement and returns a restore function. It lets tests capture output written through Writer(), and lets calle
internal/stdout/stdout.go:57
↓ 4 callers
Function
ToToolDef
ToToolDef converts an MCP tool definition to an llm.ToolDef.
internal/mcp/provider.go:70
↓ 4 callers
Function
UseTestSessions
UseTestSessions redirects session persistence to the "test-sessions" subdirectory so that test runs do not pollute the real sessions store. It must b
internal/session/testing.go:11
↓ 4 callers
Method
WaitBackground
WaitBackground blocks until every background job started by this Runner has returned. Background memory compression is the only such job, and cancelPe
internal/llmloop/loop.go:123
↓ 4 callers
Function
WithinBase
WithinBase reports whether target is base itself or contained under base.
internal/pathutil/path.go:22
↓ 4 callers
Method
Write
([]byte)
cmd/opencodereview/output_file_test.go:405
↓ 4 callers
Method
_retry
(self, endpoint, data=None, method="GET")
examples/gitlab_ci/post_review.py:824
↓ 4 callers
Method
_versions
(self, *triples)
examples/gitlab_ci/post_review_test.py:1306
↓ 4 callers
Method
acquire
(ctx context.Context)
internal/gitcmd/runner.go:32
↓ 4 callers
Function
addRepoFlag
(cmd *cobra.Command, target *string)
cmd/opencodereview/shared_flags.go:15
↓ 4 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:1027
↓ 4 callers
Function
batchPaths
(b [][]model.ScanItem)
internal/scan/batch_test.go:21
↓ 4 callers
Function
buildAllowedHosts
buildAllowedHosts returns the default-deny allowlist used by the host guard. The set always includes the standard loopback names. If bindHost is a con
internal/viewer/hostguard.go:61
↓ 4 callers
Function
buildBadgeImage
(comment)
scripts/github-actions/post-review-comments.js:1555
↓ 4 callers
Method
buildOpenAIParams
buildOpenAIParams converts the shared ChatRequest into OpenAI SDK parameters.
internal/llm/client.go:616
↓ 4 callers
Function
buildPolicy
({ severityThreshold, categories } = {})
scripts/github-actions/post-review-comments.js:1586
↓ 4 callers
Function
buildToolRegistry
(collector *tool.CommentCollector, fr *tool.FileReader)
cmd/opencodereview/review_cmd.go:576
↓ 4 callers
Method
cancel
()
extensions/vscode/src/extension/services/CliService.ts:161
↓ 4 callers
Function
captureConfigStderr
(t *testing.T, fn func())
cmd/opencodereview/config_cmd_test.go:1179
↓ 4 callers
Function
captureStderr
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 callers
Function
cmt
(path, content string)
internal/scan/dedup_test.go:13
↓ 4 callers
Function
colorize
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 callers
Function
computeRetryDelayMs
(error, attempt)
scripts/github-actions/post-review-comments.js:1200
↓ 4 callers
Method
config
(self)
examples/gitlab_ci/post_review_test.py:716
↓ 4 callers
Method
confirmDeleteCustomProviderModel
()
cmd/opencodereview/provider_tui.go:2985
↓ 4 callers
Method
confirmDeleteOfficialModel
()
cmd/opencodereview/provider_tui.go:3023
↓ 4 callers
Method
customProviderActiveModel
(cp customProviderListItem)
cmd/opencodereview/provider_tui.go:233
↓ 4 callers
Method
dedupEnabled
()
internal/scan/agent.go:88
↓ 4 callers
Function
defaultAuthHeader
(protocol string)
internal/llm/resolver.go:801
↓ 4 callers
Function
describeStart
(s session.Summary)
cmd/opencodereview/session_cmd.go:565
↓ 4 callers
Function
diffsFixture
()
internal/diff/relocate_across_files_test.go:36
↓ 4 callers
Function
ensureMessagesSuffix
ensureMessagesSuffix appends /v1/messages to base URLs that lack a versioned path.
internal/llm/resolver.go:915
↓ 4 callers
Function
estimateCost
(items []model.ScanItem, planEnabled, dedupEnabled, summaryEnabled bool)
internal/scan/estimate.go:62
↓ 4 callers
Function
estimateDiffFileTokens
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 callers
Method
executeGroupPlanPhase
executeGroupPlanPhase runs the plan phase for a file group.
internal/agent/agent.go:1684
↓ 4 callers
Function
expandSessionKeyInBody
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:122
↓ 4 callers
Function
expandSessionKeyInHeaders
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:108
↓ 4 callers
Method
explainError
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 callers
Function
fencedBlock
(content, language = "")
scripts/github-actions/post-review-comments.js:1802
↓ 4 callers
Method
filterLargeScans
filterLargeScans drops items whose content exceeds 80% of MaxTokens.
internal/scan/agent.go:450
↓ 4 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:1240
↓ 4 callers
Function
firstLine
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 callers
Function
formatPlanGuidance
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 callers
Function
getShellEnv
()
extensions/vscode/src/extension/services/shellEnv.ts:29
↓ 4 callers
Function
handleSession
(w http.ResponseWriter, r *http.Request, root, repo, sessionID string)
internal/viewer/handler.go:64
↓ 4 callers
Function
handleSessions
(w http.ResponseWriter, r *http.Request, root, repo string)
internal/viewer/handler.go:35
↓ 4 callers
Function
humanTokens
humanTokens formats a token count as e.g. "1.2M" / "850K" / "420".
internal/scan/estimate.go:114
↓ 4 callers
Function
humanTokens
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 callers
Function
initPreviewRepo
(t *testing.T)
internal/agent/preview_run_test.go:14
↓ 4 callers
Function
initRulesCheckTestRepo
(t *testing.T)
cmd/opencodereview/rules_cmd_test.go:14
↓ 4 callers
Function
isSubtaskErrorType
(warningType string)
cmd/opencodereview/output.go:63
↓ 4 callers
Function
isUserEditMsg
isUserEditMsg reports whether msg represents user text input (typing or paste).
cmd/opencodereview/provider_tui.go:886
↓ 4 callers
Function
itemList
(paths ...string)
internal/scan/batch_test.go:13
↓ 4 callers
Function
loadReviewResumeState
(repoDir string, opts reviewOptions)
cmd/opencodereview/review_cmd.go:339
↓ 4 callers
Function
loadTestTemplate
loadTestTemplate returns a validated default template for runtime tests.
cmd/opencodereview/shared_llmruntime_test.go:17
↓ 4 callers
Function
makeErr
(message, status, headers, data)
scripts/github-actions/post-review-comments.test.js:61
↓ 4 callers
Function
makeTask
()
internal/diff/relocation_test.go:35
↓ 4 callers
Function
manifestMessage
(manifest *session.RunManifest, findings int)
cmd/opencodereview/output.go:582
↓ 4 callers
Method
maybeRunPlan
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 callers
Method
modelProviderName
()
cmd/opencodereview/provider_tui.go:428
↓ 4 callers
Function
mustGetResult
mustGetResult extracts the first result from a SARIF document, failing the test if the structure is wrong.
cmd/opencodereview/sarif_test.go:35
↓ 4 callers
Function
nKey
()
cmd/opencodereview/provider_tui_test.go:1146
↓ 4 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:271
↓ 4 callers
Function
newManifestFlowAgentWithClient
(t *testing.T, diffs []model.Diff, resume *session.ResumeState, client llm.LLMClient)
internal/agent/manifest_integration_test.go:72
↓ 4 callers
Function
newMockResponse
(content string)
internal/diff/relocation_test.go:27
↓ 4 callers
Function
newRetryObserver
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 callers
Function
normalizeLine
normalizeLine removes leading/trailing whitespace and strips any leading '+' or '-' diff marker.
internal/diff/resolver.go:301
↓ 4 callers
Function
objcRuleText
objcRuleText is the exact text a sniffed .m file must resolve to. Assert on identity rather than on wording: objc.md currently ships as a placeholder
internal/config/rules/sniffer_test.go:61
↓ 4 callers
Function
openAIClient
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 callers
Function
outputJSONWithWarnings
(comments []model.LlmComment, warnings []agent.AgentWarning, filesReviewed, inputTokens, outputTokens, totalT
cmd/opencodereview/output.go:323
↓ 4 callers
Function
outputTextWithWarnings
(comments []model.LlmComment, warnings []agent.AgentWarning, manifest *session.RunManifest, out io.Writer)
cmd/opencodereview/output.go:67
↓ 4 callers
Function
parseNameStatus
(output: string)
extensions/vscode/src/extension/services/gitMap.ts:161
↓ 4 callers
Function
parseNonNegInt
(val, defaultVal)
scripts/github-actions/post-review-comments.js:1182
↓ 4 callers
Function
partitionMessages
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 callers
Method
post
(msg: ConfigPanelHostToWebview)
extensions/vscode/src/extension/providers/ConfigPanelProvider.ts:61
↓ 4 callers
Method
post_discussion
(self, discussion, comment_id=None)
examples/gitlab_ci/post_review_test.py:186
↓ 4 callers
Function
printVersion
()
cmd/opencodereview/version.go:28
↓ 4 callers
Method
read
(self)
examples/gerrit_ci/post_review_test.py:514
↓ 4 callers
Function
readAllPages
(tag, pageFn, log, maxPages = 50)
scripts/github-actions/post-review-comments.js:1348
← previous
next →
501–600 of 4,576, ranked by callers