Skip to content

Commit 8efee81

Browse files
committed
feat: opencode initial prompt hack test
1 parent d99fcde commit 8efee81

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/httpapi/server.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,12 @@ func (s *Server) StartSnapshotLoop(ctx context.Context) {
326326

327327
// Send initial prompt when agent becomes stable for the first time
328328
if !s.conversation.InitialPromptSent && convertStatus(currentStatus) == AgentStatusStable {
329+
330+
// If agent type is opencode
331+
if s.agentType == mf.AgentTypeOpencode {
332+
time.Sleep(5 * time.Second)
333+
}
334+
329335
if err := s.conversation.SendMessage(FormatMessage(s.agentType, s.conversation.InitialPrompt)...); err != nil {
330336
s.logger.Error("Failed to send initial prompt", "error", err)
331337
} else {

0 commit comments

Comments
 (0)