Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
3,271 in github.com/alibaba/open-code-review
⨍
Functions
3,271
◇
Types & classes
309
↓ 4 callers
Function
parseNameStatus
(output: string)
extensions/vscode/src/extension/services/gitMap.ts:158
↓ 4 callers
Function
parseNonNegInt
(val, defaultVal)
scripts/github-actions/post-review-comments.js:1061
↓ 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:123
↓ 4 callers
Method
post
(msg: ConfigPanelHostToWebview)
extensions/vscode/src/extension/providers/ConfigPanelProvider.ts:58
↓ 4 callers
Function
printVersion
()
cmd/opencodereview/version.go:24
↓ 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:1227
↓ 4 callers
Function
readJSONLRecords
(t *testing.T, path string)
internal/session/persist_test.go:110
↓ 4 callers
Method
release
()
internal/gitcmd/runner.go:41
↓ 4 callers
Function
renderListName
(name string, isCursor bool)
cmd/opencodereview/provider_tui.go:1946
↓ 4 callers
Function
resolveBackgroundFilePath
(repoDir, path string)
cmd/opencodereview/background_file.go:22
↓ 4 callers
Function
resolveRepoDir
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:308
↓ 4 callers
Method
resolvedModel
resolvedModel returns the model to persist, falling back to the in-session pick for the provider being finalized when result.model is empty.
cmd/opencodereview/provider_tui.go:85
↓ 4 callers
Method
reviewMode
()
internal/agent/agent.go:732
↓ 4 callers
Function
reviewModeString
(from, to, commit string)
internal/agent/util.go:92
↓ 4 callers
Function
runLLMTest
()
cmd/opencodereview/llm_cmd.go:44
↓ 4 callers
Method
selectedModel
()
cmd/opencodereview/provider_tui.go:2883
↓ 4 callers
Method
selectedModelFromState
()
cmd/opencodereview/provider_tui.go:1819
↓ 4 callers
Function
sessionJSONLPath
(t *testing.T, repoDir, sessionID string)
internal/session/persist_test.go:130
↓ 4 callers
Function
setupFileFindRepo
(t *testing.T)
internal/tool/file_find_test.go:89
↓ 4 callers
Method
summaryEnabled
()
internal/scan/agent.go:84
↓ 4 callers
Function
taskDoneResponse
()
internal/llmloop/loop_test.go:54
↓ 4 callers
Function
taskDoneResponseWithArguments
(arguments string)
internal/llmloop/loop_test.go:33
↓ 4 callers
Method
transition
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:556
↓ 4 callers
Function
unquoteGitPath
(path: string)
extensions/vscode/src/extension/services/gitMap.ts:127
↓ 4 callers
Function
unsetCustomProvider
(configPath, name string)
cmd/opencodereview/config_cmd.go:187
↓ 4 callers
Function
unsetMCPServer
(configPath, name string)
cmd/opencodereview/config_cmd.go:210
↓ 4 callers
Function
useSectionTitleStyle
()
pages/src/hooks/useResponsiveStyle.ts:12
↓ 4 callers
Function
userAgent
(provider string)
internal/llm/client.go:26
↓ 4 callers
Method
valid
valid reports whether c is one of the fixed item failure classes.
internal/session/manifest.go:64
↓ 4 callers
Function
validateTimeoutSec
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:146
↓ 4 callers
Function
writeCommit
writeCommit writes content to name, stages it, and commits with msg.
internal/diff/git_resolve_test.go:38
↓ 3 callers
Method
CallTool
CallTool invokes a tool on the MCP server and returns the text result.
internal/mcp/client.go:155
↓ 3 callers
Method
CompletionsWithCtx
CompletionsWithCtx sends a Responses API request and maps the result back to the shared ChatResponse shape.
internal/llm/responses_client.go:74
↓ 3 callers
Function
ComputeLineDiff
ComputeLineDiff returns a line-level diff between oldLines and newLines. Uses Myers-style LCS to find common subsequences, then emits context/added/de
internal/suggestdiff/diff.go:24
↓ 3 callers
Function
ContentLogging
ContentLogging returns true when content logging is enabled via OCR_CONTENT_LOGGING.
internal/telemetry/provider.go:75
↓ 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
Frozen
Frozen reports whether Finalize has already run.
internal/session/manifest.go:715
↓ 3 callers
Method
Get
Get returns the diff text for path.
internal/tool/file_read_diff.go:24
↓ 3 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:209
↓ 3 callers
Function
ListSessions
ListSessions returns lightweight summaries for all sessions in a repo subdir.
internal/viewer/store.go:108
↓ 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:95
↓ 3 callers
Method
MergeBase
MergeBase returns the computed merge-base commit hash for range mode.
internal/diff/git.go:162
↓ 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:289
↓ 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:187
↓ 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
budgetAgentTestTemplate
budgetAgentTestTemplate returns a minimal template sufficient to drive dispatchSubtasks without plan/dedup/summary phases.
internal/agent/budget_test.go:50
↓ 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:446
↓ 3 callers
Method
cancel
()
extensions/vscode/src/extension/services/CliService.ts:158
↓ 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
cloned
cloned returns a copy of the manifest whose coverage slices are owned copies, so every Finalize caller gets an independent, non-aliased snapshot. The
internal/session/manifest.go:878
↓ 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:1536
↓ 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
emptySHA256
emptySHA256 is the canonical digest of an empty input, which hashFields must return for an empty field sequence.
internal/agent/manifest_hash_test.go:15
↓ 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:231
↓ 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:1462
↓ 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:307
↓ 3 callers
Function
fileReadToolCallResponse
(callID, args string)
internal/llmloop/loop_test.go:58
↓ 3 callers
Function
finish
(callback: () => void)
plugins/open-code-review/opencode/open-code-review.ts:139
↓ 3 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:523
↓ 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:27
↓ 3 callers
Function
initOTLPHTTPProviders
initOTLPHTTPProviders sets up OTLP HTTP exporters for traces and metrics. Unlike the gRPC path this uses WithEndpointURL rather than WithEndpoint, so
internal/telemetry/exporter.go:150
↓ 3 callers
Function
initOTLPProviders
initOTLPProviders dispatches to the gRPC or HTTP exporter based on cfg.OTLPProtocol.
internal/telemetry/exporter.go:83
↓ 3 callers
Method
isCustomItem
(idx int)
cmd/opencodereview/provider_tui.go:2680
↓ 3 callers
Method
isCustomModelItem
(idx int)
cmd/opencodereview/provider_tui.go:588
← previous
next →
401–500 of 3,271, ranked by callers