Fix the app's pane focus reporting and hold show on a right-pane draft
This commit is contained in:
@@ -462,7 +462,7 @@ func (m *Manager) leadTools(l *live) []mcp.Tool {
|
||||
"Omit both task_id and project_id to clear the pane. "+
|
||||
"If the pane already shows that task (or project) on that tab, only the tab order changes and you are told so, even while the human is working in the pane. "+
|
||||
"Otherwise refused for 10 seconds after the human last moved the pane themselves (switching task or tab), whatever else holds; if a show was refused for it, byre signals you \"The move hold is over\" when those 10 seconds pass without another move, and sends no signal otherwise. "+
|
||||
"Otherwise refused while the human is working in the right pane, unless it is on the project tab, or what it shows is finished (a merged or discarded task, or an inbox tab with nothing left), "+
|
||||
"Otherwise refused while the human is working in the right pane (focused in it, or with unsent text in it), unless it is on the project tab, or what it shows is finished (a merged or discarded task, or an inbox tab with nothing left), "+
|
||||
"or it is on the transcript tab of a task whose agent is mid-turn, the human has no unsent text there, and either the human sent the message that started that turn since the pane last moved or the pane moved there 10 seconds ago or more; byre signals you \"Your right pane is free\" when either happens. "+
|
||||
"Also refused while the pane is on the project tab and the human started a TODO item there in the last 10 seconds, unless they switched task or tab or messaged you since; if a show was refused for it, byre signals you \"The start hold is over\" when those 10 seconds pass with the pane still on the project tab, and sends no signal otherwise.",
|
||||
`{"type": "object", "properties": {
|
||||
@@ -492,7 +492,7 @@ func (m *Manager) leadTools(l *live) []mcp.Tool {
|
||||
return "Already shown on that tab; the tab order was updated.", nil
|
||||
}
|
||||
m.mu.Lock()
|
||||
focused := m.paneFocus[user.Login].Focused
|
||||
working := m.paneFocus[user.Login].Focused || m.paneFocus[user.Login].Drafting
|
||||
humanMoved := m.humanMoved[user.Login]
|
||||
since := time.Since(humanMoved)
|
||||
moveHeld := since < moveHold
|
||||
@@ -510,7 +510,7 @@ func (m *Manager) leadTools(l *live) []mcp.Tool {
|
||||
if startHeld {
|
||||
return "", fmt.Errorf("%w: the human just started a TODO item from the project tab and is likely to start more; tell them in chat instead. The hold ends %s after that start, unless they move the pane or message you first; byre signals you \"The start hold is over\" when it ends, because this show was refused", ErrConflict, startHold)
|
||||
}
|
||||
if focused && current.Tab != api.TabProject {
|
||||
if working && current.Tab != api.TabProject {
|
||||
finished, err := m.paneFinished(ctx, current)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user