Add show_page and show_file, and let file tools reach any path

This commit is contained in:
Ian Gulliver
2026-10-21 18:29:01 -07:00
parent 585c8ba5f8
commit 524bc0252e
11 changed files with 540 additions and 496 deletions
+7
View File
@@ -30,6 +30,7 @@ private let signScript = """
@MainActor
final class Remote {
let api: API
weak var store: Store?
private var ws: URLSessionWebSocketTask?
private var stopped = false
private var heard = Date()
@@ -188,6 +189,12 @@ final class Remote {
case .sign:
let (code, status, signature) = try await sign(Data(req.data?.data ?? []), as: req.ident ?? "", timeoutMs: req.timeoutMs ?? 120_000)
return ClientReply(id: req.id, exitCode: code, output: status, data: Base64EncodedData(signature))
case .openPage:
store!.showPage(req.task ?? "", req.path ?? "")
return ClientReply(id: req.id)
case .openFile:
store!.showInFiles(req.task ?? "", req.path ?? "")
return ClientReply(id: req.id)
}
}