Mac: add summarize tool
This commit is contained in:
@@ -75,7 +75,14 @@ private enum InstallState: Equatable {
|
|||||||
// MARK: - View
|
// MARK: - View
|
||||||
|
|
||||||
struct ToolsSettings: 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(
|
ToolEntry(
|
||||||
id: "mcporter",
|
id: "mcporter",
|
||||||
name: "🧳 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.",
|
description: "Runs OpenAI-ready agent workflows from the CLI with session replay and browser control.",
|
||||||
method: .node(package: "@steipete/oracle", binary: "oracle"),
|
method: .node(package: "@steipete/oracle", binary: "oracle"),
|
||||||
kind: .tool),
|
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(
|
ToolEntry(
|
||||||
id: "qmd",
|
id: "qmd",
|
||||||
name: "🔎 qmd",
|
name: "🔎 qmd",
|
||||||
@@ -208,6 +222,7 @@ struct ToolsSettings: View {
|
|||||||
destination: "\(NSHomeDirectory())/agent-tools"),
|
destination: "\(NSHomeDirectory())/agent-tools"),
|
||||||
kind: .tool),
|
kind: .tool),
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
|
||||||
@AppStorage("tools.packageManager") private var packageManagerRaw = NodePackageManager.npm.rawValue
|
@AppStorage("tools.packageManager") private var packageManagerRaw = NodePackageManager.npm.rawValue
|
||||||
@State private var installStates: [String: InstallState] = [:]
|
@State private var installStates: [String: InstallState] = [:]
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ struct SettingsViewSmokeTests {
|
|||||||
enabled: false,
|
enabled: false,
|
||||||
createdAtMs: 1_700_000_000_000,
|
createdAtMs: 1_700_000_000_000,
|
||||||
updatedAtMs: 1_700_000_100_000,
|
updatedAtMs: 1_700_000_100_000,
|
||||||
schedule: .every(everyMs: 30_000, anchorMs: nil),
|
schedule: .every(everyMs: 30000, anchorMs: nil),
|
||||||
sessionTarget: .isolated,
|
sessionTarget: .isolated,
|
||||||
wakeMode: .nextHeartbeat,
|
wakeMode: .nextHeartbeat,
|
||||||
payload: .agentTurn(
|
payload: .agentTurn(
|
||||||
@@ -148,4 +148,8 @@ struct SettingsViewSmokeTests {
|
|||||||
let view = ToolsSettings()
|
let view = ToolsSettings()
|
||||||
_ = view.body
|
_ = view.body
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test func toolsSettingsIncludesSummarize() {
|
||||||
|
#expect(ToolsSettings.toolIDsForTests.contains("summarize"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user