MCPcopy Create free account
hub / github.com/Facets-cloud/flow / SpawnTab

Function SpawnTab

internal/spawner/spawner.go:106–121  ·  view source on GitHub ↗

SpawnTab opens a tab in the auto-detected backend. The contract matches every backend's SpawnTab.

(title, cwd, command string, envVars map[string]string)

Source from the content-addressed store, hash-verified

104// SpawnTab opens a tab in the auto-detected backend. The contract
105// matches every backend's SpawnTab.
106func SpawnTab(title, cwd, command string, envVars map[string]string) error {
107 switch Detect() {
108 case BackendZellij:
109 return zellij.SpawnTab(title, cwd, command, envVars)
110 case BackendKitty:
111 return kitty.SpawnTab(title, cwd, command, envVars)
112 case BackendTerminal:
113 return terminal.SpawnTab(title, cwd, command, envVars)
114 case BackendWarp:
115 return warp.SpawnTab(title, cwd, command, envVars)
116 case BackendGhostty:
117 return ghostty.SpawnTab(title, cwd, command, envVars)
118 default:
119 return iterm.SpawnTab(title, cwd, command, envVars)
120 }
121}
122
123// FocusSession tries to focus an existing tab/pane that is already
124// running the named harness binary with the given session UUID. The

Callers 8

cmdDoFunction · 0.92
owner_tick.goFile · 0.92
TestSpawnTabRoutesToWarpFunction · 0.70

Calls 7

SpawnTabFunction · 0.92
SpawnTabFunction · 0.92
SpawnTabFunction · 0.92
SpawnTabFunction · 0.92
SpawnTabFunction · 0.92
SpawnTabFunction · 0.92
DetectFunction · 0.85

Tested by 6

TestSpawnTabRoutesToWarpFunction · 0.56