MCPcopy Create free account

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

Functions7,599 in github.com/alibaba/open-code-review

↓ 12 callersMethodCompletionsWithCtx
The deferred finalizeRequest is this client's boundary for the retry report; see the OpenAI counterpart for why it is deferred and why the results are
internal/llm/client.go:1491
↓ 12 callersFunctionEvent
Event emits a structured event as a span with immediate end.
internal/telemetry/events.go:22
↓ 12 callersFunctionLoadDefault
LoadDefault parses the embedded task_template.json and resolves prompt file references.
internal/config/template/template.go:219
↓ 12 callersMethodLogin
(ctx context.Context, s Store, account string, newAccount, noBrowser, consent bool, out io.Writer)
internal/chatgptauth/oauth.go:265
↓ 12 callersFunctionNewParser
NewParser builds a parser. Both dependencies may be nil: a nil LLM makes natural-language input a rejection, and a nil RepoContext skips ref checks.
acp/internal/intent/parser.go:64
↓ 12 callersFunctionNormalizeAuthHeader
NormalizeAuthHeader normalizes an auth header value to a canonical form. It returns an error for unrecognized values.
internal/llm/resolver.go:864
↓ 12 callersFunctionRegisterAll
RegisterAll registers tools from the MCP client into the tool registry. When allowedTools is non-empty, only tools whose names appear in the list are
internal/mcp/provider.go:34
↓ 12 callersFunctionRequestMetaFromContext
RequestMetaFromContext returns the RequestMeta attached to ctx, if any. It is exported so the packages that stamp identity — internal/llmloop and int
internal/llm/retry_meta.go:148
↓ 12 callersFunctionResolve
(entries []ToolConfigEntry, names []string)
internal/config/toolsconfig/toolsconfig.go:34
↓ 12 callersMethodResolve
(path string)
internal/config/rules/sniffer.go:27
↓ 12 callersMethodResolveInput
ResolveInput freezes this run's commit endpoints by asking git, following the input-mode matrix: - range: base = merge-base(from,to); head = the
internal/diff/git.go:162
↓ 12 callersMethodRun
Run executes the full-scan pipeline: enumerate → filter → token-filter → dispatch one subtask per file → collect comments.
internal/scan/agent.go:318
↓ 12 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:224
↓ 12 callersMethodTool
Tool returns which tool this provider implements.
internal/tool/definitions.go:78
↓ 12 callersMethodVisibleContent
VisibleContent extracts visible text only, never falling back to ReasoningContent. History builders must use this to avoid duplicating reasoning that
internal/llm/client.go:362
↓ 12 callersFunctionactionStepBlock
(name)
scripts/github-actions/post-review-comments.test.js:5191
↓ 12 callersMethodcancel
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/ReviewSession.kt:85
↓ 12 callersMethoddispatch
(ctx context.Context, name, raw string)
internal/behaviortask/runner.go:341
↓ 12 callersFunctionequalArgs
(a, b []string)
acp/internal/intent/fake_test.go:127
↓ 12 callersFunctionerrAttempt
(class ErrorClass, phase FailurePhase, status int)
internal/llm/retry_report_test.go:30
↓ 12 callersFunctiongenerateUUID
()
internal/session/persist.go:76
↓ 12 callersMethodgit
(self, *args)
scripts/github-actions/test_review_pr.py:115
↓ 12 callersFunctioninitBareRepo
initBareRepo creates an empty (unborn) git repository with identity configured but no commits, returning the repo dir.
internal/diff/git_resolve_test.go:30
↓ 12 callersFunctionisolateLLMConnectionTest
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:15
↓ 12 callersFunctionjsonResponse
(body string)
internal/llm/raw_test.go:81
↓ 12 callersFunctionlog
(msg)
examples/gitlab_ci/post_review.py:60
↓ 12 callersFunctionmodelTUIIdxForName
(t *testing.T, m modelTUIModel, name string)
cmd/opencodereview/provider_tui_funcs_test.go:1140
↓ 12 callersFunctionmustUnmarshal
mustUnmarshal is a test helper that unmarshals SARIF output and fails the test on error, so malformed output produces a clear failure instead of a nil
cmd/opencodereview/sarif_test.go:24
↓ 12 callersFunctionnewCompareSession
newCompareSession records one session with the given findings and returns it.
cmd/opencodereview/session_cmd_test.go:577
↓ 12 callersMethodobj
extensions/idea/src/test/kotlin/com/alibaba/opencodereview/idea/services/ConfigDraftTest.kt:80
↓ 12 callersFunctionparseCheckpointMarker
(body)
scripts/github-actions/post-review-comments.js:3189
↓ 12 callersFunctionparseConfig
* Parses the config file content. Blank input returns null; invalid JSON throws * (caught by [ConfigService] and treated as "no configuration"). */
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/ConfigParse.kt:55
↓ 12 callersFunctionresultToState
Only recognized, non-failing terminal results can report an empty review. */
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/ReviewSession.kt:20
↓ 12 callersFunctionrunSessionCompare
(beforeID, afterID string)
cmd/opencodereview/session_cmd.go:407
↓ 12 callersFunctiontaskMessages
()
internal/llmloop/task_test.go:72
↓ 12 callersFunctiontestTaskResponse
(name, arguments string)
internal/llmloop/task_test.go:26
↓ 11 callersMethodApplyLanguage
ApplyLanguage injects a language directive into all system-role messages across MAIN_TASK, PLAN_TASK (if set), and MEMORY_COMPRESSION_TASK.
internal/config/template/template.go:288
↓ 11 callersFunctionCanonicalPath
CanonicalPath returns an absolute path with symlinks resolved.
internal/pathutil/path.go:13
↓ 11 callersMethodCredentials
(ctx context.Context, s Store, account string)
internal/chatgptauth/oauth.go:500
↓ 11 callersMethodReason
Reason is the safe, human-facing sentence for a stop, and the single source of truth for it: the diff-review manifest reason and the scan subtask warn
internal/llmloop/loop.go:272
↓ 11 callersMethodRecordReviewItemFailed
RecordReviewItemFailed persists an incomplete file-level checkpoint.
internal/session/history.go:335
↓ 11 callersMethodSessionID
SessionID returns the current scan's persisted session ID. It returns an empty string when no session file exists.
internal/scan/agent.go:190
↓ 11 callersFunctionSetAttr
SetAttr sets a single attribute on a span.
internal/telemetry/span.go:66
↓ 11 callersFunctionSwap
Swap replaces the stdout writer with replacement and returns a restore function. It lets tests capture output written through Writer(), and lets calle
internal/stdout/stdout.go:57
↓ 11 callersMethodTotalTokensUsed
()
cmd/opencodereview/shared.go:852
↓ 11 callersMethodValidate
()
internal/config/template/template.go:315
↓ 11 callersFunctionWithinBase
WithinBase reports whether target is base itself or contained under base.
internal/pathutil/path.go:22
↓ 11 callersFunctionapplyOfficialProviderConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:279
↓ 11 callersMethodapplyResumeLine
applyResumeLine folds one record into the index. It reports an unparseable line to the caller, which decides whether that is fatal.
internal/session/resume.go:155
↓ 11 callersMethodbeginAPIKeyReplace
beginAPIKeyReplace switches from the fixed-length mask placeholder to edit mode so the next keystroke or paste fully replaces the saved key. While edi
cmd/opencodereview/provider_tui.go:898
↓ 11 callersFunctioncm
(path, content string)
internal/tool/comment_collector_test.go:12
↓ 11 callersFunctionformatReport
(result *orchestrator.Result)
acp/internal/adapter/presentation/helpers_test.go:76
↓ 11 callersFunctionfreezeOne
freezeOne freezes c and returns the single listed request.
internal/llm/retry_boundary_test.go:47
↓ 11 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
↓ 11 callersFunctionhttp_error
(code, body=b"", reason="error")
examples/gerrit_ci/post_review_test.py:275
↓ 11 callersFunctionofficialConfigModelTUI
(t *testing.T, configPath string, extraModels []string)
cmd/opencodereview/provider_tui_funcs_test.go:1055
↓ 11 callersFunctionoutputRetryReportText
outputRetryReportText groups noteworthy requests by review stage. It renders only stable classes and status codes; raw provider errors stay out.
cmd/opencodereview/output.go:509
↓ 11 callersFunctionoutputSARIF
outputSARIF writes a SARIF v2.1.0 document to the provided writer. The document always contains a single run with the 8 built-in category rules, one r
cmd/opencodereview/sarif.go:131
↓ 11 callersFunctionparseTemplate
(name string)
internal/viewer/server.go:326
↓ 11 callersFunctionpost
(msg: WebviewToHost)
extensions/frontend/src/webview/bridge.vsc.ts:13
↓ 11 callersMethodpost
(msg: WebviewToHost)
extensions/frontend/src/webview/bridge.ts:14
↓ 11 callersFunctionreadEnvAssignments
(file)
scripts/github-actions/action-contract.test.js:315
↓ 11 callersFunctionrequireReject
(t *testing.T, r Result)
acp/internal/intent/fake_test.go:116
↓ 11 callersFunctionresolveKeyCmd
resolveKeyCmd runs a credential-fetching shell command and returns its trimmed, single-line stdout. label names the source (e.g. `api_key_cmd for prov
internal/llm/keycmd.go:91
↓ 11 callersFunctionresolveRepoDir
resolveRepoDir resolves the project rule root for `ocr rules check`. A failed Git probe may hide a worktree root, so surface the failure instead of si
cmd/opencodereview/review_cmd.go:541
↓ 11 callersFunctionretryReportFixture
retryReportFixture is the report used by most rendering assertions: one request recovered after two errors, one request that never succeeded, and a to
cmd/opencodereview/retry_report_render_test.go:24
↓ 11 callersFunctionrunAgentCheck
({ json = {}, dirs = {}, files = {} } = {})
scripts/github-actions/check-plugin-contract.test.js:541
↓ 11 callersFunctionrunSessionRm
(cmd *cobra.Command, sessionID string)
cmd/opencodereview/session_cmd.go:602
↓ 11 callersMethodsetPending
(p *Pending)
acp/internal/intent/state.go:41
↓ 11 callersFunctionsetTestHome
setTestHome redirects the user home resolved by os.UserHomeDir() to dir for the duration of the test. Setting HOME alone is NOT enough on Windows: os.
internal/agent/test_home_test.go:13
↓ 11 callersMethodtokens
()
internal/chatgptauth/auth_test.go:181
↓ 11 callersFunctionuseCompareRepo
useCompareRepo points the compare command at repoDir and restores the shared command flags afterwards.
cmd/opencodereview/session_cmd_test.go:596
↓ 11 callersFunctionuseResponsive
()
pages/src/hooks/useResponsive.ts:12
↓ 11 callersMethodwhyExcluded
whyExcluded applies the static gates — binary, the built-in secret paths, user exclude/include, then the extension allowlist and default-path patterns
internal/agent/selection.go:70
↓ 11 callersFunctionwriteOpenAISSE
(t *testing.T, w http.ResponseWriter, events ...string)
internal/llm/client_test.go:758
↓ 11 callersFunctionwriteTempFile
writeTempFile writes content to a temporary file and returns its path.
cmd/opencodereview/background_file_test.go:16
↓ 10 callersFunctionBuildScanArgs
BuildScanArgs constructs OCR CLI arguments from ScanIntent. Returns error if a path escapes the scan root or Extra contains a flag outside scanExtraFl
acp/internal/contract/intent.go:138
↓ 10 callersMethodClear
Clear drops any pending clarification. Phase 6 calls it on session/cancel and on task completion; the parser also clears it when a command replaces or
acp/internal/intent/state.go:53
↓ 10 callersMethodCollect
Collect uses one native tool call for the entire OCR process. Log snapshots replace prior content at a bounded rate, not once per stderr line.
acp/internal/adapter/presentation/progress.go:27
↓ 10 callersMethodCommentsForPath
CommentsForPath returns a copy of comments whose Path matches the given path.
internal/tool/comment_collector.go:41
↓ 10 callersMethodCompletionTokenLimit
CompletionTokenLimit returns the output cap for LLM requests. Runtime prompt-limit overrides must not silently expand the model's output budget.
internal/config/template/template.go:142
↓ 10 callersFunctionFileURLString
FileURLString formats a local path and optional line as a file URL.
acp/internal/adapter/workspace/fileurl.go:25
↓ 10 callersFunctionLoadDefault
LoadDefault parses the embedded system_rules.json and resolves rule file references.
internal/config/rules/system_rules.go:94
↓ 10 callersFunctionNewManifestBuilder
NewManifestBuilder creates a builder for a run identified by runID (the canonical session ID) and operation ("review" or "scan").
internal/session/manifest.go:371
↓ 10 callersMethodPlanEnabled
()
internal/chatgptauth/store.go:46
↓ 10 callersFunctionPreview
Preview loads diffs and applies the same selection the real run applies before dispatch, returning structured preview data without dispatching any LLM
internal/agent/preview.go:52
↓ 10 callersMethodRecordAttempt
RecordAttempt appends one observed HTTP attempt for m. startedAt and endedAt bracket the real HTTP call: the observer takes them immediately before a
internal/llm/retry_report.go:289
↓ 10 callersMethodRecordUsage
RecordUsage adds the prompt/completion/cache tokens reported by an LLM response to the runner's aggregate counters. Used by callers (plan phase in age
internal/llmloop/loop.go:205
↓ 10 callersMethodRegisterExcluded
RegisterExcluded requires a defined exclusion reason and an item_id outside the selected set. It rejects calls after seal or freeze and keeps the firs
internal/session/manifest.go:554
↓ 10 callersMethodSetRunFailure
SetRunFailure records why the whole run stopped. It rejects an invalid class (so an unclassifiable stop is never silently downgraded) and a change of
internal/session/manifest.go:435
↓ 10 callersMethodWaitBackground
WaitBackground blocks until every background job started by this Runner has returned. Background memory compression is the only such job, and cancelPe
internal/llmloop/loop.go:109
↓ 10 callersMethodbuildGrepArgs
(searchText string, caseSensitive bool, usePerlRegexp bool, noIndex bool, pathspec []string)
internal/tool/code_search.go:69
↓ 10 callersMethodbuildOpenAIParams
buildOpenAIParams converts the shared ChatRequest into OpenAI SDK parameters.
internal/llm/client.go:899
↓ 10 callersFunctioneffectivePath
(d model.Diff)
internal/agent/preview.go:131
↓ 10 callersFunctionencodeRepoPath
(p string)
internal/session/persist.go:89
↓ 10 callersFunctionenumeratePaths
enumeratePaths returns the sorted paths NewProvider selects for the given --path selectors, so a case reads as selector in, file list out.
internal/scan/provider_paths_test.go:127
↓ 10 callersFunctionescapedCount
escapedCount reads the escaped-character count out of a repair description, reporting zero for a declined repair so assertions stay compact.
internal/tool/comment_args_repair_test.go:29
↓ 10 callersMethodexecute
(ctx context.Context, name string, args map[string]any)
internal/behaviortask/code.go:150
↓ 10 callersFunctionmakeDiff
()
internal/diff/relocation_test.go:44
↓ 10 callersMethodmapResponsesResponse
mapResponsesResponse converts the SDK Response into the shared ChatResponse. Text output is read via the SDK's OutputText() helper (it walks all outpu
internal/llm/responses_client.go:533
← previousnext →301–400 of 7,599, ranked by callers