Admin view in the web UI
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
|
||||
type QueuedTurn struct {
|
||||
SessionID string
|
||||
TaskID string
|
||||
Vendor api.AgentSessionVendor
|
||||
Actor string
|
||||
Text string
|
||||
@@ -59,7 +60,7 @@ func (s *Store) EnqueueTurn(ctx context.Context, q QueuedTurn) error {
|
||||
|
||||
func (s *Store) QueuedTurns(ctx context.Context) ([]QueuedTurn, error) {
|
||||
rows, err := s.db.QueryContext(ctx, `
|
||||
SELECT q.session_id, s.vendor, q.actor, q.text, q.images, q.created_at
|
||||
SELECT q.session_id, s.task_id, s.vendor, q.actor, q.text, q.images, q.created_at
|
||||
FROM turn_queue q JOIN agent_sessions s ON s.id = q.session_id
|
||||
ORDER BY q.created_at
|
||||
`)
|
||||
@@ -74,7 +75,7 @@ func (s *Store) QueuedTurns(ctx context.Context) ([]QueuedTurn, error) {
|
||||
vendor := ""
|
||||
images := ""
|
||||
createdAt := ""
|
||||
err = rows.Scan(&q.SessionID, &vendor, &q.Actor, &q.Text, &images, &createdAt)
|
||||
err = rows.Scan(&q.SessionID, &q.TaskID, &vendor, &q.Actor, &q.Text, &images, &createdAt)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user