Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
2,775 in github.com/alibaba/open-code-review
⨍
Functions
2,775
◇
Types & classes
260
↓ 150 callers
Function
newProviderTUI
(cfg *Config, configPath string)
cmd/opencodereview/provider_tui.go:230
↓ 123 callers
Method
Run
Run executes the full-scan pipeline: enumerate → filter → token-filter → dispatch one subtask per file → collect comments.
internal/scan/agent.go:200
↓ 91 callers
Method
Update
(msg tea.Msg)
cmd/opencodereview/provider_tui.go:2688
↓ 66 callers
Method
String
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
↓ 60 callers
Function
New
New creates a new SessionHistory with the given repo directory.
internal/session/history.go:109
↓ 50 callers
Function
t
(locale: SupportedLocale, key: string)
extensions/vscode/src/shared/i18n.ts:317
↓ 49 callers
Function
ResolveEndpoint
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 callers
Function
captureStdout
(t *testing.T, fn func())
cmd/opencodereview/output_helpers_test.go:374
↓ 47 callers
Function
clearAllEnv
--- Provider-based resolution tests ---
internal/llm/resolver_test.go:260
↓ 46 callers
Method
Close
()
internal/mcp/client.go:85
↓ 44 callers
Function
New
New creates a new Agent from the given arguments.
internal/agent/agent.go:147
↓ 43 callers
Function
NewCommentCollector
NewCommentCollector creates an empty collector.
internal/tool/comment_collector.go:17
↓ 41 callers
Function
setConfigValue
(cfg *Config, key, value string)
cmd/opencodereview/config_cmd.go:274
↓ 39 callers
Method
View
()
cmd/opencodereview/provider_tui.go:2894
↓ 38 callers
Function
NewRegistry
NewRegistry creates an empty, mutable registry.
internal/tool/definitions.go:82
↓ 36 callers
Function
NewCodeSearch
(fr *FileReader)
internal/tool/code_search.go:24
↓ 35 callers
Function
enterKey
()
cmd/opencodereview/provider_tui_test.go:19
↓ 34 callers
Method
Add
Add appends a comment to the collector.
internal/tool/comment_collector.go:22
↓ 32 callers
Method
Execute
Execute runs the tool with the given arguments and returns the result string.
internal/tool/definitions.go:72
↓ 31 callers
Function
run
({ result, stderr = "", opts = {}, githubOpts = {} })
scripts/github-actions/post-review-comments.test.js:262
↓ 30 callers
Function
makeTemplateWithFullScan
()
internal/scan/agent_test.go:27
↓ 30 callers
Function
setupTestRepo
(t *testing.T)
internal/tool/code_search_test.go:88
↓ 29 callers
Function
Writer
Writer returns the current stdout writer (real stdout or discard).
internal/stdout/stdout.go:15
↓ 29 callers
Method
models
()
cmd/opencodereview/provider_tui.go:492
↓ 29 callers
Function
saveConfig
(path string, cfg *Config)
cmd/opencodereview/provider_cmd.go:385
↓ 28 callers
Function
ResolveLineNumbers
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 callers
Function
setupEnabledTelemetry
(t *testing.T)
internal/telemetry/events_test.go:21
↓ 27 callers
Function
New
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 callers
Function
NewTextMessage
NewTextMessage creates a message with simple string content.
internal/llm/client.go:62
↓ 25 callers
Function
NewResolver
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
↓ 25 callers
Function
loadOrCreateConfig
(path string)
cmd/opencodereview/config_cmd.go:243
↓ 23 callers
Method
Get
Get returns the provider registered under name.
internal/tool/definitions.go:95
↓ 23 callers
Method
GetOrCreateFileSession
GetOrCreateFileSession returns the FileSession for the given file path, creating one if it doesn't exist yet.
internal/session/history.go:138
↓ 23 callers
Function
NewAgent
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
↓ 23 callers
Function
dKey
--- Delete custom provider tests ---
cmd/opencodereview/provider_tui_test.go:1079
↓ 23 callers
Function
useT
()
extensions/vscode/src/webview/I18nProvider.tsx:7
↓ 22 callers
Method
Resolve
(path string)
internal/config/rules/system_rules.go:17
↓ 22 callers
Function
writeJSONL
(t *testing.T, path string, lines ...string)
internal/viewer/store_test.go:10
↓ 21 callers
Function
StartSpan
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 callers
Function
msg
(role, text string)
internal/llmloop/compression_test.go:10
↓ 21 callers
Method
result
()
cmd/opencodereview/provider_tui.go:1830
↓ 20 callers
Method
ExtractText
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 callers
Method
loadExistingAPIKey
()
cmd/opencodereview/provider_tui.go:1796
↓ 19 callers
Function
ListProviders
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 callers
Function
comment
One OCR comment as `ocr review --format json` emits it.
examples/gerrit_ci/post_review_test.py:31
↓ 19 callers
Method
gitGrep
(ctx context.Context, searchText string, caseSensitive bool, usePerlRegexp bool, pathspec []string)
internal/tool/code_search.go:126
↓ 19 callers
Method
run_main
(self, argv=(), env=BASE_ENV, result=SAMPLE_RESULT, outcomes=None, input_args=None)
examples/gerrit_ci/post_review_test.py:304
↓ 18 callers
Method
Comments
Comments returns all collected comments.
internal/tool/comment_collector.go:29
↓ 18 callers
Function
NewOpenAIResponsesClient
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 callers
Method
Run
Run executes the full review pipeline: parse diffs -> plan per file -> LLM tool-loop -> collect comments.
internal/agent/agent.go:190
↓ 18 callers
Function
resolveRuleEntries
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 callers
Method
Content
Content extracts the text content from the first choice, falling back to reasoning content.
internal/llm/client.go:150
↓ 17 callers
Function
LookupProvider
LookupProvider returns the preset provider by name. The returned Provider has its own copy of the Models slice.
internal/llm/providers.go:331
↓ 17 callers
Method
ReadLines
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 callers
Function
newTestRunner
(client llm.LLMClient, tpl template.Template)
internal/llmloop/runner_test.go:81
↓ 17 callers
Function
parseReviewFlags
(args []string)
cmd/opencodereview/flags.go:119
↓ 16 callers
Method
AppendTaskRecord
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 callers
Method
Register
Register adds a tool provider. Panics if the registry is frozen.
internal/tool/definitions.go:87
↓ 16 callers
Method
displayModels
()
cmd/opencodereview/provider_tui.go:2538
↓ 15 callers
Method
Finalize
Finalize marks the session as complete, sets the end time, and persists the final summary record.
internal/session/history.go:204
↓ 15 callers
Function
IsEnabled
IsEnabled returns true when telemetry has been initialized with exporters.
internal/telemetry/provider.go:70
↓ 15 callers
Function
emitRunResult
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:271
↓ 15 callers
Function
getHeadCommit
(t *testing.T, dir string)
internal/tool/code_search_test.go:116
↓ 15 callers
Function
loadBackgroundFile
(path string)
cmd/opencodereview/background_file.go:46
↓ 15 callers
Function
newAgentForTest
(t *testing.T, tpl template.ScanTemplate)
internal/scan/agent_test.go:15
↓ 15 callers
Function
setMCPServerValue
(cfg *Config, key, value string)
cmd/opencodereview/config_cmd.go:558
↓ 15 callers
Function
stripANSI
stripANSI removes ANSI escape sequences from a string so tests can assert against plain text content.
cmd/opencodereview/provider_tui_test.go:2550
↓ 14 callers
Method
Name
()
internal/mcp/client.go:63
↓ 14 callers
Function
NewRunner
NewRunner returns a Runner bound to the given dependencies.
internal/llmloop/loop.go:58
↓ 14 callers
Method
SetError
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 callers
Method
Since
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
↓ 14 callers
Function
escKey
()
cmd/opencodereview/provider_tui_test.go:15
↓ 14 callers
Function
modelIdxForName
(t *testing.T, m providerTUIModel, name string)
cmd/opencodereview/provider_tui_test.go:1509
↓ 14 callers
Function
rightKey
()
cmd/opencodereview/provider_tui_test.go:27
↓ 14 callers
Function
truncate
(s string, maxLen int)
internal/config/rules/system_rules_test.go:211
↓ 14 callers
Function
writeTestFile
(t *testing.T, dir, name, content string)
internal/tool/file_read_test.go:14
↓ 13 callers
Function
NewOpenAIClient
NewOpenAIClient creates a new OpenAI-compatible LLM client.
internal/llm/client.go:300
↓ 13 callers
Function
build
(comments, **extra)
examples/gerrit_ci/post_review_test.py:43
↓ 13 callers
Method
currentProvider
()
cmd/opencodereview/provider_tui.go:380
↓ 13 callers
Function
parseScanFlags
(args []string)
cmd/opencodereview/scan_cmd.go:47
↓ 12 callers
Method
GetDiff
GetDiff returns all changes as parsed model.Diff structs.
internal/diff/git.go:110
↓ 12 callers
Function
LoadSession
LoadSession fully parses a JSONL file into a ViewSession.
internal/viewer/store.go:263
↓ 12 callers
Function
NewCommentWorkerPool
NewCommentWorkerPool creates a pool with the given concurrency limit. workerCount <= 0 defaults to 8.
internal/llmloop/pool.go:50
↓ 12 callers
Method
Parse
(arguments []string)
cmd/opencodereview/flags.go:65
↓ 12 callers
Method
Read
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 callers
Function
modelTUIIdxForName
(t *testing.T, m modelTUIModel, name string)
cmd/opencodereview/provider_tui_funcs_test.go:1024
↓ 12 callers
Function
newModelTUI
newModelTUI builds a model-only TUI for tests. It has no config path or existing config, so add/delete/persist operations are unavailable — use newMod
cmd/opencodereview/provider_tui.go:2481
↓ 12 callers
Function
resolveLocale
(raw: string)
extensions/vscode/src/shared/i18n.ts:327
↓ 12 callers
Method
set
(key: string, value: string)
extensions/vscode/src/extension/services/ConfigService.ts:85
↓ 12 callers
Function
useTranslation
()
pages/src/i18n/context.tsx:58
↓ 11 callers
Method
CompletionsWithCtx
CompletionsWithCtx sends a chat completion request with context support for cancellation and timeout.
internal/llm/client.go:339
↓ 11 callers
Function
CountTokens
(text string)
internal/llm/client.go:269
↓ 11 callers
Function
ModelListContains
ModelListContains reports whether target matches any entry in models (trimmed).
internal/llm/resolver.go:568
↓ 11 callers
Function
NewAnthropicClient
NewAnthropicClient creates a new Anthropic Messages API client.
internal/llm/client.go:573
↓ 11 callers
Function
NormalizeAuthHeader
NormalizeAuthHeader normalizes an auth header value to a canonical form. It returns an error for unrecognized values.
internal/llm/resolver.go:580
↓ 11 callers
Function
SetAttr
SetAttr sets a single attribute on a span.
internal/telemetry/span.go:63
↓ 11 callers
Function
cm
(path, content string)
internal/tool/comment_collector_test.go:9
↓ 11 callers
Function
collectCustomProviders
(cfg *Config)
cmd/opencodereview/provider_tui.go:218
↓ 11 callers
Function
http_error
(code, body=b"", reason="error")
examples/gerrit_ci/post_review_test.py:271
↓ 11 callers
Function
officialConfigModelTUI
(t *testing.T, configPath string, extraModels []string)
cmd/opencodereview/provider_tui_funcs_test.go:939
next →
1–100 of 2,775, ranked by callers