Bounce prose questions only when they ask the human to decide
This commit is contained in:
@@ -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+`
|
||||
|
||||
Reference in New Issue
Block a user