Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
4,381 in github.com/alibaba/open-code-review
⨍
Functions
4,381
◇
Types & classes
411
↓ 2 callers
Function
FormatDuration
FormatDuration returns a human-readable duration string for console output.
internal/telemetry/events.go:67
↓ 2 callers
Function
GroupRules
GroupRules groups the given file paths by their resolved rule content. Files are placed in the same group only when their source, matched pattern, and
internal/delegate/rulegroup.go:27
↓ 2 callers
Function
HomeConfigPath
HomeConfigPath returns the default path to ~/.opencodereview/config.json.
internal/telemetry/config.go:128
↓ 2 callers
Method
Init
()
cmd/opencodereview/provider_tui.go:2860
↓ 2 callers
Function
InitEmbeddedLoader
initEmbeddedLoader configures tiktoken to use embedded BPE data instead of fetching from network. Call this once during application startup, before an
internal/llm/embedded_loader.go:23
↓ 2 callers
Method
IsKnown
IsKnown reports whether the tool is not UNKNOWN.
internal/tool/definitions.go:65
↓ 2 callers
Method
IsTransition
IsTransition reports whether the resume changed provider or model, which is the condition that required an explicit flag to be accepted.
internal/session/resume_identity.go:186
↓ 2 callers
Function
ItemID
ItemID is the single, canonical derivation of a manifest item_id. It is content-independent: it is derived from the operation, the input mode and the
internal/session/manifest.go:199
↓ 2 callers
Method
LLMFailures
LLMFailures returns the total number of LLM request failures recorded during this session.
internal/session/history.go:476
↓ 2 callers
Function
LoadDefault
LoadDefault parses the embedded task.json and returns the TEST_TASK conversation.
internal/config/testconnection/testconnection.go:34
↓ 2 callers
Function
LoadFromJSON
LoadFromJSON merges telemetry settings from a JSON config file if present. This has lower priority than environment variables.
internal/telemetry/config.go:74
↓ 2 callers
Method
LoadTiktokenBpe
(tiktokenBpeFile string)
internal/llm/embedded_loader.go:39
↓ 2 callers
Method
Name
Name returns the tool's identifier name.
internal/tool/definitions.go:62
↓ 2 callers
Function
NewAnthropicBedrockClient
NewAnthropicBedrockClient creates a client for Anthropic models served by AWS Bedrock. The wire format is the Messages API, so this reuses AnthropicC
internal/llm/client.go:843
↓ 2 callers
Function
NewToolResultMessage
NewToolResultMessage creates a tool-role message with the given result. Uses the OpenAI Chat Completions format: role="tool" with tool_call_id and pla
internal/llm/client.go:97
↓ 2 callers
Function
OfName
(name string)
internal/tool/definitions.go:27
↓ 2 callers
Function
OpenCodeReviewPlugin
({ client, worktree })
plugins/open-code-review/opencode/open-code-review.ts:300
↓ 2 callers
Function
PhaseEvent
PhaseEvent records a review phase completion with duration and optional error.
internal/telemetry/events.go:53
↓ 2 callers
Method
PlanRequired
PlanRequired reports whether a group warrants the plan phase based on its churn profile. Two thresholds cooperate: PlanModeLineThreshold gates on the
internal/config/template/template.go:67
↓ 2 callers
Method
Preset
Preset returns the knob set for e.
internal/config/template/effort.go:50
↓ 2 callers
Function
Preview
Preview loads diffs and applies the filter algorithm, returning structured preview data without dispatching any LLM calls. It builds none of the revi
internal/agent/preview.go:68
↓ 2 callers
Function
PrintToolCallError
PrintToolCallError prints a line when a tool fails. Example: [ocr] ✘ file_read "internal/config/rules/loader.go" failed: permission denied
internal/telemetry/events.go:124
↓ 2 callers
Function
PrintToolCallFinished
PrintToolCallFinished prints a line when a tool finishes successfully. Example: [ocr] ✔ file_read "internal/config/rules/loader.go" (12ms)
internal/telemetry/events.go:118
↓ 2 callers
Method
ProjectSummary
ProjectSummary returns the markdown project-level summary produced after all batches finish. Empty when SkipSummary is set, PROJECT_SUMMARY_TASK is ab
internal/scan/agent.go:115
↓ 2 callers
Method
ReasoningContent
ReasoningContent extracts the reasoning content of the first choice, if any.
internal/llm/client.go:190
↓ 2 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
↓ 2 callers
Method
RemoteIdentity
RemoteIdentity returns a stable, credential-free identity string for the repository's "origin" remote, suitable for hashing into the run manifest's re
internal/diff/git.go:421
↓ 2 callers
Method
ResumeInfo
()
cmd/opencodereview/shared.go:613
↓ 2 callers
Method
ReviewRounds
ReviewRounds returns the effective per-group round count, never below 1.
internal/config/template/template.go:54
↓ 2 callers
Function
RuleGroupsMarkdown
RuleGroupsMarkdown renders rule groups into a markdown section.
internal/delegate/format.go:12
↓ 2 callers
Method
RunManifest
RunManifest returns the immutable coverage snapshot produced for this review, or nil when manifest construction failed. The scan path deliberately ret
internal/agent/agent.go:425
↓ 2 callers
Method
Sealed
Sealed reports whether the selected set has been sealed.
internal/session/manifest.go:545
↓ 2 callers
Function
StartToolSpan
StartToolSpan creates a span for a tool execution with standard attributes.
internal/telemetry/span.go:87
↓ 2 callers
Method
Stream
Stream acquires the semaphore, starts a git command, and passes its stdout as an io.Reader to consume. The semaphore is held for the full duration. co
internal/gitcmd/runner.go:93
↓ 2 callers
Method
ToolCalls
ToolCalls extracts tool calls from the first choice.
internal/llm/client.go:182
↓ 2 callers
Method
ToolDefsByPhase
ToolDefsByPhase returns the parsed tool definitions filtered by phase. planOnly=true returns only tools with plan_task:true. planOnly=false returns on
internal/config/toolsconfig/toolsconfig.go:48
↓ 2 callers
Method
Warnings
Warnings returns the warnings recorded by the LLM runner.
internal/scan/agent.go:222
↓ 2 callers
Method
WriteSessionStart
WriteSessionStart writes the initial session_start record.
internal/session/persist.go:136
↓ 2 callers
Function
_api_request_once
Single GitLab API attempt. Returns a rich result dict (no retry).
examples/gitlab_ci/post_review.py:591
↓ 2 callers
Function
_api_request_with_retry
Make a GitLab API request with retry on rate-limit and transient errors. Used for reads and note writes (discussions go through the idempotency-a
examples/gitlab_ci/post_review.py:688
↓ 2 callers
Function
_compute_retry_delay
Compute a retry delay (seconds) for a failed attempt, or None if not retryable. Order: Retry-After header -> wait-until-reset (primary limit exha
examples/gitlab_ci/post_review.py:639
↓ 2 callers
Function
_field
Return the first present, non-empty field among several possible key names.
examples/codeup_ci/post_review.py:116
↓ 2 callers
Function
_get_header
Case-insensitive header lookup.
examples/gitlab_ci/post_review.py:570
↓ 2 callers
Function
_parse_rate_limit_header
(headers, name)
examples/gitlab_ci/post_review.py:581
↓ 2 callers
Method
_print
(self, kind, discussion)
examples/gitlab_ci/post_review.py:1019
↓ 2 callers
Function
_truncate_error
Collapse whitespace and cap length so log lines stay readable.
examples/gitlab_ci/post_review.py:1065
↓ 2 callers
Function
addBackgroundFlags
(cmd *cobra.Command, background, backgroundFile *string)
cmd/opencodereview/shared_flags.go:29
↓ 2 callers
Function
addColorFlags
addColorFlags registers the color control. It is persistent on the root command so every subcommand inherits identical behavior, and so `ocr --color=n
cmd/opencodereview/color.go:35
↓ 2 callers
Function
addDiffFlags
(cmd *cobra.Command, from, to, commit *string)
cmd/opencodereview/shared_flags.go:23
↓ 2 callers
Function
addModelFlag
(cmd *cobra.Command, target *string)
cmd/opencodereview/shared_flags.go:61
↓ 2 callers
Method
addNextMessage
addNextMessage extends the conversation with the assistant message and tool responses, applying three-zone compression at the soft (60%) and warning (
internal/llmloop/loop.go:714
↓ 2 callers
Function
addOutputPathFlag
addOutputPathFlag registers --output/-o: write results to a UTF-8 file instead of stdout. "" or "-" keeps stdout; a real path is created lazily on the
cmd/opencodereview/shared_flags.go:44
↓ 2 callers
Function
addProviderFlag
(cmd *cobra.Command, target *string)
cmd/opencodereview/shared_flags.go:65
↓ 2 callers
Function
addToolsFlag
(cmd *cobra.Command, target *string)
cmd/opencodereview/shared_flags.go:69
↓ 2 callers
Method
adjustModelIdxAfterDelete
()
cmd/opencodereview/provider_tui.go:1685
↓ 2 callers
Method
adjusted
(file: string, line: number)
extensions/vscode/src/extension/providers/lineOffset.ts:13
↓ 2 callers
Function
allTools
()
internal/tool/definitions.go:36
↓ 2 callers
Method
apiKeyCmdForStep
apiKeyCmdForStep returns the api_key_cmd already configured for the provider the API-key step is editing, reading the same config entry loadExistingAP
cmd/opencodereview/provider_tui.go:970
↓ 2 callers
Method
apiKeyStepCanConfirm
()
cmd/opencodereview/provider_tui.go:985
↓ 2 callers
Method
apply
(index: number)
extensions/vscode/src/extension/providers/CommentProvider.ts:141
↓ 2 callers
Function
applyConfigEntries
(base: RawConfig, entries: ConfigEntry[])
extensions/vscode/src/extension/services/configDraft.ts:144
↓ 2 callers
Method
applyCreateCustomProvider
()
cmd/opencodereview/provider_tui.go:1224
↓ 2 callers
Function
applyDedupGroupsWithCheckpoints
( rawJSON string, originals []model.LlmComment, )
internal/scan/agent.go:1032
↓ 2 callers
Function
applyLanguage
applyLanguage appends instruction to all system-role messages in conv.
internal/config/template/template.go:205
↓ 2 callers
Function
applyProviderField
(entry: RawProviderEntry, field: string, value: string)
extensions/vscode/src/extension/services/configDraft.ts:34
↓ 2 callers
Method
applyResume
(diffs []model.Diff)
internal/agent/agent.go:843
↓ 2 callers
Function
applySessionEnd
(summary *SessionSummary, rec map[string]any)
internal/viewer/store.go:573
↓ 2 callers
Function
asModelTUIModel
(t *testing.T, m tea.Model)
cmd/opencodereview/provider_tui_funcs_test.go:1110
↓ 2 callers
Function
assertContainsInOrder
(t *testing.T, args []string, vals ...string)
internal/tool/code_search_test.go:318
↓ 2 callers
Method
attemptCounts
attemptCounts snapshots the per-file real HTTP attempt counts.
cmd/opencodereview/retry_fake_llm_test.go:56
↓ 2 callers
Function
authHeaderFormError
(raw string)
cmd/opencodereview/provider_tui.go:1124
↓ 2 callers
Method
beginManualTokenReplace
beginManualTokenReplace is the manual-tab equivalent of beginAPIKeyReplace.
cmd/opencodereview/provider_tui.go:917
↓ 2 callers
Method
blurCPStep
()
cmd/opencodereview/provider_tui.go:1421
↓ 2 callers
Method
blurManualStep
()
cmd/opencodereview/provider_tui.go:1755
↓ 2 callers
Function
branchRefCandidates
(ref: string)
extensions/vscode/src/extension/services/gitMap.ts:114
↓ 2 callers
Function
buildBadge
buildBadge renders a compact "[category · severity]" tag for a finding. It returns an empty string when neither structured field is present, so text o
cmd/opencodereview/output.go:137
↓ 2 callers
Function
buildBadge
(comment)
scripts/github-actions/post-review-comments.js:1374
↓ 2 callers
Method
buildChangeFilesExceptGroup
buildChangeFilesExceptGroup returns a formatted list of changed files excluding all group members.
internal/agent/agent.go:1581
↓ 2 callers
Function
buildDedupCommentsJSON
buildDedupCommentsJSON renders the batch comments as a JSON list with stable c-N ids that the LLM groups by. Only fields the LLM needs to judge simila
internal/scan/agent.go:1003
↓ 2 callers
Function
buildDiffLines
(comment model.LlmComment)
cmd/opencodereview/output.go:258
↓ 2 callers
Function
buildEntries
()
extensions/vscode/src/webview/views/ConfigView.tsx:354
↓ 2 callers
Function
buildFileList
(diffs []model.Diff)
internal/agent/grouping.go:101
↓ 2 callers
Function
buildGroupFilterCommentsJSON
buildGroupFilterCommentsJSON serializes comments with path info for group-level filtering.
internal/agent/agent.go:1869
↓ 2 callers
Function
buildMessageXML
buildMessageXML serializes msgs into the <message><content> form expected by the MEMORY_COMPRESSION_TASK prompt template.
internal/llmloop/compression.go:186
↓ 2 callers
Function
buildReviewArgs
(opts: CliRunOptions)
extensions/vscode/src/extension/services/cliParse.ts:6
↓ 2 callers
Function
buildRunTags
(runId, runAttempt)
scripts/github-actions/post-review-comments.js:711
↓ 2 callers
Function
buildSummaryCommentsList
buildSummaryCommentsList renders comments as a compact path-anchored markdown list suitable for embedding in the PROJECT_SUMMARY_TASK prompt. Format:
internal/scan/agent.go:917
↓ 2 callers
Function
buildWorkspaceFiles
(diffHeadOut: string, diffCachedOut: string, untrackedOut: string)
extensions/vscode/src/extension/services/gitMap.ts:77
↓ 2 callers
Function
build_badge
Build the ``[category · severity]`` badge (middot U+00B7). Byte-matches the CLI's buildBadge degeneration so review output is consistent acro
examples/gitlab_ci/post_review.py:144
↓ 2 callers
Function
callGroupingLLM
(ctx context.Context, diffs []model.Diff, client llm.LLMClient, modelName string, task *template.LlmConversati
internal/agent/grouping.go:65
↓ 2 callers
Function
canonicalRemote
canonicalRemote reduces a git remote URL to a stable, credential-free identity string for hashing into repository.identity_sha256, so the same reposit
internal/diff/git.go:443
↓ 2 callers
Function
captureDelegateStdout
(t *testing.T, fn func())
cmd/opencodereview/delegate_exec_test.go:19
↓ 2 callers
Function
checkAPIKeyRequirement
checkAPIKeyRequirement decides whether a provider selection may be saved with no api_key. It mirrors the resolver's precedence (static api_key -> api_
cmd/opencodereview/provider_cmd.go:243
↓ 2 callers
Method
checkEnvironment
(force = false)
extensions/vscode/src/extension/services/CliService.ts:55
↓ 2 callers
Function
checkMetricErr
checkMetricErr intentionally ignores metric registration errors: telemetry is best-effort and must not interrupt the main flow.
internal/telemetry/metrics.go:75
↓ 2 callers
Function
chunkArray
(items, size)
scripts/github-actions/post-review-comments.js:761
↓ 2 callers
Function
clamp_line
(n)
examples/gitflic_ci/post_review.py:170
↓ 2 callers
Function
classifyBoundaryError
classifyBoundaryError classifies an error that only surfaced after the SDK retry loop finished, and reports whether it recognized it at all. The fals
internal/llm/retry_boundary.go:45
↓ 2 callers
Function
classifyItemError
classifyItemError maps a subtask error to a stable item failure class and a safe, generic reason. It never returns the raw error text (which may embed
internal/agent/agent.go:1165
↓ 2 callers
Function
classifyMainLoopStop
classifyMainLoopStop maps a non-error, non-completed main-loop stop to an item failure class and a safe reason. Only the configured max-tool-request b
internal/agent/agent.go:1190
← previous
next →
801–900 of 4,381, ranked by callers