This commit is contained in:
Wojtek Mach 2023-06-19 14:00:04 +02:00
parent b90eb22c33
commit 0aacf09e54
4 changed files with 14 additions and 9 deletions

View file

@ -1 +0,0 @@
{"generator":{"name":"xcode-tools","version":"14.3.1"},"enums":[],"queries":{},"autoShortcuts":[],"autoShortcutProviderMangledName":"","entities":{},"version":1,"shortcutTileColor":14,"actions":{"NewNotebookIntent":{"outputFlags":0,"typeSpecificMetadata":[],"effectiveBundleIdentifiers":[],"descriptionMetadata":{"searchKeywords":[],"descriptionText":{"key":"Create a new notebook."}},"outputType":{"primitive":{"wrapper":{"typeIdentifier":0}}},"parameters":[],"mangledTypeNameByBundleIdentifier":{},"title":{"key":"New Notebook"},"systemProtocols":[],"identifier":"NewNotebookIntent","authenticationPolicy":0,"presentationStyle":0,"mangledTypeName":"8Livebook17NewNotebookIntentV","availabilityAnnotations":{"LNPlatformNameWildcard":{"introducedVersion":"*"}},"openAppWhenRun":false}}}

View file

@ -1,4 +0,0 @@
{
"version" : "3.0",
"toolsVersion" : "14.3.1"
}

View file

@ -134,16 +134,17 @@ class AppDelegate: NSObject, NSApplicationDelegate {
@objc
func addNewNotebookShortcut() {
let url = URL(string: "shortcuts://shortcuts/c0fecf5a034642cbb2cf66dbf9f581ed")
let url = URL(string: "shortcuts://shortcuts/c0fecf5a034642cbb2cf66dbf9f581ed")!
NSWorkspace.shared.open(url)
}
}
struct NewNotebookIntent: AppIntent {
static var title: LocalizedStringResource = "New Notebook"
static var title: LocalizedStringResource = "Create New Livebook (v2)"
static var description =
IntentDescription("Create a new notebook.")
static var description = IntentDescription("Create a new notebook.")
static var openAppWhenRun = true
func perform() async throws -> some IntentResult {
ElixirKit.API.publish("open", "/new")

View file

@ -8,3 +8,12 @@ export ELIXIRKIT_PROJECT_DIR=$PWD/../../..
export ELIXIRKIT_RELEASE_NAME=app
. ../../../elixirkit/elixirkit_swift/Scripts/build_macos_app.sh
/Applications/Xcode.app/Contents/Developer/usr/bin/appintentsmetadataprocessor \
--toolchain-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain \
--sdk-root `xcrun --show-sdk-path` \
--target-triple `uname -m`-apple-macos \
--output .build/Livebook.app/Contents/Resources \
--module-name Livebook \
--source-files Sources/Livebook/Livebook.swift \
--binary-file .build/Livebook.app/Contents/MacOS/Livebook