Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ cp -R dist/Halos.app ~/Applications/
- `main/` — shared trunk
- `claude/` — Claude on `claude/workspace`
- `codex/` — Codex on `codex/workspace`
- `clif/` — Clif (OpenClaw) on `clif/workspace` — no CLAUDE/AGENTS file
- `huma/` — Huma on `huma/workspace`

One agent per worktree. Don't use a sibling worktree as scratch.
One agent per worktree. Don't use a sibling worktree as scratch. Don't create additional worktrees unless Fischer explicitly asks.
60 changes: 58 additions & 2 deletions Sources/Halos/Models/RunToolRollup.swift
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
import Foundation

struct PluginToolDetail: Equatable {
let pluginName: String
let action: String

var displayText: String {
"\(pluginName): \(action)"
}
}

struct RunToolRollup {
var toolNamesByCallID: [String: String] = [:]
var toolCategoriesByName: [String: GatewayStreamFormatter.ToolCategory] = [:]
var toolCounts: [String: Int] = [:]
var toolActionCounts: [String: Int] = [:]
var compactActionCounts: [String: Int] = [:]
var activeToolCallIDsByName: [String: Set<String>] = [:]
var activePluginCallIDsByName: [String: Set<String>] = [:]
var activeTools: Set<String> = []
var failedTools: Set<String> = []
var activePlugins: Set<String> = []
var latestEndedPlugin: String?
var pluginDetails: [String] = []
var latestPluginName: String?
var pluginDetails: [PluginToolDetail] = []
var toolDetails: [String] = []
var latestSummary: String?

Expand All @@ -20,6 +31,51 @@ struct RunToolRollup {
|| !pluginDetails.isEmpty
|| !toolCounts.isEmpty
}

mutating func markActive(toolCallID: String, title: String, category: GatewayStreamFormatter.ToolCategory) {
activeToolCallIDsByName[title, default: []].insert(toolCallID)
if category == .plugin {
activePluginCallIDsByName[title, default: []].insert(toolCallID)
}
refreshActiveNames()
}

mutating func markComplete(toolCallID: String, title: String, category: GatewayStreamFormatter.ToolCategory) {
activeToolCallIDsByName[title]?.remove(toolCallID)
if activeToolCallIDsByName[title]?.isEmpty == true {
activeToolCallIDsByName.removeValue(forKey: title)
}
if category == .plugin {
activePluginCallIDsByName[title]?.remove(toolCallID)
if activePluginCallIDsByName[title]?.isEmpty == true {
activePluginCallIDsByName.removeValue(forKey: title)
}
}
refreshActiveNames()
}

mutating func markAllComplete(title: String, category: GatewayStreamFormatter.ToolCategory) {
activeToolCallIDsByName.removeValue(forKey: title)
if category == .plugin {
activePluginCallIDsByName.removeValue(forKey: title)
}
refreshActiveNames()
}

mutating func clearActiveCalls() {
activeToolCallIDsByName.removeAll()
activePluginCallIDsByName.removeAll()
refreshActiveNames()
}

private mutating func refreshActiveNames() {
activeTools = Set(activeToolCallIDsByName.compactMap { name, callIDs in
callIDs.isEmpty ? nil : name
})
activePlugins = Set(activePluginCallIDsByName.compactMap { name, callIDs in
callIDs.isEmpty ? nil : name
})
}
}

struct LocalSessionTitleOverride: Codable, Equatable {
Expand Down
Loading
Loading