feat(shell): add parallel bash shell subsystem auto-started per workspace
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
"codespace/internal/process"
|
||||
"codespace/internal/service"
|
||||
"codespace/internal/shell"
|
||||
"codespace/internal/workspace"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -29,11 +30,13 @@ func TestProcessWS(t *testing.T) {
|
||||
wsRoot := filepath.Join(tmpDir, "workspaces")
|
||||
wsMgr := workspace.NewLocalManager(wsRoot)
|
||||
procMgr := process.NewManager(opencodePath)
|
||||
wsSvc := service.NewWorkspaceService(wsMgr, procMgr, nil)
|
||||
shellMgr := shell.NewManager("bash", []string{"-i"})
|
||||
wsSvc := service.NewWorkspaceService(wsMgr, procMgr, shellMgr, nil)
|
||||
fileSvc := service.NewFileService(wsMgr, 1<<20)
|
||||
procSvc := service.NewProcessService(wsMgr, procMgr, nil)
|
||||
shellSvc := service.NewShellService(wsMgr, shellMgr, nil)
|
||||
|
||||
r := NewRouter(wsSvc, fileSvc, procSvc, nil, gin.TestMode)
|
||||
r := NewRouter(wsSvc, fileSvc, procSvc, shellSvc, nil, gin.TestMode)
|
||||
srv := httptest.NewServer(r)
|
||||
defer srv.Close()
|
||||
|
||||
@@ -102,11 +105,13 @@ func TestProcessWSMultiSubscriber(t *testing.T) {
|
||||
wsRoot := filepath.Join(tmpDir, "workspaces")
|
||||
wsMgr := workspace.NewLocalManager(wsRoot)
|
||||
procMgr := process.NewManager(opencodePath)
|
||||
wsSvc := service.NewWorkspaceService(wsMgr, procMgr, nil)
|
||||
shellMgr := shell.NewManager("bash", []string{"-i"})
|
||||
wsSvc := service.NewWorkspaceService(wsMgr, procMgr, shellMgr, nil)
|
||||
fileSvc := service.NewFileService(wsMgr, 1<<20)
|
||||
procSvc := service.NewProcessService(wsMgr, procMgr, nil)
|
||||
shellSvc := service.NewShellService(wsMgr, shellMgr, nil)
|
||||
|
||||
r := NewRouter(wsSvc, fileSvc, procSvc, nil, gin.TestMode)
|
||||
r := NewRouter(wsSvc, fileSvc, procSvc, shellSvc, nil, gin.TestMode)
|
||||
srv := httptest.NewServer(r)
|
||||
defer srv.Close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user