瀏覽代碼

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"
 	"slices"
 	"sync"
-	"time"
 
 	"github.com/google/uuid"
 	"github.com/opencode-ai/opencode/internal/config"
@@ -104,12 +103,8 @@ func (s *permissionService) Request(opts CreatePermissionRequest) bool {
 	s.Publish(pubsub.CreatedEvent, permission)
 
 	// 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) {