Bounce prose questions only when they ask the human to decide

This commit is contained in:
Ian Gulliver
2026-10-18 11:59:22 -07:00
parent aac99c48f9
commit 2658dcbfc4
6 changed files with 71 additions and 11 deletions
+9
View File
@@ -1352,6 +1352,15 @@ func (s *Store) TaskEvents(ctx context.Context, taskID string, after int64, limi
return scanEvents(rows)
}
func (s *Store) FirstPrompt(ctx context.Context, taskID string) (string, error) {
text := ""
err := s.db.QueryRowContext(ctx, `
SELECT coalesce(json_extract(payload, '$.text'), '') FROM events
WHERE task_id = ? AND kind = 'user.message' ORDER BY seq LIMIT 1
`, taskID).Scan(&text)
return text, err
}
func (s *Store) BoardPosts(ctx context.Context, taskID string, after int64) ([]api.Event, error) {
rows, err := s.db.QueryContext(ctx, `
SELECT `+eventColumns+`