feat(shell): add parallel bash shell subsystem auto-started per workspace

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
tao.chen
2026-07-03 16:36:35 +08:00
co-authored by Claude
parent 75e807c154
commit 0ec3efa812
14 changed files with 730 additions and 12 deletions
+5 -2
View File
@@ -12,6 +12,7 @@ import (
"codespace/internal/api"
"codespace/internal/process"
"codespace/internal/service"
"codespace/internal/shell"
"codespace/internal/workspace"
"codespace/pkg/config"
"codespace/pkg/logger"
@@ -34,12 +35,14 @@ func main() {
workspaces := workspace.NewLocalManager(cfg.Workspace.Root)
processes := process.NewManager(cfg.Process.OpenCodeCommand)
shellMgr := shell.NewManager(cfg.Shell.Command, cfg.Shell.Args)
workspaceSvc := service.NewWorkspaceService(workspaces, processes, lg)
workspaceSvc := service.NewWorkspaceService(workspaces, processes, shellMgr, lg)
fileSvc := service.NewFileService(workspaces, cfg.File.MaxWriteBytes)
processSvc := service.NewProcessService(workspaces, processes, lg)
shellSvc := service.NewShellService(workspaces, shellMgr, lg)
router := api.NewRouter(workspaceSvc, fileSvc, processSvc, lg, cfg.Gin.Mode)
router := api.NewRouter(workspaceSvc, fileSvc, processSvc, shellSvc, lg, cfg.Gin.Mode)
server := &http.Server{
Addr: cfg.Server.Addr,