initial interaction
Change-Id: I1ccaec03045390076191bd0d1b94ab0044398805
diff --git a/loop/agent.go b/loop/agent.go
index 186bd1a..decb4b0 100644
--- a/loop/agent.go
+++ b/loop/agent.go
@@ -25,7 +25,10 @@
"sketch.dev/claudetool/codereview"
"sketch.dev/claudetool/onstart"
"sketch.dev/dodo_tools"
+<<<<<<< variant A
"sketch.dev/experiment"
+>>>>>>> variant B
+======= end
"sketch.dev/llm"
"sketch.dev/llm/ant"
"sketch.dev/llm/conversation"
@@ -2765,4 +2768,23 @@
MessageType string `json:"message_type"`
Body any `json:"body"`
TextContent string `json:"text_content"`
+
+// SendInitialMessage sends an LLM-generated initial message
+func (a *Agent) SendInitialMessage(ctx context.Context) {
+ introPrompt := `Based on your role as a Sketch coding assistant and the codebase information provided, write a brief, professional introduction to the user:
+1. Greet the user and tell them your name.
+2. Retrieve and analyze current project's dodo environment.
+3. Give dodo environment summary to the user.
+4. Ask what they'd like to work on. Be concise and helpful.`
+
+ // The LLM response will automatically be pushed to outbox via OnResponse()
+ _, err := a.convo.SendUserTextMessage(introPrompt)
+ if err != nil {
+ a.pushToOutbox(ctx, AgentMessage{
+ Type: AgentMessageType,
+ Content: "Hello! I'm your Sketch coding assistant. What would you like to work on today?",
+ EndOfTurn: true,
+ })
+ return
+ }
}