Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
3,095 in github.com/alibaba/open-code-review
⨍
Functions
3,095
◇
Types & classes
288
↓ 3 callers
Function
DisplayAddr
DisplayAddr rewrites a wildcard listen address (empty host, 0.0.0.0, or ::) to a localhost form so printed URLs are always openable in a browser. Non-
internal/viewer/hostguard.go:119
↓ 3 callers
Method
Get
Get returns the diff text for path.
internal/tool/file_read_diff.go:24
↓ 3 callers
Function
ListSessions
ListSessions returns lightweight summaries for all sessions in a repo subdir.
internal/viewer/store.go:96
↓ 3 callers
Function
ListSessions
ListSessions enumerates all persisted sessions for the given repository directory, sorted by StartTime descending (most recent first). Missing directo
internal/session/list.go:90
↓ 3 callers
Function
NewClient
NewClient starts an MCP server subprocess (stdio transport), initializes the connection, and caches the list of available tools. The context governs t
internal/mcp/client.go:27
↓ 3 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:68
↓ 3 callers
Function
NewToolCallMessage
NewToolCallMessage creates an assistant message with text content and tool invocations.
internal/llm/client.go:67
↓ 3 callers
Function
Of
Of returns a checkpoint with data.
internal/tool/response_message.go:24
↓ 3 callers
Function
PrintToolCallStarted
PrintToolCallStarted prints a line when a tool begins execution. Args are summarized as key-value pairs (path, search terms, etc.). Example: [ocr] ▶
internal/telemetry/events.go:87
↓ 3 callers
Function
RecordLLMRequest
(ctx context.Context, model string, dur time.Duration, totalTokens int64, status string)
internal/telemetry/metrics.go:104
↓ 3 callers
Function
RecordToolCall
(ctx context.Context, name string, dur time.Duration, ok bool)
internal/telemetry/metrics.go:124
↓ 3 callers
Method
RemoveByPathAndIndices
RemoveByPathAndIndices removes comments for a given path whose per-path index (0-based position among all comments with that path) is in the indices s
internal/tool/comment_collector.go:93
↓ 3 callers
Method
Resolve
Resolve returns the rule text for a given file path. Patterns with brace expansion like "*.{go,py}" are expanded into "*.go", "*.py". The first match
internal/config/rules/system_rules.go:127
↓ 3 callers
Function
ResolveConfig
ResolveConfig builds the final Config by merging defaults, JSON config, and env vars. Precedence: defaults < config.json < environment variables.
internal/telemetry/config.go:110
↓ 3 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:257
↓ 3 callers
Method
SetDiffMap
SetDiffMap replaces the diff snapshot. Must be called before concurrent access begins.
internal/tool/file_read_diff.go:39
↓ 3 callers
Function
ShutdownWithTimeout
ShutdownWithTimeout creates a timeout context and calls Shutdown.
internal/telemetry/shutdown.go:33
↓ 3 callers
Method
Snapshot
Snapshot returns the current count of stored comments. Pair with Since / ReplaceSince to operate on the comments added between two points in time (e.g
internal/tool/comment_collector.go:53
↓ 3 callers
Method
SubmitFor
SubmitFor is Submit plus registration under key, so AwaitKey can wait for exactly the units submitted under that key instead of the whole pool. Calle
internal/llmloop/pool.go:71
↓ 3 callers
Method
TotalOutputTokens
TotalOutputTokens returns the accumulated completion tokens from all LLM calls.
internal/llmloop/loop.go:66
↓ 3 callers
Method
TotalTokensUsed
TotalTokensUsed / TotalInputTokens / ... delegate to the underlying runner.
internal/scan/agent.go:180
↓ 3 callers
Function
TraceIDFromContext
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:45
↓ 3 callers
Method
_mock_response
(self, status=200, body=b'{"comment_biz_id": "abc"}')
examples/codeup_ci/post_review_test.py:138
↓ 3 callers
Function
addExcludeFlag
(cmd *cobra.Command, target *string)
cmd/opencodereview/shared_flags.go:36
↓ 3 callers
Function
addRuleFlag
(cmd *cobra.Command, target *string)
cmd/opencodereview/shared_flags.go:14
↓ 3 callers
Function
applyProviderDeletions
(configPath string, cfg *Config, names []string)
cmd/opencodereview/provider_cmd.go:64
↓ 3 callers
Function
assertContainsInOrder
(t *testing.T, args []string, vals ...string)
internal/tool/code_search_test.go:302
↓ 3 callers
Function
buildBadge
(comment)
scripts/github-actions/post-review-comments.js:1371
↓ 3 callers
Function
buildToolRegistry
(collector *tool.CommentCollector, fr *tool.FileReader)
cmd/opencodereview/review_cmd.go:410
↓ 3 callers
Method
cancel
()
extensions/vscode/src/extension/services/CliService.ts:157
↓ 3 callers
Function
captureStderr
captureStderr captures everything written to os.Stderr during fn. Mirrors captureStdout; used to assert structured usage emitted on the failure path.
cmd/opencodereview/output_helpers_test.go:393
↓ 3 callers
Method
clear
()
extensions/vscode/src/extension/providers/lineOffset.ts:17
↓ 3 callers
Function
cloneCustomProvidersMap
(src map[string]ProviderEntry)
cmd/opencodereview/provider_tui.go:1200
↓ 3 callers
Method
configPath
()
extensions/vscode/src/extension/services/ConfigService.ts:13
↓ 3 callers
Method
confirmDeleteCustomProviderModel
()
cmd/opencodereview/provider_tui.go:2801
↓ 3 callers
Function
cpProtocolIndex
cpProtocolIndex maps a protocol string (canonical name or legacy alias) to its index in cpProtocols. Unknown / empty values default to the OpenAI Chat
cmd/opencodereview/provider_tui.go:181
↓ 3 callers
Method
customProviderNameTaken
(name string)
cmd/opencodereview/provider_tui.go:191
↓ 3 callers
Function
customStepfunModelTUI
(t *testing.T, configPath string, models []string)
cmd/opencodereview/provider_tui_test.go:1480
↓ 3 callers
Function
deleteCustomProvider
deleteCustomProvider removes a custom provider from cfg in memory. Returns true if the deleted provider was the active one.
cmd/opencodereview/config_cmd.go:238
↓ 3 callers
Function
diffs_from
(diff_text)
examples/gitflic_ci/post_review_test.py:153
↓ 3 callers
Function
excludeToolDef
excludeToolDef returns a copy of defs with any entries whose function name matches name removed. Used by `ocr scan` to hide tools that don't make sens
cmd/opencodereview/shared.go:199
↓ 3 callers
Method
executePlanPhase
executePlanPhase runs the plan task for a single file, sending template messages with resolved placeholders and collecting the LLM response as plan gu
internal/agent/agent.go:926
↓ 3 callers
Method
executeToolCall
executeToolCall dispatches a single tool call from the LLM response and records the result in session history. code_comment handling includes optional
internal/llmloop/loop.go:276
↓ 3 callers
Function
finish
(callback: () => void)
plugins/open-code-review/opencode/open-code-review.ts:139
↓ 3 callers
Method
focusCPStep
()
cmd/opencodereview/provider_tui.go:1311
↓ 3 callers
Function
formatCommentMarkdown
(comment, error)
scripts/github-actions/post-review-comments.js:1477
↓ 3 callers
Function
formatWarnings
(warnings)
scripts/github-actions/post-review-comments.js:1581
↓ 3 callers
Function
getAllBlogMetas
(language: string)
pages/src/content/blog/index.ts:88
↓ 3 callers
Function
getBlogMeta
(slug: BlogSlug, language: string)
pages/src/content/blog/index.ts:84
↓ 3 callers
Function
getPostedCommentIds
({ github, owner, repo, prNumber, log })
scripts/github-actions/post-review-comments.js:1281
↓ 3 callers
Function
groupIntoRounds
groupIntoRounds parses messages[start:] into logical (assistant + tool_results) pairs.
internal/llmloop/compression.go:76
↓ 3 callers
Function
hasSubtaskErrors
(warnings []agent.AgentWarning)
cmd/opencodereview/output.go:26
↓ 3 callers
Function
initOTLPProviders
initOTLPProviders dispatches to the gRPC or HTTP exporter based on cfg.OTLPProtocol.
internal/telemetry/exporter.go:50
↓ 3 callers
Method
isCustomItem
(idx int)
cmd/opencodereview/provider_tui.go:2680
↓ 3 callers
Method
isCustomModelItem
(idx int)
cmd/opencodereview/provider_tui.go:588
↓ 3 callers
Method
isPathExcluded
isPathExcluded returns true when the given relative file path should be skipped based on hardcoded dir rules or .gitignore patterns. Patterns are res
internal/diff/git.go:196
↓ 3 callers
Function
isPresetProvider
(name: string)
extensions/vscode/src/shared/providers.ts:138
↓ 3 callers
Function
isUserAddedOfficialModelName
(name, providerName string, registryModels []string, cfg *Config)
cmd/opencodereview/provider_tui.go:407
↓ 3 callers
Function
isUserEditMsg
isUserEditMsg reports whether msg represents user text input (typing or paste).
cmd/opencodereview/provider_tui.go:852
↓ 3 callers
Function
listCursorPrefixForModel
(isCursor, userAdded bool)
cmd/opencodereview/provider_tui.go:1936
↓ 3 callers
Function
listCustomProviderNames
(config: OcrConfig | null)
extensions/vscode/src/shared/configUtils.ts:165
↓ 3 callers
Function
loadCommonContext
loadCommonContext validates the working directory, loads the embedded template, raises MaxToolRequestTimes when maxTools exceeds the default, resolves
cmd/opencodereview/shared.go:49
↓ 3 callers
Method
loadGitignorePatterns
loadGitignorePatterns reads and parses .gitignore patterns from the repo root.
internal/diff/git.go:171
↓ 3 callers
Function
log
(msg)
examples/gitlab_ci/post_review.py:37
↓ 3 callers
Function
makeErr
(message, status, headers, data)
scripts/github-actions/post-review-comments.test.js:57
↓ 3 callers
Function
makeTask
()
internal/diff/relocation_test.go:30
↓ 3 callers
Function
mapStatusCode
(code: string)
extensions/vscode/src/extension/services/gitMap.ts:4
↓ 3 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:591
↓ 3 callers
Function
modelTUIEnterCustomModelName
(t *testing.T, m modelTUIModel, name string)
cmd/opencodereview/provider_tui_funcs_test.go:1011
↓ 3 callers
Function
normalizeLine
(s: string)
extensions/vscode/src/extension/providers/commentAnchor.ts:52
↓ 3 callers
Function
normalizeModelList
(models []string)
cmd/opencodereview/config_cmd.go:556
↓ 3 callers
Function
parseOTLPEndpoint
parseOTLPEndpoint strips a http:// or https:// scheme from the endpoint and reports whether the connection should be plaintext (insecure). Scheme matc
internal/telemetry/exporter.go:38
↓ 3 callers
Function
post
(review_input)
examples/gerrit_ci/post_review.py:225
↓ 3 callers
Method
postMessage
(msg: unknown)
extensions/vscode/src/webview/bridge.ts:3
↓ 3 callers
Method
prepareModelSelection
(providerName, configModel string)
cmd/opencodereview/provider_tui.go:511
↓ 3 callers
Function
printWizardCancelled
printWizardCancelled prints the standard Esc-cancel message for config wizards. changesDescription is a short noun phrase, e.g. "Configuration changes
cmd/opencodereview/provider_cmd.go:56
↓ 3 callers
Function
readJSONLRecords
(t *testing.T, path string)
internal/session/persist_test.go:108
↓ 3 callers
Method
recordWarning
(warningType, file, message string)
internal/scan/agent.go:202
↓ 3 callers
Method
recordWarning
recordWarning adds a non-fatal warning to the agent's warning list.
internal/agent/agent.go:329
↓ 3 callers
Method
reloadConfigAfterSaveFailure
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:1576
↓ 3 callers
Method
reloadConfigAfterSaveFailure
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:2590
↓ 3 callers
Method
render
()
pages/src/components/ErrorBoundary.tsx:56
↓ 3 callers
Function
renderModelName
(name string, isCursor, userAdded bool)
cmd/opencodereview/provider_tui.go:1953
↓ 3 callers
Function
resolveAllowedHostsFromEnv
resolveAllowedHostsFromEnv reads the OCR_VIEWER_ALLOWED_HOSTS environment variable and combines it with the bind host to produce the active allowlist.
internal/viewer/hostguard.go:133
↓ 3 callers
Function
resolveBin
(name: string)
extensions/vscode/src/extension/services/shellEnv.ts:53
↓ 3 callers
Function
resolveConfigPath
resolveConfigPath returns OCR_CONFIG_PATH when set, otherwise the default user config path. Intentionally used only by read-only commands (e.g. ocr ll
cmd/opencodereview/config_cmd.go:95
↓ 3 callers
Method
resolveGitRef
(root: string, ref: string)
extensions/vscode/src/extension/services/GitService.ts:226
↓ 3 callers
Function
resolveLang
resolveLang returns the resolved language name for the instruction.
internal/config/template/template.go:152
↓ 3 callers
Function
resolveNativeBinary
()
scripts/platform.js:36
↓ 3 callers
Function
reviewModeString
(from, to, commit string)
internal/agent/util.go:92
↓ 3 callers
Function
rollbackCfgActiveModel
(cfg *Config, providerName, prevModel string)
cmd/opencodereview/provider_tui.go:445
↓ 3 callers
Function
routeComment
(comment, policy)
scripts/github-actions/post-review-comments.js:1438
↓ 3 callers
Method
run
(opts: CliRunOptions, cb: SessionCallbacks)
extensions/vscode/src/extension/services/ReviewSession.ts:21
↓ 3 callers
Function
runConfigSet
(key, value string)
cmd/opencodereview/config_cmd.go:102
↓ 3 callers
Function
runSessionList
()
cmd/opencodereview/session_cmd.go:60
↓ 3 callers
Function
runSessionListCompat
runSessionListCompat provides test compatibility for old-style runSessionList([]string{...}) calls.
cmd/opencodereview/compat_test.go:76
↓ 3 callers
Function
runSessionShow
(sessionID string)
cmd/opencodereview/session_cmd.go:87
↓ 3 callers
Function
runSessionShowCompat
runSessionShowCompat provides test compatibility for old-style runSessionShow([]string{...}) calls.
cmd/opencodereview/compat_test.go:93
↓ 3 callers
Method
run_main_with_captured_poster
Run main() with make_poster mocked; return (rc, captured_auth_header).
examples/gitlab_ci/post_review_test.py:833
↓ 3 callers
Function
savedSecretReplaceHint
savedSecretReplaceHint builds the replace hint text without leading indent.
cmd/opencodereview/provider_tui.go:2373
← previous
next →
401–500 of 3,095, ranked by callers