MCPcopy Create free account

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

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

↓ 373 callersMethodError
()
cmd/opencodereview/compat_test.go:73
↓ 150 callersFunctionnewProviderTUI
(cfg *Config, configPath string)
cmd/opencodereview/provider_tui.go:230
↓ 132 callersMethodRun
Run executes the full-scan pipeline: enumerate → filter → token-filter → dispatch one subtask per file → collect comments.
internal/scan/agent.go:208
↓ 91 callersMethodUpdate
(msg tea.Msg)
cmd/opencodereview/provider_tui.go:2688
↓ 65 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:105
↓ 61 callersFunctionNew
New creates a new SessionHistory with the given repo directory.
internal/session/history.go:109
↓ 54 callersMethodClose
()
internal/mcp/client.go:173
↓ 51 callersFunctiont
(locale: SupportedLocale, key: string)
extensions/vscode/src/shared/i18n.ts:317
↓ 49 callersFunctionResolveEndpoint
ResolveEndpoint reads from 4 strategy sources in priority order. Each strategy requires all three fields (URL, Token, Model) to be non-empty. Returns
internal/llm/resolver.go:61
↓ 47 callersFunctionNew
New creates a new Agent from the given arguments.
internal/agent/agent.go:152
↓ 47 callersFunctionclearAllEnv
--- Provider-based resolution tests ---
internal/llm/resolver_test.go:260
↓ 47 callersFunctionrun
({ result, stderr = "", opts = {}, githubOpts = {} })
scripts/github-actions/post-review-comments.test.js:358
↓ 46 callersFunctionNewCommentCollector
NewCommentCollector creates an empty collector.
internal/tool/comment_collector.go:17
↓ 41 callersFunctionNewRegistry
NewRegistry creates an empty, mutable registry.
internal/tool/definitions.go:82
↓ 41 callersFunctionsetConfigValue
(cfg *Config, key, value string)
cmd/opencodereview/config_cmd.go:349
↓ 39 callersMethodExecute
Execute runs the tool with the given arguments and returns the result string.
internal/tool/definitions.go:72
↓ 39 callersMethodView
()
cmd/opencodereview/provider_tui.go:2894
↓ 39 callersFunctioncaptureStdout
(t *testing.T, fn func())
cmd/opencodereview/output_helpers_test.go:375
↓ 36 callersFunctionNewCodeSearch
(fr *FileReader)
internal/tool/code_search.go:24
↓ 35 callersFunctionenterKey
()
cmd/opencodereview/provider_tui_test.go:19
↓ 34 callersMethodAdd
Add appends a comment to the collector.
internal/tool/comment_collector.go:22
↓ 32 callersFunctionsaveConfig
(path string, cfg *Config)
cmd/opencodereview/provider_cmd.go:385
↓ 31 callersFunctionmakeTemplateWithFullScan
()
internal/scan/agent_test.go:27
↓ 30 callersFunctionsetupTestRepo
(t *testing.T)
internal/tool/code_search_test.go:88
↓ 29 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:252
↓ 29 callersFunctionNewTextMessage
NewTextMessage creates a message with simple string content.
internal/llm/client.go:62
↓ 29 callersFunctionWriter
Writer returns the current stdout writer (real stdout or discard).
internal/stdout/stdout.go:15
↓ 29 callersMethodmodels
()
cmd/opencodereview/provider_tui.go:492
↓ 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:12
↓ 28 callersFunctionloadOrCreateConfig
(path string)
cmd/opencodereview/config_cmd.go:318
↓ 28 callersFunctionsetupEnabledTelemetry
(t *testing.T)
internal/telemetry/events_test.go:21
↓ 27 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:22
↓ 26 callersMethodGet
Get returns the provider registered under name.
internal/tool/definitions.go:95
↓ 24 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:107
↓ 24 callersFunctionsetMCPServerValue
(cfg *Config, key, value string)
cmd/opencodereview/config_cmd.go:633
↓ 23 callersMethodGetOrCreateFileSession
GetOrCreateFileSession returns the FileSession for the given file path, creating one if it doesn't exist yet.
internal/session/history.go:138
↓ 23 callersFunctiondKey
--- Delete custom provider tests ---
cmd/opencodereview/provider_tui_test.go:1079
↓ 23 callersFunctionuseT
()
extensions/vscode/src/webview/I18nProvider.tsx:7
↓ 23 callersFunctionwriteJSONL
(t *testing.T, path string, lines ...string)
internal/viewer/store_test.go:10
↓ 22 callersMethodResolve
(path string)
internal/config/rules/system_rules.go:17
↓ 22 callersFunctionmakeGithub
(opts = {})
scripts/github-actions/post-review-comments.test.js:98
↓ 21 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:22
↓ 21 callersFunctionmsg
(role, text string)
internal/llmloop/compression_test.go:10
↓ 21 callersMethodresult
()
cmd/opencodereview/provider_tui.go:1830
↓ 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:88
↓ 20 callersMethodloadExistingAPIKey
()
cmd/opencodereview/provider_tui.go:1796
↓ 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:341
↓ 19 callersFunctioncomment
One OCR comment as `ocr review --format json` emits it.
examples/gerrit_ci/post_review_test.py:31
↓ 19 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:276
↓ 19 callersMethodgitGrep
(ctx context.Context, searchText string, caseSensitive bool, usePerlRegexp bool, pathspec []string)
internal/tool/code_search.go:126
↓ 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 callersMethodComments
Comments returns all collected comments.
internal/tool/comment_collector.go:29
↓ 18 callersMethodContent
Content extracts the text content from the first choice, falling back to reasoning content.
internal/llm/client.go:150
↓ 18 callersFunctionLookupProvider
LookupProvider returns the preset provider by name. The returned Provider has its own copy of the Models slice.
internal/llm/providers.go:331
↓ 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:29
↓ 18 callersMethodRun
Run executes the full review pipeline: parse diffs -> plan per file -> LLM tool-loop -> collect comments.
internal/agent/agent.go:195
↓ 18 callersFunctioncomment
One OCR comment as ``ocr review --format json`` emits it.
examples/gitlab_ci/post_review_test.py:40
↓ 18 callersFunctionparseReviewFlags
parseReviewFlags provides test compatibility: parses args through a fresh cobra command instance and returns the resulting reviewOptions.
cmd/opencodereview/compat_test.go:7
↓ 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:472
↓ 17 callersFunctionNewRunner
NewRunner returns a Runner bound to the given dependencies.
internal/llmloop/loop.go:58
↓ 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:139
↓ 17 callersFunctionmockFs
(resultText, stderrText)
scripts/github-actions/post-review-comments.test.js:47
↓ 17 callersFunctionnewTestRunner
(client llm.LLMClient, tpl template.Template)
internal/llmloop/runner_test.go:81
↓ 17 callersFunctionrunPostReviewComments
({ github, context, core, fs, resultPath = "/tmp/ocr-result.json", stderrPath = "/tmp/ocr-stderr.l
scripts/github-actions/post-review-comments.js:66
↓ 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:224
↓ 16 callersMethodRegister
Register adds a tool provider. Panics if the registry is frozen.
internal/tool/definitions.go:87
↓ 16 callersMethoddisplayModels
()
cmd/opencodereview/provider_tui.go:2538
↓ 16 callersMethodpost_seq
Drive post() over a sequence of fake urlopen outcomes. Each outcome is either bytes (a response body), an HTTPError (raised), or a Fa
examples/gitlab_ci/post_review_test.py:338
↓ 15 callersMethodFinalize
Finalize marks the session as complete, sets the end time, and persists the final summary record.
internal/session/history.go:204
↓ 15 callersFunctionIsEnabled
IsEnabled returns true when telemetry has been initialized with exporters.
internal/telemetry/provider.go:70
↓ 15 callersMethodName
()
internal/mcp/client.go:151
↓ 15 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:61
↓ 15 callersFunctiongetHeadCommit
(t *testing.T, dir string)
internal/tool/code_search_test.go:116
↓ 15 callersFunctionloadBackgroundFile
(path string)
cmd/opencodereview/background_file.go:46
↓ 15 callersFunctionnewAgentForTest
(t *testing.T, tpl template.ScanTemplate)
internal/scan/agent_test.go:15
↓ 15 callersFunctionstripANSI
stripANSI removes ANSI escape sequences from a string so tests can assert against plain text content.
cmd/opencodereview/provider_tui_test.go:2550
↓ 15 callersFunctiontruncate
(s string, maxLen int)
internal/config/rules/system_rules_test.go:224
↓ 14 callersMethodItem
Item returns a copy of the checkpoint for fingerprint.
internal/session/resume.go:161
↓ 14 callersMethodSetError
SetError records an error for this task record, writes an llm_error entry to the JSONL stream, and increments the session-level LLM failure counter.
internal/session/history.go:335
↓ 14 callersFunctionescKey
()
cmd/opencodereview/provider_tui_test.go:15
↓ 14 callersFunctionhttp_error
Build an HTTPError suitable for mocking urlopen.
examples/gitlab_ci/post_review_test.py:73
↓ 14 callersFunctionmodelIdxForName
(t *testing.T, m providerTUIModel, name string)
cmd/opencodereview/provider_tui_test.go:1509
↓ 14 callersFunctionrightKey
()
cmd/opencodereview/provider_tui_test.go:27
↓ 14 callersFunctionwriteTestFile
(t *testing.T, dir, name, content string)
internal/tool/file_read_test.go:14
↓ 13 callersMethodCompletedCount
CompletedCount returns the number of reusable file-level checkpoints.
internal/session/resume.go:153
↓ 13 callersFunctionCountTokens
(text string)
internal/llm/client.go:269
↓ 13 callersMethodFreeze
Freeze prevents further mutations. Call once setup is complete.
internal/tool/definitions.go:101
↓ 13 callersFunctionLoadSession
LoadSession fully parses a JSONL file into a ViewSession.
internal/viewer/store.go:290
↓ 13 callersFunctionNewOpenAIClient
NewOpenAIClient creates a new OpenAI-compatible LLM client.
internal/llm/client.go:300
↓ 13 callersMethodValidateOptions
ValidateOptions verifies that the requested review range matches the prior session.
internal/session/resume.go:174
↓ 13 callersFunctionbuild
(comments, **extra)
examples/gerrit_ci/post_review_test.py:43
↓ 13 callersMethodcurrentProvider
()
cmd/opencodereview/provider_tui.go:380
↓ 13 callersFunctionrun_publish
Helper: run publish() with a Recorder and no-op sleep.
examples/gitlab_ci/post_review_test.py:193
↓ 13 callersMethodset
(key: string, value: string)
extensions/vscode/src/extension/services/ConfigService.ts:85
↓ 13 callersFunctionuseTranslation
()
pages/src/i18n/context.tsx:63
↓ 12 callersMethodGetDiff
GetDiff returns all changes as parsed model.Diff structs.
internal/diff/git.go:112
↓ 12 callersFunctionNewAnthropicClient
NewAnthropicClient creates a new Anthropic Messages API client.
internal/llm/client.go:582
↓ 12 callersFunctionNewCommentWorkerPool
NewCommentWorkerPool creates a pool with the given concurrency limit. workerCount <= 0 defaults to 8.
internal/llmloop/pool.go:49
↓ 12 callersMethodRead
Read returns the full content of a file path (relative to RepoDir), resolved according to the active review mode. - Workspace: reads directly from the
internal/tool/filereader.go:68
↓ 12 callersFunctionlog
(msg)
scripts/github-actions/post-review-comments.js:85
next →1–100 of 3,095, ranked by callers