feat: use Task tool description for subagent window titles + auto-minimize completed

- Extract short description from TaskTracker (params.description) for subagent windows
- Correlate subagents with sessions by working directory and timing
- Auto-minimize subagent windows when agents complete
- Persist minimized/open window states to server for cross-browser sync
- Restore window states on reconnection/page reload
- New API: GET/PUT /api/subagent-window-states
- State file: ~/.claudeman/subagent-window-states.json

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-26 09:06:49 +01:00
co-authored by Claude Opus 4.5
parent f95ffd12e2
commit f06240f4ef
10 changed files with 388 additions and 11 deletions
+22
View File
@@ -242,6 +242,28 @@ export class SubagentWatcher extends EventEmitter {
return this.agentInfo.get(agentId);
}
/**
* Update a subagent's description.
* Used to set the short description from TaskTracker when available.
*/
updateDescription(agentId: string, description: string): boolean {
const info = this.agentInfo.get(agentId);
if (info) {
info.description = description;
this.emit('subagent:updated', info);
return true;
}
return false;
}
/**
* Find sessions whose working directory matches a project hash.
* Returns the project hash for a given working directory.
*/
getProjectHashForDir(workingDir: string): string {
return this.getProjectHash(workingDir);
}
/**
* Get recent subagents (modified within specified minutes)
*/