Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
3,095 in github.com/alibaba/open-code-review
⨍
Functions
3,095
◇
Types & classes
288
↓ 3 callers
Function
scanLines
scanLines reads from r line by line, collecting at most maxLines lines starting from startLine (1-based), while counting the total number of lines. Th
internal/tool/filereader.go:155
↓ 3 callers
Function
sessionJSONLPath
(t *testing.T, repoDir, sessionID string)
internal/session/persist_test.go:128
↓ 3 callers
Method
setStatus
(index: number, status: CommentStatus)
extensions/vscode/src/extension/providers/CommentProvider.ts:176
↓ 3 callers
Method
shouldReview
shouldReview applies the filter algorithm via whyExcluded.
internal/agent/agent.go:881
↓ 3 callers
Function
shouldSkipFile
shouldSkipFile returns true if a git ls-files output path should be skipped. Keeps only widely useful files (those with recognizable extensions).
internal/tool/file_find.go:173
↓ 3 callers
Function
splitAndNormalize
splitAndNormalize splits code text into lines and normalizes each one.
internal/diff/resolver.go:217
↓ 3 callers
Function
splitBindHost
splitBindHost returns the host portion of a listen address as passed to http.Server.Addr. Empty input returns "".
internal/viewer/hostguard.go:106
↓ 3 callers
Function
stripEmptyPlanBlock
stripEmptyPlanBlock removes the "### Review Plan …\n{{plan_guidance}}\n\n" wrapper from a MAIN_TASK user message when the plan phase produced no guida
internal/agent/util.go:32
↓ 3 callers
Function
stripThinkTags
stripThinkTags removes reasoning wrapper tags from content.
internal/llm/client.go:875
↓ 3 callers
Method
syncModelsFromConfig
()
cmd/opencodereview/provider_tui.go:2603
↓ 3 callers
Function
toConfigSetArgs
(key: string, value: string)
extensions/vscode/src/extension/services/configParse.ts:47
↓ 3 callers
Method
triggerAsyncCompression
triggerAsyncCompression kicks off a background compression job for the conversation owning st. A no-op when a job is already pending — the check-and-s
internal/llmloop/compression.go:277
↓ 3 callers
Function
visibleRunesLen
(runes []rune)
cmd/opencodereview/output.go:191
↓ 3 callers
Method
waitForRepo
等待至少一个仓库就绪(git 扩展异步扫描,首次可能为空)。
extensions/vscode/src/extension/services/GitService.ts:44
↓ 3 callers
Method
whyExcluded
whyExcluded mirrors agent.whyExcluded but for ScanItem inputs.
internal/scan/agent.go:352
↓ 3 callers
Function
withEnv
(env, fn)
scripts/github-actions/post-review-comments.test.js:82
↓ 3 callers
Function
writeGarbageExternalDiff
writeGarbageExternalDiff writes a shell script that emits non-diff output and returns its path. When git invokes it via GIT_EXTERNAL_DIFF / diff.exter
internal/diff/git_test.go:30
↓ 3 callers
Method
writeReviewItemRecord
(recordType, filePath, oldPath, newPath, fingerprint, sourceSessionID, errorMsg string, comments []model.LlmCo
internal/session/persist.go:181
↓ 2 callers
Method
AddToolResult
AddToolResult appends a tool call result to this task record and writes a tool_call record to the JSONL stream.
internal/session/history.go:354
↓ 2 callers
Method
ApplyLanguage
ApplyLanguage injects a language directive into all system-role messages of this conversation.
internal/config/testconnection/testconnection.go:47
↓ 2 callers
Function
BuildToolDefs
BuildToolDefs converts toolsconfig.ToolConfigEntry slice into []llm.ToolDef, filtering by phase (planOnly=true for plan_task, false for main_task).
internal/agent/agent.go:1026
↓ 2 callers
Function
Complete
Complete returns a checkpoint signaling task completion.
internal/tool/response_message.go:18
↓ 2 callers
Function
CountTokensForModel
(text string, modelName string)
internal/llm/client.go:273
↓ 2 callers
Function
EndSpan
EndSpan ends the span and records error status if present.
internal/telemetry/span.go:54
↓ 2 callers
Function
Eventf
Eventf is like Event but includes a message attribute.
internal/telemetry/events.go:31
↓ 2 callers
Function
Fail
Fail returns a checkpoint signaling terminal task failure.
internal/tool/response_message.go:21
↓ 2 callers
Function
FormatDuration
FormatDuration returns a human-readable duration string for console output.
internal/telemetry/events.go:64
↓ 2 callers
Function
GroupRules
GroupRules groups the given file paths by their resolved rule content. Files are placed in the same group only when their source, matched pattern, and
internal/delegate/rulegroup.go:24
↓ 2 callers
Function
HomeConfigPath
HomeConfigPath returns the default path to ~/.opencodereview/config.json.
internal/telemetry/config.go:125
↓ 2 callers
Method
Init
()
cmd/opencodereview/provider_tui.go:2676
↓ 2 callers
Function
InitEmbeddedLoader
initEmbeddedLoader configures tiktoken to use embedded BPE data instead of fetching from network. Call this once during application startup, before an
internal/llm/embedded_loader.go:20
↓ 2 callers
Method
IsKnown
IsKnown reports whether the tool is not UNKNOWN.
internal/tool/definitions.go:62
↓ 2 callers
Method
LLMFailures
LLMFailures returns the total number of LLM request failures recorded during this session.
internal/session/history.go:348
↓ 2 callers
Function
LoadDefault
LoadDefault parses the embedded task.json and returns the TEST_TASK conversation.
internal/config/testconnection/testconnection.go:31
↓ 2 callers
Function
LoadFromJSON
LoadFromJSON merges telemetry settings from a JSON config file if present. This has lower priority than environment variables.
internal/telemetry/config.go:71
↓ 2 callers
Method
LoadTiktokenBpe
(tiktokenBpeFile string)
internal/llm/embedded_loader.go:36
↓ 2 callers
Method
MergeBase
MergeBase returns the computed merge-base commit hash for range mode.
internal/diff/git.go:103
↓ 2 callers
Method
Name
Name returns the tool's identifier name.
internal/tool/definitions.go:59
↓ 2 callers
Function
NewCommentWorkerPool
NewCommentWorkerPool delegates to llmloop.NewCommentWorkerPool.
internal/agent/agent.go:38
↓ 2 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:78
↓ 2 callers
Function
OfName
(name string)
internal/tool/definitions.go:24
↓ 2 callers
Function
ParseReviewMode
ParseReviewMode returns the correct ReviewMode based on provided flag values.
internal/tool/filereader.go:31
↓ 2 callers
Function
PhaseEvent
PhaseEvent records a review phase completion with duration and optional error.
internal/telemetry/events.go:50
↓ 2 callers
Function
PrintToolCallError
PrintToolCallError prints a line when a tool fails. Example: [ocr] ✘ file_read "internal/config/rules/loader.go" failed: permission denied
internal/telemetry/events.go:104
↓ 2 callers
Function
PrintToolCallFinished
PrintToolCallFinished prints a line when a tool finishes successfully. Example: [ocr] ✔ file_read "internal/config/rules/loader.go" (12ms)
internal/telemetry/events.go:98
↓ 2 callers
Method
ProjectSummary
ProjectSummary returns the markdown project-level summary produced after all batches finish. Empty when SkipSummary is set, PROJECT_SUMMARY_TASK is ab
internal/scan/agent.go:103
↓ 2 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:30
↓ 2 callers
Method
RecordReviewItemReused
RecordReviewItemReused records that this run reused a checkpoint from another session.
internal/session/history.go:171
↓ 2 callers
Method
RefValue
RefValue returns the git ref that should be used for reading file contents in range or commit mode. Returns ("", false) for workspace mode.
internal/tool/filereader.go:43
↓ 2 callers
Method
ResumeInfo
()
cmd/opencodereview/shared.go:266
↓ 2 callers
Function
RuleGroupsMarkdown
RuleGroupsMarkdown renders rule groups into a markdown section.
internal/delegate/format.go:9
↓ 2 callers
Method
RunSplit
RunSplit executes a git command and returns stdout and stderr separately.
internal/gitcmd/runner.go:69
↓ 2 callers
Function
SessionsRoot
SessionsRoot returns the root directory where session JSONL files are stored.
internal/viewer/store.go:19
↓ 2 callers
Function
StartToolSpan
StartToolSpan creates a span for a tool execution with standard attributes.
internal/telemetry/span.go:84
↓ 2 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. co
internal/gitcmd/runner.go:90
↓ 2 callers
Method
ToolCalls
ToolCalls extracts tool calls from the first choice.
internal/llm/client.go:163
↓ 2 callers
Method
ToolDefsByPhase
ToolDefsByPhase returns the parsed tool definitions filtered by phase. planOnly=true returns only tools with plan_task:true. planOnly=false returns on
internal/config/toolsconfig/toolsconfig.go:45
↓ 2 callers
Method
Warnings
Warnings returns the warnings recorded by the LLM runner.
internal/scan/agent.go:189
↓ 2 callers
Method
WriteSessionStart
WriteSessionStart writes the initial session_start record.
internal/session/persist.go:131
↓ 2 callers
Function
_api_request_with_retry
Make a GitLab API request with retry on rate-limit and transient errors. Returns a dict:: {'success': bool, 'data': response or None,
examples/gitlab_ci/post_review.py:224
↓ 2 callers
Function
_field
Return the first present, non-empty field among several possible key names.
examples/codeup_ci/post_review.py:116
↓ 2 callers
Function
_get_header
Case-insensitive header lookup. urllib normalizes response header keys to title-case (e.g. 'Retry-After'), but this defensive check also hand
examples/gitlab_ci/post_review.py:197
↓ 2 callers
Function
addBackgroundFlags
(cmd *cobra.Command, background, backgroundFile *string)
cmd/opencodereview/shared_flags.go:24
↓ 2 callers
Function
addDiffFlags
(cmd *cobra.Command, from, to, commit *string)
cmd/opencodereview/shared_flags.go:18
↓ 2 callers
Function
addModelFlag
(cmd *cobra.Command, target *string)
cmd/opencodereview/shared_flags.go:48
↓ 2 callers
Method
addNextMessage
addNextMessage extends the conversation with the assistant message and tool responses, applying three-zone compression at the soft (60%) and warning (
internal/llmloop/loop.go:458
↓ 2 callers
Function
addOutputFlags
(cmd *cobra.Command, format, audience *string)
cmd/opencodereview/shared_flags.go:29
↓ 2 callers
Function
addToolsFlag
(cmd *cobra.Command, target *string)
cmd/opencodereview/shared_flags.go:52
↓ 2 callers
Method
adjustModelIdxAfterDelete
()
cmd/opencodereview/provider_tui.go:1562
↓ 2 callers
Method
adjustModelIdxAfterDelete
()
cmd/opencodereview/provider_tui.go:2576
↓ 2 callers
Method
adjusted
(file: string, line: number)
extensions/vscode/src/extension/providers/lineOffset.ts:10
↓ 2 callers
Function
allTools
()
internal/tool/definitions.go:33
↓ 2 callers
Method
apply
(index: number)
extensions/vscode/src/extension/providers/CommentProvider.ts:138
↓ 2 callers
Function
applyConfigEntries
(base: RawConfig, entries: ConfigEntry[])
extensions/vscode/src/extension/services/configDraft.ts:141
↓ 2 callers
Function
applyLanguage
applyLanguage appends instruction to all system-role messages in conv.
internal/config/template/template.go:143
↓ 2 callers
Function
applyProviderField
(entry *ProviderEntry, field, key, value string)
cmd/opencodereview/config_cmd.go:485
↓ 2 callers
Function
applyProviderField
(entry: RawProviderEntry, field: string, value: string)
extensions/vscode/src/extension/services/configDraft.ts:31
↓ 2 callers
Function
applyRecordToSummary
(s *Summary, rec summaryRecord)
internal/session/list.go:202
↓ 2 callers
Method
applyResume
(diffs []model.Diff)
internal/agent/agent.go:507
↓ 2 callers
Function
asModelTUIModel
(t *testing.T, m tea.Model)
cmd/opencodereview/provider_tui_funcs_test.go:998
↓ 2 callers
Function
authHeaderFormError
(raw string)
cmd/opencodereview/provider_tui.go:1039
↓ 2 callers
Method
beginManualTokenReplace
beginManualTokenReplace is the manual-tab equivalent of beginAPIKeyReplace.
cmd/opencodereview/provider_tui.go:883
↓ 2 callers
Method
blurCPStep
()
cmd/opencodereview/provider_tui.go:1298
↓ 2 callers
Method
blurManualStep
()
cmd/opencodereview/provider_tui.go:1630
↓ 2 callers
Function
branchRefCandidates
(ref: string)
extensions/vscode/src/extension/services/gitMap.ts:111
↓ 2 callers
Function
budgetAgentTestTemplate
budgetAgentTestTemplate returns a minimal template sufficient to drive dispatchSubtasks without plan/dedup/summary phases.
internal/agent/budget_test.go:49
↓ 2 callers
Function
budgetTestTemplate
()
internal/scan/budget_test.go:46
↓ 2 callers
Function
buildBadge
buildBadge renders a compact "[category · severity]" tag for a finding. It returns an empty string when neither structured field is present, so text o
cmd/opencodereview/output.go:105
↓ 2 callers
Method
buildChangeFilesExcept
buildChangeFilesExcept returns a formatted list of changed files except the given path.
internal/agent/agent.go:804
↓ 2 callers
Function
buildDedupCommentsJSON
buildDedupCommentsJSON renders the batch comments as a JSON list with stable c-N ids that the LLM groups by. Only fields the LLM needs to judge simila
internal/scan/agent.go:772
↓ 2 callers
Function
buildDiffLines
(comment model.LlmComment)
cmd/opencodereview/output.go:220
↓ 2 callers
Function
buildEntries
()
extensions/vscode/src/webview/views/ConfigView.tsx:351
↓ 2 callers
Function
buildFilterCommentsJSON
buildFilterCommentsJSON serializes comments into a JSON array with generated IDs.
internal/agent/agent.go:762
↓ 2 callers
Function
buildMessageXML
buildMessageXML serializes msgs into the <message><content> form expected by the MEMORY_COMPRESSION_TASK prompt template.
internal/llmloop/compression.go:183
↓ 2 callers
Function
buildReviewArgs
(opts: CliRunOptions)
extensions/vscode/src/extension/services/cliParse.ts:3
↓ 2 callers
Function
buildRunTags
(runId, runAttempt)
scripts/github-actions/post-review-comments.js:708
↓ 2 callers
Function
buildSummaryCommentsList
buildSummaryCommentsList renders comments as a compact path-anchored markdown list suitable for embedding in the PROJECT_SUMMARY_TASK prompt. Format:
internal/scan/agent.go:691
↓ 2 callers
Function
buildWorkspaceFiles
(diffHeadOut: string, diffCachedOut: string, untrackedOut: string)
extensions/vscode/src/extension/services/gitMap.ts:74
↓ 2 callers
Method
checkEnvironment
(force = false)
extensions/vscode/src/extension/services/CliService.ts:51
↓ 2 callers
Function
checkMetricErr
checkMetricErr intentionally ignores metric registration errors: telemetry is best-effort and must not interrupt the main flow.
internal/telemetry/metrics.go:72
← previous
next →
501–600 of 3,095, ranked by callers