Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
7,169 in github.com/alibaba/open-code-review
⨍
Functions
7,169
◇
Types & classes
774
↓ 4 callers
Function
ensureMessagesSuffix
ensureMessagesSuffix appends /v1/messages to base URLs that lack a versioned path.
internal/llm/resolver.go:958
↓ 4 callers
Function
estimateFileTokens
estimateCost projects token usage for reviewing the given items under the supplied scan template. planEnabled reports whether PLAN_TASK runs for each
internal/scan/estimate.go:44
↓ 4 callers
Function
executeReview
(opts reviewOptions)
cmd/opencodereview/compat_test.go:12
↓ 4 callers
Function
executeScan
(opts scanOptions)
cmd/opencodereview/scan_cmd.go:110
↓ 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:1392
↓ 4 callers
Function
extractCliError
Extracts the most useful error text from the CLI's stderr: prefer the last `error:` line, otherwise the last non-empty line. */
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/CliParse.kt:180
↓ 4 callers
Function
extractHeadings
(markdown: string)
pages/src/utils/extractHeadings.ts:7
↓ 4 callers
Function
fencedBlock
(content, language = "")
scripts/github-actions/post-review-comments.js:2527
↓ 4 callers
Function
fingerprintDigestSource
()
scripts/github-actions/post-review-comments.test.js:5643
↓ 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:610
↓ 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:1153
↓ 4 callers
Function
formatRelative
* Formats a unix-seconds timestamp as relative time. [nowMillis] is passed in by the caller instead of reading * `System.currentTimeMillis()` interna
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/GitService.kt:571
↓ 4 callers
Function
formatToolDefs
formatToolDefs renders tool definitions as human-readable text for embedding in prompts.
internal/agent/agent.go:2098
↓ 4 callers
Function
getCommitMessage
(repoDir, commit string)
cmd/opencodereview/git.go:27
↓ 4 callers
Function
getShellEnv
()
extensions/vscode/src/extension/services/shellEnv.ts:29
↓ 4 callers
Function
gitFailure
gitFailure builds an error that carries git's own message. Every diff-producing caller used to drop git's output on the floor, so a failure surfaced
internal/diff/git.go:798
↓ 4 callers
Function
helperCmd
helperCmd builds a helper command with its steering variables set on the Cmd itself, for the tests that hand an *exec.Cmd to runBrowserCmd directly.
internal/viewer/browser_exec_test.go:52
↓ 4 callers
Function
humanTokens
humanTokens formats a token count as e.g. "1.2M" / "850K" / "420".
internal/scan/estimate.go:113
↓ 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
initRulesCheckTestRepo
(t *testing.T)
cmd/opencodereview/rules_cmd_test.go:14
↓ 4 callers
Function
isPresetProvider
(name: string)
extensions/frontend/src/shared/providers.ts:26
↓ 4 callers
Function
isSubtaskErrorType
(warningType string)
cmd/opencodereview/output.go:67
↓ 4 callers
Function
isSummaryAuthorOurs
(comment, { appSlug = "", resolveSelfLogin = null } = {})
scripts/github-actions/post-review-comments.js:3182
↓ 4 callers
Function
isUserEditMsg
isUserEditMsg reports whether msg represents user text input (typing or paste).
cmd/opencodereview/provider_tui.go:887
↓ 4 callers
Function
isValidProviderName
(name: string)
extensions/frontend/src/shared/configUtils.ts:21
↓ 4 callers
Function
itemList
(paths ...string)
internal/scan/batch_test.go:13
↓ 4 callers
Function
loadProjectRule
loadProjectRule reads <repoDir>/.opencodereview/rule.json. Since #287 anchored RepoDir at the git top-level, `ocr review` from a monorepo subdirectory
internal/config/rules/system_rules.go:410
↓ 4 callers
Function
makeErr
(message, status, headers, data)
scripts/github-actions/post-review-comments.test.js:62
↓ 4 callers
Function
makeTask
()
internal/diff/relocation_test.go:35
↓ 4 callers
Function
manifestMessage
(manifest *session.RunManifest, findings int)
cmd/opencodereview/output.go:625
↓ 4 callers
Function
mapStatusCode
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/GitMap.kt:13
↓ 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:853
↓ 4 callers
Method
modelProviderName
()
cmd/opencodereview/provider_tui.go:429
↓ 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
newManifestFlowAgentWithClient
(t *testing.T, diffs []model.Diff, resume *session.ResumeState, client llm.LLMClient)
internal/agent/manifest_integration_test.go:74
↓ 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
newTestMCPServer
newTestMCPServer returns a working MCP server with a single echo tool.
internal/mcp/stdio_test.go:55
↓ 4 callers
Function
normalizeLine
normalizeLine removes leading/trailing whitespace and strips any leading '+' or '-' diff marker.
internal/diff/resolver.go:314
↓ 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
page
(commits, options = {})
scripts/github-actions/check-pr-commit-policy.test.js:38
↓ 4 callers
Function
parseNameStatus
(output: string)
extensions/vscode/src/extension/services/gitMap.ts:161
↓ 4 callers
Function
parseWebviewMessage
* Parses one frontend message and never throws: a parse failure yields [WebviewToHost.Malformed] and * an unrecognised type yields [WebviewToHost.Unk
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/messages/WebviewMessages.kt:137
↓ 4 callers
Method
post
(ctx context.Context, endpoint string, form url.Values, target any)
internal/chatgptauth/oauth.go:117
↓ 4 callers
Method
post
(msg: ConfigPanelHostToWebview)
extensions/vscode/src/extension/providers/ConfigPanelProvider.ts:61
↓ 4 callers
Method
post
(msg: HostToWebview)
extensions/vscode/src/extension/providers/SidebarProvider.ts:56
↓ 4 callers
Method
post_discussion
(self, discussion, comment_id=None)
examples/gitlab_ci/post_review_test.py:198
↓ 4 callers
Function
prepareReviewCodeTools
(ctx context.Context, repoDir string, opts reviewOptions, runner *gitcmd.Runner, resolution *diff.InputResolut
cmd/opencodereview/code_access.go:22
↓ 4 callers
Method
preview
(ctx context.Context)
internal/agent/preview.go:55
↓ 4 callers
Function
printVersion
()
cmd/opencodereview/version.go:28
↓ 4 callers
Function
processRunning
(pid int)
acp/internal/orchestrator/process_alive_unix_test.go:15
↓ 4 callers
Function
progressWriter
(destination io.Writer, enabled bool)
internal/stdout/style.go:37
↓ 4 callers
Method
read
Reads the file and converts it to the plugin's internal camelCase config; returns null when the file is missing or invalid. */
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/ConfigService.kt:35
↓ 4 callers
Method
read
(self)
examples/gerrit_ci/post_review_test.py:518
↓ 4 callers
Function
readFileSync
(file)
scripts/github-actions/post-review-comments.test.js:54
↓ 4 callers
Function
readStderr
(r io.Reader, byteLimit, lineLimit int, emit func(Event))
acp/internal/orchestrator/streams.go:79
↓ 4 callers
Method
release
()
internal/gitcmd/runner.go:63
↓ 4 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:1726
↓ 4 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:2808
↓ 4 callers
Function
renderListName
(name string, isCursor bool)
cmd/opencodereview/provider_tui.go:2124
↓ 4 callers
Function
renderedEnv
(step, values, stepOutputs = {})
scripts/github-actions/action-contract.test.js:196
↓ 4 callers
Method
reportTimeout
(ctx context.Context, id acp.SessionId)
acp/internal/adapter/prompt.go:141
↓ 4 callers
Function
requireExec
(t *testing.T)
internal/mcp/stdio_test.go:248
↓ 4 callers
Function
resolveBackground
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 callers
Function
resolveEnv
(over = {})
scripts/github-actions/post-review-comments.test.js:5088
↓ 4 callers
Function
reviewModeString
(from, to, commit string)
internal/agent/util.go:147
↓ 4 callers
Function
rollbackCfgActiveModel
(cfg *Config, providerName, prevModel string)
cmd/opencodereview/provider_tui.go:480
↓ 4 callers
Method
ruleConfigSHA256
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:1074
↓ 4 callers
Function
runChatGPTLogout
(ctx context.Context, out io.Writer)
cmd/opencodereview/chatgpt_auth.go:90
↓ 4 callers
Function
runConfigSet
(key, value string)
cmd/opencodereview/config_cmd.go:101
↓ 4 callers
Method
runGitSplit
runGitSplit runs git with stdout and stderr kept apart, for the callers that quote the failure back to the user. runGit's combined output cannot be q
internal/diff/git.go:760
↓ 4 callers
Function
runLauncher
(fixture, args, signal, readyToken)
bin/ocr.test.js:138
↓ 4 callers
Function
runScanPreview
(cc *commonContext, scanTpl *template.ScanTemplate, scanPaths []string, outputFormat string, out io.Writer)
cmd/opencodereview/scan_cmd.go:279
↓ 4 callers
Method
run_main_with_captured_poster
(self, env_overrides, result=None)
examples/gitlab_ci/post_review_test.py:1625
↓ 4 callers
Method
run_with_urlopen
(self, fake_urlopen, config=None, discussion=None)
examples/gitlab_ci/post_review_test.py:1161
↓ 4 callers
Function
sarifInvocationFromRun
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 callers
Function
sarifResultFromComment
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 callers
Method
scanItemFingerprint
(it model.ScanItem)
internal/scan/agent.go:264
↓ 4 callers
Method
selectScanItems
selectScanItems is the single pre-dispatch selection pass shared by Run and Preview. Keep the size check after the normal reviewability rules so an it
internal/scan/agent.go:432
↓ 4 callers
Method
selectedModelFromState
()
cmd/opencodereview/provider_tui.go:1986
↓ 4 callers
Function
sessionFixture
sessionFixture writes a session JSONL under root/repo and returns root.
internal/viewer/export_test.go:15
↓ 4 callers
Method
set
(stage string)
acp/internal/intent/llm/diagnostics.go:30
↓ 4 callers
Function
setRulesCheckRepo
setRulesCheckRepo points the rulesCheckCmd's package-level --repo flag at repo for the duration of the test, restoring it afterward. runRulesCheck rea
cmd/opencodereview/rules_cmd_test.go:46
↓ 4 callers
Function
setupRecordingTelemetry
setupRecordingTelemetry enables telemetry through the public Init entrypoint, then redirects the global tracer provider to an in-process span recorder
internal/scan/trace_parent_test.go:49
↓ 4 callers
Function
startCancellableCopy
(dst, src *os.File, acquireThread func() (syscall.Handle, error))
acp/cmd/ocr-acp/stdio_windows.go:158
↓ 4 callers
Function
statusBadge
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:835
↓ 4 callers
Method
stop
(cmd *exec.Cmd, waited <-chan error)
acp/internal/orchestrator/runner.go:266
↓ 4 callers
Function
stripThinkTags
stripThinkTags removes reasoning wrapper tags from content.
internal/llm/client.go:1811
↓ 4 callers
Function
stubForceExit
stubForceExit replaces the process-level force-exit hook with a recording stub so tests can observe the second-signal path without terminating the tes
cmd/opencodereview/interrupt_test.go:25
↓ 4 callers
Method
summaryEnabled
()
internal/scan/agent.go:103
↓ 4 callers
Function
toolResultMessages
toolResultMessages answers every tool call in the turn. Both supported protocols reject an assistant turn whose tool calls are not all answered, so le
cmd/opencodereview/llm_cmd.go:222
↓ 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:618
↓ 4 callers
Method
triggerAsyncCompression
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:382
↓ 4 callers
Function
trimGitUsage
(stderr string, exitCode int)
internal/tool/code_search.go:268
↓ 4 callers
Function
unmarshalChatCompletionBody
These tests are the deterministic, no-live-model reproductions for issue #805: a response that carries provider reasoning must still carry it, byte fo
internal/llm/native_turn_test.go:22
↓ 4 callers
Function
unquoteGitPath
(path: string)
extensions/vscode/src/extension/services/gitMap.ts:130
← previous
next →
901–1,000 of 7,169, ranked by callers