فهرست منبع

remove tool timeout

Kujtim Hoxha 1 سال پیش
والد
کامیت
1586d757dc
1فایلهای تغییر یافته به همراه2 افزوده شده و 7 حذف شده
  1. 2 7
      internal/permission/permission.go

+ 2 - 7
internal/permission/permission.go

@@ -5,7 +5,6 @@ import (
 	"path/filepath"
 	"path/filepath"
 	"slices"
 	"slices"
 	"sync"
 	"sync"
-	"time"
 
 
 	"github.com/google/uuid"
 	"github.com/google/uuid"
 	"github.com/opencode-ai/opencode/internal/config"
 	"github.com/opencode-ai/opencode/internal/config"
@@ -104,12 +103,8 @@ func (s *permissionService) Request(opts CreatePermissionRequest) bool {
 	s.Publish(pubsub.CreatedEvent, permission)
 	s.Publish(pubsub.CreatedEvent, permission)
 
 
 	// Wait for the response with a timeout
 	// Wait for the response with a timeout
-	select {
-	case resp := <-respCh:
-		return resp
-	case <-time.After(10 * time.Minute):
-		return false
-	}
+	resp := <-respCh
+	return resp
 }
 }
 
 
 func (s *permissionService) AutoApproveSession(sessionID string) {
 func (s *permissionService) AutoApproveSession(sessionID string) {