Let the lead move the right pane while it shows the Project tab
This commit is contained in:
@@ -23,7 +23,7 @@ const leadGuidance = `You are the human's lead agent in byre, shown in the left
|
||||
- A question or report that needs the human: that task's inbox tab, and say in a sentence or two what it is and what you recommend.
|
||||
- Discussing a task's work, what its agent did or is doing, or whether it is ready to merge: its transcript tab. A specific file in its worktree: its files tab.
|
||||
- The changes tab only when the human asks to see the diff; they rarely want it.
|
||||
- Don't move the pane for things that don't need the human, and don't pull it away from what they are looking at unless the new thing is more urgent. While the human is working in the right pane, show is refused unless what it shows is finished: say in chat what you would have shown, and carry on.
|
||||
- Don't move the pane for things that don't need the human, and don't pull it away from what they are looking at unless the new thing is more urgent. While the human is working in the right pane, show is refused unless it is on the project tab or what it shows is finished: say in chat what you would have shown, and carry on.
|
||||
- Questions from task agents: answer one yourself with answer_question only when the answer is clear, for example the agent's recommendation is plainly right given what the human has said, or the human already decided it. Otherwise show it to the human with your recommendation and wait. When the human tells you an answer, give it with answer_question. Say which questions you answered and how.
|
||||
- Reports: read them and tell the human only what matters: work finished and ready to merge, problems, decisions made. Stay quiet about routine progress.
|
||||
- Dig into context with list_tasks, read_transcript and read_inbox, and with your own Read, Grep and Bash on a task's worktree path (from list_tasks). Don't edit files in task worktrees; ask the task's agent with send_message.
|
||||
|
||||
@@ -117,6 +117,19 @@ func TestLeadSignalsAndShow(t *testing.T) {
|
||||
e.waitFor("show allowed on an emptied inbox", func(ev api.Event) bool {
|
||||
return ev.Kind == "focus.updated" && ev.Actor == login+" (lead)" && ev.Payload["tab"] == string(api.TabChanges)
|
||||
})
|
||||
e.waitFor("lead idle after show on an emptied inbox", leadIdle)
|
||||
|
||||
err = m.SetFocus(e.ctx, login, api.Focus{ProjectId: &e.project.Id, Tabs: []api.TaskTab{api.TabProject}, Tab: api.TabProject}, login)
|
||||
if err != nil {
|
||||
t.Fatalf("focus project: %v", err)
|
||||
}
|
||||
_, err = m.MessageLead(e.ctx, e.user, "Call the show tool with task_id "+e.task.Id+", tabs [\"transcript\"] and tab \"transcript\". Then say done.", "", nil)
|
||||
if err != nil {
|
||||
t.Fatalf("message lead: %v", err)
|
||||
}
|
||||
e.waitFor("show allowed over the project tab", func(ev api.Event) bool {
|
||||
return ev.Kind == "focus.updated" && ev.Actor == login+" (lead)" && ev.Payload["tab"] == string(api.TabTranscript)
|
||||
})
|
||||
}
|
||||
|
||||
func TestFocusProject(t *testing.T) {
|
||||
|
||||
@@ -296,7 +296,7 @@ func (m *Manager) leadTools(l *live) []mcp.Tool {
|
||||
"Tabs: transcript, changes, files, inbox (the task's open items), project (the project's dashboard: its active tasks and its TODO.md items); with only project_id, only project shows anything. "+
|
||||
"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 while the human is working in the right pane, unless 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, 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).",
|
||||
`{"type": "object", "properties": {
|
||||
"task_id": {"type": "string"},
|
||||
"project_id": {"type": "string", "description": "Ignored when task_id is given."},
|
||||
@@ -326,7 +326,7 @@ func (m *Manager) leadTools(l *live) []mcp.Tool {
|
||||
m.mu.Lock()
|
||||
focused := m.paneFocused[user.Login]
|
||||
m.mu.Unlock()
|
||||
if focused {
|
||||
if focused && current.Tab != api.TabProject {
|
||||
finished, err := m.paneFinished(ctx, current)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user