MCPcopy Create free account

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

Functions4,649 in github.com/alibaba/open-code-review

↓ 11 callersFunctionmustJSON
--- helpers ---
internal/session/resume_test.go:736
↓ 11 callersFunctionofficialConfigModelTUI
(t *testing.T, configPath string, extraModels []string)
cmd/opencodereview/provider_tui_funcs_test.go:1051
↓ 11 callersFunctionoutputRetryReportText
outputRetryReportText groups noteworthy requests by review stage. It renders only stable classes and status codes; raw provider errors stay out.
cmd/opencodereview/output.go:434
↓ 11 callersFunctionoutputSARIF
outputSARIF writes a SARIF v2.1.0 document to the provided writer. The document always contains a single run with the 8 built-in category rules, one r
cmd/opencodereview/sarif.go:131
↓ 11 callersMethodpost
(msg: HostToWebview)
extensions/vscode/src/extension/providers/SidebarProvider.ts:56
↓ 11 callersFunctionreadJsonLines
(file)
scripts/github-actions/action-contract.test.js:297
↓ 11 callersFunctionrenderTemplate
(w http.ResponseWriter, name string, data any)
internal/viewer/server.go:309
↓ 11 callersFunctionresolveKeyCmd
resolveKeyCmd runs a credential-fetching shell command and returns its trimmed, single-line stdout. label names the source (e.g. `api_key_cmd for prov
internal/llm/keycmd.go:59
↓ 11 callersFunctionretryReportFixture
retryReportFixture is the report used by most rendering assertions: one request recovered after two errors, one request that never succeeded, and a to
cmd/opencodereview/retry_report_render_test.go:24
↓ 11 callersFunctionsetColor
setColor pins the resolved color decision for one test and restores the previous state afterwards. Tests capture stdout through a pipe, which is not a
cmd/opencodereview/color_test.go:16
↓ 11 callersFunctiontaskDoneResponse
()
internal/llmloop/loop_test.go:62
↓ 11 callersFunctionuseResponsive
()
pages/src/hooks/useResponsive.ts:12
↓ 11 callersFunctionwriteTempFile
writeTempFile writes content to a temporary file and returns its path.
cmd/opencodereview/background_file_test.go:16
↓ 10 callersMethodCommentsForPath
CommentsForPath returns a copy of comments whose Path matches the given path.
internal/tool/comment_collector.go:41
↓ 10 callersFunctionLoadDefault
LoadDefault parses the embedded system_rules.json and resolves rule file references.
internal/config/rules/system_rules.go:93
↓ 10 callersFunctionNewFileRead
(fr *FileReader)
internal/tool/file_read.go:19
↓ 10 callersFunctionNewLLMClient
--- Factory --- NewLLMClient creates the appropriate client based on the resolved endpoint protocol. protocol dispatch (canonical names from protocol.
internal/llm/client.go:390
↓ 10 callersFunctionNewManifestBuilder
NewManifestBuilder creates a builder for a run identified by runID (the canonical session ID) and operation ("review" or "scan").
internal/session/manifest.go:351
↓ 10 callersFunctionNewProvider
NewProvider creates a Provider that enumerates the repository at repoDir. If paths is non-empty each element must be a repo-relative path (file or dir
internal/scan/provider.go:54
↓ 10 callersFunctionParseDiffText
ParseDiffText splits the unified diff text into per-file Diff structs. ref, if non-empty, is a git ref used to read new-file content via git show inst
internal/diff/parser.go:33
↓ 10 callersMethodRecordReviewItemFailed
RecordReviewItemFailed persists an incomplete file-level checkpoint.
internal/session/history.go:298
↓ 10 callersMethodSetRunFailure
SetRunFailure records why the whole run stopped. It rejects an invalid class (so an unclassifiable stop is never silently downgraded) and a change of
internal/session/manifest.go:415
↓ 10 callersMethodbeginAPIKeyReplace
beginAPIKeyReplace switches from the fixed-length mask placeholder to edit mode so the next keystroke or paste fully replaces the saved key. While edi
cmd/opencodereview/provider_tui.go:898
↓ 10 callersMethodbuildGrepArgs
(searchText string, caseSensitive bool, usePerlRegexp bool, noIndex bool, pathspec []string)
internal/tool/code_search.go:58
↓ 10 callersFunctiondefaultConfigPath
Default config file location: ~/.opencodereview/config.json
cmd/opencodereview/config_cmd.go:92
↓ 10 callersFunctiongitCommit
(t *testing.T, repo, msg string)
internal/scan/provider_test.go:116
↓ 10 callersFunctiongitCommitFile
gitCommitFile writes a file and commits it, returning after the commit lands.
cmd/opencodereview/delegate_exec_test.go:52
↓ 10 callersFunctionloadCommonContext
loadCommonContext validates the working directory, loads the embedded template, raises MaxToolRequestTimes when maxTools exceeds the default, resolves
cmd/opencodereview/shared.go:91
↓ 10 callersFunctionmakeDiff
()
internal/diff/relocation_test.go:44
↓ 10 callersFunctionmatchConsecutive
matchConsecutive scans sideLines for a consecutive run matching all targetLines.
internal/diff/resolver.go:217
↓ 10 callersFunctionnewCompareSession
newCompareSession records one session with the given findings and returns it.
cmd/opencodereview/session_cmd_test.go:379
↓ 10 callersFunctionnewFakeLLM
newFakeLLM returns a server that succeeds on the first attempt for every file. rateLimitOnce and hardFail are set by the caller before use.
cmd/opencodereview/retry_fake_llm_test.go:52
↓ 10 callersFunctionnewTestClient
(name string, tools []*mcp.Tool)
internal/mcp/provider_test.go:14
↓ 10 callersFunctionreadWorkspaceFileForDiff
(repoDir, relPath string)
internal/diff/workspace_file.go:14
↓ 10 callersFunctionrenderComment
(comment model.LlmComment, out io.Writer)
cmd/opencodereview/output.go:92
↓ 10 callersFunctionresolveUsage
resolveUsage parses raw JSON bytes into a map and extracts token usage by probing configured paths sequentially. Returns nil if no total_tokens found.
internal/llm/usage_resolver.go:76
↓ 10 callersFunctionretryTestRepo
retryTestRepo builds a repo with one reviewable commit range (HEAD~1..HEAD), each file carrying its own marker in the second commit only. The file se
cmd/opencodereview/retry_fake_llm_test.go:240
↓ 10 callersFunctionrunSessionCompare
(beforeID, afterID string)
cmd/opencodereview/session_cmd.go:234
↓ 10 callersFunctionsilenceStdout
silenceStdout redirects os.Stdout to /dev/null for the duration of fn so the delegate commands' Printf output does not clutter test logs.
cmd/opencodereview/delegate_exec_test.go:67
↓ 10 callersFunctionstartFakeLLM
startFakeLLM starts srv and points the OCR_LLM_* endpoint resolution at it, with HOME/XDG_CONFIG_HOME redirected so the developer's real config and se
cmd/opencodereview/retry_fake_llm_test.go:275
↓ 10 callersMethodwhyExcluded
whyExcluded applies the filter algorithm as shouldReview but returns the specific reason a file is excluded.
internal/agent/preview.go:34
↓ 10 callersFunctionyKey
()
cmd/opencodereview/provider_tui_test.go:1142
↓ 9 callersFunctionAnyToAttr
AnyToAttr converts an arbitrary value to an OTel attribute.KeyValue.
internal/telemetry/span.go:132
↓ 9 callersFunctionDynamic
Dynamic creates a Tool with the given name for dynamically discovered tools (e.g. MCP).
internal/tool/definitions.go:51
↓ 9 callersMethodEnumerate
Enumerate returns one ScanItem per reviewable file. Binaries are emitted with empty Content + IsBinary=true so previews can show them as excluded.
internal/scan/provider.go:80
↓ 9 callersFunctionPromptTokenLimit
PromptTokenLimit returns tokenWarningThreshold (80%) of maxTokens. It is shared by the agent and scan pre-flight gates, their large-input filters, and
internal/llmloop/compression.go:29
↓ 9 callersMethodResolveInput
ResolveInput freezes this run's commit endpoints by asking git, following the input-mode matrix: - range: base = merge-base(from,to); head = the
internal/diff/git.go:125
↓ 9 callersMethodRestore
Restore re-enables stdout. Safe to call multiple times.
cmd/opencodereview/shared.go:350
↓ 9 callersMethodSetFinalManifest
SetFinalManifest stores the frozen manifest the agent produced. It is embedded into session_end by Finalize and returned to the CLI via FinalManifest.
internal/session/history.go:200
↓ 9 callersMethodTotalInputTokens
()
cmd/opencodereview/shared.go:596
↓ 9 callersMethodTotalTokensUsed
()
cmd/opencodereview/shared.go:598
↓ 9 callersFunctionValidateProtocol
ValidateProtocol accepts the four canonical protocol names and rejects everything else.
internal/llm/protocol.go:65
↓ 9 callersFunctiondownKey
()
cmd/opencodereview/provider_tui_test.go:34
↓ 9 callersMethodexecuteGroupReviewFilter
executeGroupReviewFilter runs the REVIEW_FILTER_TASK for a file group. When from is non-nil, only comments at indices >= from[path] for each path are
internal/agent/agent.go:1747
↓ 9 callersFunctionexpandBraces
expandBraces turns "{a,b,c}" style patterns into individual strings. e.g. "*.go.{java,kotlin}" → ["*.go.java", "*.go.kotlin"]. If no braces exist, ret
internal/config/rules/system_rules.go:183
↓ 9 callersFunctionfileReadToolCallResponse
(callID, args string)
internal/llmloop/loop_test.go:66
↓ 9 callersFunctiongroupingSkipTemplate
groupingSkipTemplate is a template whose GROUPING_TASK is configured, so that a test asserting client.called == false proves the fast path skipped the
internal/agent/grouping_test.go:284
↓ 9 callersFunctionmakeComments
(n)
scripts/github-actions/post-review-comments.test.js:1400
↓ 9 callersFunctionnewManifestFlowAgent
(t *testing.T, diffs []model.Diff, resume *session.ResumeState)
internal/agent/manifest_integration_test.go:67
↓ 9 callersFunctionofficialDashscopeModelTUI
(t *testing.T, configPath string, extraModels []string)
cmd/opencodereview/provider_tui_test.go:1513
↓ 9 callersFunctionopen
()
extensions/vscode/src/webview/components/CommentCard.tsx:18
↓ 9 callersMethodpost_note
(self, body)
examples/gitlab_ci/post_review_test.py:139
↓ 9 callersFunctionreadJSONLRecords
(t *testing.T, path string)
internal/session/persist_test.go:113
↓ 9 callersMethodrecordWarning
recordWarning adds a non-fatal warning to the agent's warning list.
internal/agent/agent.go:508
↓ 9 callersFunctionresolveWorkingDir
resolveWorkingDir returns (absPath, isGitRepo, err). When requireGit is true, returns an error if the directory is not a git repo. When false, returns
cmd/opencodereview/shared.go:133
↓ 9 callersMethodrunCompression
runCompression performs three-zone memory compression on the given messages, summarizing the compress zone while preserving the active zone intact. Re
internal/llmloop/compression.go:223
↓ 9 callersFunctionrunGit
(cwd: string, args: string[])
extensions/vscode/src/extension/services/GitService.ts:503
↓ 9 callersFunctionscanItemFingerprint
(it model.ScanItem)
internal/scan/agent.go:288
↓ 9 callersMethodselectedCustomProvider
()
cmd/opencodereview/provider_tui.go:421
↓ 9 callersFunctionsessionJSONLPath
(t *testing.T, repoDir, sessionID string)
internal/session/persist_test.go:133
↓ 9 callersFunctionuseCompareRepo
useCompareRepo points the compare command at repoDir and restores the shared command flags afterwards.
cmd/opencodereview/session_cmd_test.go:398
↓ 9 callersFunctionwriteConfig
writeConfig writes an OCR config file to a temp dir and returns its path.
internal/llm/bedrock_test.go:16
↓ 8 callersMethodApplyLanguage
ApplyLanguage injects a language directive into all system-role messages across MAIN_TASK, PLAN_TASK (if set), and MEMORY_COMPRESSION_TASK.
internal/config/template/template.go:285
↓ 8 callersFunctionCanonicalPath
CanonicalPath returns an absolute path with symlinks resolved.
internal/pathutil/path.go:13
↓ 8 callersMethodIsUserIncluded
IsUserIncluded reports whether the given path matches any user include pattern. The check is case-insensitive: both path and pattern are lowercased. R
internal/config/rules/system_rules.go:250
↓ 8 callersFunctionLoadDefault
LoadDefault parses the embedded task_template.json and resolves prompt file references.
internal/config/template/template.go:216
↓ 8 callersFunctionLoadScanDefault
LoadScanDefault parses the embedded scan_template.json.
internal/config/template/template.go:258
↓ 8 callersFunctionNewDiffMap
NewDiffMap creates a frozen, read-only DiffMap from a plain map.
internal/tool/file_read_diff.go:18
↓ 8 callersMethodRecordAttempt
RecordAttempt appends one observed HTTP attempt for m. startedAt and endedAt bracket the real HTTP call: the observer takes them immediately before a
internal/llm/retry_report.go:289
↓ 8 callersFunctionRecordLLMResult
RecordLLMResult sets the outcome of an LLM request on the span.
internal/telemetry/span.go:115
↓ 8 callersMethodRecordUsage
RecordUsage adds the prompt/completion/cache tokens reported by an LLM response to the runner's aggregate counters. Used by callers (plan phase in age
internal/llmloop/loop.go:188
↓ 8 callersFunctionRegisterAll
RegisterAll registers tools from the MCP client into the tool registry. When allowedTools is non-empty, only tools whose names appear in the list are
internal/mcp/provider.go:33
↓ 8 callersFunctionRequestMetaFromContext
RequestMetaFromContext returns the RequestMeta attached to ctx, if any. It is exported so the packages that stamp identity — internal/llmloop and int
internal/llm/retry_meta.go:148
↓ 8 callersMethodSealSelected
SealSelected closes the selected set. After it returns, RegisterSelected fails and the coverage denominator is fixed; per-item Mark* calls continue to
internal/session/manifest.go:531
↓ 8 callersMethodSetPendingFailureCause
SetPendingFailureCause records the classification Finalize must use when it sweeps items that never received a Mark*. It records no run_failure and tr
internal/session/manifest.go:460
↓ 8 callersMethodTool
Tool returns which tool this provider implements.
internal/tool/definitions.go:73
↓ 8 callersMethodValidateScanOptions
ValidateScanOptions verifies that the previous session was a full-file scan.
internal/session/resume.go:294
↓ 8 callersFunctionWithinBase
WithinBase reports whether target is base itself or contained under base.
internal/pathutil/path.go:22
↓ 8 callersMethodapplyEditCustomProviderSave
()
cmd/opencodereview/provider_tui.go:1337
↓ 8 callersFunctionapplyOfficialProviderConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:260
↓ 8 callersMethodcustomProviderEntry
(name string, fallback ProviderEntry)
cmd/opencodereview/provider_tui.go:599
↓ 8 callersMethoddispose
()
extensions/vscode/src/extension/providers/CommentProvider.ts:326
↓ 8 callersFunctionentry_of
(ri, path="main.go")
examples/gerrit_ci/post_review_test.py:49
↓ 8 callersFunctionfreezeOne
freezeOne freezes c and returns the single listed request.
internal/llm/retry_boundary_test.go:47
↓ 8 callersFunctionisolateLLMConnectionTest
isolateLLMConnectionTest keeps the "Testing connection..." step that ends every apply*Config call away from the developer's own machine. Without it re
cmd/opencodereview/provider_cmd_test.go:25
↓ 8 callersMethodmapResponsesResponse
mapResponsesResponse converts the SDK Response into the shared ChatResponse. Text output is read via the SDK's OutputText() helper (it walks all outpu
internal/llm/responses_client.go:255
↓ 8 callersFunctionmergeModelLists
(lists ...[]string)
cmd/opencodereview/config_cmd.go:768
↓ 8 callersFunctionnewModelTUIConfig
(cfg modelTUIConfig)
cmd/opencodereview/provider_tui.go:2681
↓ 8 callersFunctionnewQuietHandle
newQuietHandle routes [ocr] progress lines away from stdout so they cannot corrupt a structured output document. What it does depends on why stdout ne
cmd/opencodereview/shared.go:338
↓ 8 callersFunctionparseCheckpointMarker
(body)
scripts/github-actions/post-review-comments.js:2319
← previousnext →201–300 of 4,649, ranked by callers