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

Method applyContent

internal/tui/model.go:757–769  ·  view source on GitHub ↗

applyContent writes one streamed text chunk to the live buffer and promotes phase from thinking to streaming on the first chunk so the status bar shows tokens flowing. View() renders the buffer live above the prompt; once the block ends it's flushed through glamour into scrollback via tea.Println.

(e llm.Event)

Source from the content-addressed store, hash-verified

755 }
756 m.lastPromptEstimate = est
757 dbgWriteRequest(m.cfg.ActiveProfile().LLM, ctxSize, budget, len(m.history), out)
758 return out
759}
760
761// buildTools exposes the four local tools every turn: bash, read_file,
762// write_file, edit_file. No loop/control tool; a turn ends when the model
763// stops emitting tool calls (see handleStreamClosed).
764func (m *Model) buildTools() []llm.Tool {
765 return []llm.Tool{
766 schemaToTool(tools.BashSchema()),
767 schemaToTool(tools.ReadFileSchema()),
768 schemaToTool(tools.WriteFileSchema()),
769 schemaToTool(tools.EditFileSchema()),
770 }
771}
772

Callers 1

handleStreamMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected