mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 01:00:21 +00:00
fix(tool-display): generate swift snapshot from core config
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -130,44 +130,7 @@ public enum ToolDisplayRegistry {
|
||||
"messageId",
|
||||
],
|
||||
actions: nil),
|
||||
tools: [
|
||||
"bash": ToolDisplaySpec(
|
||||
emoji: "🛠️",
|
||||
title: "Bash",
|
||||
label: nil,
|
||||
detailKeys: ["command"],
|
||||
actions: nil),
|
||||
"read": ToolDisplaySpec(
|
||||
emoji: "📖",
|
||||
title: "Read",
|
||||
label: nil,
|
||||
detailKeys: ["path"],
|
||||
actions: nil),
|
||||
"write": ToolDisplaySpec(
|
||||
emoji: "✍️",
|
||||
title: "Write",
|
||||
label: nil,
|
||||
detailKeys: ["path"],
|
||||
actions: nil),
|
||||
"edit": ToolDisplaySpec(
|
||||
emoji: "📝",
|
||||
title: "Edit",
|
||||
label: nil,
|
||||
detailKeys: ["path"],
|
||||
actions: nil),
|
||||
"attach": ToolDisplaySpec(
|
||||
emoji: "📎",
|
||||
title: "Attach",
|
||||
label: nil,
|
||||
detailKeys: ["path", "url", "fileName"],
|
||||
actions: nil),
|
||||
"process": ToolDisplaySpec(
|
||||
emoji: "🧰",
|
||||
title: "Process",
|
||||
label: nil,
|
||||
detailKeys: ["sessionId"],
|
||||
actions: nil),
|
||||
])
|
||||
tools: nil)
|
||||
}
|
||||
|
||||
private static func titleFromName(_ name: String) -> String {
|
||||
|
||||
@@ -9,8 +9,8 @@ import Testing
|
||||
}
|
||||
|
||||
@Test func resolvesKnownToolFromConfig() {
|
||||
let summary = ToolDisplayRegistry.resolve(name: "bash", args: nil)
|
||||
let summary = ToolDisplayRegistry.resolve(name: "exec", args: nil)
|
||||
#expect(summary.emoji == "🛠️")
|
||||
#expect(summary.title == "Bash")
|
||||
#expect(summary.title == "Exec")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user