Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
7,390 in github.com/alibaba/open-code-review
⨍
Functions
7,390
◇
Types & classes
806
↓ 7 callers
Method
Close
Close closes the capture file.
internal/session/raw_writer.go:116
↓ 7 callers
Method
CollectPendingComments
CollectPendingComments awaits any async comment-processing workers and returns the aggregated comments from the collector. Safe to call once per sessi
internal/reviewtask/task.go:129
↓ 7 callers
Function
DeleteSession
DeleteSession removes one persisted session for a repository.
internal/session/delete.go:82
↓ 7 callers
Function
DiscoverRepos
DiscoverRepos walks the sessions root and returns one entry per subdirectory.
internal/viewer/store.go:45
↓ 7 callers
Function
ErrorEvent
ErrorEvent emits an error event with error status.
internal/telemetry/events.go:38
↓ 7 callers
Method
Finalize
Finalize performs the hard-validated close of the run and returns the immutable manifest. In order it: sweeps any item still selected into failed (col
internal/session/manifest.go:801
↓ 7 callers
Function
FindSessionsByID
FindSessionsByID returns every session file matching an id, in any repository.
internal/session/delete.go:169
↓ 7 callers
Method
Host
(ctx context.Context)
internal/chatgptauth/store.go:202
↓ 7 callers
Method
Init
()
cmd/opencodereview/provider_tui.go:2894
↓ 7 callers
Function
IsPathExcluded
IsPathExcluded returns true when relPath matches any of the supplied gitignore-style patterns or any default excluded directory prefix (see ExcludedDi
internal/diff/gitignore.go:73
↓ 7 callers
Method
IsUserExcluded
IsUserExcluded reports whether the given path matches any user exclude pattern. The check is case-insensitive: both path and pattern are lowercased.
internal/config/rules/system_rules.go:233
↓ 7 callers
Function
LoadAppConfig
LoadAppConfig loads config from path. Returns nil, nil if file does not exist.
cmd/opencodereview/config_cmd.go:586
↓ 7 callers
Function
LoadBehaviorDefault
()
internal/config/template/behavior.go:22
↓ 7 callers
Function
NewRawFileWriter
NewRawFileWriter opens (creating if needed) the raw capture file for sessionID under repoDir's encoded raw directory. Directories are created 0700 and
internal/session/raw_writer.go:49
↓ 7 callers
Function
NewStub
(t Tool)
internal/tool/stub.go:14
↓ 7 callers
Function
NewToolResultMessage
NewToolResultMessage creates a tool-role message with the given result. Uses the OpenAI Chat Completions format: role="tool" with tool_call_id and pla
internal/llm/client.go:240
↓ 7 callers
Function
ParseHunks
ParseHunks parses raw unified diff text for a single file into a slice of Hunks. Lines before the first @@ header (file-level headers like "diff --git
internal/diff/hunk.go:70
↓ 7 callers
Function
RecordFilesReviewed
(ctx context.Context, n int64)
internal/telemetry/metrics.go:93
↓ 7 callers
Method
SetExecution
SetExecution sets the non-secret execution provenance.
internal/session/manifest.go:418
↓ 7 callers
Method
SetRepository
SetRepository sets the redacted repository identity.
internal/session/manifest.go:393
↓ 7 callers
Function
Shutdown
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
↓ 7 callers
Method
Snapshot
()
internal/chatgptauth/store.go:125
↓ 7 callers
Method
Tools
()
internal/mcp/client.go:185
↓ 7 callers
Method
TotalCacheReadTokens
()
cmd/opencodereview/shared.go:772
↓ 7 callers
Method
TotalCacheWriteTokens
()
cmd/opencodereview/shared.go:773
↓ 7 callers
Method
TotalInputTokens
TotalInputTokens returns the accumulated input/prompt tokens from all LLM calls.
internal/llmloop/loop.go:113
↓ 7 callers
Method
ValidateResume
ValidateResume reports whether req may reuse this parent's checkpoints. A mismatch on any input field rejects the whole resume rather than degrading
internal/session/resume_identity.go:52
↓ 7 callers
Function
ValidateSessionID
ValidateSessionID rejects ids that are not a single path element.
internal/session/delete.go:28
↓ 7 callers
Function
activeModelForProvider
(cfg *Config, providerName string, entry ProviderEntry)
cmd/opencodereview/config_cmd.go:954
↓ 7 callers
Function
aliasGit
aliasGit configures a git alias so the spawned descendant inherits git's own stdout descriptor directly. A clean/smudge filter is NOT usable here: gi
internal/gitcmd/runner_pipe_test.go:25
↓ 7 callers
Function
applyCustomProviderConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:157
↓ 7 callers
Method
applySessionStart
(rec resumeRecord)
internal/session/resume.go:193
↓ 7 callers
Method
await
(ctx context.Context, deadline time.Time, cmd *exec.Cmd, waited <-chan error)
acp/internal/orchestrator/runner.go:229
↓ 7 callers
Function
classifyCommentAgainstDiff
(item, diff)
scripts/github-actions/post-review-comments.js:2837
↓ 7 callers
Method
clear
Clear all comments and highlights. */
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/providers/CommentService.kt:201
↓ 7 callers
Function
customConfigModelTUI
(t *testing.T, configPath string, models []string)
cmd/opencodereview/provider_tui_funcs_test.go:1085
↓ 7 callers
Function
decodeReview
(t *testing.T, stdout string)
acp/internal/contract/mock_contract_test.go:77
↓ 7 callers
Function
dispatch
(ctx context.Context, a acp.Agent, method string, params json.RawMessage)
acp/internal/adapter/transport/dispatch.go:14
↓ 7 callers
Function
handleRepos
(w http.ResponseWriter, r *http.Request, root string)
internal/viewer/handler.go:16
↓ 7 callers
Function
handleSession
(w http.ResponseWriter, r *http.Request, root, repo, sessionID string)
internal/viewer/handler.go:85
↓ 7 callers
Function
initRepoWithChange
initRepoWithChange creates a real git repository with one committed file and an uncommitted working-tree modification, returning the repo dir. There i
internal/diff/git_test.go:50
↓ 7 callers
Function
installStep
()
scripts/github-actions/action-contract.test.js:220
↓ 7 callers
Method
jwt
()
internal/chatgptauth/auth_test.go:173
↓ 7 callers
Function
loadLLMRuntime
loadLLMRuntime reads the app config from the user's default config path (applying the configured language to tpl — defaulting when the config file is
cmd/opencodereview/shared.go:237
↓ 7 callers
Function
markdownLabel
(text string)
acp/internal/adapter/presentation/markdown.go:12
↓ 7 callers
Function
newErrorFixtureClient
These tests cover issue #1042. The SDK extracts an error payload with the gjson path "error", which does not match when a provider array-wraps its err
internal/llm/provider_error_test.go:24
↓ 7 callers
Function
parentState
parentState builds a resumable parent: a v1 review manifest whose identity is parentIdentity, run on anthropic/claude, with one selected item. mutate
internal/session/resume_identity_test.go:27
↓ 7 callers
Function
parseRawConfig
Parses the config file text; blank input or invalid JSON yields an empty draft (semantically "no configuration" for callers). */
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/ConfigDraft.kt:29
↓ 7 callers
Function
peekSession
peekSession reads the first record, all review_item records (for comment count), and the last record of a JSONL file.
internal/viewer/store.go:154
↓ 7 callers
Method
post
(ctx context.Context, rawURL string, body any, headers map[string]string)
acp/internal/intent/llm/client.go:203
↓ 7 callers
Method
repoRoot
()
extensions/vscode/src/extension/services/GitService.ts:261
↓ 7 callers
Function
resolveOutdatedThreads
({ github, owner, repo, prNumber, core, log, botLogin, currentSpans = [], dryRun = false, })
scripts/github-actions/post-review-comments.js:1786
↓ 7 callers
Function
resolveWorkingDirForSession
resolveWorkingDirForSession accepts an explicit --repo flag value and falls back to the current working directory. Unlike resolveRepoDir it does not r
cmd/opencodereview/session_cmd.go:686
↓ 7 callers
Function
retryTestGit
retryTestGit runs git in dir with a fixed identity so the fixture repo does not depend on the developer's git config.
cmd/opencodereview/retry_fake_llm_test.go:228
↓ 7 callers
Function
run
()
cmd/opencodereview/main.go:21
↓ 7 callers
Function
runSessionListCompat
runSessionListCompat provides test compatibility for old-style runSessionList([]string{...}) calls.
cmd/opencodereview/compat_test.go:64
↓ 7 callers
Function
runSessionRmForTest
(t *testing.T, repoFlag, sessionID, stdin string, yes bool)
cmd/opencodereview/session_rm_test.go:337
↓ 7 callers
Function
sanitizeRenderedMarkdown
(rendered string)
cmd/opencodereview/markdown.go:187
↓ 7 callers
Method
save
(d *Database)
internal/chatgptauth/store.go:165
↓ 7 callers
Function
seedSession
(t *testing.T, repoDir, sessionID string)
internal/session/delete_test.go:15
↓ 7 callers
Function
sel
(id string)
internal/session/manifest_test.go:18
↓ 7 callers
Function
setupFileFindRepo
(t *testing.T)
internal/tool/file_find_test.go:112
↓ 7 callers
Function
shouldResolveThread
( thread, { botLogin, currentSpans = [], unlocatablePaths = new Set() } = {} )
scripts/github-actions/post-review-comments.js:1626
↓ 7 callers
Function
skipIfNoSh
skipIfNoSh skips tests that need a POSIX shell and sleep utility.
internal/gitcmd/runner_pipe_test.go:34
↓ 7 callers
Method
snapshot
()
internal/behaviortask/budget.go:30
↓ 7 callers
Function
startEnvServer
startEnvServer starts this test binary as the given child MCP server mode.
internal/mcp/closeall_test.go:16
↓ 7 callers
Function
summarizeSelection
summarizeSelection returns the diffs the run keeps working with, plus the counts Run reports.
internal/agent/selection.go:112
↓ 7 callers
Method
syncSessionModelSelection
()
cmd/opencodereview/provider_tui.go:609
↓ 7 callers
Method
trace
(msg: string)
extensions/vscode/src/extension/services/GitService.ts:20
↓ 7 callers
Function
unquoteGitPath
* Decodes git's quotepath escapes (with `core.quotepath=true`, Chinese paths become `"\344\275\240"`). * Every git invocation passes `-c core.quotepa
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/GitMap.kt:150
↓ 7 callers
Function
validateReviewRefs
validateReviewRefs rejects ref-option injection (#112): any --from/--to/ --commit value must be a real commit ref and must not start with '-'.
cmd/opencodereview/review_cmd.go:563
↓ 7 callers
Function
withEnv
(env, fn)
scripts/github-actions/post-review-comments.test.js:87
↓ 7 callers
Method
writeRecordLocked
(rec map[string]any)
internal/session/persist.go:139
↓ 6 callers
Method
Cancel
(_ context.Context, p acp.CancelNotification)
acp/internal/adapter/session.go:46
↓ 6 callers
Function
Compare
Compare buckets the findings of an earlier run (before) against a later one (after). Matching is a multiset match on findingKey, so N identical findin
internal/session/compare.go:35
↓ 6 callers
Function
DeleteSessionAt
DeleteSessionAt removes one session file found by FindSessionsByID.
internal/session/delete.go:229
↓ 6 callers
Function
ExeName
ExeName returns name with a Windows .exe suffix when needed.
acp/internal/testutil/stub.go:47
↓ 6 callers
Function
ExportSession
ExportSession renders one persisted session as a single self-contained HTML document and writes it to out. It is the offline counterpart of the viewer
internal/viewer/export.go:31
↓ 6 callers
Function
LoadDetail
LoadDetail returns the summary plus per-file item records for one session.
internal/session/list.go:161
↓ 6 callers
Method
MarkReused
MarkReused records that the item was reused from a parent session checkpoint.
internal/session/manifest.go:755
↓ 6 callers
Method
MarkWaived
MarkWaived records that the user explicitly waived this selected item, which must still be in the pre-terminal (selected) state. reason is required an
internal/session/manifest.go:772
↓ 6 callers
Function
ParseComments
ParseComments extracts LlmComment entries from tool call arguments without writing to the Collector. Returns parsed comments and an error message (emp
internal/tool/code_comment.go:96
↓ 6 callers
Function
ParseEffort
ParseEffort validates a user-supplied effort value.
internal/config/template/effort.go:41
↓ 6 callers
Function
PrintTraceSummary
PrintTraceSummary prints a one-line summary of the review to stdout. If SessionID is non-empty, an "[ocr] Session: <id>" line follows the summary.
internal/telemetry/events.go:85
↓ 6 callers
Function
Quiet
Quiet replaces stdout with io.Discard and returns a cleanup function. Usage: defer stdout.Quiet()() WARNING: Quiet must ONLY be called from the mai
internal/stdout/stdout.go:33
↓ 6 callers
Function
ReLocateComment
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:49
↓ 6 callers
Method
RecordReviewItemReused
RecordReviewItemReused records that this run reused a checkpoint from another session.
internal/session/history.go:291
↓ 6 callers
Function
RejectResult
RejectResult refuses the prompt with an actionable hint.
acp/internal/intent/result.go:60
↓ 6 callers
Function
ResolveComment
ResolveComment attempts to resolve StartLine/EndLine for a single comment by matching ExistingCode against the diff. Returns true on success.
internal/diff/resolver.go:63
↓ 6 callers
Method
ReviseLastAttempt
ReviseLastAttempt rewrites the last attempt of m as an error. It is the client-boundary correction for what the observer cannot see: an error surfaci
internal/llm/retry_report.go:381
↓ 6 callers
Method
Session
Session returns the session history associated with this Agent.
internal/agent/agent.go:447
↓ 6 callers
Function
SessionKeyFromContext
SessionKeyFromContext returns the session key carried by ctx, or "" when none was set.
internal/llm/sessionkey.go:85
↓ 6 callers
Function
StartLLMSpan
StartLLMSpan creates a span for an LLM request with standard attributes.
internal/telemetry/span.go:109
↓ 6 callers
Method
Stream
Stream acquires the semaphore, starts a git command, and passes its stdout as an io.Reader to consume. The semaphore is held for the full duration. c
internal/gitcmd/runner.go:426
↓ 6 callers
Method
String
String names the strategy for logs and telemetry attributes. An unhandled value reads as "unknown" rather than falling through to a real strategy name
internal/config/template/template.go:100
↓ 6 callers
Function
StripMarkdownFences
StripMarkdownFences removes ```json and ``` wrappers some models add around structured outputs. Exposed so callers (e.g. agent's review-filter post-st
internal/llmloop/compression.go:104
↓ 6 callers
Method
ToolFailures
ToolFailures returns failed tool calls ordered by their global call number.
internal/llmloop/loop.go:161
↓ 6 callers
Method
ToolFailures
()
cmd/opencodereview/shared.go:780
↓ 6 callers
Function
ValidateTimeoutSec
ValidateTimeoutSec converts a config-file timeout (in seconds) to time.Duration. Returns 0 for zero input (use default). Rejects negative values and o
internal/llm/resolver.go:230
↓ 6 callers
Method
Warnings
Warnings returns the warnings recorded by the LLM runner.
internal/scan/agent.go:235
← previous
next →
501–600 of 7,390, ranked by callers