MCPcopy Create free account
hub / github.com/codehamr/codehamr / buildTools

Method buildTools

internal/tui/model.go:686–693  ·  view source on GitHub ↗

buildTools exposes the four local tools every turn: bash, read_file, write_file, edit_file. No loop/control tool; a turn ends when the model stops emitting tool calls (see handleStreamClosed).

()

Source from the content-addressed store, hash-verified

684 m.turnStart = time.Now()
685 m.lastOutcome = outcomeNone // the new run replaces the prior frozen summary
686 m.phase = phaseThinking
687 return m.startChat()
688}
689
690// appendUserTurn appends a user-role message to history and starts a turn.
691// The only path that does so; used by submit.
692func (m *Model) appendUserTurn(content string) tea.Cmd {
693 m.history = append(m.history, chmctx.Message{Role: chmctx.RoleUser, Content: content})
694 return m.beginTurn()
695}
696

Callers 2

startChatMethod · 0.95

Calls 5

BashSchemaFunction · 0.92
ReadFileSchemaFunction · 0.92
WriteFileSchemaFunction · 0.92
EditFileSchemaFunction · 0.92
schemaToToolFunction · 0.85

Tested by 1