Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/betta-tech/byo-coding-agent
/ functions
Functions
301 in github.com/betta-tech/byo-coding-agent
⨍
Functions
301
◇
Types & classes
75
Method
EstimatedCostUSD
EstimatedCostUSD multiplies the cumulative usage by the current model's per-million-token rates. Returns -1 for an unknown model.
internal/provider/anthropic.go:55
Method
EstimatedCostUSD
()
internal/provider/openai.go:61
Method
Execute
(ctx context.Context, rawInput string)
delegate.go:40
Method
Execute
(ctx context.Context, input string)
internal/mcp/register.go:29
Method
Execute
(_ context.Context, in string)
internal/agent/agent_test.go:29
Method
Execute
(ctx context.Context, rawInput string)
internal/tool/remember.go:44
Method
Execute
(_ context.Context, rawInput string)
internal/tool/readfile.go:30
Method
Execute
(ctx context.Context, rawInput string)
internal/tool/recall.go:40
Method
Execute
(_ context.Context, rawInput string)
internal/tool/writefile.go:34
Method
Execute
(_ context.Context, _ string)
internal/tool/registry_test.go:23
Method
Execute
(ctx context.Context, rawInput string)
internal/tool/bash.go:30
Method
Init
()
internal/ui/program.go:207
Method
Init
()
internal/ui/input.go:53
Method
Init
()
internal/ui/input.go:146
Method
Model
()
internal/provider/mock.go:89
Method
Model
()
internal/provider/anthropic.go:37
Method
Model
()
internal/provider/openai.go:43
Method
Preamble
(ctx context.Context)
internal/memory/store.go:43
Method
Preamble
(_ context.Context)
internal/memory/store.go:58
Function
PrintBanner
PrintBanner renders the startup banner. Falls back to a single-line wordmark when the terminal is narrower than the big banner needs.
internal/ui/banner.go:29
Function
ReadChatInput
ReadChatInput shows the bordered input box and blocks until the user submits or hits ctrl-d. Returns (text, ok). ok=false on exit.
internal/ui/input.go:119
Method
Recall
(_ context.Context, _ string, _ int)
internal/memory/store.go:57
Method
Register
(s Subagent)
internal/subagent/registry.go:35
Method
RoundTrip
(req *http.Request)
internal/mcp/client.go:118
Method
Run
(ctx context.Context, task string)
internal/subagent/research.go:40
Method
Save
(_ context.Context, _ Entry)
internal/memory/store.go:56
Method
Send
Send returns the next canned response (or Err, or a default end_turn), recording the messages and tools it was called with for later assertion.
internal/provider/mock.go:61
Method
Send
(ctx context.Context, messages []api.Message, tools []api.ToolDef)
internal/provider/anthropic.go:86
Method
Send
(ctx context.Context, messages []api.Message, tools []api.ToolDef)
internal/provider/openai.go:75
Method
Send
Send appends a user message and runs the tool-use loop until the model stops requesting tools (or MaxTurns is reached). Returns the final assistant te
internal/agent/agent.go:63
Method
SentAt
SentAt returns a copy of the messages passed to the i-th Send call. Indexing is 0-based and matches the order of Responses. Returns nil when i is out
internal/provider/mock.go:114
Method
SetModel
(name string)
internal/provider/mock.go:98
Method
SetModel
(name string)
internal/provider/anthropic.go:38
Method
SetModel
(name string)
internal/provider/openai.go:49
Function
StartSpinner
StartSpinner begins a braille spinner on stdout with the given label. No-op when stdout isn't a TTY (piped, redirected). Call Stop() to clear.
internal/ui/spinner.go:26
Function
TestBuildWriteDiffIdenticalContentReturnsMarker
(t *testing.T)
internal/agent/diff_test.go:52
Function
TestBuildWriteDiffMalformedInputReturnsEmpty
(t *testing.T)
internal/agent/diff_test.go:66
Function
TestBuildWriteDiffNewFileShowsAdditions
(t *testing.T)
internal/agent/diff_test.go:10
Function
TestBuildWriteDiffShowsChangedLines
(t *testing.T)
internal/agent/diff_test.go:31
Function
TestDefinitionsAreSortedByName
Definitions must be sorted by name. Two reasons matter — chapter 09's "map iteration is random" warning, and prompt caching (chapter 17), which silent
internal/tool/registry_test.go:47
Function
TestExecuteDispatchesToTool
(t *testing.T)
internal/tool/registry_test.go:109
Function
TestExecutePropagatesIsErr
Tools that fail report it via the (result, isErr) channel rather than a Go error — the agent loop relies on this contract (chapter 02).
internal/tool/registry_test.go:124
Function
TestExecuteUnknownReturnsErrorString
(t *testing.T)
internal/tool/registry_test.go:98
Function
TestLatestSkipsPayloadlessEvents
Latest walks back from the newest event to find one with a non-empty payload, skipping payload-less events along the way.
internal/debug/debug_test.go:173
Function
TestMessageHasToolResult
(t *testing.T)
internal/api/types_test.go:34
Function
TestNoCompactionIsPassthrough
(t *testing.T)
internal/compact/strategy_test.go:86
Function
TestPairReturnsFalseForUnpairedEvent
Unpaired events return (zero, false). The lookup must not match itself.
internal/debug/debug_test.go:132
Function
TestPairWalksBothDirections
Pair walks both directions: a request emits → response correlates back. Calling Pair on either ID returns the other.
internal/debug/debug_test.go:106
Function
TestRecordAssignsMonotonicIDs
(t *testing.T)
internal/debug/debug_test.go:27
Function
TestRecordReturnsZeroWhenDisabled
All tests in this file share the package's global state (the ring, the nextID counter, the sink). They run sequentially (no t.Parallel()) and reset st
internal/debug/debug_test.go:14
Function
TestRegisterAndGet
(t *testing.T)
internal/tool/registry_test.go:27
Function
TestRenderTranscriptIncludesAllBlockKinds
(t *testing.T)
internal/api/types_test.go:80
Function
TestRingDropsOldestPastCapacity
The ring drops the oldest event once it reaches capacity. We push more than the ring can hold and verify the front is gone, the back is intact, and Fi
internal/debug/debug_test.go:66
Function
TestSafeSplitPointAtCleanBoundary
When the desired split already lands on a clean user text message, SafeSplitPoint returns it as-is.
internal/compact/strategy_test.go:36
Function
TestSafeSplitPointEdges
Edge values bounce out without walking the slice.
internal/compact/strategy_test.go:76
Function
TestSafeSplitPointGivesUpAtZero
If no clean boundary exists in the prefix, returns 0 — "do nothing" is safer than risking an orphaned tool_use.
internal/compact/strategy_test.go:65
Function
TestSafeSplitPointWalksBackOverToolPair
When desired falls inside a tool_use/tool_result pair, the function walks back to the previous clean user-text boundary.
internal/compact/strategy_test.go:49
Function
TestSendLoopsOnToolUse
TestSendLoopsOnToolUse covers the tool-use round-trip: the model asks for `echo`, the agent dispatches it, the agent loops back to the model with the
internal/agent/agent_test.go:68
Function
TestSendPropagatesProviderError
TestSendPropagatesProviderError makes sure a provider failure bubbles out of Send instead of being swallowed. The error itself should be the exact sen
internal/agent/agent_test.go:142
Function
TestSendReturnsTextOnEndTurn
TestSendReturnsTextOnEndTurn exercises the simplest path: the model replies with a text block and a non-tool stop reason, and Send returns that text t
internal/agent/agent_test.go:43
Function
TestSendStopsAtMaxTurns
TestSendStopsAtMaxTurns confirms the safety clamp: a provider that keeps requesting tools indefinitely is bounded by Agent.MaxTurns. The loop terminat
internal/agent/agent_test.go:108
Function
TestSessionFilesEmptyCloseIsNoop
Empty sessions shouldn't leak into the index — opening, doing nothing, and closing leaves the store untouched.
internal/memory/sessionfiles_test.go:65
Function
TestSessionFilesPrunesMissingFiles
If the session file referenced in index.json was deleted manually, the loader should prune the dead reference on the next open.
internal/memory/sessionfiles_test.go:160
Function
TestSessionFilesRecallMatchesTagsAndSummary
Recall is matched by tag OR summary substring.
internal/memory/sessionfiles_test.go:115
Function
TestSessionFilesReopenLoadsHistory
After a session is closed, reopening the store should re-load the index and surface the previous session via Preamble and Recall.
internal/memory/sessionfiles_test.go:81
Function
TestSessionFilesSaveAndCloseWritesSessionAndIndex
(t *testing.T)
internal/memory/sessionfiles_test.go:11
Function
TestSinkReceivesEventsInOrder
The sink is called once per Record while enabled, in order, with the fully-constructed Event.
internal/debug/debug_test.go:146
Function
TestSlidingWindowAboveThresholdDropsPrefix
Above the keep-window: drops a prefix, snapping to a safe boundary.
internal/compact/strategy_test.go:114
Function
TestSlidingWindowBelowThresholdIsNoop
Below the keep-window: no-op.
internal/compact/strategy_test.go:101
Function
TestSlidingWindowNeverSplitsToolPair
The whole point of SafeSplitPoint is that compaction never separates a tool_use from its tool_result. This is a regression test for that invariant on
internal/compact/strategy_test.go:136
Function
TestSnapshotReturnsCopy
(t *testing.T)
internal/debug/debug_test.go:44
Function
TestSubsetEmpty
Subset of nothing is a valid empty registry — used by subagents that shouldn't have any tools at all.
internal/tool/registry_test.go:89
Function
TestSubsetKeepsOnlyNamedTools
(t *testing.T)
internal/tool/registry_test.go:65
Function
TestUsageAddIsCommutative
(t *testing.T)
internal/api/types_test.go:19
Function
TestUsageAddSumsAllFields
(t *testing.T)
internal/api/types_test.go:8
Function
TestUsageAddWithZero
(t *testing.T)
internal/api/types_test.go:27
Method
TotalUsage
TotalUsage returns the cumulative tokens this provider has consumed since it was constructed. Subagents that share the provider contribute to the same
internal/provider/anthropic.go:47
Method
TotalUsage
()
internal/provider/openai.go:55
Method
Update
(msg tea.Msg)
internal/ui/input.go:55
Method
View
()
internal/ui/input.go:107
Function
WithLogging
WithLogging is sugar for &LoggingStrategy{Inner: inner, FilePath: path}.
internal/compact/logging.go:21
Function
cmdClear
(_ string)
commands.go:215
Function
cmdCompact
(args string)
commands.go:264
Function
cmdDebug
(args string)
commands.go:312
Function
cmdExit
(_ string)
commands.go:414
Function
cmdHelp
(_ string)
commands.go:115
Function
cmdModel
(args string)
commands.go:152
Function
cmdProvider
(args string)
commands.go:169
Function
cmdSubagents
cmdSubagents lists registered subagent types and, separately, any that are currently running. The active list is empty when nothing is in flight.
commands.go:238
Function
cmdTokens
(_ string)
commands.go:61
Function
cmdTools
(_ string)
commands.go:220
Function
cmdVerbose
(args string)
commands.go:293
Function
init
()
commands.go:27
Function
init
()
internal/tool/remember.go:19
Function
init
()
internal/tool/readfile.go:14
Function
init
()
internal/tool/recall.go:20
Function
init
()
internal/tool/writefile.go:14
Function
init
()
internal/tool/bash.go:14
Function
main
()
main.go:94
Function
main
()
cmd/sitegen/main.go:166
← previous
next →
201–300 of 301, ranked by callers