Mac: add summarize tool

main
Peter Steinberger 2025-12-19 17:46:49 +01:00
parent 2bc0c57f18
commit 47a1774dc0
2 changed files with 153 additions and 134 deletions

View File

@ -75,7 +75,14 @@ private enum InstallState: Equatable {
// MARK: - View
struct ToolsSettings: View {
private let tools: [ToolEntry] = [
private let tools: [ToolEntry] = Self.makeTools()
static var toolIDsForTests: [String] {
makeTools().map(\.id)
}
private static func makeTools() -> [ToolEntry] {
[
ToolEntry(
id: "mcporter",
name: "🧳 mcporter",
@ -104,6 +111,13 @@ struct ToolsSettings: View {
description: "Runs OpenAI-ready agent workflows from the CLI with session replay and browser control.",
method: .node(package: "@steipete/oracle", binary: "oracle"),
kind: .tool),
ToolEntry(
id: "summarize",
name: "🧾 summarize",
url: URL(string: "https://github.com/steipete/summarize")!,
description: "Link → clean text → summary (web pages, YouTube, and local/remote files).",
method: .brew(formula: "steipete/tap/summarize", binary: "summarize"),
kind: .tool),
ToolEntry(
id: "qmd",
name: "🔎 qmd",
@ -208,6 +222,7 @@ struct ToolsSettings: View {
destination: "\(NSHomeDirectory())/agent-tools"),
kind: .tool),
]
}
@AppStorage("tools.packageManager") private var packageManagerRaw = NodePackageManager.npm.rawValue
@State private var installStates: [String: InstallState] = [:]

View File

@ -35,7 +35,7 @@ struct SettingsViewSmokeTests {
enabled: false,
createdAtMs: 1_700_000_000_000,
updatedAtMs: 1_700_000_100_000,
schedule: .every(everyMs: 30_000, anchorMs: nil),
schedule: .every(everyMs: 30000, anchorMs: nil),
sessionTarget: .isolated,
wakeMode: .nextHeartbeat,
payload: .agentTurn(
@ -148,4 +148,8 @@ struct SettingsViewSmokeTests {
let view = ToolsSettings()
_ = view.body
}
@Test func toolsSettingsIncludesSummarize() {
#expect(ToolsSettings.toolIDsForTests.contains("summarize"))
}
}