MCPcopy Create free account

hub / github.com/alibaba/open-code-review / functions

Functions7,128 in github.com/alibaba/open-code-review

↓ 4 callersFunctionexpandSessionKeyInHeaders
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 callersMethodexplainError
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:1381
↓ 4 callersFunctionextractCliError
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 callersFunctionextractHeadings
(markdown: string)
pages/src/utils/extractHeadings.ts:7
↓ 4 callersFunctionfencedBlock
(content, language = "")
scripts/github-actions/post-review-comments.js:2527
↓ 4 callersFunctionfingerprintDigestSource
()
scripts/github-actions/post-review-comments.test.js:5643
↓ 4 callersFunctionfirstLine
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 callersFunctionformatPlanGuidance
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 callersFunctionformatRelative
* 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 callersFunctionformatToolDefs
formatToolDefs renders tool definitions as human-readable text for embedding in prompts.
internal/agent/agent.go:2098
↓ 4 callersFunctiongetCommitMessage
(repoDir, commit string)
cmd/opencodereview/git.go:27
↓ 4 callersFunctiongetShellEnv
()
extensions/vscode/src/extension/services/shellEnv.ts:29
↓ 4 callersFunctiongitFailure
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 callersFunctiongroupIntoRounds
groupIntoRounds parses messages[start:] into logical (assistant + tool_results) pairs.
internal/llmloop/compression.go:84
↓ 4 callersFunctionhelperCmd
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 callersFunctionhumanTokens
humanTokens formats a token count as e.g. "1.2M" / "850K" / "420".
internal/scan/estimate.go:113
↓ 4 callersFunctionhumanTokens
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 callersFunctioninitRulesCheckTestRepo
(t *testing.T)
cmd/opencodereview/rules_cmd_test.go:14
↓ 4 callersFunctionisPresetProvider
(name: string)
extensions/frontend/src/shared/providers.ts:26
↓ 4 callersFunctionisSubtaskErrorType
(warningType string)
cmd/opencodereview/output.go:67
↓ 4 callersFunctionisSummaryAuthorOurs
(comment, { appSlug = "", resolveSelfLogin = null } = {})
scripts/github-actions/post-review-comments.js:3182
↓ 4 callersFunctionisUserEditMsg
isUserEditMsg reports whether msg represents user text input (typing or paste).
cmd/opencodereview/provider_tui.go:887
↓ 4 callersFunctionisValidProviderName
(name: string)
extensions/frontend/src/shared/configUtils.ts:21
↓ 4 callersFunctionitemList
(paths ...string)
internal/scan/batch_test.go:13
↓ 4 callersFunctionloadProjectRule
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 callersFunctionmakeErr
(message, status, headers, data)
scripts/github-actions/post-review-comments.test.js:62
↓ 4 callersFunctionmakeTask
()
internal/diff/relocation_test.go:35
↓ 4 callersFunctionmanifestMessage
(manifest *session.RunManifest, findings int)
cmd/opencodereview/output.go:625
↓ 4 callersFunctionmapStatusCode
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/GitMap.kt:13
↓ 4 callersMethodmaybeRunPlan
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 callersMethodmodelProviderName
()
cmd/opencodereview/provider_tui.go:429
↓ 4 callersFunctionmustGetResult
mustGetResult extracts the first result from a SARIF document, failing the test if the structure is wrong.
cmd/opencodereview/sarif_test.go:35
↓ 4 callersFunctionnKey
()
cmd/opencodereview/provider_tui_test.go:1146
↓ 4 callersFunctionnewCompressionRunner
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:91
↓ 4 callersFunctionnewManifestFlowAgentWithClient
(t *testing.T, diffs []model.Diff, resume *session.ResumeState, client llm.LLMClient)
internal/agent/manifest_integration_test.go:74
↓ 4 callersFunctionnewMockResponse
(content string)
internal/diff/relocation_test.go:27
↓ 4 callersFunctionnewRetryObserver
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 callersFunctionnewTestMCPServer
newTestMCPServer returns a working MCP server with a single echo tool.
internal/mcp/stdio_test.go:55
↓ 4 callersFunctionnormalizeLine
normalizeLine removes leading/trailing whitespace and strips any leading '+' or '-' diff marker.
internal/diff/resolver.go:314
↓ 4 callersFunctionobjcRuleText
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 callersFunctionopenAIClient
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 callersFunctionpage
(commits, options = {})
scripts/github-actions/check-pr-commit-policy.test.js:38
↓ 4 callersFunctionparseNameStatus
(output: string)
extensions/vscode/src/extension/services/gitMap.ts:161
↓ 4 callersFunctionparseWebviewMessage
* 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 callersFunctionpartitionMessages
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:131
↓ 4 callersMethodpost
(ctx context.Context, endpoint string, form url.Values, target any)
internal/chatgptauth/oauth.go:113
↓ 4 callersMethodpost
(msg: ConfigPanelHostToWebview)
extensions/vscode/src/extension/providers/ConfigPanelProvider.ts:61
↓ 4 callersMethodpost
(msg: HostToWebview)
extensions/vscode/src/extension/providers/SidebarProvider.ts:56
↓ 4 callersMethodpost_discussion
(self, discussion, comment_id=None)
examples/gitlab_ci/post_review_test.py:198
↓ 4 callersFunctionprepareReviewCodeTools
(ctx context.Context, repoDir string, opts reviewOptions, runner *gitcmd.Runner, resolution *diff.InputResolut
cmd/opencodereview/code_access.go:22
↓ 4 callersMethodpreview
(ctx context.Context)
internal/agent/preview.go:55
↓ 4 callersFunctionprintVersion
()
cmd/opencodereview/version.go:28
↓ 4 callersFunctionprocessRunning
(pid int)
acp/internal/orchestrator/process_alive_unix_test.go:15
↓ 4 callersFunctionprogressWriter
(destination io.Writer, enabled bool)
internal/stdout/style.go:37
↓ 4 callersMethodread
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 callersMethodread
(self)
examples/gerrit_ci/post_review_test.py:518
↓ 4 callersFunctionreadFileSync
(file)
scripts/github-actions/post-review-comments.test.js:54
↓ 4 callersFunctionreadStderr
(r io.Reader, byteLimit, lineLimit int, emit func(Event))
acp/internal/orchestrator/streams.go:79
↓ 4 callersMethodrelease
()
internal/gitcmd/runner.go:63
↓ 4 callersMethodreloadConfigAfterSaveFailure
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 callersMethodreloadConfigAfterSaveFailure
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 callersFunctionrenderListName
(name string, isCursor bool)
cmd/opencodereview/provider_tui.go:2124
↓ 4 callersFunctionrenderedEnv
(step, values, stepOutputs = {})
scripts/github-actions/action-contract.test.js:196
↓ 4 callersMethodreportTimeout
(ctx context.Context, id acp.SessionId)
acp/internal/adapter/prompt.go:141
↓ 4 callersFunctionrequireExec
(t *testing.T)
internal/mcp/stdio_test.go:248
↓ 4 callersFunctionresolveBackground
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 callersFunctionresolveEnv
(over = {})
scripts/github-actions/post-review-comments.test.js:5088
↓ 4 callersFunctionreviewModeString
(from, to, commit string)
internal/agent/util.go:147
↓ 4 callersFunctionrollbackCfgActiveModel
(cfg *Config, providerName, prevModel string)
cmd/opencodereview/provider_tui.go:480
↓ 4 callersMethodruleConfigSHA256
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 callersFunctionrunChatGPTLogout
(ctx context.Context, out io.Writer)
cmd/opencodereview/chatgpt_auth.go:90
↓ 4 callersFunctionrunConfigSet
(key, value string)
cmd/opencodereview/config_cmd.go:101
↓ 4 callersMethodrunGitSplit
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 callersFunctionrunLauncher
(fixture, args, signal, readyToken)
bin/ocr.test.js:138
↓ 4 callersFunctionrunScanPreview
(cc *commonContext, scanTpl *template.ScanTemplate, scanPaths []string, outputFormat string, out io.Writer)
cmd/opencodereview/scan_cmd.go:279
↓ 4 callersMethodrun_main_with_captured_poster
(self, env_overrides, result=None)
examples/gitlab_ci/post_review_test.py:1625
↓ 4 callersMethodrun_with_urlopen
(self, fake_urlopen, config=None, discussion=None)
examples/gitlab_ci/post_review_test.py:1161
↓ 4 callersFunctionsarifInvocationFromRun
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 callersFunctionsarifResultFromComment
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 callersMethodscanItemFingerprint
(it model.ScanItem)
internal/scan/agent.go:264
↓ 4 callersMethodselectScanItems
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 callersMethodselectedModelFromState
()
cmd/opencodereview/provider_tui.go:1986
↓ 4 callersFunctionsessionFixture
sessionFixture writes a session JSONL under root/repo and returns root.
internal/viewer/export_test.go:15
↓ 4 callersMethodset
(stage string)
acp/internal/intent/llm/diagnostics.go:30
↓ 4 callersFunctionsetRulesCheckRepo
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 callersFunctionsetupRecordingTelemetry
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 callersFunctionstartCancellableCopy
(dst, src *os.File, acquireThread func() (syscall.Handle, error))
acp/cmd/ocr-acp/stdio_windows.go:158
↓ 4 callersFunctionstatusBadge
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 callersMethodstop
(cmd *exec.Cmd, waited <-chan error)
acp/internal/orchestrator/runner.go:266
↓ 4 callersFunctionstripThinkTags
stripThinkTags removes reasoning wrapper tags from content.
internal/llm/client.go:1800
↓ 4 callersFunctionstubForceExit
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 callersMethodsummaryEnabled
()
internal/scan/agent.go:103
↓ 4 callersFunctiontoolResultMessages
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 callersMethodtransition
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 callersMethodtriggerAsyncCompression
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:296
↓ 4 callersFunctiontrimGitUsage
(stderr string, exitCode int)
internal/tool/code_search.go:268
↓ 4 callersFunctionunmarshalChatCompletionBody
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 callersFunctionunquoteGitPath
(path: string)
extensions/vscode/src/extension/services/gitMap.ts:130
↓ 4 callersMethodupdateManualForm
(key string, msg tea.KeyPressMsg)
cmd/opencodereview/provider_tui.go:1496
↓ 4 callersFunctionuseSectionTitleStyle
()
pages/src/hooks/useResponsiveStyle.ts:15
← previousnext →901–1,000 of 7,128, ranked by callers