You've already forked agentic-coding-workflow
主流程
This commit is contained in:
@@ -154,11 +154,12 @@ SELECT id, workspace_id, project_id, agent_kind_id, user_id,
|
||||
branch, cwd_path, is_main_worktree, status,
|
||||
pid, exit_code, last_error, started_at, ended_at
|
||||
FROM acp_sessions
|
||||
WHERE ($1::uuid IS NULL OR requirement_id = $1)
|
||||
ORDER BY started_at DESC
|
||||
`
|
||||
|
||||
func (q *Queries) ListAllSessions(ctx context.Context) ([]AcpSession, error) {
|
||||
rows, err := q.db.Query(ctx, listAllSessions)
|
||||
func (q *Queries) ListAllSessions(ctx context.Context, dollar_1 pgtype.UUID) ([]AcpSession, error) {
|
||||
rows, err := q.db.Query(ctx, listAllSessions, dollar_1)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -202,11 +203,17 @@ SELECT id, workspace_id, project_id, agent_kind_id, user_id,
|
||||
pid, exit_code, last_error, started_at, ended_at
|
||||
FROM acp_sessions
|
||||
WHERE user_id = $1
|
||||
AND ($2::uuid IS NULL OR requirement_id = $2)
|
||||
ORDER BY started_at DESC
|
||||
`
|
||||
|
||||
func (q *Queries) ListSessionsByUser(ctx context.Context, userID pgtype.UUID) ([]AcpSession, error) {
|
||||
rows, err := q.db.Query(ctx, listSessionsByUser, userID)
|
||||
type ListSessionsByUserParams struct {
|
||||
UserID pgtype.UUID `json:"user_id"`
|
||||
Column2 pgtype.UUID `json:"column_2"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListSessionsByUser(ctx context.Context, arg ListSessionsByUserParams) ([]AcpSession, error) {
|
||||
rows, err := q.db.Query(ctx, listSessionsByUser, arg.UserID, arg.Column2)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user