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
↓ 1 callers
Function
NewRegistry
()
internal/subagent/registry.go:31
↓ 1 callers
Function
NewStdioClient
NewStdioClient launches command/args as a subprocess and connects over its stdin/stdout. The Connect call blocks until the server has responded to the
internal/mcp/client.go:25
↓ 1 callers
Function
PrintCompaction
PrintCompaction writes a before/after diff to stdout. Used by verbose mode when a compaction strategy shortens the history.
internal/ui/compaction.go:11
↓ 1 callers
Method
Recall
(ctx context.Context, query string, limit int)
internal/memory/store.go:42
↓ 1 callers
Function
Recordf
Recordf is the printf variant of Record.
internal/debug/debug.go:88
↓ 1 callers
Function
Register
Register connects to every server in cfg and registers their tools into the supplied Registry. Returns the open clients so main can defer Close. Serve
internal/mcp/register.go:103
↓ 1 callers
Method
Save
(ctx context.Context, e Entry)
internal/memory/store.go:41
↓ 1 callers
Method
SetMessages
SetMessages replaces the conversation slice. Used by /compact to write back the result of an ad-hoc strategy.
internal/agent/agent.go:54
↓ 1 callers
Method
SetModel
(name string)
internal/provider/provider.go:15
↓ 1 callers
Method
Stop
Stop must be called exactly once per started spinner.
internal/ui/spinner.go:59
↓ 1 callers
Method
Update
(msg tea.Msg)
internal/ui/input.go:148
↓ 1 callers
Method
View
()
internal/ui/input.go:162
↓ 1 callers
Function
activeSubagentSummary
activeSubagentSummary returns a short string like " · research" or " · research ×2, codereview" when subagents are running. Empty otherwise. Tacked on
internal/ui/program.go:1060
↓ 1 callers
Function
agentLoop
agentLoop is the inner loop: call the model, dispatch any tool calls, loop. Two exits — the model returns plain text, or it returns a non-tool stop re
examples/minimal/main.go:96
↓ 1 callers
Function
apiKeySet
(provider string)
commands.go:200
↓ 1 callers
Function
appendHistory
(line string)
internal/ui/input.go:207
↓ 1 callers
Method
assembleSession
assembleSession turns the in-memory draft into (summary, tags, body). The session-summary entry (if any) becomes the file header + the index record; e
internal/memory/sessionfiles.go:225
↓ 1 callers
Function
buildGroups
buildGroups partitions chapters into the four curriculum chapters of the design. Extra chapters past 12 fall into "Going further" so adding a new chap
cmd/sitegen/main.go:767
↓ 1 callers
Function
cleanExerciseTitle
(h1 string)
cmd/sitegen/main.go:593
↓ 1 callers
Function
cmdDebugList
cmdDebugList prints every event currently in the ring, one per line, with a marker for events that have an inspectable payload.
commands.go:355
↓ 1 callers
Function
cmdDebugShow
cmdDebugShow dumps a single event's full payload to scrollback. With no argument it shows the most recent event that has a payload.
commands.go:378
↓ 1 callers
Function
copyStatic
(out string)
cmd/sitegen/main.go:384
↓ 1 callers
Function
detectLanguage
detectLanguage picks a Chroma lexer name from a leading-character peek. Returns "" when no lexer applies — caller skips highlighting in that case.
internal/ui/highlight.go:40
↓ 1 callers
Function
dial
(ctx context.Context, s ServerConfig)
internal/mcp/register.go:159
↓ 1 callers
Function
easeInOutCubic
easeInOutCubic maps t ∈ [0,1] to [0,1] with a smooth-start/smooth-end shape: slow entrance, fast middle, slow exit. The classic curve for "object pass
internal/ui/program.go:237
↓ 1 callers
Function
envTruthy
envTruthy reports whether an env var is set to a value humans normally mean as "yes". Kept tiny on purpose: the harness has no central config struct,
main.go:86
↓ 1 callers
Function
executeTool
executeTool is the switch that runs whatever the model asked for. The (string, bool) return — content plus is-error flag — is the "errors as tool resu
examples/minimal/main.go:132
↓ 1 callers
Method
executeTool
executeTool prints the tool-call line, optionally asks for confirmation, and dispatches to the registry.
internal/agent/agent.go:144
↓ 1 callers
Function
exerciseBlurb
exerciseBlurb looks for the "**Goal:** ..." line. Falls back to the first paragraph if no goal marker is present.
cmd/sitegen/main.go:606
↓ 1 callers
Function
extractDifficulty
(body string)
cmd/sitegen/main.go:597
↓ 1 callers
Function
extractWritePath
extractWritePath pulls the path out of a write_file tool input so the approval prompt can name the target file. Returns "" on any parse failure — the
internal/agent/agent.go:206
↓ 1 callers
Method
flushIndex
()
internal/memory/sessionfiles.go:86
↓ 1 callers
Function
formatDebugEvent
formatDebugEvent renders one event as a single line, color-coded by level and source. The leading `#<id>` is what the user passes to /debug show. A tr
internal/ui/program.go:805
↓ 1 callers
Function
fromFinishReason
(r string)
internal/provider/openai.go:219
↓ 1 callers
Function
fromStopReason
(s anthropic.StopReason)
internal/provider/anthropic.go:184
↓ 1 callers
Function
groupByKind
(entries []Entry)
internal/memory/sessionfiles.go:283
↓ 1 callers
Function
hasToolResult
hasToolResult scans messages for a tool_result block matching id.
internal/agent/agent_test.go:154
↓ 1 callers
Method
hintText
hintText returns the keymap hint shown under the input box. Changes with the active focus so the user always sees which keys are live.
internal/ui/program.go:1150
↓ 1 callers
Method
inModal
inModal reports whether the current state should render a centered full-screen modal in place of the normal viewport+input layout. Two callers: the de
internal/ui/program.go:547
↓ 1 callers
Method
inputArea
()
internal/ui/program.go:1076
↓ 1 callers
Function
joinContent
joinContent flattens MCP content blocks into one string. We only render text natively; non-text blocks get a placeholder so the model knows something
internal/mcp/client.go:95
↓ 1 callers
Function
loadAgentsContext
loadAgentsContext reads ./AGENTS.md and returns it wrapped in a header for inclusion in the system prompt. The file is the AGENTS.md convention popula
main.go:400
↓ 1 callers
Function
loadHistory
()
internal/ui/input.go:186
↓ 1 callers
Method
loadIndex
()
internal/memory/sessionfiles.go:57
↓ 1 callers
Method
loop
(ctx context.Context)
internal/agent/agent.go:71
↓ 1 callers
Function
matches
(r SessionRecord, q string)
internal/memory/sessionfiles.go:138
↓ 1 callers
Method
mcpStatusText
mcpStatusText formats the loading line shown next to the spinner while background MCP servers are being connected. Empty when nothing's in flight (the
internal/ui/program.go:1126
↓ 1 callers
Method
mouseSelect
mouseSelect maps a left-click Y coordinate onto the debug panel and, if it lands on an event row, focuses the panel and selects that event.
internal/ui/program.go:779
↓ 1 callers
Function
newChatInput
(width int, history []string)
internal/ui/input.go:38
↓ 1 callers
Function
newHarness
(runner AgentRunner, usageFunc UsageFunc, banner string)
internal/ui/program.go:151
↓ 1 callers
Function
newMarkdown
()
cmd/sitegen/main.go:800
↓ 1 callers
Function
newProvider
newProvider picks the initial provider at startup, honoring $LLM_PROVIDER and $LLM_MODEL as optional defaults. Mid-session swaps go through the provid
main.go:272
↓ 1 callers
Function
normalizeSchema
(s any)
internal/mcp/register.go:207
↓ 1 callers
Function
parseSummaryAndTags
parseSummaryAndTags extracts a "<summary>\n\nTAGS: a, b, c" shape from the model's reply. If the TAGS line is missing, returns the full text as the su
main.go:378
↓ 1 callers
Function
plural
(n int)
internal/ui/program.go:1141
↓ 1 callers
Function
precedingHasToolUse
precedingHasToolUse reports whether any message in slice contains a tool_use block with the given id.
internal/compact/strategy_test.go:166
↓ 1 callers
Method
pruneMissing
()
internal/memory/sessionfiles.go:76
↓ 1 callers
Function
recordToEntry
(r SessionRecord)
internal/memory/sessionfiles.go:150
↓ 1 callers
Function
renderChapter
(path, name, lang string, md goldmark.Markdown)
cmd/sitegen/main.go:644
↓ 1 callers
Method
renderDebugDetail
()
internal/ui/program.go:625
↓ 1 callers
Method
renderDebugList
()
internal/ui/program.go:594
↓ 1 callers
Function
renderExerciseFile
(path, name, lang string, md goldmark.Markdown)
cmd/sitegen/main.go:546
↓ 1 callers
Function
renderGuide
(path, name, lang string, md goldmark.Markdown)
cmd/sitegen/main.go:473
↓ 1 callers
Function
renderTurnHeader
renderTurnHeader returns a "── 15:23:45 ─────────…" divider sized to width. Called when the user submits a new prompt so each turn has an unmistakable
internal/ui/program.go:914
↓ 1 callers
Function
run
(c config)
cmd/sitegen/main.go:179
↓ 1 callers
Function
runCommand
runCommand handles a line that starts with "/". Returns true if handled, false if the line should fall through to the model as a normal message.
commands.go:96
↓ 1 callers
Method
runOnce
(text string)
internal/ui/program.go:509
↓ 1 callers
Function
setupMCP
setupMCP loads mcp.json (if present) and connects each configured server. progress receives per-server lifecycle events the caller can pipe into the T
main.go:412
↓ 1 callers
Function
shineColor256
shineColor256 returns the 256-color foreground for a banner cell. Two inputs shape the gradient beyond a simple horizontal sweep: - row creates a dia
internal/ui/banner.go:128
↓ 1 callers
Function
splitSchema
splitSchema converts the SDK's `any` InputSchema into the (properties, required) pair our api.ToolDef expects. The Anthropic provider feeds InputSchem
internal/mcp/register.go:187
↓ 1 callers
Function
summarizeSession
summarizeSession asks the active provider for a one-paragraph recap of the conversation plus 3–5 tags, used as the body of the session file saved at s
main.go:337
↓ 1 callers
Function
switchProvider
switchProvider replaces the root agent's provider mid-session and re-registers subagents so they use the new one. Conversation history is kept — it's
main.go:309
↓ 1 callers
Function
synthesizeNewFileDiff
(path, content string)
internal/agent/diff.go:56
↓ 1 callers
Function
titleCase
(s string)
internal/memory/sessionfiles.go:291
↓ 1 callers
Method
toMessages
(messages []api.Message)
internal/provider/anthropic.go:137
↓ 1 callers
Method
toMessages
toMessages translates our generic Message slice into the OpenAI chat-message shape. Two notable splits: - tool results: Anthropic carries them as bloc
internal/provider/openai.go:134
↓ 1 callers
Method
toTools
(tools []api.ToolDef)
internal/provider/anthropic.go:167
↓ 1 callers
Method
toTools
toTools builds the OpenAI tool list. OpenAI expects the *full* JSON Schema envelope (`{"type":"object","properties":..., "required":...}`); our ToolDe
internal/provider/openai.go:195
↓ 1 callers
Method
toggleDebugFocus
toggleDebugFocus flips focus between the input box and the debug panel. On the first focus, picks the latest event as the selection so ↑/↓ has a start
internal/ui/program.go:650
↓ 1 callers
Method
updateApproval
(msg tea.KeyMsg)
internal/ui/program.go:466
↓ 1 callers
Method
updateDebugFocus
updateDebugFocus is the key handler used while the debug panel is focused. It owns ↑/↓ navigation, Enter to drill in, Esc to back out, and forwards sc
internal/ui/program.go:674
↓ 1 callers
Method
updateInput
(msg tea.KeyMsg)
internal/ui/program.go:426
↓ 1 callers
Method
usageStatus
usageStatus formats the session's cumulative token usage for the status line. Empty when no calls have been made or no UsageFunc was wired.
internal/ui/program.go:1165
↓ 1 callers
Method
viewApprovalModal
viewApprovalModal renders the full-screen modal that takes over while the user is reviewing a write_file proposal. Same shape as the debug modal but w
internal/ui/program.go:965
↓ 1 callers
Method
viewDebugModal
viewDebugModal renders the full-screen modal that takes over while the user is inspecting one event. The conversation viewport and input box are hidde
internal/ui/program.go:997
↓ 1 callers
Method
writeEvent
(before, after []api.Message)
internal/compact/logging.go:43
Method
Compact
(ctx context.Context, messages []api.Message)
internal/compact/logging.go:25
Method
Compact
(ctx context.Context, messages []api.Message)
internal/compact/summarize.go:25
Method
Compact
(_ context.Context, messages []api.Message)
internal/compact/nocompaction.go:12
Function
Confirm
Confirm shows a single-line y/n prompt and returns the user's answer. Default (Enter, Esc, Ctrl-C) is deny — safer for destructive tools.
internal/ui/input.go:168
Method
Definition
()
delegate.go:26
Method
Definition
()
internal/mcp/register.go:27
Method
Definition
()
internal/agent/agent_test.go:25
Method
Definition
()
internal/tool/remember.go:21
Method
Definition
()
internal/tool/readfile.go:16
Method
Definition
()
internal/tool/recall.go:22
Method
Definition
()
internal/tool/writefile.go:16
Method
Definition
()
internal/tool/registry_test.go:19
Method
Definition
()
internal/tool/bash.go:16
Method
Description
()
internal/subagent/research.go:31
← previous
next →
101–200 of 301, ranked by callers