iOS: centralize canvas commands and capabilities

This commit is contained in:
Peter Steinberger
2025-12-18 02:12:53 +01:00
parent c976799f8c
commit 33bf5cf42a
5 changed files with 77 additions and 9 deletions

View File

@@ -266,12 +266,7 @@ final class NodeAppModel {
private func handleInvoke(_ req: BridgeInvokeRequest) async -> BridgeInvokeResponse {
// Alias for "canvas" capability: accept canvas.* commands and map them to screen.*.
let command =
if req.command.hasPrefix("canvas.") {
"screen." + req.command.dropFirst("canvas.".count)
} else {
req.command
}
let command = ClawdisInvokeCommandAliases.canonicalizeCanvasToScreen(req.command)
if command.hasPrefix("screen.") || command.hasPrefix("camera."), self.isBackgrounded {
return BridgeInvokeResponse(