MCPcopy Create free account

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

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

↓ 206 callersMethodRun
Run executes the full-scan pipeline: enumerate → filter → token-filter → dispatch one subtask per file → collect comments.
internal/scan/agent.go:299
↓ 169 callersFunctionnewProviderTUI
(cfg *Config, configPath string)
cmd/opencodereview/provider_tui.go:233
↓ 95 callersMethodUpdate
(msg tea.Msg)
cmd/opencodereview/provider_tui.go:2698
↓ 87 callersFunctionNew
New creates a new SessionHistory with the given repo directory.
internal/session/history.go:150
↓ 74 callersMethodString
String renders a one-line human-readable estimate. Money is intentionally omitted — pricing varies per provider/model and we don't want to imply a pre
internal/scan/estimate.go:108
↓ 68 callersMethodClose
()
internal/mcp/client.go:176
↓ 62 callersFunctionNewCommentCollector
NewCommentCollector creates an empty collector.
internal/tool/comment_collector.go:20
↓ 62 callersFunctionclearAllEnv
--- Provider-based resolution tests ---
internal/llm/resolver_test.go:264
↓ 60 callersFunctionNewRegistry
NewRegistry creates an empty, mutable registry.
internal/tool/definitions.go:85
↓ 57 callersFunctionResolveEndpoint
ResolveEndpoint resolves an endpoint without per-run overrides.
internal/llm/resolver.go:70
↓ 56 callersFunctioncaptureStdout
(t *testing.T, fn func())
cmd/opencodereview/output_helpers_test.go:383
↓ 54 callersFunctionNew
New creates a new Agent from the given arguments.
internal/agent/agent.go:190
↓ 51 callersFunctiont
(locale: SupportedLocale, key: string)
extensions/vscode/src/shared/i18n.ts:320
↓ 48 callersFunctionrun
({ result, stderr = "", opts = {}, githubOpts = {} })
scripts/github-actions/post-review-comments.test.js:362
↓ 47 callersFunctionsetConfigValue
(cfg *Config, key, value string)
cmd/opencodereview/config_cmd.go:403
↓ 45 callersMethodExecute
Execute runs the tool with the given arguments and returns the result string.
internal/tool/definitions.go:75
↓ 44 callersFunctioncomment
One OCR comment as ``ocr review --format json`` emits it.
examples/gitlab_ci/post_review_test.py:40
↓ 42 callersMethodAdd
Add appends a comment to the collector.
internal/tool/comment_collector.go:25
↓ 39 callersMethodFinalize
Finalize marks the session as complete, sets the end time, and persists the final summary record. When a frozen manifest was stored via SetFinalManife
internal/session/history.go:308
↓ 39 callersMethodView
()
cmd/opencodereview/provider_tui.go:2904
↓ 37 callersFunctionNewCodeSearch
(fr *FileReader)
internal/tool/code_search.go:27
↓ 36 callersFunctionenterKey
()
cmd/opencodereview/provider_tui_test.go:22
↓ 36 callersFunctionsaveConfig
(path string, cfg *Config)
cmd/opencodereview/provider_cmd.go:388
↓ 34 callersFunctionmakeTemplateWithFullScan
()
internal/scan/agent_test.go:30
↓ 32 callersFunctionNewRunner
NewRunner returns a Runner bound to the given dependencies.
internal/llmloop/loop.go:61
↓ 32 callersFunctionNewTextMessage
NewTextMessage creates a message with simple string content.
internal/llm/client.go:68
↓ 32 callersFunctionloadOrCreateConfig
(path string)
cmd/opencodereview/config_cmd.go:346
↓ 31 callersFunctionNewResolver
NewResolver builds a Resolver with the following priority: 1. Custom rule file specified via --rule flag (first match wins) 2. Project-local .opencode
internal/config/rules/system_rules.go:268
↓ 30 callersMethodGet
Get returns the provider registered under name.
internal/tool/definitions.go:98
↓ 30 callersFunctionWriter
Writer returns the current stdout writer (real stdout or discard).
internal/stdout/stdout.go:18
↓ 30 callersFunctionsetupTestRepo
(t *testing.T)
internal/tool/code_search_test.go:104
↓ 29 callersMethodmodels
()
cmd/opencodereview/provider_tui.go:495
↓ 29 callersFunctionsetupEnabledTelemetry
(t *testing.T)
internal/telemetry/events_test.go:24
↓ 28 callersFunctionNew
New creates a Runner that allows at most maxConcurrent simultaneous git subprocesses. If maxConcurrent <= 0 the default (16) is used.
internal/gitcmd/runner.go:25
↓ 28 callersFunctionResolveLineNumbers
ResolveLineNumbers populates StartLine/EndLine on each comment by matching the ExistingCode against the corresponding file's diff hunks (primary), or
internal/diff/resolver.go:15
↓ 28 callersFunctioninitTestGitRepo
(t *testing.T)
cmd/opencodereview/git_test.go:14
↓ 28 callersFunctionnewBuilderWith
newBuilderWith registers a set of selected items on a fresh builder and sets a valid input mode so Finalize passes the mandatory-mode check.
internal/session/manifest_test.go:22
↓ 28 callersFunctionwriteJSONL
(t *testing.T, path string, lines ...string)
internal/viewer/store_test.go:13
↓ 27 callersFunctionmustFinalize
mustFinalize finalizes and fails the test on an unexpected validation error.
internal/session/manifest_test.go:34
↓ 26 callersMethodMarkCompleted
MarkCompleted records that the item's subtask completed. Whether it produced comments does not affect completion.
internal/session/manifest.go:691
↓ 26 callersFunctionNewAgent
NewAgent creates a scan Agent from the given args. The Session is auto-created (review_mode = full_scan) when not supplied.
internal/scan/agent.go:118
↓ 26 callersFunctionemitRunResult
emitRunResult is the post-LLM-run finalization shared by `ocr review` and `ocr scan`: resolves comment line numbers, records telemetry, restores stdou
cmd/opencodereview/shared.go:334
↓ 26 callersFunctionsetMCPServerValue
(cfg *Config, key, value string)
cmd/opencodereview/config_cmd.go:711
↓ 25 callersMethodFreeze
Freeze prevents further mutations. Call once setup is complete.
internal/tool/definitions.go:104
↓ 25 callersMethodRegister
Register adds a tool provider. Panics if the registry is frozen.
internal/tool/definitions.go:90
↓ 25 callersMethodRun
Run executes the full review pipeline: parse diffs -> plan per file -> LLM tool-loop -> collect comments.
internal/agent/agent.go:235
↓ 24 callersFunctiondKey
--- Delete custom provider tests ---
cmd/opencodereview/provider_tui_test.go:1138
↓ 23 callersMethodComments
Comments returns all collected comments.
internal/tool/comment_collector.go:32
↓ 23 callersMethodGetOrCreateFileSession
GetOrCreateFileSession returns the FileSession for the given file path, creating one if it doesn't exist yet.
internal/session/history.go:235
↓ 23 callersMethodName
()
internal/mcp/client.go:154
↓ 23 callersFunctionmsg
(role, text string)
internal/llmloop/compression_test.go:13
↓ 23 callersFunctionuseT
()
extensions/vscode/src/webview/I18nProvider.tsx:10
↓ 22 callersMethodRecordReviewItemDone
RecordReviewItemDone persists the file-level checkpoint used by resume.
internal/session/history.go:252
↓ 22 callersMethodResolve
(path string)
internal/config/rules/system_rules.go:20
↓ 22 callersFunctionStartSpan
StartSpan creates a new span from the given context. When telemetry is not enabled, it returns a no-op span so callers can safely defer .End().
internal/telemetry/span.go:25
↓ 22 callersFunctionmakeGithub
(opts = {})
scripts/github-actions/post-review-comments.test.js:102
↓ 22 callersFunctionparseReviewFlags
parseReviewFlags provides test compatibility: parses args through a fresh cobra command instance and returns the resulting reviewOptions.
cmd/opencodereview/compat_test.go:10
↓ 21 callersMethodContent
Content extracts the text content from the first choice, falling back to reasoning content.
internal/llm/client.go:156
↓ 21 callersFunctionLookupProvider
LookupProvider returns the preset provider by name. The returned Provider has its own copy of the Models slice.
internal/llm/providers.go:410
↓ 21 callersMethodresult
()
cmd/opencodereview/provider_tui.go:1840
↓ 21 callersFunctionrun_publish
Helper: run publish() with a Recorder and no-op sleep.
examples/gitlab_ci/post_review_test.py:205
↓ 20 callersMethodExtractText
ExtractText returns the concatenated text content from a Message's Content field. Handles both plain string and content block array formats.
internal/llm/client.go:94
↓ 20 callersMethodgitGrep
(ctx context.Context, searchText string, caseSensitive bool, usePerlRegexp bool, pathspec []string)
internal/tool/code_search.go:136
↓ 20 callersMethodloadExistingAPIKey
()
cmd/opencodereview/provider_tui.go:1806
↓ 19 callersFunctionListProviders
ListProviders returns all built-in providers sorted by provider name. Each returned Provider has its own copy of the Models slice in registry order.
internal/llm/providers.go:420
↓ 19 callersFunctioncomment
One OCR comment as `ocr review --format json` emits it.
examples/gerrit_ci/post_review_test.py:31
↓ 19 callersMethoddispatchSubtasks
dispatchSubtasks runs the Plan + Main phases for each changed file concurrently.
internal/agent/agent.go:490
↓ 19 callersMethodrun_main
(self, argv=(), env=BASE_ENV, result=SAMPLE_RESULT, outcomes=None, input_args=None)
examples/gerrit_ci/post_review_test.py:304
↓ 18 callersFunctionNewOpenAIClient
NewOpenAIClient creates a new OpenAI-compatible LLM client.
internal/llm/client.go:342
↓ 18 callersFunctionNewOpenAIResponsesClient
NewOpenAIResponsesClient creates a client for the OpenAI Responses API. URL normalization mirrors NewOpenAIClient: cfg.URL is forced to end in respons
internal/llm/responses_client.go:32
↓ 18 callersFunctionresolveRuleEntries
resolveRuleEntries scans each entry's Rule field. When the value looks like a file path, it reads the file content and replaces the Rule. Absolute pat
internal/config/rules/system_rules.go:518
↓ 17 callersFunctionModelListContains
ModelListContains reports whether target matches any entry in models (trimmed).
internal/llm/resolver.go:627
↓ 17 callersMethodReadLines
ReadLines returns a window of lines from the file plus the total line count. startLine is 1-based; maxLines is the maximum number of lines to collect.
internal/tool/filereader.go:142
↓ 17 callersFunctionescKey
()
cmd/opencodereview/provider_tui_test.go:18
↓ 17 callersFunctionmockFs
(resultText, stderrText)
scripts/github-actions/post-review-comments.test.js:51
↓ 17 callersFunctionnewTestRunner
(client llm.LLMClient, tpl template.Template)
internal/llmloop/runner_test.go:84
↓ 17 callersFunctionrunPostReviewComments
({ github, context, core, fs, resultPath = "/tmp/ocr-result.json", stderrPath = "/tmp/ocr-stderr.l
scripts/github-actions/post-review-comments.js:69
↓ 16 callersMethodAppendTaskRecord
AppendTaskRecord adds a new task record to the file session for the given file path and task type. It auto-assigns the RequestNo based on existing rec
internal/session/history.go:341
↓ 16 callersMethodCompletedCount
CompletedCount returns the number of reusable file-level checkpoints.
internal/session/resume.go:165
↓ 16 callersMethodCompletionsWithCtx
CompletionsWithCtx sends a chat completion request with context support for cancellation and timeout.
internal/llm/client.go:384
↓ 16 callersMethodItem
Item returns a copy of the checkpoint for fingerprint.
internal/session/resume.go:173
↓ 16 callersFunctionLoadSession
LoadSession fully parses a JSONL file into a ViewSession.
internal/viewer/store.go:311
↓ 16 callersMethodMarkFailed
MarkFailed records that the item failed. class must be a valid, specific failure class — an empty or unknown-string class is rejected rather than down
internal/session/manifest.go:704
↓ 16 callersMethodRunPerFile
RunPerFile drives the main LLM conversation loop for a single file. It sends messages with the configured tool definitions, executes any tool calls re
internal/llmloop/loop.go:177
↓ 16 callersMethodSetInput
SetInput sets the frozen, resolved input identity (including the mandatory Mode). Finalize rejects an invalid or missing Mode.
internal/session/manifest.go:386
↓ 16 callersMethodSince
Since returns a copy of all comments stored at index ≥ start. Returns nil when no new comments have been added since the snapshot.
internal/tool/comment_collector.go:64
↓ 16 callersMethodcall
Drive a poster method over a sequence of fake urlopen outcomes.
examples/gitlab_ci/post_review_test.py:771
↓ 16 callersMethoddisplayModels
()
cmd/opencodereview/provider_tui.go:2548
↓ 16 callersFunctionparseScanFlags
parseScanFlags provides test compatibility: parses args through a fresh cobra command instance and returns the resulting scanOptions.
cmd/opencodereview/compat_test.go:38
↓ 16 callersFunctionrunGitTest
runGitTest runs a git command in dir and fails the test on error.
internal/diff/git_test.go:19
↓ 15 callersFunctionIsEnabled
IsEnabled returns true when telemetry has been initialized with exporters.
internal/telemetry/provider.go:73
↓ 15 callersMethodcurrentProvider
()
cmd/opencodereview/provider_tui.go:383
↓ 15 callersFunctiongetHeadCommit
(t *testing.T, dir string)
internal/tool/code_search_test.go:132
↓ 15 callersFunctionhttp_error
Build an HTTPError suitable for mocking urlopen.
examples/gitlab_ci/post_review_test.py:79
↓ 15 callersFunctionloadBackgroundFile
(path string)
cmd/opencodereview/background_file.go:49
↓ 15 callersFunctionnewAgentForTest
(t *testing.T, tpl template.ScanTemplate)
internal/scan/agent_test.go:18
↓ 15 callersFunctionstripANSI
stripANSI removes ANSI escape sequences from a string so tests can assert against plain text content.
cmd/opencodereview/provider_tui_test.go:2609
↓ 15 callersFunctiontruncate
(s string, maxLen int)
internal/config/rules/system_rules_test.go:232
↓ 14 callersFunctionNewAnthropicClient
NewAnthropicClient creates a new Anthropic Messages API client.
internal/llm/client.go:644
↓ 14 callersFunctionNewCommentWorkerPool
NewCommentWorkerPool creates a pool with the given concurrency limit. workerCount <= 0 defaults to 8.
internal/llmloop/pool.go:52
next →1–100 of 3,747, ranked by callers