on main help sign in
remove tool timeout
1586d75Kujtim Hoxha
internal/permission/permission.go+2−7
@@ -5,7 +5,6 @@ import (
5 "path/filepath"
5 "path/filepath"
6 "slices"
6 "slices"
7 "sync"
7 "sync"
8− "time"
9
8
10 "github.com/google/uuid"
9 "github.com/google/uuid"
11 "github.com/opencode-ai/opencode/internal/config"
10 "github.com/opencode-ai/opencode/internal/config"
@@ -104,12 +103,8 @@ func (s *permissionService) Request(opts CreatePermissionRequest) bool {
104 s.Publish(pubsub.CreatedEvent, permission)
103 s.Publish(pubsub.CreatedEvent, permission)
105
104
106 // Wait for the response with a timeout
105 // Wait for the response with a timeout
107− select {
108− case resp := <-respCh:
106+ resp := <-respCh
109− return resp
110− case <-time.After(10 * time.Minute):
111− return false
107+ return resp
112− }
113}
108}
114
109
115func (s *permissionService) AutoApproveSession(sessionID string) {
110func (s *permissionService) AutoApproveSession(sessionID string) {