MCPcopy Create free account

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

Functions3,747 in github.com/alibaba/open-code-review

↓ 6 callersFunctionunmarshalResponsesBody
--- helpers ---
internal/llm/responses_client_test.go:669
↓ 6 callersFunctionunwritableConfigPath
unwritableConfigPath returns a config path whose parent is a regular file, so any saveConfig / loadOrCreateConfig against it fails (ENOTDIR). This is
cmd/opencodereview/provider_tui_savefail_test.go:16
↓ 6 callersFunctionupKey
()
cmd/opencodereview/provider_tui_funcs_test.go:318
↓ 6 callersMethodwriteRecordLocked
(rec map[string]any)
internal/session/persist.go:125
↓ 5 callersMethodAsDiff
AsDiff returns a Diff suitable for handing to code that expects the diff-based shape (line-number resolver, file_read_diff tool). The Diff field stays
internal/model/scan.go:22
↓ 5 callersMethodBudgetExceeded
BudgetExceeded reports whether the aggregate token budget gate stopped the run before all files were reviewed. It is a diagnostic signal only — it fee
cmd/opencodereview/shared.go:317
↓ 5 callersFunctionCollectToolDefs
CollectToolDefs gathers tool definitions from MCP clients, filtering out tools that conflict with built-in tools or were not successfully registered.
internal/mcp/provider.go:99
↓ 5 callersFunctionContextWithTraceParentFromEnv
ContextWithTraceParentFromEnv extracts W3C traceparent from the TRACEPARENT environment variable and returns a context carrying the upstream span cont
internal/telemetry/span.go:35
↓ 5 callersFunctionCountMessagesTokens
CountMessagesTokens returns the rough token count of msgs by summing the per-message text token count. Exported because both review and scan top layer
internal/llmloop/compression.go:69
↓ 5 callersMethodFilesReviewed
()
cmd/opencodereview/shared.go:294
↓ 5 callersMethodFrozen
Frozen reports whether Finalize has already run.
internal/session/manifest.go:718
↓ 5 callersFunctionInit
Init initializes global TracerProvider and MeterProvider based on environment variables and optional config file. Returns true when enabled. Safe to c
internal/telemetry/provider.go:32
↓ 5 callersFunctionListSessions
ListSessions enumerates all persisted sessions for the given repository directory, sorted by StartTime descending (most recent first). Missing directo
internal/session/list.go:98
↓ 5 callersFunctionLoad
Load parses the tools config file. When path is empty, falls back to the embedded default tools configuration.
internal/config/toolsconfig/toolsconfig.go:27
↓ 5 callersFunctionLoadAppConfig
LoadAppConfig loads config from path. Returns nil, nil if file does not exist.
cmd/opencodereview/config_cmd.go:362
↓ 5 callersFunctionLoadSummary
LoadSummary loads a single session's Summary. Errors when the session file is missing or unreadable.
internal/session/list.go:131
↓ 5 callersFunctionReLocateComment
ReLocateComment calls the LLM to regenerate a precise existing_code snippet when text-based matching fails, then retries ResolveComment with the new s
internal/diff/relocation.go:23
↓ 5 callersFunctionRecordCommentsGenerated
(ctx context.Context, n int64)
internal/telemetry/metrics.go:97
↓ 5 callersFunctionRecordReviewDuration
(ctx context.Context, dur time.Duration)
internal/telemetry/metrics.go:77
↓ 5 callersMethodReplaceSince
ReplaceSince replaces comments[start:] with the given replacements. Useful for batch-level dedup: take a Snapshot, run a batch, dedup the new comments
internal/tool/comment_collector.go:82
↓ 5 callersFunctionResolveComment
ResolveComment attempts to resolve StartLine/EndLine for a single comment by matching ExistingCode against the diff. Returns true on success.
internal/diff/resolver.go:62
↓ 5 callersMethodRun
Run executes a git command and returns the combined stdout+stderr output.
internal/gitcmd/runner.go:47
↓ 5 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:197
↓ 5 callersFunctionStartLLMSpan
StartLLMSpan creates a span for an LLM request with standard attributes.
internal/telemetry/span.go:109
↓ 5 callersMethodString
String renders a one-line human-readable estimate, matching scan.Estimate's format so diff and scan warnings read consistently. Money is intentionally
internal/agent/estimate.go:94
↓ 5 callersMethodSubmit
Submit runs f in a background goroutine bounded by the semaphore. When f completes its return value is collected internally.
internal/llmloop/pool.go:63
↓ 5 callersMethodTools
()
internal/mcp/client.go:155
↓ 5 callersFunctionTraceIDFromContext
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:48
↓ 5 callersFunctionagentTaskDoneResponse
()
internal/agent/agent_test.go:38
↓ 5 callersMethodapiKeyStepCanConfirm
()
cmd/opencodereview/provider_tui.go:917
↓ 5 callersFunctionapplyDedupGroups
applyDedupGroups parses the DEDUP_TASK output and returns the deduped comment slice. Returns (nil, false) when the response is malformed OR when the g
internal/scan/agent.go:949
↓ 5 callersFunctionapplyManualConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:101
↓ 5 callersFunctionapplyModelDeleteToEntry
(entry ProviderEntry, name string)
cmd/opencodereview/provider_tui.go:434
↓ 5 callersFunctionapplyOfficialProviderConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:230
↓ 5 callersFunctionassertContains
(t *testing.T, args []string, val string)
internal/tool/code_search_test.go:304
↓ 5 callersFunctionassertNotContains
(t *testing.T, args []string, val string)
internal/tool/code_search_test.go:311
↓ 5 callersMethodassert_unresolved
(self, severity, want)
examples/gerrit_ci/post_review_test.py:89
↓ 5 callersMethodcancelPendingCompression
cancelPendingCompression aborts the conversation's in-flight background compression, if any.
internal/llmloop/compression.go:356
↓ 5 callersFunctionclearCfgActiveModelIfDeleted
(cfg *Config, providerName, name string)
cmd/opencodereview/provider_tui.go:442
↓ 5 callersFunctioncommentKey
(rc)
scripts/github-actions/post-review-comments.test.js:78
↓ 5 callersFunctioncompleteEnum
(values ...string)
cmd/opencodereview/shared_flags.go:68
↓ 5 callersFunctioncontentToText
(contents []mcp.Content)
internal/mcp/client.go:180
↓ 5 callersFunctioncopyLlmComments
(in []model.LlmComment)
internal/session/resume.go:274
↓ 5 callersMethodcustomListCount
()
cmd/opencodereview/provider_tui.go:599
↓ 5 callersMethodensureApi
()
extensions/vscode/src/extension/services/GitService.ts:24
↓ 5 callersFunctionensureModelInList
ensureModelInList appends model to the end when missing; never reorders existing entries.
cmd/opencodereview/config_cmd.go:660
↓ 5 callersMethodexecuteSubtask
executeSubtask performs the Plan Phase + Main Loop for a single file. It returns (completed, stop, err): a hard Go error (err) for provider/config/ctx
internal/agent/agent.go:1097
↓ 5 callersFunctionextractFilenameFromURL
extractFilenameFromURL returns the filename part (last path segment) of a URL pattern.
internal/release/asset_naming_test.go:57
↓ 5 callersMethodfindCustomIdx
(name string)
cmd/opencodereview/provider_tui.go:1299
↓ 5 callersFunctionfindMissingTranslations
(changedFiles)
scripts/github-actions/check-translation-sync.js:183
↓ 5 callersFunctiongetChangedFiles
(env, exec = execFileSync)
scripts/github-actions/check-translation-sync.js:224
↓ 5 callersFunctiongetCommitMessage
(repoDir, commit string)
cmd/opencodereview/git.go:27
↓ 5 callersFunctiongitOut
gitOut runs a git command in dir and returns its trimmed stdout, failing the test on error. Used to capture the SHAs a ResolveInput result must match.
internal/diff/git_resolve_test.go:17
↓ 5 callersFunctionhashFields
hashFields folds a sequence of string fields into one SHA-256 digest, writing an unambiguous 8-byte big-endian length prefix before each field so no t
internal/agent/agent.go:902
↓ 5 callersFunctioninitRepo
(t *testing.T)
internal/gitcmd/runner_test.go:17
↓ 5 callersFunctionisConfigReady
(config: OcrConfig | null)
extensions/vscode/src/shared/configUtils.ts:81
↓ 5 callersMethodisUserAddedModel
(name string)
cmd/opencodereview/provider_tui.go:2563
↓ 5 callersMethodisUserAddedOfficialModel
(name string)
cmd/opencodereview/provider_tui.go:467
↓ 5 callersFunctionloadDelegateContext
(opts delegateOptions)
cmd/opencodereview/delegate_cmd.go:95
↓ 5 callersMethodmanifestItemID
manifestItemID derives the content-independent item_id for a diff, keyed on operation, input mode and the normalized old/new paths. RegisterSelected a
internal/agent/agent.go:931
↓ 5 callersFunctionmergeBackground
mergeBackground combines the inline --background value (or an auto-populated commit message) with the content read from --background-file, separated b
cmd/opencodereview/background_file.go:37
↓ 5 callersMethodmodelCount
()
cmd/opencodereview/provider_tui.go:595
↓ 5 callersMethodofficialProviderActiveModel
(p llm.Provider)
cmd/opencodereview/provider_tui.go:210
↓ 5 callersFunctionparseShellRC
(path, modelOverride string)
internal/llm/resolver.go:572
↓ 5 callersMethodplanEnabled
planEnabled / dedupEnabled / summaryEnabled report whether each optional phase will actually run: template must define it AND the corresponding --no-*
internal/scan/agent.go:84
↓ 5 callersMethodpost_seq
Drive post() over a sequence of per-call fake_urlopen outcomes. Each outcome is either the raw response body (bytes, returned) or an
examples/gerrit_ci/post_review_test.py:561
↓ 5 callersFunctionreadRuleFileSafe
readRuleFileSafe reads and validates a rule file. It enforces extension whitelist (.md / .txt / .markdown), a 512 KB size cap, and resolves symlinks b
internal/config/rules/system_rules.go:579
↓ 5 callersFunctionrunSessionCommentsCompat
runSessionCommentsCompat provides test compatibility for old-style runSessionComments([]string{...}) calls.
cmd/opencodereview/compat_test.go:90
↓ 5 callersFunctionsanitizeTerminal
(s string)
cmd/opencodereview/output.go:231
↓ 5 callersFunctionsleep
(ms)
scripts/github-actions/post-review-comments.js:1055
↓ 5 callersFunctionsplitPaths
(raw string)
cmd/opencodereview/scan_cmd.go:93
↓ 5 callersFunctionunsetCustomProvider
(configPath, name string)
cmd/opencodereview/config_cmd.go:212
↓ 5 callersFunctionunsetMCPServer
(configPath, name string)
cmd/opencodereview/config_cmd.go:235
↓ 4 callersMethodAwaitKey
AwaitKey blocks until every unit submitted under key so far has completed. It never touches the pool-wide WaitGroup, so it is safe to call while other
internal/llmloop/pool.go:141
↓ 4 callersMethodCanonicalConfig
()
internal/config/rules/canonical_config_test.go:17
↓ 4 callersFunctionDefaultConfig
DefaultConfig returns a disabled default configuration.
internal/telemetry/config.go:32
↓ 4 callersMethodDiffs
()
cmd/opencodereview/shared.go:293
↓ 4 callersMethodHasInclude
HasInclude reports whether any include patterns are configured.
internal/config/rules/system_rules.go:217
↓ 4 callersMethodHasPersistence
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:224
↓ 4 callersFunctionIsReserved
IsReserved reports whether name matches any built-in tool name (including Unknown).
internal/tool/definitions.go:41
↓ 4 callersFunctionLoadComments
LoadComments replays one session's JSONL and returns every review comment recorded in it, in file-completion order. It mirrors resume replay semantics
internal/session/comments.go:17
↓ 4 callersFunctionLoadGitignorePatterns
LoadGitignorePatterns reads and parses .gitignore patterns from the given repository root. Returns nil if the file is missing or unreadable.
internal/diff/gitignore.go:17
↓ 4 callersFunctionNewRemoteClient
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:71
↓ 4 callersFunctionParseExtraHeaders
ParseExtraHeaders parses a string of comma-separated key=value pairs into a dictionary. Values may be double-quoted to include commas, e.g. X-Forwarde
internal/llm/resolver.go:668
↓ 4 callersFunctionPrintTraceSummary
PrintTraceSummary prints a one-line summary of the review to stdout.
internal/telemetry/events.go:72
↓ 4 callersMethodProjectSummary
ProjectSummary is the markdown project-level summary produced by scan's PROJECT_SUMMARY_TASK. Empty for review mode and for scans that skipped / faile
cmd/opencodereview/shared.go:304
↓ 4 callersFunctionRecordFilesReviewed
(ctx context.Context, n int64)
internal/telemetry/metrics.go:87
↓ 4 callersFunctionRecordToolResult
RecordToolResult sets the outcome of a tool execution on the span.
internal/telemetry/span.go:93
↓ 4 callersMethodRecordWarning
RecordWarning adds a non-fatal warning.
internal/llmloop/loop.go:92
↓ 4 callersMethodResumeInfo
ResumeInfo returns resume metadata for output. Nil means this was not a resume run.
internal/scan/agent.go:186
↓ 4 callersMethodSetExecution
SetExecution sets the non-secret execution provenance.
internal/session/manifest.go:398
↓ 4 callersMethodSetParentRunID
SetParentRunID links this run to the session it resumed from. It only records the direct parent; the parent's input is never copied into this run.
internal/session/manifest.go:361
↓ 4 callersMethodSetRepository
SetRepository sets the redacted repository identity.
internal/session/manifest.go:373
↓ 4 callersFunctionShutdown
Shutdown flushes and shuts down all initialized providers. It should be called before process exit to ensure buffered data is exported.
internal/telemetry/shutdown.go:15
↓ 4 callersFunctionToToolDef
ToToolDef converts an MCP tool definition to an llm.ToolDef.
internal/mcp/provider.go:70
↓ 4 callersMethodTotalInputTokens
TotalInputTokens returns the accumulated input/prompt tokens from all LLM calls.
internal/llmloop/loop.go:66
↓ 4 callersFunctionUseTestSessions
UseTestSessions redirects session persistence to the "test-sessions" subdirectory so that test runs do not pollute the real sessions store. It must b
internal/session/testing.go:11
↓ 4 callersFunctionWithinBase
WithinBase reports whether target is base itself or contained under base.
internal/pathutil/path.go:22
↓ 4 callersMethod_retry
(self, endpoint, data=None, method="GET")
examples/gitlab_ci/post_review.py:824
↓ 4 callersMethod_versions
(self, *triples)
examples/gitlab_ci/post_review_test.py:1306
← previousnext →301–400 of 3,747, ranked by callers