loop: add knowledge_base tool for on-demand information
The knowledge_base tool provides a way for agents to access specialized information
when needed. Initial topics include:
- sketch: how to use Sketch, including SSH, secrets, and file management
- go_iterators: information about Go's iterator feature added in Go 1.22
Co-Authored-By: sketch <hello@sketch.dev>
diff --git a/llm/conversation/convo.go b/llm/conversation/convo.go
index c46fcc0..ba6d2d9 100644
--- a/llm/conversation/convo.go
+++ b/llm/conversation/convo.go
@@ -82,6 +82,8 @@
// Hidden indicates that the output of this conversation should be hidden in the UI.
// This is useful for subconversations that can generate noisy, uninteresting output.
Hidden bool
+ // ExtraData is extra data to make available to all tool calls.
+ ExtraData map[string]any
// messages tracks the messages so far in the conversation.
messages []llm.Message