MCPcopy Create free account

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

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

↓ 3 callersMethodlist_notes
(self)
examples/gitlab_ci/post_review_test.py:158
↓ 3 callersMethodloadGitignorePatterns
loadGitignorePatterns reads and parses .gitignore patterns from the repo root.
internal/diff/git.go:239
↓ 3 callersFunctionloadScanResumeState
(repoDir string, opts scanOptions, scanPaths []string)
cmd/opencodereview/scan_cmd.go:249
↓ 3 callersFunctionmakeBudgetDiffs
makeBudgetDiffs returns n small, non-deleted diffs that survive filterDiffs and filterLargeDiffs.
internal/agent/budget_test.go:68
↓ 3 callersFunctionmakeErr
(message, status, headers, data)
scripts/github-actions/post-review-comments.test.js:61
↓ 3 callersFunctionmakeScanItems
(n int)
internal/scan/budget_test.go:62
↓ 3 callersMethodmanifestMode
manifestMode maps the review to the manifest input mode. It derives purely from From/To/Commit so the value is always one of the three valid input mod
internal/agent/agent.go:941
↓ 3 callersFunctionmapStatusCode
(code: string)
extensions/vscode/src/extension/services/gitMap.ts:7
↓ 3 callersMethodmergeBase
mergeBase computes the merge-base for range mode. Returns "" for other modes.
cmd/opencodereview/delegate_cmd.go:130
↓ 3 callersFunctionmodelTUIEnterCustomModelName
(t *testing.T, m modelTUIModel, name string)
cmd/opencodereview/provider_tui_funcs_test.go:1123
↓ 3 callersMethodnewRequestMeta
newRequestMeta builds the retry-report identity for one logical LLM request. It is the single place provider and model are read for that purpose — th
internal/agent/agent.go:267
↓ 3 callersFunctionnormalizeLine
(s: string)
extensions/vscode/src/extension/providers/commentAnchor.ts:55
↓ 3 callersFunctionnormalizeModelList
(models []string)
cmd/opencodereview/config_cmd.go:751
↓ 3 callersFunctionofficialAPIKeyRequiredError
officialAPIKeyRequiredError mirrors the wording applyOfficialProviderConfig uses for the same failure, so the interactive and non-interactive paths na
cmd/opencodereview/provider_tui.go:944
↓ 3 callersFunctionoutputPreview
outputPreview renders a preview in the requested output format. sarif is rejected with an error because a preview contains file/rule metadata, not rev
cmd/opencodereview/output.go:698
↓ 3 callersFunctionparseExplicitHeadingId
(text: string)
pages/src/utils/headingId.ts:9
↓ 3 callersFunctionparseRecordTime
(s string)
internal/session/list.go:331
↓ 3 callersMethodpassThroughCPInput
(msg tea.Msg)
cmd/opencodereview/provider_tui.go:1448
↓ 3 callersFunctionpositionalSignature
positionalSignature extracts the positional-argument part of cmd.Use, e.g. "<key> <value>" from "set <key> <value>" and "<path...>" from "rule [flags]
cmd/opencodereview/arg_errors.go:81
↓ 3 callersFunctionpost
(review_input)
examples/gerrit_ci/post_review.py:225
↓ 3 callersMethodpostMessage
(msg: unknown)
extensions/vscode/src/webview/bridge.ts:6
↓ 3 callersMethodprepareModelSelection
(providerName, configModel string)
cmd/opencodereview/provider_tui.go:545
↓ 3 callersMethodpreview
preview is read-only with respect to the Agent: it does not mutate a.items. (Earlier versions did, which made a subsequent Run on the same Agent silen
internal/scan/preview.go:28
↓ 3 callersMethodpreview
(ctx context.Context)
internal/agent/preview.go:72
↓ 3 callersFunctionpreviewFixture
()
cmd/opencodereview/output_color_test.go:106
↓ 3 callersFunctionprintDiffLine
printDiffLine renders a single diff line with colored prefix and background on content. With color disabled it emits "<prefix> <content>", which keeps
cmd/opencodereview/output.go:172
↓ 3 callersFunctionprintWizardCancelled
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:61
↓ 3 callersFunctionreadFileSync
(file)
scripts/github-actions/post-review-comments.test.js:53
↓ 3 callersFunctionreadJSONLLines
readJSONLLines visits each physical JSONL record without bufio.Scanner's fixed token ceiling. session_end embeds the complete run manifest and can leg
internal/viewer/store.go:209
↓ 3 callersMethodrecordWarning
(warningType, file, message string)
internal/scan/agent.go:234
↓ 3 callersFunctionregistryModelsForProvider
(name string, fallback []string)
cmd/opencodereview/provider_tui.go:455
↓ 3 callersMethodrender
()
pages/src/components/ErrorBoundary.tsx:59
↓ 3 callersFunctionrenderModelName
(name string, isCursor, userAdded bool)
cmd/opencodereview/provider_tui.go:2097
↓ 3 callersFunctionrequest
request is a resume of parentState with the same provider and model, which is the accepted baseline every case below deviates from.
internal/session/resume_identity_test.go:50
↓ 3 callersMethodrequestCtx
requestCtx returns ctx carrying the identity of one logical LLM request, or ctx unchanged when identity is disabled (scan) or the meta is unusable. C
internal/llmloop/loop.go:73
↓ 3 callersFunctionresolveAllowedHostsFromEnv
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:136
↓ 3 callersFunctionresolveBackgroundFilePath
(repoDir, path string)
cmd/opencodereview/background_file.go:25
↓ 3 callersFunctionresolveBin
(name: string)
extensions/vscode/src/extension/services/shellEnv.ts:56
↓ 3 callersFunctionresolveConfigPath
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:103
↓ 3 callersMethodresolveGitRef
(root: string, ref: string)
extensions/vscode/src/extension/services/GitService.ts:229
↓ 3 callersFunctionresolveLang
resolveLang returns the resolved language name for the instruction.
internal/config/template/template.go:214
↓ 3 callersFunctionresolveMaxTokens
resolveMaxTokens applies the per-run CLI override, then the saved setting, and finally the embedded task-template default.
cmd/opencodereview/shared.go:49
↓ 3 callersFunctionresolveNativeBinary
()
scripts/platform.js:39
↓ 3 callersFunctionresumedFromSession
(resume *session.ResumeState)
internal/agent/agent.go:1258
↓ 3 callersFunctionretryAttemptChain
retryAttemptChain renders one logical request as a short human-readable chain.
cmd/opencodereview/output.go:523
↓ 3 callersMethodrollbackModelDelete
(prevEntry ProviderEntry, prevCfgModel string)
cmd/opencodereview/provider_tui.go:485
↓ 3 callersFunctionrouteComment
(comment, policy)
scripts/github-actions/post-review-comments.js:1508
↓ 3 callersMethodrun
(opts: CliRunOptions, cb: SessionCallbacks)
extensions/vscode/src/extension/services/ReviewSession.ts:24
↓ 3 callersMethodrunIdentity
runIdentity reads the identity off the agent's current selection. It is only meaningful once the selection is final: sourceArtifactSHA256 hashes what
internal/agent/identity.go:109
↓ 3 callersFunctionrunPreview
(cc *commonContext, opts reviewOptions, out io.Writer)
cmd/opencodereview/review_helpers_test.go:16
↓ 3 callersFunctionrunReview
runReview provides test compatibility for the pre-cobra runReview(args) entry point: parse flags, then execute the review.
cmd/opencodereview/compat_test.go:36
↓ 3 callersFunctionrunSessionList
()
cmd/opencodereview/session_cmd.go:121
↓ 3 callersFunctionrunSessionListCompat
runSessionListCompat provides test compatibility for old-style runSessionList([]string{...}) calls.
cmd/opencodereview/compat_test.go:64
↓ 3 callersFunctionrunSessionShow
(sessionID string)
cmd/opencodereview/session_cmd.go:148
↓ 3 callersFunctionrunSessionShowCompat
runSessionShowCompat provides test compatibility for old-style runSessionShow([]string{...}) calls.
cmd/opencodereview/compat_test.go:81
↓ 3 callersFunctionsanitizeMetadata
(value)
scripts/github-actions/post-review-comments.js:1362
↓ 3 callersFunctionsanitizeRetryCodes
sanitizeRetryCodes filters out SDK-default codes (408, 409, 429) and returns the remaining valid codes, any warnings for filtered codes, and an error
internal/llm/resolver.go:935
↓ 3 callersFunctionsarifFingerprints
sarifFingerprints builds a stable partialFingerprints entry for a finding. The fingerprint is based on Path + Category + ExistingCode (not message.tex
cmd/opencodereview/sarif.go:288
↓ 3 callersFunctionsavedSecretReplaceHint
savedSecretReplaceHint builds the replace hint text without leading indent.
cmd/opencodereview/provider_tui.go:2535
↓ 3 callersFunctionscanLines
scanLines reads from r line by line, collecting at most maxLines lines starting from startLine (1-based), while counting the total number of lines. Th
internal/tool/filereader.go:158
↓ 3 callersFunctionsealRepo
sealRepo builds a two-commit repo on a branch, so `main..feature` is a real range whose head a later commit can move.
internal/agent/sealed_input_test.go:19
↓ 3 callersFunctionsecurityHeaders
securityHeaders wraps a handler and sets defense-in-depth response headers on every reply. These harden the local viewer's browser-facing surface (the
internal/viewer/securityheaders.go:28
↓ 3 callersFunctionsemverGt
(a, b)
scripts/version.js:16
↓ 3 callersFunctionsetColorFlags
setColorFlags sets the flag-backed variable for one test and restores it.
cmd/opencodereview/color_test.go:24
↓ 3 callersFunctionsetCustomProviderValue
(cfg *Config, key, value string)
cmd/opencodereview/config_cmd.go:808
↓ 3 callersMethodsetStatus
(index: number, status: CommentStatus)
extensions/vscode/src/extension/providers/CommentProvider.ts:179
↓ 3 callersMethodshouldReview
shouldReview applies the filter algorithm via whyExcluded.
internal/agent/agent.go:1987
↓ 3 callersFunctionshouldSkipFile
shouldSkipFile returns true if a git ls-files output path should be skipped. Keeps only widely useful files (those with recognizable extensions).
internal/tool/file_find.go:176
↓ 3 callersFunctionsplitAndNormalize
splitAndNormalize splits code text into lines and normalizes each one.
internal/diff/resolver.go:286
↓ 3 callersFunctionsplitBindHost
splitBindHost returns the host portion of a listen address as passed to http.Server.Addr. Empty input returns "".
internal/viewer/hostguard.go:109
↓ 3 callersFunctionstripEmptyPlanBlock
stripEmptyPlanBlock removes the "### Review Directive\n{{plan_guidance}}\n\n" wrapper from a MAIN_TASK user message when the plan phase produced no gu
internal/agent/util.go:29
↓ 3 callersFunctionstripThinkTags
stripThinkTags removes reasoning wrapper tags from content.
internal/llm/client.go:1320
↓ 3 callersFunctionsummary_tag_for
(run_tag)
examples/gitlab_ci/post_review.py:71
↓ 3 callersMethodsyncModelsFromConfig
()
cmd/opencodereview/provider_tui.go:2787
↓ 3 callersFunctiontoConfigSetArgs
(key: string, value: string)
extensions/vscode/src/extension/services/configParse.ts:50
↓ 3 callersFunctiontruncate
(s string, n int)
cmd/opencodereview/session_cmd.go:426
↓ 3 callersMethodupdateCustomProviderForm
(key string, msg tea.KeyPressMsg)
cmd/opencodereview/provider_tui.go:1045
↓ 3 callersMethodupdateDeleteModelConfirm
(key string)
cmd/opencodereview/provider_tui.go:2964
↓ 3 callersFunctionupsert_summary
Find-or-create/update a summary note. Sticky matches the cross-run :data:`SUMMARY_MARKER`; non-sticky matches this run's ``tag`` (per-run), s
examples/gitlab_ci/post_review.py:1093
↓ 3 callersMethodvalid
valid reports whether m can identify a logical request. Provider may be empty; Model, FilePath and TaskType may not. No field may contain NUL, becaus
internal/llm/retry_meta.go:57
↓ 3 callersFunctionvisibleRunesLen
(runes []rune)
cmd/opencodereview/output.go:229
↓ 3 callersMethodwaitForRepo
等待至少一个仓库就绪(git 扩展异步扫描,首次可能为空)。
extensions/vscode/src/extension/services/GitService.ts:47
↓ 3 callersFunctionwalkSessionFile
(path string, apply func(summaryRecord))
internal/session/list.go:196
↓ 3 callersFunctionwantMeta
(t *testing.T, got capturedRequest, want llm.RequestMeta)
internal/llmloop/retry_identity_test.go:77
↓ 3 callersMethodwhyExcluded
whyExcluded mirrors agent.whyExcluded but for ScanItem inputs.
internal/scan/agent.go:474
↓ 3 callersFunctionwithEnv
(env, fn)
scripts/github-actions/post-review-comments.test.js:86
↓ 3 callersFunctionwriteGarbageExternalDiff
writeGarbageExternalDiff writes a shell script that emits non-diff output and returns its path. When git invokes it via GIT_EXTERNAL_DIFF / diff.exter
internal/diff/git_test.go:33
↓ 3 callersFunctionwriteRangeResumeSession
writeRangeResumeSession persists a range-mode session with the given completed file checkpoints and returns its ID. HOME must already point at a temp
cmd/opencodereview/review_resume_more_test.go:24
↓ 3 callersMethodwriteReviewItemRecord
(recordType, filePath, oldPath, newPath, fingerprint, sourceSessionID, errorMsg string, comments []model.LlmCo
internal/session/persist.go:189
↓ 2 callersMethodAddToolResult
AddToolResult appends a tool call result to this task record and writes a tool_call record to the JSONL stream.
internal/session/history.go:482
↓ 2 callersMethodApplyEffort
ApplyEffort overwrites the effort-controlled template scalars.
internal/config/template/effort.go:58
↓ 2 callersMethodApplyLanguage
ApplyLanguage injects a language directive into all system-role messages of this conversation.
internal/config/testconnection/testconnection.go:50
↓ 2 callersMethodBedrockContext
BedrockContext reports the AWS region and profile a Bedrock client resolved, so callers can show what a request actually used. ok is false for every o
internal/llm/client.go:946
↓ 2 callersMethodBudgetExceeded
BudgetExceeded reports whether the aggregate token budget gate stopped dispatch before every file was reviewed. Diagnostic only: scan still returns it
internal/scan/agent.go:232
↓ 2 callersFunctionBuildToolDefs
BuildToolDefs converts toolsconfig.ToolConfigEntry slice into []llm.ToolDef, filtering by phase (planOnly=true for plan_task, false for main_task).
internal/agent/agent.go:2167
↓ 2 callersFunctionComplete
Complete returns a checkpoint signaling task completion.
internal/tool/response_message.go:21
↓ 2 callersFunctionCountTokensForModel
(text string, modelName string)
internal/llm/client.go:360
↓ 2 callersFunctionEndSpan
EndSpan ends the span and records error status if present.
internal/telemetry/span.go:57
↓ 2 callersFunctionEventf
Eventf is like Event but includes a message attribute.
internal/telemetry/events.go:34
↓ 2 callersFunctionFail
Fail returns a checkpoint signaling terminal task failure.
internal/tool/response_message.go:24
← previousnext →701–800 of 4,381, ranked by callers