You've already forked agentic-coding-workflow
主流程
This commit is contained in:
@@ -335,14 +335,14 @@ func (s *sessionService) Get(ctx context.Context, c Caller, id uuid.UUID) (*Sess
|
||||
return sess, nil
|
||||
}
|
||||
|
||||
func (s *sessionService) List(ctx context.Context, c Caller, all bool) ([]*Session, error) {
|
||||
if all && !c.IsAdmin {
|
||||
func (s *sessionService) List(ctx context.Context, c Caller, f SessionListFilter) ([]*Session, error) {
|
||||
if f.All && !c.IsAdmin {
|
||||
return nil, errs.New(errs.CodeForbidden, "admin only")
|
||||
}
|
||||
if all {
|
||||
return s.repo.ListAllSessions(ctx)
|
||||
if f.All {
|
||||
return s.repo.ListAllSessions(ctx, f.RequirementID)
|
||||
}
|
||||
return s.repo.ListSessionsByUser(ctx, c.UserID)
|
||||
return s.repo.ListSessionsByUser(ctx, c.UserID, f.RequirementID)
|
||||
}
|
||||
|
||||
func (s *sessionService) Terminate(ctx context.Context, c Caller, id uuid.UUID) error {
|
||||
|
||||
Reference in New Issue
Block a user