Show the terminal immediately when opening the Terminal tab
This commit is contained in:
@@ -109,6 +109,16 @@ func (ts *Terminals) List(taskID string) []*Terminal {
|
||||
return slices.Clone(ts.byTask[taskID])
|
||||
}
|
||||
|
||||
func (ts *Terminals) All() map[string][]*Terminal {
|
||||
ts.mu.Lock()
|
||||
defer ts.mu.Unlock()
|
||||
out := map[string][]*Terminal{}
|
||||
for taskID, terms := range ts.byTask {
|
||||
out[taskID] = slices.Clone(terms)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func (ts *Terminals) Get(taskID, id string) *Terminal {
|
||||
ts.mu.Lock()
|
||||
defer ts.mu.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user