Remove Nostr session sharing from goose core (#12453)
This commit is contained in:
Generated
+4
-332
@@ -551,38 +551,6 @@ dependencies = [
|
||||
"syn 3.0.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-utility"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "188f83b9a198af8c336e505611edb00d6d2ac5c694241c5a4f9a12316938cfe9"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"gloo-timers",
|
||||
"tokio",
|
||||
"wasm-bindgen-futures",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-wsocket"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2c713e1f14c7b82e32ea159af1c6e2f070cfadbdf23fb2512acce9af0a26f1a2"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"futures-util",
|
||||
"js-sys",
|
||||
"tokio",
|
||||
"tokio-happy-eyeballs",
|
||||
"tokio-rustls",
|
||||
"tokio-socks",
|
||||
"tokio-tungstenite 0.28.0",
|
||||
"url",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async_io_stream"
|
||||
version = "0.3.3"
|
||||
@@ -1326,12 +1294,6 @@ dependencies = [
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bech32"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "efbd3e1070bbdf4cd88a75264e18e8a26f7cb5c6949eadf0ceb85fb159cf08f8"
|
||||
|
||||
[[package]]
|
||||
name = "better_scoped_tls"
|
||||
version = "1.0.1"
|
||||
@@ -1633,17 +1595,6 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bip39"
|
||||
version = "2.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "90dbd31c98227229239363921e60fcf5e558e43ec69094d46fc4996f08d1d5bc"
|
||||
dependencies = [
|
||||
"bitcoin_hashes 0.14.101",
|
||||
"serde",
|
||||
"unicode-normalization",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bit-set"
|
||||
version = "0.8.0"
|
||||
@@ -1674,54 +1625,6 @@ version = "0.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6"
|
||||
|
||||
[[package]]
|
||||
name = "bitcoin-consensus-encoding"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6712f9c6fd6785b3b270884e57c441c403dc5d7e19ca45368c97c7a1de3000ec"
|
||||
dependencies = [
|
||||
"bitcoin-internals",
|
||||
"hex-conservative 1.3.0",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitcoin-internals"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d573f4cf32996a8dce612e4348cece65a241f1882ed594047c9ba348e8869fa5"
|
||||
|
||||
[[package]]
|
||||
name = "bitcoin-io"
|
||||
version = "0.1.101"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb5de036369d1ac59d3c1819ebc4d850f89466f5401c571a285b6ed564a4cb78"
|
||||
dependencies = [
|
||||
"bitcoin-consensus-encoding",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitcoin_hashes"
|
||||
version = "0.14.101"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bca4c7abb40c8817d77403c880988cfd484f23ab2365726afb2f798363e2c4a2"
|
||||
dependencies = [
|
||||
"bitcoin-io",
|
||||
"hex-conservative 0.2.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitcoin_hashes"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5304e53726dbe5f93141535e102ed97b5bf4714fbecefdda8f9fb98d7fdaff0e"
|
||||
dependencies = [
|
||||
"bitcoin-consensus-encoding",
|
||||
"bitcoin-internals",
|
||||
"hex-conservative 1.3.0",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.3.2"
|
||||
@@ -1786,15 +1689,6 @@ dependencies = [
|
||||
"hybrid-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "block-padding"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "block-padding"
|
||||
version = "0.4.2"
|
||||
@@ -2205,15 +2099,6 @@ dependencies = [
|
||||
"rustversion",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cbc"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6"
|
||||
dependencies = [
|
||||
"cipher 0.4.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cbc"
|
||||
version = "0.2.1"
|
||||
@@ -2273,17 +2158,6 @@ version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
|
||||
|
||||
[[package]]
|
||||
name = "chacha20"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cipher 0.4.4",
|
||||
"cpufeatures 0.2.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "chacha20"
|
||||
version = "0.10.2"
|
||||
@@ -2295,19 +2169,6 @@ dependencies = [
|
||||
"rand_core 0.10.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "chacha20poly1305"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35"
|
||||
dependencies = [
|
||||
"aead",
|
||||
"chacha20 0.9.1",
|
||||
"cipher 0.4.4",
|
||||
"poly1305",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.4.45"
|
||||
@@ -2340,7 +2201,6 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
|
||||
dependencies = [
|
||||
"crypto-common 0.1.7",
|
||||
"inout 0.1.4",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4339,16 +4199,6 @@ dependencies = [
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "faster-hex"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7223ae2d2f179b803433d9c830478527e92b8117eab39460edae7f1614d9fb73"
|
||||
dependencies = [
|
||||
"heapless",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "2.5.0"
|
||||
@@ -5228,8 +5078,6 @@ dependencies = [
|
||||
"minijinja",
|
||||
"mockall",
|
||||
"nanoid",
|
||||
"nostr",
|
||||
"nostr-sdk",
|
||||
"ntapi",
|
||||
"oauth2",
|
||||
"once_cell",
|
||||
@@ -5697,15 +5545,6 @@ dependencies = [
|
||||
"thiserror 2.0.20",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hash32"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.12.3"
|
||||
@@ -5761,16 +5600,6 @@ version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0049b265b7f201ca9ab25475b22b47fe444060126a51abe00f77d986fc5cc52e"
|
||||
|
||||
[[package]]
|
||||
name = "heapless"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad"
|
||||
dependencies = [
|
||||
"hash32",
|
||||
"stable_deref_trait",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.5.0"
|
||||
@@ -5789,24 +5618,6 @@ version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
|
||||
|
||||
[[package]]
|
||||
name = "hex-conservative"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db3fef046dca3ca91ee1408a8c1b80ab777e80a4d308d1bf4e7adb3fcb047e08"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hex-conservative"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "271e0d19bcb473b6675739a2b536076b24a082316cb5199ad918edce10c599e8"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hf-hub"
|
||||
version = "1.0.0"
|
||||
@@ -6448,7 +6259,6 @@ version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01"
|
||||
dependencies = [
|
||||
"block-padding 0.3.3",
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
@@ -6458,7 +6268,7 @@ version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4250ce6452e92010fdf7268ccc5d14faa80bb12fc741938534c58f16804e03c7"
|
||||
dependencies = [
|
||||
"block-padding 0.4.2",
|
||||
"block-padding",
|
||||
"hybrid-array",
|
||||
]
|
||||
|
||||
@@ -7255,7 +7065,7 @@ dependencies = [
|
||||
"aes 0.9.3",
|
||||
"bitflags 2.13.2",
|
||||
"brotli-decompressor",
|
||||
"cbc 0.2.1",
|
||||
"cbc",
|
||||
"ecb",
|
||||
"encoding_rs",
|
||||
"flate2",
|
||||
@@ -7704,12 +7514,6 @@ version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"
|
||||
|
||||
[[package]]
|
||||
name = "negentropy"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "81c353b400a5503efdcf398f11a83fb7aa84f59f5d76fc4bf5bbc1e4f5366caa"
|
||||
|
||||
[[package]]
|
||||
name = "netdev"
|
||||
version = "0.45.1"
|
||||
@@ -8019,74 +7823,6 @@ dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nostr"
|
||||
version = "0.45.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "38ca5c25a6df8d4d78fdf39b42792438f6ce22b4809ccbfdb27582ed9ca45407"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"bech32",
|
||||
"bip39",
|
||||
"bitcoin_hashes 1.2.0",
|
||||
"cbc 0.1.2",
|
||||
"chacha20 0.9.1",
|
||||
"chacha20poly1305",
|
||||
"faster-hex",
|
||||
"opaquerr",
|
||||
"rand 0.10.2",
|
||||
"secp256k1",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"unicode-normalization",
|
||||
"universal-time",
|
||||
"url",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nostr-database"
|
||||
version = "0.45.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "309950383c9854ca413d195705400e78b1376aedc48f3256754a86c609c047e8"
|
||||
dependencies = [
|
||||
"nostr",
|
||||
"opaquerr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nostr-gossip"
|
||||
version = "0.45.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4ea822fd48ff6b84b81ddf84169e6edf1dc0bc9b312c8e41685b2278debaac3d"
|
||||
dependencies = [
|
||||
"nostr",
|
||||
"opaquerr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nostr-sdk"
|
||||
version = "0.45.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c53a37469ce2df8fe6471b6a4d1c4da833f86c7ba0138ac95299b6f37f69ec84"
|
||||
dependencies = [
|
||||
"async-utility",
|
||||
"async-wsocket",
|
||||
"faster-hex",
|
||||
"futures",
|
||||
"lru",
|
||||
"negentropy",
|
||||
"nostr",
|
||||
"nostr-database",
|
||||
"nostr-gossip",
|
||||
"opaquerr",
|
||||
"rand 0.10.2",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"tracing",
|
||||
"universal-time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ntapi"
|
||||
version = "0.4.3"
|
||||
@@ -8525,12 +8261,6 @@ version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
|
||||
|
||||
[[package]]
|
||||
name = "opaquerr"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4f933a4265d5cdad61d19bbdfc972ea5726d56cd8d3d57b8f2d3c365dd42bee9"
|
||||
|
||||
[[package]]
|
||||
name = "open"
|
||||
version = "5.4.4"
|
||||
@@ -9379,17 +9109,6 @@ dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "poly1305"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf"
|
||||
dependencies = [
|
||||
"cpufeatures 0.2.17",
|
||||
"opaque-debug",
|
||||
"universal-hash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "polyval"
|
||||
version = "0.6.2"
|
||||
@@ -9863,7 +9582,7 @@ version = "0.10.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80"
|
||||
dependencies = [
|
||||
"chacha20 0.10.2",
|
||||
"chacha20",
|
||||
"getrandom 0.4.3",
|
||||
"rand_core 0.10.1",
|
||||
]
|
||||
@@ -10869,26 +10588,6 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "secp256k1"
|
||||
version = "0.30.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252"
|
||||
dependencies = [
|
||||
"bitcoin_hashes 0.14.101",
|
||||
"rand 0.8.8",
|
||||
"secp256k1-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "secp256k1-sys"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "security-framework"
|
||||
version = "2.11.1"
|
||||
@@ -13174,15 +12873,6 @@ dependencies = [
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-happy-eyeballs"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8564c32dfb6f4257f8bc6edfc178a34af97520e0b7b9815500c55eb3d092f29f"
|
||||
dependencies = [
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-macros"
|
||||
version = "2.7.2"
|
||||
@@ -13264,18 +12954,6 @@ dependencies = [
|
||||
"x509-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-socks"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a7e2948f60dbe26b35f2c7fb74ac2854c1fddded0fe9d7548fcc674a246f7615"
|
||||
dependencies = [
|
||||
"either",
|
||||
"futures-util",
|
||||
"thiserror 1.0.69",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-stream"
|
||||
version = "0.1.19"
|
||||
@@ -13931,7 +13609,7 @@ dependencies = [
|
||||
"aes 0.9.3",
|
||||
"base64 0.22.1",
|
||||
"byteorder",
|
||||
"cbc 0.2.1",
|
||||
"cbc",
|
||||
"cfb",
|
||||
"chrono",
|
||||
"encoding_rs",
|
||||
@@ -14184,12 +13862,6 @@ dependencies = [
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "universal-time"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "47a939edecc3c5a7b83c02e5f6b3c31d2bc69eabcc9a87ab12c6d37ee6dbc856"
|
||||
|
||||
[[package]]
|
||||
name = "unsafe-libyaml"
|
||||
version = "0.2.11"
|
||||
|
||||
@@ -98,7 +98,6 @@ default = [
|
||||
"local-inference",
|
||||
"aws-providers",
|
||||
"telemetry",
|
||||
"nostr",
|
||||
"otel",
|
||||
"rustls-tls",
|
||||
"live-voice",
|
||||
@@ -122,7 +121,6 @@ cuda = ["goose/cuda", "local-inference"]
|
||||
vulkan = ["goose/vulkan", "local-inference"]
|
||||
mlx = ["goose/mlx", "local-inference"]
|
||||
telemetry = ["goose/telemetry"]
|
||||
nostr = ["goose/nostr"]
|
||||
otel = ["goose/otel"]
|
||||
system-keyring = ["goose/system-keyring"]
|
||||
update = ["dep:sigstore-verify", "dep:snap"]
|
||||
|
||||
@@ -575,32 +575,13 @@ enum SessionCommand {
|
||||
default_value = "markdown"
|
||||
)]
|
||||
format: String,
|
||||
|
||||
#[arg(
|
||||
long = "nostr",
|
||||
help = "Publish the JSON session export as an encrypted Nostr event and print a Goose share link"
|
||||
)]
|
||||
nostr: bool,
|
||||
|
||||
#[arg(
|
||||
long = "relay",
|
||||
value_name = "RELAY",
|
||||
help = "Nostr relay URL to publish to (can be specified multiple times)",
|
||||
action = clap::ArgAction::Append
|
||||
)]
|
||||
relays: Vec<String>,
|
||||
},
|
||||
#[command(
|
||||
about = "Import a session from JSON, a Claude Code / Codex / Pi .jsonl, or an encrypted Nostr share link"
|
||||
)]
|
||||
#[command(about = "Import a session from JSON or a Claude Code / Codex / Pi .jsonl")]
|
||||
Import {
|
||||
#[arg(
|
||||
help = "Path to a goose session export, a Claude Code, Codex, or Pi .jsonl transcript, or a goose://sessions/nostr share link"
|
||||
help = "Path to a goose session export, or a Claude Code, Codex, or Pi .jsonl transcript"
|
||||
)]
|
||||
input: String,
|
||||
|
||||
#[arg(long = "nostr", help = "Treat input as an encrypted Nostr share link")]
|
||||
nostr: bool,
|
||||
},
|
||||
#[command(name = "diagnostics")]
|
||||
Diagnostics {
|
||||
@@ -1961,8 +1942,6 @@ async fn handle_session_subcommand(command: SessionCommand) -> Result<()> {
|
||||
identifier,
|
||||
output,
|
||||
format,
|
||||
nostr,
|
||||
relays,
|
||||
} => {
|
||||
let session_manager = SessionManager::instance();
|
||||
let session_identifier = if let Some(id) = identifier {
|
||||
@@ -1980,17 +1959,11 @@ async fn handle_session_subcommand(command: SessionCommand) -> Result<()> {
|
||||
}
|
||||
}
|
||||
};
|
||||
crate::commands::session::handle_session_export(
|
||||
session_identifier,
|
||||
output,
|
||||
format,
|
||||
nostr,
|
||||
relays,
|
||||
)
|
||||
.await?;
|
||||
crate::commands::session::handle_session_export(session_identifier, output, format)
|
||||
.await?;
|
||||
}
|
||||
SessionCommand::Import { input, nostr } => {
|
||||
crate::commands::session::handle_session_import(input, nostr).await?;
|
||||
SessionCommand::Import { input } => {
|
||||
crate::commands::session::handle_session_import(input).await?;
|
||||
}
|
||||
SessionCommand::Diagnostics { identifier, output } => {
|
||||
let session_manager = SessionManager::instance();
|
||||
|
||||
@@ -2,10 +2,6 @@ use anyhow::{Context, Result};
|
||||
|
||||
use cliclack::{confirm, multiselect, select};
|
||||
use etcetera::home_dir;
|
||||
#[cfg(feature = "nostr")]
|
||||
use goose::config::Config;
|
||||
#[cfg(feature = "nostr")]
|
||||
use goose::session::nostr_share;
|
||||
use goose::session::{
|
||||
export_session_to_markdown, generate_diagnostics, DiagnosticsLevel, Session, SessionManager,
|
||||
SessionType,
|
||||
@@ -298,8 +294,6 @@ pub async fn handle_session_export(
|
||||
session_id: String,
|
||||
output_path: Option<PathBuf>,
|
||||
format: String,
|
||||
nostr: bool,
|
||||
#[cfg_attr(not(feature = "nostr"), allow(unused_variables))] relays: Vec<String>,
|
||||
) -> Result<()> {
|
||||
let session_manager = SessionManager::instance();
|
||||
let session = match session_manager.get_session(&session_id, true).await {
|
||||
@@ -325,34 +319,6 @@ pub async fn handle_session_export(
|
||||
_ => return Err(anyhow::anyhow!("Unsupported format: {}", format)),
|
||||
};
|
||||
|
||||
#[cfg(feature = "nostr")]
|
||||
if nostr {
|
||||
if format != "json" {
|
||||
return Err(anyhow::anyhow!(
|
||||
"Nostr session sharing only supports --format json"
|
||||
));
|
||||
}
|
||||
if output_path.is_some() {
|
||||
return Err(anyhow::anyhow!(
|
||||
"Nostr session sharing cannot be combined with --output"
|
||||
));
|
||||
}
|
||||
|
||||
let relays = nostr_share::resolve_relays(relays, Config::global());
|
||||
let share = nostr_share::publish_session_json(&output, relays).await?;
|
||||
println!("Session published to Nostr relays:");
|
||||
for relay in &share.relays {
|
||||
println!("- {}", relay);
|
||||
}
|
||||
println!("\nShare link:");
|
||||
println!("{}", share.deeplink);
|
||||
return Ok(());
|
||||
}
|
||||
#[cfg(not(feature = "nostr"))]
|
||||
if nostr {
|
||||
return Err(anyhow::anyhow!("goose was not built with nostr support"));
|
||||
}
|
||||
|
||||
if let Some(output_path) = output_path {
|
||||
fs::write(&output_path, output).with_context(|| {
|
||||
format!("Failed to write to output file: {}", output_path.display())
|
||||
@@ -365,18 +331,9 @@ pub async fn handle_session_export(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn handle_session_import(input: String, nostr: bool) -> Result<()> {
|
||||
let json = if nostr || input.starts_with("goose://sessions/nostr") {
|
||||
#[cfg(feature = "nostr")]
|
||||
{
|
||||
nostr_share::import_session_json_from_deeplink(&input).await?
|
||||
}
|
||||
#[cfg(not(feature = "nostr"))]
|
||||
return Err(anyhow::anyhow!("goose was not built with nostr support"));
|
||||
} else {
|
||||
fs::read_to_string(&input)
|
||||
.with_context(|| format!("Failed to read session import file: {input}"))?
|
||||
};
|
||||
pub async fn handle_session_import(input: String) -> Result<()> {
|
||||
let json = fs::read_to_string(&input)
|
||||
.with_context(|| format!("Failed to read session import file: {input}"))?;
|
||||
|
||||
let format = goose::session::import_formats::detect_format(&json);
|
||||
let label = match format {
|
||||
|
||||
@@ -826,43 +826,12 @@ pub struct ExportSessionResponse {
|
||||
pub data: String,
|
||||
}
|
||||
|
||||
/// Import a session from a JSON string or share link.
|
||||
/// Import a session from a serialized session JSON string.
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcRequest)]
|
||||
#[request(method = "_goose/unstable/session/import", response = ImportSessionResponse)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ImportSessionRequest {
|
||||
pub input: String,
|
||||
pub source: SessionImportSource,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum SessionImportSource {
|
||||
#[default]
|
||||
Auto,
|
||||
Json,
|
||||
Nostr,
|
||||
}
|
||||
|
||||
/// Share a session through Nostr and return its share links.
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcRequest)]
|
||||
#[request(
|
||||
method = "_goose/unstable/session/share/nostr",
|
||||
response = ShareSessionNostrResponse
|
||||
)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ShareSessionNostrRequest {
|
||||
pub session_id: String,
|
||||
pub relays: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcResponse)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ShareSessionNostrResponse {
|
||||
pub deeplink: String,
|
||||
pub nevent: String,
|
||||
pub event_id: String,
|
||||
pub relays: Vec<String>,
|
||||
}
|
||||
|
||||
/// Import session response — metadata about the newly created session.
|
||||
|
||||
@@ -105,7 +105,6 @@ portable-default = [
|
||||
"chat-recall",
|
||||
"acp-http",
|
||||
]
|
||||
nostr = ["dep:nostr", "dep:nostr-sdk"]
|
||||
platform-apps = []
|
||||
chat-recall = []
|
||||
scheduler = ["dep:tokio-cron-scheduler"]
|
||||
@@ -246,8 +245,6 @@ goose-acp-macros = { path = "../goose-acp-macros", default-features = false }
|
||||
tower-http = { workspace = true, features = ["cors"] }
|
||||
tracing-appender = { workspace = true }
|
||||
process-wrap = { version = "9", default-features = false, features = ["std", "process-session"] }
|
||||
nostr = { version = "0.45.1", default-features = false, features = ["nip44", "os-rng", "std"], optional = true }
|
||||
nostr-sdk = { version = "0.45.1", default-features = false, optional = true }
|
||||
rustls = { workspace = true, optional = true }
|
||||
rcgen = { version = "0.14", default-features = false, features = ["crypto", "pem"], optional = true }
|
||||
axum-server = { workspace = true, optional = true }
|
||||
|
||||
@@ -290,11 +290,6 @@
|
||||
"requestType": "ImportSessionRequest_unstable",
|
||||
"responseType": "ImportSessionResponse_unstable"
|
||||
},
|
||||
{
|
||||
"method": "_goose/unstable/session/share/nostr",
|
||||
"requestType": "ShareSessionNostrRequest_unstable",
|
||||
"responseType": "ShareSessionNostrResponse_unstable"
|
||||
},
|
||||
{
|
||||
"method": "_goose/unstable/recipes/encode",
|
||||
"requestType": "EncodeRecipeRequest_unstable",
|
||||
|
||||
@@ -3597,27 +3597,15 @@
|
||||
"properties": {
|
||||
"input": {
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"$ref": "#/$defs/SessionImportSource"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"input",
|
||||
"source"
|
||||
"input"
|
||||
],
|
||||
"description": "Import a session from a JSON string or share link.",
|
||||
"description": "Import a session from a serialized session JSON string.",
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/session/import"
|
||||
},
|
||||
"SessionImportSource": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"auto",
|
||||
"json",
|
||||
"nostr"
|
||||
]
|
||||
},
|
||||
"ImportSessionResponse_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3649,55 +3637,6 @@
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/session/import"
|
||||
},
|
||||
"ShareSessionNostrRequest_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sessionId": {
|
||||
"type": "string"
|
||||
},
|
||||
"relays": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"sessionId",
|
||||
"relays"
|
||||
],
|
||||
"description": "Share a session through Nostr and return its share links.",
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/session/share/nostr"
|
||||
},
|
||||
"ShareSessionNostrResponse_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"deeplink": {
|
||||
"type": "string"
|
||||
},
|
||||
"nevent": {
|
||||
"type": "string"
|
||||
},
|
||||
"eventId": {
|
||||
"type": "string"
|
||||
},
|
||||
"relays": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"deeplink",
|
||||
"nevent",
|
||||
"eventId",
|
||||
"relays"
|
||||
],
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/session/share/nostr"
|
||||
},
|
||||
"EncodeRecipeRequest_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -7642,15 +7581,6 @@
|
||||
"description": "Params for _goose/unstable/session/import",
|
||||
"title": "ImportSessionRequest_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/ShareSessionNostrRequest_unstable"
|
||||
}
|
||||
],
|
||||
"description": "Params for _goose/unstable/session/share/nostr",
|
||||
"title": "ShareSessionNostrRequest_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
@@ -8485,14 +8415,6 @@
|
||||
],
|
||||
"title": "ImportSessionResponse_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/ShareSessionNostrResponse_unstable"
|
||||
}
|
||||
],
|
||||
"title": "ShareSessionNostrResponse_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
|
||||
@@ -494,14 +494,6 @@ impl GooseAcpAgent {
|
||||
self.on_import_session(req).await
|
||||
}
|
||||
|
||||
#[custom_method(ShareSessionNostrRequest)]
|
||||
async fn dispatch_share_session_nostr(
|
||||
&self,
|
||||
req: ShareSessionNostrRequest,
|
||||
) -> Result<ShareSessionNostrResponse, agent_client_protocol::Error> {
|
||||
self.on_share_session_nostr(req).await
|
||||
}
|
||||
|
||||
#[custom_method(EncodeRecipeRequest)]
|
||||
async fn dispatch_encode_recipe(
|
||||
&self,
|
||||
|
||||
@@ -134,23 +134,9 @@ impl GooseAcpAgent {
|
||||
&self,
|
||||
req: ImportSessionRequest,
|
||||
) -> Result<ImportSessionResponse, agent_client_protocol::Error> {
|
||||
let is_nostr = match req.source {
|
||||
SessionImportSource::Auto => is_nostr_session_link(&req.input),
|
||||
SessionImportSource::Json => false,
|
||||
SessionImportSource::Nostr => true,
|
||||
};
|
||||
let (data, session_type) = if is_nostr {
|
||||
(
|
||||
import_nostr_session_json(&req.input).await?,
|
||||
Some(SessionType::User),
|
||||
)
|
||||
} else {
|
||||
(req.input, None)
|
||||
};
|
||||
|
||||
let session = self
|
||||
.session_manager
|
||||
.import_session(&data, session_type)
|
||||
.import_session(&req.input, None)
|
||||
.await
|
||||
.internal_err()?;
|
||||
|
||||
@@ -164,26 +150,6 @@ impl GooseAcpAgent {
|
||||
})
|
||||
}
|
||||
|
||||
pub(super) async fn on_share_session_nostr(
|
||||
&self,
|
||||
req: ShareSessionNostrRequest,
|
||||
) -> Result<ShareSessionNostrResponse, agent_client_protocol::Error> {
|
||||
let data = self
|
||||
.session_manager
|
||||
.export_session(&req.session_id)
|
||||
.await
|
||||
.internal_err()?;
|
||||
|
||||
let share = publish_session_to_nostr(&data, req.relays).await?;
|
||||
|
||||
Ok(ShareSessionNostrResponse {
|
||||
deeplink: share.deeplink,
|
||||
nevent: share.nevent,
|
||||
event_id: share.event_id,
|
||||
relays: share.relays,
|
||||
})
|
||||
}
|
||||
|
||||
pub(super) async fn on_get_session_info(
|
||||
&self,
|
||||
req: GetSessionInfoRequest,
|
||||
@@ -295,55 +261,3 @@ impl GooseAcpAgent {
|
||||
Ok(EmptyResponse {})
|
||||
}
|
||||
}
|
||||
|
||||
fn is_nostr_session_link(input: &str) -> bool {
|
||||
input.trim_start().starts_with("goose://sessions/nostr")
|
||||
}
|
||||
|
||||
#[cfg(feature = "nostr")]
|
||||
async fn import_nostr_session_json(deeplink: &str) -> Result<String, agent_client_protocol::Error> {
|
||||
crate::session::nostr_share::import_session_json_from_deeplink(deeplink)
|
||||
.await
|
||||
.invalid_params_err()
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "nostr"))]
|
||||
async fn import_nostr_session_json(
|
||||
_deeplink: &str,
|
||||
) -> Result<String, agent_client_protocol::Error> {
|
||||
Err(agent_client_protocol::Error::invalid_params()
|
||||
.data("Nostr session import is not available in this build"))
|
||||
}
|
||||
|
||||
#[cfg(feature = "nostr")]
|
||||
async fn publish_session_to_nostr(
|
||||
data: &str,
|
||||
relays: Vec<String>,
|
||||
) -> Result<NostrSessionShare, agent_client_protocol::Error> {
|
||||
let relays = crate::session::nostr_share::resolve_relays(relays, Config::global());
|
||||
let share = crate::session::nostr_share::publish_session_json(data, relays)
|
||||
.await
|
||||
.internal_err()?;
|
||||
Ok(NostrSessionShare {
|
||||
deeplink: share.deeplink,
|
||||
nevent: share.nevent,
|
||||
event_id: share.event_id,
|
||||
relays: share.relays,
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "nostr"))]
|
||||
async fn publish_session_to_nostr(
|
||||
_data: &str,
|
||||
_relays: Vec<String>,
|
||||
) -> Result<NostrSessionShare, agent_client_protocol::Error> {
|
||||
Err(agent_client_protocol::Error::invalid_params()
|
||||
.data("Nostr session sharing is not available in this build"))
|
||||
}
|
||||
|
||||
struct NostrSessionShare {
|
||||
deeplink: String,
|
||||
nevent: String,
|
||||
event_id: String,
|
||||
relays: Vec<String>,
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ pub mod extension_data;
|
||||
pub mod import_formats;
|
||||
mod last_message_snippet;
|
||||
mod legacy;
|
||||
#[cfg(feature = "nostr")]
|
||||
pub mod nostr_share;
|
||||
pub mod session_manager;
|
||||
mod session_naming;
|
||||
|
||||
|
||||
@@ -1,372 +0,0 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use async_trait::async_trait;
|
||||
use nostr::nips::nip19::{FromBech32, Nip19Event, ToBech32};
|
||||
use nostr::nips::nip44;
|
||||
use nostr::prelude::*;
|
||||
use nostr_sdk::client::Client;
|
||||
|
||||
use crate::config::{Config, ConfigError};
|
||||
|
||||
pub const EVENT_KIND: u16 = 30278;
|
||||
pub const CONFIG_RELAYS_KEY: &str = "GOOSE_NOSTR_RELAYS";
|
||||
|
||||
const DEFAULT_RELAYS: &[&str] = &[
|
||||
"wss://relay.damus.io",
|
||||
"wss://relay.primal.net",
|
||||
"wss://nos.lol",
|
||||
"wss://relay.nostr.band",
|
||||
];
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct NostrShare {
|
||||
pub deeplink: String,
|
||||
pub nevent: String,
|
||||
pub event_id: String,
|
||||
pub relays: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct ParsedShareLink {
|
||||
pub nevent: String,
|
||||
pub decryption_key: String,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
pub trait NostrPublisher {
|
||||
async fn publish(&self, event: Event, relays: &[String]) -> Result<()>;
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
pub trait NostrFetcher {
|
||||
async fn fetch(&self, event_id: EventId, relays: &[String]) -> Result<Event>;
|
||||
}
|
||||
|
||||
pub struct LiveNostrClient;
|
||||
|
||||
#[async_trait]
|
||||
impl NostrPublisher for LiveNostrClient {
|
||||
async fn publish(&self, event: Event, relays: &[String]) -> Result<()> {
|
||||
install_rustls_crypto_provider();
|
||||
let client = Client::default();
|
||||
for relay in relays {
|
||||
client
|
||||
.add_relay(relay)
|
||||
.await
|
||||
.with_context(|| format!("Failed to add relay {relay}"))?;
|
||||
}
|
||||
|
||||
client.try_connect().timeout(Duration::from_secs(8)).await;
|
||||
let output = client
|
||||
.send_event(&event)
|
||||
.to(relays.iter().map(String::as_str))
|
||||
.await
|
||||
.context("Failed to publish session to Nostr relays")?;
|
||||
client.shutdown().await;
|
||||
|
||||
if output.success.is_empty() {
|
||||
return Err(anyhow!(
|
||||
"Failed to publish session to any Nostr relay: {:?}",
|
||||
output.failed
|
||||
));
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl NostrFetcher for LiveNostrClient {
|
||||
async fn fetch(&self, event_id: EventId, relays: &[String]) -> Result<Event> {
|
||||
install_rustls_crypto_provider();
|
||||
let client = Client::default();
|
||||
for relay in relays {
|
||||
client
|
||||
.add_relay(relay)
|
||||
.await
|
||||
.with_context(|| format!("Failed to add relay {relay}"))?;
|
||||
}
|
||||
|
||||
client.try_connect().timeout(Duration::from_secs(8)).await;
|
||||
let filter = Filter::new()
|
||||
.id(event_id)
|
||||
.kind(Kind::Custom(EVENT_KIND))
|
||||
.limit(1);
|
||||
let targets = relays
|
||||
.iter()
|
||||
.map(|relay| (relay.as_str(), vec![filter.clone()]))
|
||||
.collect::<Vec<_>>();
|
||||
let events = client
|
||||
.fetch_events(targets)
|
||||
.timeout(Duration::from_secs(10))
|
||||
.await
|
||||
.context("Failed to fetch shared session from Nostr relays")?;
|
||||
client.shutdown().await;
|
||||
|
||||
events
|
||||
.into_iter()
|
||||
.next()
|
||||
.ok_or_else(|| anyhow!("Shared session event not found"))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "rustls-tls")]
|
||||
fn install_rustls_crypto_provider() {
|
||||
let _ = rustls::crypto::aws_lc_rs::default_provider().install_default();
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "rustls-tls"))]
|
||||
fn install_rustls_crypto_provider() {}
|
||||
|
||||
pub fn default_relays() -> Vec<String> {
|
||||
DEFAULT_RELAYS
|
||||
.iter()
|
||||
.map(|relay| relay.to_string())
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn relays_from_config(config: &Config) -> Vec<String> {
|
||||
match config.get_param::<Vec<String>>(CONFIG_RELAYS_KEY) {
|
||||
Ok(relays) if !relays.is_empty() => normalize_relays(relays),
|
||||
Err(ConfigError::NotFound(_)) => default_relays(),
|
||||
_ => default_relays(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn resolve_relays(cli_relays: Vec<String>, config: &Config) -> Vec<String> {
|
||||
if cli_relays.is_empty() {
|
||||
relays_from_config(config)
|
||||
} else {
|
||||
normalize_relays(cli_relays)
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn publish_session_json(session_json: &str, relays: Vec<String>) -> Result<NostrShare> {
|
||||
publish_session_json_with(session_json, relays, &LiveNostrClient).await
|
||||
}
|
||||
|
||||
pub async fn publish_session_json_with<P>(
|
||||
session_json: &str,
|
||||
relays: Vec<String>,
|
||||
publisher: &P,
|
||||
) -> Result<NostrShare>
|
||||
where
|
||||
P: NostrPublisher + Sync,
|
||||
{
|
||||
let relays = normalize_relays(relays);
|
||||
if relays.is_empty() {
|
||||
return Err(anyhow!("At least one Nostr relay is required"));
|
||||
}
|
||||
let relay_urls = relays
|
||||
.iter()
|
||||
.map(|relay| RelayUrl::parse(relay))
|
||||
.collect::<Result<Vec<_>, _>>()?;
|
||||
|
||||
let publish_keys = Keys::generate();
|
||||
let encryption_key = SecretKey::generate();
|
||||
let encryption_keys = Keys::new(encryption_key.clone());
|
||||
let encrypted = nip44::encrypt(
|
||||
&encryption_key,
|
||||
&encryption_keys.public_key(),
|
||||
session_json,
|
||||
nip44::Version::V2,
|
||||
)?;
|
||||
|
||||
let event = EventBuilder::new(Kind::Custom(EVENT_KIND), encrypted)
|
||||
.tag(Tag::identifier(format!(
|
||||
"goose-session-{}",
|
||||
uuid::Uuid::now_v7()
|
||||
)))
|
||||
.tag(Tag::parse(["client", "goose"])?)
|
||||
.finalize(&publish_keys)?;
|
||||
|
||||
publisher.publish(event.clone(), &relays).await?;
|
||||
|
||||
let nevent = Nip19Event::new(event.id)
|
||||
.author(event.pubkey)
|
||||
.kind(Kind::Custom(EVENT_KIND))
|
||||
.relays(relay_urls)
|
||||
.to_bech32()?;
|
||||
let decryption_key = encryption_key.to_secret_hex();
|
||||
let deeplink = build_deeplink(&nevent, &decryption_key);
|
||||
|
||||
Ok(NostrShare {
|
||||
deeplink,
|
||||
nevent,
|
||||
event_id: event.id.to_hex(),
|
||||
relays,
|
||||
})
|
||||
}
|
||||
|
||||
pub async fn import_session_json_from_deeplink(deeplink: &str) -> Result<String> {
|
||||
import_session_json_from_deeplink_with(deeplink, &LiveNostrClient).await
|
||||
}
|
||||
|
||||
pub async fn import_session_json_from_deeplink_with<F>(
|
||||
deeplink: &str,
|
||||
fetcher: &F,
|
||||
) -> Result<String>
|
||||
where
|
||||
F: NostrFetcher + Sync,
|
||||
{
|
||||
let ParsedShareLink {
|
||||
nevent,
|
||||
decryption_key,
|
||||
} = parse_deeplink(deeplink)?;
|
||||
let event_ref = Nip19Event::from_bech32(&nevent)?;
|
||||
let relays = event_ref
|
||||
.relays
|
||||
.iter()
|
||||
.map(ToString::to_string)
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
if relays.is_empty() {
|
||||
return Err(anyhow!("Shared session link does not include any relays"));
|
||||
}
|
||||
|
||||
let event = fetcher.fetch(event_ref.event_id, &relays).await?;
|
||||
if event.kind != Kind::Custom(EVENT_KIND) {
|
||||
return Err(anyhow!(
|
||||
"Unexpected Nostr event kind: {}",
|
||||
u16::from(event.kind)
|
||||
));
|
||||
}
|
||||
|
||||
let secret_key = SecretKey::parse(&decryption_key)?;
|
||||
let encryption_keys = Keys::new(secret_key.clone());
|
||||
nip44::decrypt(&secret_key, &encryption_keys.public_key(), event.content).map_err(Into::into)
|
||||
}
|
||||
|
||||
pub fn build_deeplink(nevent: &str, decryption_key: &str) -> String {
|
||||
format!(
|
||||
"goose://sessions/nostr?nevent={}&key={}",
|
||||
urlencoding::encode(nevent),
|
||||
urlencoding::encode(decryption_key)
|
||||
)
|
||||
}
|
||||
|
||||
pub fn parse_deeplink(deeplink: &str) -> Result<ParsedShareLink> {
|
||||
let parsed = url::Url::parse(deeplink).context("Invalid Goose session share link")?;
|
||||
if parsed.scheme() != "goose"
|
||||
|| parsed.host_str() != Some("sessions")
|
||||
|| parsed.path() != "/nostr"
|
||||
{
|
||||
return Err(anyhow!("Invalid Goose Nostr session share link"));
|
||||
}
|
||||
|
||||
let nevent = parsed
|
||||
.query_pairs()
|
||||
.find_map(|(key, value)| (key == "nevent").then(|| value.into_owned()))
|
||||
.ok_or_else(|| anyhow!("Missing nevent parameter"))?;
|
||||
let decryption_key = parsed
|
||||
.query_pairs()
|
||||
.find_map(|(key, value)| (key == "key").then(|| value.into_owned()))
|
||||
.ok_or_else(|| anyhow!("Missing decryption key parameter"))?;
|
||||
|
||||
Ok(ParsedShareLink {
|
||||
nevent,
|
||||
decryption_key,
|
||||
})
|
||||
}
|
||||
|
||||
fn normalize_relays(relays: Vec<String>) -> Vec<String> {
|
||||
let mut normalized = Vec::new();
|
||||
for relay in relays {
|
||||
let relay = relay.trim();
|
||||
if relay.is_empty() || normalized.iter().any(|existing| existing == relay) {
|
||||
continue;
|
||||
}
|
||||
normalized.push(relay.to_string());
|
||||
}
|
||||
normalized
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
struct RecordingPublisher {
|
||||
event: Arc<Mutex<Option<Event>>>,
|
||||
relays: Arc<Mutex<Vec<String>>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl NostrPublisher for RecordingPublisher {
|
||||
async fn publish(&self, event: Event, relays: &[String]) -> Result<()> {
|
||||
*self.event.lock().unwrap() = Some(event);
|
||||
*self.relays.lock().unwrap() = relays.to_vec();
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
struct StaticFetcher(Event);
|
||||
|
||||
#[async_trait]
|
||||
impl NostrFetcher for StaticFetcher {
|
||||
async fn fetch(&self, _event_id: EventId, _relays: &[String]) -> Result<Event> {
|
||||
Ok(self.0.clone())
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn publish_builds_deeplink_and_encrypted_kind_30278_event() {
|
||||
let event = Arc::new(Mutex::new(None));
|
||||
let relays = Arc::new(Mutex::new(Vec::new()));
|
||||
let publisher = RecordingPublisher {
|
||||
event: event.clone(),
|
||||
relays: relays.clone(),
|
||||
};
|
||||
|
||||
let share = publish_session_json_with(
|
||||
r#"{"id":"session-id","conversation":{"messages":[]}}"#,
|
||||
vec!["wss://relay.example".to_string()],
|
||||
&publisher,
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert!(share.deeplink.starts_with("goose://sessions/nostr?"));
|
||||
assert!(share.nevent.starts_with("nevent1"));
|
||||
assert_eq!(share.relays, vec!["wss://relay.example"]);
|
||||
assert_eq!(*relays.lock().unwrap(), vec!["wss://relay.example"]);
|
||||
|
||||
let event = event.lock().unwrap().clone().unwrap();
|
||||
assert_eq!(event.kind, Kind::Custom(EVENT_KIND));
|
||||
assert_ne!(
|
||||
event.content,
|
||||
r#"{"id":"session-id","conversation":{"messages":[]}}"#
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn publish_and_import_round_trips_session_json() {
|
||||
let event = Arc::new(Mutex::new(None));
|
||||
let publisher = RecordingPublisher {
|
||||
event: event.clone(),
|
||||
relays: Arc::new(Mutex::new(Vec::new())),
|
||||
};
|
||||
let json = r#"{"id":"session-id","name":"shared"}"#;
|
||||
|
||||
let share =
|
||||
publish_session_json_with(json, vec!["wss://relay.example".to_string()], &publisher)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let fetched_event = event.lock().unwrap().clone().unwrap();
|
||||
let imported =
|
||||
import_session_json_from_deeplink_with(&share.deeplink, &StaticFetcher(fetched_event))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(imported, json);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parses_deeplink() {
|
||||
let parsed = parse_deeplink("goose://sessions/nostr?nevent=abc&key=def").unwrap();
|
||||
assert_eq!(parsed.nevent, "abc");
|
||||
assert_eq!(parsed.decryption_key, "def");
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
import { useEffect, useState, useRef, type RefObject } from 'react';
|
||||
import { IpcRendererEvent } from 'electron';
|
||||
import { HashRouter, Routes, Route, useNavigate, useLocation, useSearchParams } from 'react-router';
|
||||
import { importNostrSessionFromDeepLink } from './sessionLinks';
|
||||
import { ErrorUI } from './components/ErrorBoundary';
|
||||
import { ExtensionInstallModal } from './components/ExtensionInstallModal';
|
||||
import RecipeParamsModalContainer from './components/RecipeParamsModalContainer';
|
||||
@@ -332,8 +331,6 @@ const ExtensionsRoute = () => {
|
||||
export function AppInner() {
|
||||
const [fatalError, setFatalError] = useState<string | null>(null);
|
||||
|
||||
const nostrImportInFlight = useRef<string | null>(null);
|
||||
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
const setView = useNavigation();
|
||||
@@ -456,47 +453,6 @@ export function AppInner() {
|
||||
.catch(() => {});
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const handleOpenSharedSession = async (_event: IpcRendererEvent, ...args: unknown[]) => {
|
||||
const link = args[0] as string;
|
||||
window.electron.logInfo('Opening session share link');
|
||||
|
||||
if (!link.startsWith('goose://sessions/nostr')) {
|
||||
toast.error('Unsupported session share link');
|
||||
navigate('/sessions');
|
||||
return;
|
||||
}
|
||||
|
||||
if (nostrImportInFlight.current === link) {
|
||||
window.electron.logInfo('Skipping duplicate Nostr deep link import');
|
||||
return;
|
||||
}
|
||||
nostrImportInFlight.current = link;
|
||||
|
||||
try {
|
||||
await importNostrSessionFromDeepLink(link);
|
||||
navigate('/sessions');
|
||||
} catch (error) {
|
||||
console.error('Unexpected error opening Nostr session share:', error);
|
||||
trackErrorWithContext(error, {
|
||||
component: 'AppInner',
|
||||
action: 'open_nostr_session_share',
|
||||
recoverable: true,
|
||||
});
|
||||
toast.error(`Failed to import Nostr session: ${errorMessage(error, 'Unknown error')}`);
|
||||
navigate('/sessions');
|
||||
} finally {
|
||||
if (nostrImportInFlight.current === link) {
|
||||
nostrImportInFlight.current = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
window.electron.on('open-shared-session', handleOpenSharedSession);
|
||||
return () => {
|
||||
window.electron.off('open-shared-session', handleOpenSharedSession);
|
||||
};
|
||||
}, [navigate]);
|
||||
|
||||
useEffect(() => {
|
||||
const handleKeyDown = (event: KeyboardEvent) => {
|
||||
const isMac = window.electron.platform === 'darwin';
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
type NewSessionRequest,
|
||||
type SessionInfo,
|
||||
} from '@agentclientprotocol/sdk';
|
||||
import type { GooseExtension, SessionExportFormat, SessionImportSource } from '@aaif/goose-acp-client';
|
||||
import type { GooseExtension, SessionExportFormat } from '@aaif/goose-acp-client';
|
||||
import { getAcpClient } from './acpConnection';
|
||||
import type { ExtensionLoadResult } from '../types/extensions';
|
||||
import type { Session } from '../types/session';
|
||||
@@ -322,12 +322,7 @@ export async function acpExportSession(
|
||||
return response.data;
|
||||
}
|
||||
|
||||
export async function acpImportSession(input: string, source: SessionImportSource): Promise<void> {
|
||||
export async function acpImportSession(input: string): Promise<void> {
|
||||
const client = await getAcpClient();
|
||||
await client.goose.sessionImport_unstable({ input, source });
|
||||
}
|
||||
|
||||
export async function acpShareSessionNostr(sessionId: string, relays: string[]) {
|
||||
const client = await getAcpClient();
|
||||
return await client.goose.sessionShareNostr_unstable({ sessionId, relays });
|
||||
await client.goose.sessionImport_unstable({ input });
|
||||
}
|
||||
|
||||
@@ -10,8 +10,6 @@ import {
|
||||
Trash2,
|
||||
Download,
|
||||
Upload,
|
||||
Share2,
|
||||
LoaderCircle,
|
||||
ExternalLink,
|
||||
Copy,
|
||||
ChevronDown,
|
||||
@@ -30,14 +28,6 @@ import { errorMessage } from '../../utils/conversionUtils';
|
||||
import { Skeleton } from '../ui/skeleton';
|
||||
import { toast } from 'react-toastify';
|
||||
import { ConfirmationModal } from '../ui/ConfirmationModal';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '../ui/dialog';
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
@@ -51,7 +41,6 @@ import {
|
||||
acpImportSession,
|
||||
acpListSessions,
|
||||
acpRenameSession,
|
||||
acpShareSessionNostr,
|
||||
type SessionListItem,
|
||||
} from '../../acp/sessions';
|
||||
import type { SessionExportFormat } from '@aaif/goose-acp-client';
|
||||
@@ -79,17 +68,6 @@ const i18n = defineMessages({
|
||||
},
|
||||
chatHistory: { id: 'sessions.chatHistory', defaultMessage: 'Chat history' },
|
||||
importSession: { id: 'sessions.import', defaultMessage: 'Import Session' },
|
||||
importNostrSession: { id: 'sessions.importNostr', defaultMessage: 'Import Link' },
|
||||
importNostrTitle: { id: 'sessions.importNostr.title', defaultMessage: 'Import Nostr Session' },
|
||||
importNostrDesc: {
|
||||
id: 'sessions.importNostr.description',
|
||||
defaultMessage: 'Paste a Goose Nostr share link to fetch, decrypt, and import the session.',
|
||||
},
|
||||
importNostrPlaceholder: {
|
||||
id: 'sessions.importNostr.placeholder',
|
||||
defaultMessage: 'goose://sessions/nostr?nevent=...&key=...',
|
||||
},
|
||||
importing: { id: 'sessions.importing', defaultMessage: 'Importing...' },
|
||||
chatHistoryDesc: {
|
||||
id: 'sessions.chatHistoryDesc',
|
||||
defaultMessage: 'View and search your past conversations with Goose. {shortcut} to search.',
|
||||
@@ -137,14 +115,6 @@ const i18n = defineMessages({
|
||||
id: 'sessions.toast.exportFailed',
|
||||
defaultMessage: 'Failed to export session: {error}',
|
||||
},
|
||||
shareNostrSuccess: {
|
||||
id: 'sessions.toast.shareNostr',
|
||||
defaultMessage: 'Encrypted Nostr share link created',
|
||||
},
|
||||
shareNostrFailed: {
|
||||
id: 'sessions.toast.shareNostrFailed',
|
||||
defaultMessage: 'Failed to create Nostr share link: {error}',
|
||||
},
|
||||
copied: { id: 'sessions.toast.copied', defaultMessage: 'Copied to clipboard' },
|
||||
openInNewWindow: { id: 'sessions.action.openNewWindow', defaultMessage: 'Open in new window' },
|
||||
editSessionName: { id: 'sessions.action.editName', defaultMessage: 'Edit session name' },
|
||||
@@ -153,19 +123,6 @@ const i18n = defineMessages({
|
||||
exportSession: { id: 'sessions.action.export', defaultMessage: 'Export session' },
|
||||
exportAsJson: { id: 'sessions.action.exportJson', defaultMessage: 'JSON' },
|
||||
exportAsMarkdown: { id: 'sessions.action.exportMarkdown', defaultMessage: 'Markdown' },
|
||||
shareNostrSession: {
|
||||
id: 'sessions.action.shareNostr',
|
||||
defaultMessage: 'Share encrypted Nostr link',
|
||||
},
|
||||
shareNostrTitle: {
|
||||
id: 'sessions.shareNostr.title',
|
||||
defaultMessage: 'Encrypted Nostr Share Link',
|
||||
},
|
||||
shareNostrDesc: {
|
||||
id: 'sessions.shareNostr.description',
|
||||
defaultMessage:
|
||||
'Anyone with this link can fetch and decrypt the session. Treat it like a secret.',
|
||||
},
|
||||
close: { id: 'sessions.close', defaultMessage: 'Close' },
|
||||
scheduledJobs: {
|
||||
id: 'sessions.scheduledJobs',
|
||||
@@ -343,14 +300,6 @@ const SessionListView: React.FC<SessionListViewProps> = React.memo(({ onSelectSe
|
||||
const [showDeleteConfirmation, setShowDeleteConfirmation] = useState(false);
|
||||
const [sessionToDelete, setSessionToDelete] = useState<SessionListItem | null>(null);
|
||||
|
||||
const [showImportLinkModal, setShowImportLinkModal] = useState(false);
|
||||
const [nostrImportLink, setNostrImportLink] = useState('');
|
||||
const [isImportingNostr, setIsImportingNostr] = useState(false);
|
||||
const [shareLink, setShareLink] = useState('');
|
||||
const [showShareLinkModal, setShowShareLinkModal] = useState(false);
|
||||
const [sharingSessionId, setSharingSessionId] = useState<string | null>(null);
|
||||
const [nostrEnabled, setNostrEnabled] = useState(true);
|
||||
|
||||
const [includeAcpSessions, setIncludeAcpSessions] = useState(
|
||||
() => localStorage.getItem(INCLUDE_ACP_SESSIONS_KEY) === 'true'
|
||||
);
|
||||
@@ -492,14 +441,6 @@ const SessionListView: React.FC<SessionListViewProps> = React.memo(({ onSelectSe
|
||||
};
|
||||
}, [loadSessions, debouncedSearchTerm, includeAcpSessions]);
|
||||
|
||||
// Hide Nostr sharing when explicitly disabled via env var (restricted/enterprise bundles)
|
||||
useEffect(() => {
|
||||
const config = window.electron.getConfig();
|
||||
if (config.GOOSE_DISABLE_NOSTR_SHARING === true) {
|
||||
setNostrEnabled(false);
|
||||
}
|
||||
}, []);
|
||||
|
||||
// Timing logic to prevent flicker between skeleton and content on initial load
|
||||
useEffect(() => {
|
||||
if (!isLoading && showSkeleton) {
|
||||
@@ -665,26 +606,6 @@ const SessionListView: React.FC<SessionListViewProps> = React.memo(({ onSelectSe
|
||||
[intl]
|
||||
);
|
||||
|
||||
const handleShareSessionNostr = useCallback(
|
||||
async (session: SessionListItem, e: React.MouseEvent) => {
|
||||
e.stopPropagation();
|
||||
setSharingSessionId(session.id);
|
||||
try {
|
||||
const response = await acpShareSessionNostr(session.id, []);
|
||||
setShareLink(response.deeplink);
|
||||
setShowShareLinkModal(true);
|
||||
toast.success(intl.formatMessage(i18n.shareNostrSuccess));
|
||||
} catch (error) {
|
||||
toast.error(
|
||||
intl.formatMessage(i18n.shareNostrFailed, { error: errorMessage(error, 'Unknown error') })
|
||||
);
|
||||
} finally {
|
||||
setSharingSessionId(null);
|
||||
}
|
||||
},
|
||||
[intl]
|
||||
);
|
||||
|
||||
const handleImportClick = useCallback(async () => {
|
||||
const native = window.electron?.selectImportSessionFile;
|
||||
if (typeof native === 'function') {
|
||||
@@ -695,7 +616,7 @@ const SessionListView: React.FC<SessionListViewProps> = React.memo(({ onSelectSe
|
||||
toast.error(intl.formatMessage(i18n.importFailed, { error: result.error }));
|
||||
return;
|
||||
}
|
||||
await acpImportSession(result.contents, 'json');
|
||||
await acpImportSession(result.contents);
|
||||
toast.success(intl.formatMessage(i18n.importSuccess));
|
||||
window.dispatchEvent(new CustomEvent(AppEvents.SESSION_CREATED));
|
||||
await loadSessions();
|
||||
@@ -710,36 +631,6 @@ const SessionListView: React.FC<SessionListViewProps> = React.memo(({ onSelectSe
|
||||
fileInputRef.current?.click();
|
||||
}, [intl, loadSessions]);
|
||||
|
||||
const handleImportNostrLink = useCallback(async () => {
|
||||
const deeplink = nostrImportLink.trim();
|
||||
if (!deeplink) return;
|
||||
|
||||
setIsImportingNostr(true);
|
||||
try {
|
||||
await acpImportSession(deeplink, 'nostr');
|
||||
setNostrImportLink('');
|
||||
setShowImportLinkModal(false);
|
||||
toast.success(intl.formatMessage(i18n.importSuccess));
|
||||
window.dispatchEvent(new CustomEvent(AppEvents.SESSION_CREATED));
|
||||
await loadSessions();
|
||||
} catch (error) {
|
||||
toast.error(
|
||||
intl.formatMessage(i18n.importFailed, { error: errorMessage(error, 'Unknown error') })
|
||||
);
|
||||
} finally {
|
||||
setIsImportingNostr(false);
|
||||
}
|
||||
}, [intl, loadSessions, nostrImportLink]);
|
||||
|
||||
const handleCopyShareLink = useCallback(async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(shareLink);
|
||||
toast.success(intl.formatMessage(i18n.copied));
|
||||
} catch (error) {
|
||||
toast.error(`Failed to copy: ${errorMessage(error, 'Unknown error')}`);
|
||||
}
|
||||
}, [intl, shareLink]);
|
||||
|
||||
const handleImportSession = useCallback(
|
||||
async (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const file = e.target.files?.[0];
|
||||
@@ -747,7 +638,7 @@ const SessionListView: React.FC<SessionListViewProps> = React.memo(({ onSelectSe
|
||||
|
||||
try {
|
||||
const json = await file.text();
|
||||
await acpImportSession(json, 'json');
|
||||
await acpImportSession(json);
|
||||
|
||||
toast.success(intl.formatMessage(i18n.importSuccess));
|
||||
window.dispatchEvent(new CustomEvent(AppEvents.SESSION_CREATED));
|
||||
@@ -778,18 +669,14 @@ const SessionListView: React.FC<SessionListViewProps> = React.memo(({ onSelectSe
|
||||
onDuplicateClick,
|
||||
onDeleteClick,
|
||||
onExportClick,
|
||||
onShareClick,
|
||||
onOpenInNewWindow,
|
||||
isSharing,
|
||||
}: {
|
||||
session: SessionListItem;
|
||||
onEditClick: (session: SessionListItem) => void;
|
||||
onDuplicateClick: (session: SessionListItem) => void;
|
||||
onDeleteClick: (session: SessionListItem) => void;
|
||||
onExportClick: (session: SessionListItem, format: SessionExportFormat) => void;
|
||||
onShareClick: (session: SessionListItem, e: React.MouseEvent) => void;
|
||||
onOpenInNewWindow: (session: SessionListItem, e: React.MouseEvent) => void;
|
||||
isSharing: boolean;
|
||||
}) {
|
||||
const handleEditClick = useCallback(
|
||||
(e: React.MouseEvent) => {
|
||||
@@ -826,13 +713,6 @@ const SessionListView: React.FC<SessionListViewProps> = React.memo(({ onSelectSe
|
||||
[onExportClick, session]
|
||||
);
|
||||
|
||||
const handleShareClick = useCallback(
|
||||
(e: React.MouseEvent) => {
|
||||
onShareClick(session, e);
|
||||
},
|
||||
[onShareClick, session]
|
||||
);
|
||||
|
||||
const handleOpenInNewWindowClick = useCallback(
|
||||
(e: React.MouseEvent) => {
|
||||
onOpenInNewWindow(session, e);
|
||||
@@ -925,20 +805,6 @@ const SessionListView: React.FC<SessionListViewProps> = React.memo(({ onSelectSe
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
{nostrEnabled && (
|
||||
<button
|
||||
onClick={handleShareClick}
|
||||
disabled={isSharing}
|
||||
className="p-2 rounded hover:bg-gray-100 dark:hover:bg-gray-700 cursor-pointer disabled:cursor-wait disabled:opacity-60"
|
||||
title={intl.formatMessage(i18n.shareNostrSession)}
|
||||
>
|
||||
{isSharing ? (
|
||||
<LoaderCircle className="w-3 h-3 text-text-secondary animate-spin" />
|
||||
) : (
|
||||
<Share2 className="w-3 h-3 text-text-secondary hover:text-text-primary" />
|
||||
)}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
@@ -1032,9 +898,7 @@ const SessionListView: React.FC<SessionListViewProps> = React.memo(({ onSelectSe
|
||||
onDuplicateClick={handleDuplicateSession}
|
||||
onDeleteClick={handleDeleteSession}
|
||||
onExportClick={handleExportSession}
|
||||
onShareClick={handleShareSessionNostr}
|
||||
onOpenInNewWindow={handleOpenInNewWindow}
|
||||
isSharing={sharingSessionId === session.id}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
@@ -1083,9 +947,7 @@ const SessionListView: React.FC<SessionListViewProps> = React.memo(({ onSelectSe
|
||||
onDuplicateClick={handleDuplicateSession}
|
||||
onDeleteClick={handleDeleteSession}
|
||||
onExportClick={handleExportSession}
|
||||
onShareClick={handleShareSessionNostr}
|
||||
onOpenInNewWindow={handleOpenInNewWindow}
|
||||
isSharing={sharingSessionId === session.id}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
@@ -1117,17 +979,6 @@ const SessionListView: React.FC<SessionListViewProps> = React.memo(({ onSelectSe
|
||||
<div className="flex justify-between items-center mb-1">
|
||||
<h1 className="text-4xl font-light">{intl.formatMessage(i18n.chatHistory)}</h1>
|
||||
<div className="flex items-center gap-2">
|
||||
{nostrEnabled && (
|
||||
<Button
|
||||
onClick={() => setShowImportLinkModal(true)}
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="flex items-center gap-2"
|
||||
>
|
||||
<Share2 className="w-4 h-4" />
|
||||
{intl.formatMessage(i18n.importNostrSession)}
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
onClick={handleImportClick}
|
||||
variant="outline"
|
||||
@@ -1240,83 +1091,6 @@ const SessionListView: React.FC<SessionListViewProps> = React.memo(({ onSelectSe
|
||||
onSave={handleModalSave}
|
||||
/>
|
||||
|
||||
<Dialog open={showImportLinkModal} onOpenChange={setShowImportLinkModal}>
|
||||
<DialogContent className="sm:max-w-lg">
|
||||
<DialogHeader>
|
||||
<DialogTitle className="flex items-center gap-2">
|
||||
<Share2 className="w-5 h-5" />
|
||||
{intl.formatMessage(i18n.importNostrTitle)}
|
||||
</DialogTitle>
|
||||
<DialogDescription>{intl.formatMessage(i18n.importNostrDesc)}</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<textarea
|
||||
value={nostrImportLink}
|
||||
onChange={(event) => setNostrImportLink(event.target.value)}
|
||||
placeholder={intl.formatMessage(i18n.importNostrPlaceholder)}
|
||||
className="min-h-28 w-full resize-none rounded-lg border border-border-primary bg-background-primary p-3 text-sm text-text-primary outline-none focus:ring-2 focus:ring-border-active"
|
||||
disabled={isImportingNostr}
|
||||
/>
|
||||
|
||||
<DialogFooter>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => setShowImportLinkModal(false)}
|
||||
disabled={isImportingNostr}
|
||||
>
|
||||
{intl.formatMessage(i18n.cancel)}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={handleImportNostrLink}
|
||||
disabled={isImportingNostr || !nostrImportLink.trim()}
|
||||
>
|
||||
{isImportingNostr ? (
|
||||
<>
|
||||
<LoaderCircle className="w-4 h-4 animate-spin" />
|
||||
{intl.formatMessage(i18n.importing)}
|
||||
</>
|
||||
) : (
|
||||
intl.formatMessage(i18n.importSession)
|
||||
)}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
<Dialog open={showShareLinkModal} onOpenChange={setShowShareLinkModal}>
|
||||
<DialogContent className="sm:max-w-lg">
|
||||
<DialogHeader>
|
||||
<DialogTitle className="flex items-center gap-2">
|
||||
<Share2 className="w-5 h-5" />
|
||||
{intl.formatMessage(i18n.shareNostrTitle)}
|
||||
</DialogTitle>
|
||||
<DialogDescription>{intl.formatMessage(i18n.shareNostrDesc)}</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="relative rounded-lg border border-border-primary bg-background-secondary p-3 pr-12">
|
||||
<code className="block max-h-36 overflow-y-auto break-all text-sm text-text-primary">
|
||||
{shareLink}
|
||||
</code>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="absolute right-2 top-2"
|
||||
onClick={handleCopyShareLink}
|
||||
disabled={!shareLink}
|
||||
>
|
||||
<Copy className="h-4 w-4" />
|
||||
<span className="sr-only">{intl.formatMessage(i18n.copied)}</span>
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<DialogFooter>
|
||||
<Button variant="outline" onClick={() => setShowShareLinkModal(false)}>
|
||||
{intl.formatMessage(i18n.close)}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
<ConfirmationModal
|
||||
isOpen={showDeleteConfirmation}
|
||||
title={intl.formatMessage(i18n.deleteTitle)}
|
||||
|
||||
@@ -3827,9 +3827,6 @@
|
||||
"sessions.action.openNewWindow": {
|
||||
"defaultMessage": "In neuem Fenster öffnen"
|
||||
},
|
||||
"sessions.action.shareNostr": {
|
||||
"defaultMessage": "Verschlüsselten Nostr-Link teilen"
|
||||
},
|
||||
"sessions.cancel": {
|
||||
"defaultMessage": "Abbrechen"
|
||||
},
|
||||
@@ -3869,21 +3866,6 @@
|
||||
"sessions.import": {
|
||||
"defaultMessage": "Sitzung importieren"
|
||||
},
|
||||
"sessions.importNostr": {
|
||||
"defaultMessage": "Link importieren"
|
||||
},
|
||||
"sessions.importNostr.description": {
|
||||
"defaultMessage": "Fügen Sie einen Goose-Nostr-Freigabelink ein, um die Sitzung abzurufen, zu entschlüsseln und zu importieren."
|
||||
},
|
||||
"sessions.importNostr.placeholder": {
|
||||
"defaultMessage": "goose://sessions/nostr?nevent=...&key=..."
|
||||
},
|
||||
"sessions.importNostr.title": {
|
||||
"defaultMessage": "Nostr-Sitzung importieren"
|
||||
},
|
||||
"sessions.importing": {
|
||||
"defaultMessage": "Wird importiert..."
|
||||
},
|
||||
"sessions.includeAcp": {
|
||||
"defaultMessage": "ACP-Sitzungen einschließen"
|
||||
},
|
||||
@@ -3911,12 +3893,6 @@
|
||||
"sessions.searchPlaceholder": {
|
||||
"defaultMessage": "Verlauf durchsuchen..."
|
||||
},
|
||||
"sessions.shareNostr.description": {
|
||||
"defaultMessage": "Jeder mit diesem Link kann die Sitzung abrufen und entschlüsseln. Behandeln Sie ihn wie ein Geheimnis."
|
||||
},
|
||||
"sessions.shareNostr.title": {
|
||||
"defaultMessage": "Verschlüsselter Nostr-Freigabelink"
|
||||
},
|
||||
"sessions.toast.copied": {
|
||||
"defaultMessage": "In die Zwischenablage kopiert"
|
||||
},
|
||||
@@ -3944,12 +3920,6 @@
|
||||
"sessions.toast.imported": {
|
||||
"defaultMessage": "Sitzung erfolgreich importiert"
|
||||
},
|
||||
"sessions.toast.shareNostr": {
|
||||
"defaultMessage": "Verschlüsselter Nostr-Freigabelink erstellt"
|
||||
},
|
||||
"sessions.toast.shareNostrFailed": {
|
||||
"defaultMessage": "Nostr-Freigabelink konnte nicht erstellt werden: {error}"
|
||||
},
|
||||
"sessions.toast.updateFailed": {
|
||||
"defaultMessage": "Sitzungsbeschreibung konnte nicht aktualisiert werden: {error}"
|
||||
},
|
||||
|
||||
@@ -3875,9 +3875,6 @@
|
||||
"sessions.action.openNewWindow": {
|
||||
"defaultMessage": "Open in new window"
|
||||
},
|
||||
"sessions.action.shareNostr": {
|
||||
"defaultMessage": "Share encrypted Nostr link"
|
||||
},
|
||||
"sessions.cancel": {
|
||||
"defaultMessage": "Cancel"
|
||||
},
|
||||
@@ -3917,21 +3914,6 @@
|
||||
"sessions.import": {
|
||||
"defaultMessage": "Import Session"
|
||||
},
|
||||
"sessions.importNostr": {
|
||||
"defaultMessage": "Import Link"
|
||||
},
|
||||
"sessions.importNostr.description": {
|
||||
"defaultMessage": "Paste a Goose Nostr share link to fetch, decrypt, and import the session."
|
||||
},
|
||||
"sessions.importNostr.placeholder": {
|
||||
"defaultMessage": "goose://sessions/nostr?nevent=...&key=..."
|
||||
},
|
||||
"sessions.importNostr.title": {
|
||||
"defaultMessage": "Import Nostr Session"
|
||||
},
|
||||
"sessions.importing": {
|
||||
"defaultMessage": "Importing..."
|
||||
},
|
||||
"sessions.includeAcp": {
|
||||
"defaultMessage": "Include ACP sessions"
|
||||
},
|
||||
@@ -3959,12 +3941,6 @@
|
||||
"sessions.searchPlaceholder": {
|
||||
"defaultMessage": "Search history..."
|
||||
},
|
||||
"sessions.shareNostr.description": {
|
||||
"defaultMessage": "Anyone with this link can fetch and decrypt the session. Treat it like a secret."
|
||||
},
|
||||
"sessions.shareNostr.title": {
|
||||
"defaultMessage": "Encrypted Nostr Share Link"
|
||||
},
|
||||
"sessions.toast.copied": {
|
||||
"defaultMessage": "Copied to clipboard"
|
||||
},
|
||||
@@ -3992,12 +3968,6 @@
|
||||
"sessions.toast.imported": {
|
||||
"defaultMessage": "Session imported successfully"
|
||||
},
|
||||
"sessions.toast.shareNostr": {
|
||||
"defaultMessage": "Encrypted Nostr share link created"
|
||||
},
|
||||
"sessions.toast.shareNostrFailed": {
|
||||
"defaultMessage": "Failed to create Nostr share link: {error}"
|
||||
},
|
||||
"sessions.toast.updateFailed": {
|
||||
"defaultMessage": "Failed to update session description: {error}"
|
||||
},
|
||||
|
||||
@@ -3827,9 +3827,6 @@
|
||||
"sessions.action.openNewWindow": {
|
||||
"defaultMessage": "Abrir en una ventana nueva"
|
||||
},
|
||||
"sessions.action.shareNostr": {
|
||||
"defaultMessage": "Compartir enlace cifrado de Nostr"
|
||||
},
|
||||
"sessions.cancel": {
|
||||
"defaultMessage": "Cancelar"
|
||||
},
|
||||
@@ -3869,21 +3866,6 @@
|
||||
"sessions.import": {
|
||||
"defaultMessage": "Importar sesión"
|
||||
},
|
||||
"sessions.importNostr": {
|
||||
"defaultMessage": "Importar enlace"
|
||||
},
|
||||
"sessions.importNostr.description": {
|
||||
"defaultMessage": "Pega un enlace de Goose para compartir por Nostr para obtener, descifrar e importar la sesión."
|
||||
},
|
||||
"sessions.importNostr.placeholder": {
|
||||
"defaultMessage": "goose://sessions/nostr?nevent=...&key=..."
|
||||
},
|
||||
"sessions.importNostr.title": {
|
||||
"defaultMessage": "Importar sesión de Nostr"
|
||||
},
|
||||
"sessions.importing": {
|
||||
"defaultMessage": "Importando..."
|
||||
},
|
||||
"sessions.includeAcp": {
|
||||
"defaultMessage": "Incluir sesiones ACP"
|
||||
},
|
||||
@@ -3911,12 +3893,6 @@
|
||||
"sessions.searchPlaceholder": {
|
||||
"defaultMessage": "Buscar en el historial..."
|
||||
},
|
||||
"sessions.shareNostr.description": {
|
||||
"defaultMessage": "Cualquiera que tenga este enlace puede obtener y descifrar la sesión. Trátalo como un secreto."
|
||||
},
|
||||
"sessions.shareNostr.title": {
|
||||
"defaultMessage": "Enlace cifrado de Nostr para compartir"
|
||||
},
|
||||
"sessions.toast.copied": {
|
||||
"defaultMessage": "Copiado al portapapeles"
|
||||
},
|
||||
@@ -3944,12 +3920,6 @@
|
||||
"sessions.toast.imported": {
|
||||
"defaultMessage": "Sesión importada correctamente"
|
||||
},
|
||||
"sessions.toast.shareNostr": {
|
||||
"defaultMessage": "Enlace cifrado de Nostr creado para compartir"
|
||||
},
|
||||
"sessions.toast.shareNostrFailed": {
|
||||
"defaultMessage": "No se pudo crear el enlace de Nostr para compartir: {error}"
|
||||
},
|
||||
"sessions.toast.updateFailed": {
|
||||
"defaultMessage": "No se pudo actualizar la descripción de la sesión: {error}"
|
||||
},
|
||||
|
||||
@@ -3827,9 +3827,6 @@
|
||||
"sessions.action.openNewWindow": {
|
||||
"defaultMessage": "Ouvrir dans une nouvelle fenêtre"
|
||||
},
|
||||
"sessions.action.shareNostr": {
|
||||
"defaultMessage": "Partager un lien Nostr chiffré"
|
||||
},
|
||||
"sessions.cancel": {
|
||||
"defaultMessage": "Annuler"
|
||||
},
|
||||
@@ -3869,21 +3866,6 @@
|
||||
"sessions.import": {
|
||||
"defaultMessage": "Importer une session"
|
||||
},
|
||||
"sessions.importNostr": {
|
||||
"defaultMessage": "Importer un lien"
|
||||
},
|
||||
"sessions.importNostr.description": {
|
||||
"defaultMessage": "Collez un lien de partage Goose Nostr pour récupérer, déchiffrer et importer la session."
|
||||
},
|
||||
"sessions.importNostr.placeholder": {
|
||||
"defaultMessage": "goose://sessions/nostr?nevent=...&key=..."
|
||||
},
|
||||
"sessions.importNostr.title": {
|
||||
"defaultMessage": "Importer une session Nostr"
|
||||
},
|
||||
"sessions.importing": {
|
||||
"defaultMessage": "Importation..."
|
||||
},
|
||||
"sessions.includeAcp": {
|
||||
"defaultMessage": "Inclure les sessions ACP"
|
||||
},
|
||||
@@ -3911,12 +3893,6 @@
|
||||
"sessions.searchPlaceholder": {
|
||||
"defaultMessage": "Rechercher dans l'historique..."
|
||||
},
|
||||
"sessions.shareNostr.description": {
|
||||
"defaultMessage": "Toute personne disposant de ce lien peut récupérer et déchiffrer la session. Traitez-le comme un secret."
|
||||
},
|
||||
"sessions.shareNostr.title": {
|
||||
"defaultMessage": "Lien de partage Nostr chiffré"
|
||||
},
|
||||
"sessions.toast.copied": {
|
||||
"defaultMessage": "Copié dans le presse-papiers"
|
||||
},
|
||||
@@ -3944,12 +3920,6 @@
|
||||
"sessions.toast.imported": {
|
||||
"defaultMessage": "Session importée avec succès"
|
||||
},
|
||||
"sessions.toast.shareNostr": {
|
||||
"defaultMessage": "Lien de partage Nostr chiffré créé"
|
||||
},
|
||||
"sessions.toast.shareNostrFailed": {
|
||||
"defaultMessage": "Échec de la création du lien de partage Nostr : {error}"
|
||||
},
|
||||
"sessions.toast.updateFailed": {
|
||||
"defaultMessage": "Échec de la mise à jour de la description de la session : {error}"
|
||||
},
|
||||
|
||||
@@ -3827,9 +3827,6 @@
|
||||
"sessions.action.openNewWindow": {
|
||||
"defaultMessage": "नई विंडो में खोलें"
|
||||
},
|
||||
"sessions.action.shareNostr": {
|
||||
"defaultMessage": "एन्क्रिप्टेड नोस्ट्र लिंक साझा करें"
|
||||
},
|
||||
"sessions.cancel": {
|
||||
"defaultMessage": "रद्द करें"
|
||||
},
|
||||
@@ -3869,21 +3866,6 @@
|
||||
"sessions.import": {
|
||||
"defaultMessage": "आयात सत्र"
|
||||
},
|
||||
"sessions.importNostr": {
|
||||
"defaultMessage": "लिंक आयात करें"
|
||||
},
|
||||
"sessions.importNostr.description": {
|
||||
"defaultMessage": "सत्र लाने, डिक्रिप्ट करने और आयात करने के लिए Goose नॉस्ट्र शेयर लिंक चिपकाएँ।"
|
||||
},
|
||||
"sessions.importNostr.placeholder": {
|
||||
"defaultMessage": "goose://sessions/nostr?nevent=...&key=..."
|
||||
},
|
||||
"sessions.importNostr.title": {
|
||||
"defaultMessage": "नोस्ट्र सत्र आयात करें"
|
||||
},
|
||||
"sessions.importing": {
|
||||
"defaultMessage": "आयात किया जा रहा है..."
|
||||
},
|
||||
"sessions.includeAcp": {
|
||||
"defaultMessage": "ACP सत्र शामिल करें"
|
||||
},
|
||||
@@ -3911,12 +3893,6 @@
|
||||
"sessions.searchPlaceholder": {
|
||||
"defaultMessage": "खोज इतिहास..."
|
||||
},
|
||||
"sessions.shareNostr.description": {
|
||||
"defaultMessage": "इस लिंक वाला कोई भी व्यक्ति सत्र को ला सकता है और डिक्रिप्ट कर सकता है। इसे एक रहस्य की तरह समझो."
|
||||
},
|
||||
"sessions.shareNostr.title": {
|
||||
"defaultMessage": "एन्क्रिप्टेड नोस्ट्र शेयर लिंक"
|
||||
},
|
||||
"sessions.toast.copied": {
|
||||
"defaultMessage": "क्लिपबोर्ड पर कॉपी किया गया"
|
||||
},
|
||||
@@ -3944,12 +3920,6 @@
|
||||
"sessions.toast.imported": {
|
||||
"defaultMessage": "सत्र सफलतापूर्वक आयात किया गया"
|
||||
},
|
||||
"sessions.toast.shareNostr": {
|
||||
"defaultMessage": "एन्क्रिप्टेड नोस्ट्र शेयर लिंक बनाया गया"
|
||||
},
|
||||
"sessions.toast.shareNostrFailed": {
|
||||
"defaultMessage": "Nostr शेयर लिंक बनाने में विफल: {error}"
|
||||
},
|
||||
"sessions.toast.updateFailed": {
|
||||
"defaultMessage": "सत्र विवरण अद्यतन करने में विफल: {error}"
|
||||
},
|
||||
|
||||
@@ -3827,9 +3827,6 @@
|
||||
"sessions.action.openNewWindow": {
|
||||
"defaultMessage": "Buka di jendela baru"
|
||||
},
|
||||
"sessions.action.shareNostr": {
|
||||
"defaultMessage": "Bagikan tautan Nostr terenkripsi"
|
||||
},
|
||||
"sessions.cancel": {
|
||||
"defaultMessage": "Batal"
|
||||
},
|
||||
@@ -3869,21 +3866,6 @@
|
||||
"sessions.import": {
|
||||
"defaultMessage": "Impor Sesi"
|
||||
},
|
||||
"sessions.importNostr": {
|
||||
"defaultMessage": "Impor Tautan"
|
||||
},
|
||||
"sessions.importNostr.description": {
|
||||
"defaultMessage": "Tempel tautan berbagi Nostr Goose untuk mengambil, mendekripsi, dan mengimpor sesi."
|
||||
},
|
||||
"sessions.importNostr.placeholder": {
|
||||
"defaultMessage": "goose://sessions/nostr?nevent=...&key=..."
|
||||
},
|
||||
"sessions.importNostr.title": {
|
||||
"defaultMessage": "Impor Sesi Nostr"
|
||||
},
|
||||
"sessions.importing": {
|
||||
"defaultMessage": "Mengimpor..."
|
||||
},
|
||||
"sessions.includeAcp": {
|
||||
"defaultMessage": "Sertakan sesi ACP"
|
||||
},
|
||||
@@ -3911,12 +3893,6 @@
|
||||
"sessions.searchPlaceholder": {
|
||||
"defaultMessage": "Cari riwayat..."
|
||||
},
|
||||
"sessions.shareNostr.description": {
|
||||
"defaultMessage": "Siapa pun yang memiliki tautan ini dapat mengambil dan mendekripsi sesi. Perlakukan seperti rahasia."
|
||||
},
|
||||
"sessions.shareNostr.title": {
|
||||
"defaultMessage": "Tautan Berbagi Nostr Terenkripsi"
|
||||
},
|
||||
"sessions.toast.copied": {
|
||||
"defaultMessage": "Disalin ke papan klip"
|
||||
},
|
||||
@@ -3944,12 +3920,6 @@
|
||||
"sessions.toast.imported": {
|
||||
"defaultMessage": "Sesi berhasil diimpor"
|
||||
},
|
||||
"sessions.toast.shareNostr": {
|
||||
"defaultMessage": "Tautan berbagi Nostr terenkripsi dibuat"
|
||||
},
|
||||
"sessions.toast.shareNostrFailed": {
|
||||
"defaultMessage": "Gagal membuat tautan berbagi Nostr: {error}"
|
||||
},
|
||||
"sessions.toast.updateFailed": {
|
||||
"defaultMessage": "Gagal memperbarui deskripsi sesi: {error}"
|
||||
},
|
||||
|
||||
@@ -3827,9 +3827,6 @@
|
||||
"sessions.action.openNewWindow": {
|
||||
"defaultMessage": "Apri in una nuova finestra"
|
||||
},
|
||||
"sessions.action.shareNostr": {
|
||||
"defaultMessage": "Condividi link Nostr crittografato"
|
||||
},
|
||||
"sessions.cancel": {
|
||||
"defaultMessage": "Annulla"
|
||||
},
|
||||
@@ -3869,21 +3866,6 @@
|
||||
"sessions.import": {
|
||||
"defaultMessage": "Importa sessione"
|
||||
},
|
||||
"sessions.importNostr": {
|
||||
"defaultMessage": "Importa link"
|
||||
},
|
||||
"sessions.importNostr.description": {
|
||||
"defaultMessage": "Incolla un link di condivisione Nostr di Goose per recuperare, decrittografare e importare la sessione."
|
||||
},
|
||||
"sessions.importNostr.placeholder": {
|
||||
"defaultMessage": "goose://sessions/nostr?nevent=...&key=..."
|
||||
},
|
||||
"sessions.importNostr.title": {
|
||||
"defaultMessage": "Importa sessione Nostr"
|
||||
},
|
||||
"sessions.importing": {
|
||||
"defaultMessage": "Importazione in corso..."
|
||||
},
|
||||
"sessions.includeAcp": {
|
||||
"defaultMessage": "Includi sessioni ACP"
|
||||
},
|
||||
@@ -3911,12 +3893,6 @@
|
||||
"sessions.searchPlaceholder": {
|
||||
"defaultMessage": "Cerca nella cronologia..."
|
||||
},
|
||||
"sessions.shareNostr.description": {
|
||||
"defaultMessage": "Chiunque abbia questo link può recuperare e decifrare la sessione. Trattalo come un segreto."
|
||||
},
|
||||
"sessions.shareNostr.title": {
|
||||
"defaultMessage": "Link di condivisione Nostr crittografato"
|
||||
},
|
||||
"sessions.toast.copied": {
|
||||
"defaultMessage": "Copiato negli appunti"
|
||||
},
|
||||
@@ -3944,12 +3920,6 @@
|
||||
"sessions.toast.imported": {
|
||||
"defaultMessage": "Sessione importata correttamente"
|
||||
},
|
||||
"sessions.toast.shareNostr": {
|
||||
"defaultMessage": "Link di condivisione Nostr crittografato creato"
|
||||
},
|
||||
"sessions.toast.shareNostrFailed": {
|
||||
"defaultMessage": "Impossibile creare il link di condivisione Nostr: {error}"
|
||||
},
|
||||
"sessions.toast.updateFailed": {
|
||||
"defaultMessage": "Impossibile aggiornare la descrizione della sessione: {error}"
|
||||
},
|
||||
|
||||
@@ -3827,9 +3827,6 @@
|
||||
"sessions.action.openNewWindow": {
|
||||
"defaultMessage": "新しいウィンドウで開く"
|
||||
},
|
||||
"sessions.action.shareNostr": {
|
||||
"defaultMessage": "暗号化Nostrリンクを共有"
|
||||
},
|
||||
"sessions.cancel": {
|
||||
"defaultMessage": "キャンセル"
|
||||
},
|
||||
@@ -3869,21 +3866,6 @@
|
||||
"sessions.import": {
|
||||
"defaultMessage": "セッションをインポート"
|
||||
},
|
||||
"sessions.importNostr": {
|
||||
"defaultMessage": "リンクをインポート"
|
||||
},
|
||||
"sessions.importNostr.description": {
|
||||
"defaultMessage": "Goose Nostr共有リンクを貼り付けて、セッションを取得・復号・インポートします。"
|
||||
},
|
||||
"sessions.importNostr.placeholder": {
|
||||
"defaultMessage": "goose://sessions/nostr?nevent=...&key=..."
|
||||
},
|
||||
"sessions.importNostr.title": {
|
||||
"defaultMessage": "Nostrセッションをインポート"
|
||||
},
|
||||
"sessions.importing": {
|
||||
"defaultMessage": "インポート中..."
|
||||
},
|
||||
"sessions.includeAcp": {
|
||||
"defaultMessage": "ACP セッションを含める"
|
||||
},
|
||||
@@ -3911,12 +3893,6 @@
|
||||
"sessions.searchPlaceholder": {
|
||||
"defaultMessage": "履歴を検索..."
|
||||
},
|
||||
"sessions.shareNostr.description": {
|
||||
"defaultMessage": "このリンクを持つ人は誰でもセッションを取得して復号できます。秘密情報として扱ってください。"
|
||||
},
|
||||
"sessions.shareNostr.title": {
|
||||
"defaultMessage": "暗号化Nostr共有リンク"
|
||||
},
|
||||
"sessions.toast.copied": {
|
||||
"defaultMessage": "クリップボードにコピーしました"
|
||||
},
|
||||
@@ -3944,12 +3920,6 @@
|
||||
"sessions.toast.imported": {
|
||||
"defaultMessage": "セッションをインポートしました"
|
||||
},
|
||||
"sessions.toast.shareNostr": {
|
||||
"defaultMessage": "暗号化Nostr共有リンクを作成しました"
|
||||
},
|
||||
"sessions.toast.shareNostrFailed": {
|
||||
"defaultMessage": "Nostr共有リンクを作成できませんでした: {error}"
|
||||
},
|
||||
"sessions.toast.updateFailed": {
|
||||
"defaultMessage": "セッションの説明を更新できませんでした: {error}"
|
||||
},
|
||||
|
||||
@@ -3827,9 +3827,6 @@
|
||||
"sessions.action.openNewWindow": {
|
||||
"defaultMessage": "새 창에서 열기"
|
||||
},
|
||||
"sessions.action.shareNostr": {
|
||||
"defaultMessage": "암호화된 Nostr 링크 공유"
|
||||
},
|
||||
"sessions.cancel": {
|
||||
"defaultMessage": "취소"
|
||||
},
|
||||
@@ -3869,21 +3866,6 @@
|
||||
"sessions.import": {
|
||||
"defaultMessage": "세션 가져오기"
|
||||
},
|
||||
"sessions.importNostr": {
|
||||
"defaultMessage": "링크 가져오기"
|
||||
},
|
||||
"sessions.importNostr.description": {
|
||||
"defaultMessage": "goose Nostr 공유 링크를 붙여넣어 세션을 가져오고 복호화한 뒤 불러오세요."
|
||||
},
|
||||
"sessions.importNostr.placeholder": {
|
||||
"defaultMessage": "goose://sessions/nostr?nevent=...&key=..."
|
||||
},
|
||||
"sessions.importNostr.title": {
|
||||
"defaultMessage": "Nostr 세션 가져오기"
|
||||
},
|
||||
"sessions.importing": {
|
||||
"defaultMessage": "가져오는 중..."
|
||||
},
|
||||
"sessions.includeAcp": {
|
||||
"defaultMessage": "ACP 세션 포함"
|
||||
},
|
||||
@@ -3911,12 +3893,6 @@
|
||||
"sessions.searchPlaceholder": {
|
||||
"defaultMessage": "기록 검색..."
|
||||
},
|
||||
"sessions.shareNostr.description": {
|
||||
"defaultMessage": "이 링크가 있는 사람은 누구나 세션을 가져오고 복호화할 수 있습니다. 비밀처럼 다루세요."
|
||||
},
|
||||
"sessions.shareNostr.title": {
|
||||
"defaultMessage": "암호화된 Nostr 공유 링크"
|
||||
},
|
||||
"sessions.toast.copied": {
|
||||
"defaultMessage": "클립보드에 복사됨"
|
||||
},
|
||||
@@ -3944,12 +3920,6 @@
|
||||
"sessions.toast.imported": {
|
||||
"defaultMessage": "세션을 성공적으로 가져왔습니다."
|
||||
},
|
||||
"sessions.toast.shareNostr": {
|
||||
"defaultMessage": "암호화된 Nostr 공유 링크가 생성되었습니다."
|
||||
},
|
||||
"sessions.toast.shareNostrFailed": {
|
||||
"defaultMessage": "Nostr 공유 링크 생성 실패: {error}"
|
||||
},
|
||||
"sessions.toast.updateFailed": {
|
||||
"defaultMessage": "세션 설명 업데이트 실패: {error}"
|
||||
},
|
||||
|
||||
@@ -3827,9 +3827,6 @@
|
||||
"sessions.action.openNewWindow": {
|
||||
"defaultMessage": "Buka dalam tetingkap baharu"
|
||||
},
|
||||
"sessions.action.shareNostr": {
|
||||
"defaultMessage": "Kongsi pautan Nostr tersulit"
|
||||
},
|
||||
"sessions.cancel": {
|
||||
"defaultMessage": "Batal"
|
||||
},
|
||||
@@ -3869,21 +3866,6 @@
|
||||
"sessions.import": {
|
||||
"defaultMessage": "Import Sesi"
|
||||
},
|
||||
"sessions.importNostr": {
|
||||
"defaultMessage": "Import Pautan"
|
||||
},
|
||||
"sessions.importNostr.description": {
|
||||
"defaultMessage": "Tampal pautan kongsi Nostr Goose untuk mengambil, menyahsulit, dan mengimport sesi."
|
||||
},
|
||||
"sessions.importNostr.placeholder": {
|
||||
"defaultMessage": "goose://sessions/nostr?nevent=...&key=..."
|
||||
},
|
||||
"sessions.importNostr.title": {
|
||||
"defaultMessage": "Import Sesi Nostr"
|
||||
},
|
||||
"sessions.importing": {
|
||||
"defaultMessage": "Mengimport..."
|
||||
},
|
||||
"sessions.includeAcp": {
|
||||
"defaultMessage": "Sertakan sesi ACP"
|
||||
},
|
||||
@@ -3911,12 +3893,6 @@
|
||||
"sessions.searchPlaceholder": {
|
||||
"defaultMessage": "Cari sejarah..."
|
||||
},
|
||||
"sessions.shareNostr.description": {
|
||||
"defaultMessage": "Sesiapa sahaja yang mempunyai pautan ini boleh mengambil dan menyahsulit sesi tersebut. Anggap ia sebagai rahsia."
|
||||
},
|
||||
"sessions.shareNostr.title": {
|
||||
"defaultMessage": "Pautan Kongsi Nostr Tersulit"
|
||||
},
|
||||
"sessions.toast.copied": {
|
||||
"defaultMessage": "Disalin ke papan keratan"
|
||||
},
|
||||
@@ -3944,12 +3920,6 @@
|
||||
"sessions.toast.imported": {
|
||||
"defaultMessage": "Sesi berjaya diimport"
|
||||
},
|
||||
"sessions.toast.shareNostr": {
|
||||
"defaultMessage": "Pautan kongsi Nostr tersulit dicipta"
|
||||
},
|
||||
"sessions.toast.shareNostrFailed": {
|
||||
"defaultMessage": "Gagal mencipta pautan kongsi Nostr: {error}"
|
||||
},
|
||||
"sessions.toast.updateFailed": {
|
||||
"defaultMessage": "Gagal mengemas kini penerangan sesi: {error}"
|
||||
},
|
||||
|
||||
@@ -3827,9 +3827,6 @@
|
||||
"sessions.action.openNewWindow": {
|
||||
"defaultMessage": "Abrir numa nova janela"
|
||||
},
|
||||
"sessions.action.shareNostr": {
|
||||
"defaultMessage": "Partilhar ligação Nostr encriptada"
|
||||
},
|
||||
"sessions.cancel": {
|
||||
"defaultMessage": "Cancelar"
|
||||
},
|
||||
@@ -3869,21 +3866,6 @@
|
||||
"sessions.import": {
|
||||
"defaultMessage": "Importar sessão"
|
||||
},
|
||||
"sessions.importNostr": {
|
||||
"defaultMessage": "Importar ligação"
|
||||
},
|
||||
"sessions.importNostr.description": {
|
||||
"defaultMessage": "Cole uma ligação de partilha Nostr do Goose para obter, desencriptar e importar a sessão."
|
||||
},
|
||||
"sessions.importNostr.placeholder": {
|
||||
"defaultMessage": "goose://sessions/nostr?nevent=...&key=..."
|
||||
},
|
||||
"sessions.importNostr.title": {
|
||||
"defaultMessage": "Importar sessão Nostr"
|
||||
},
|
||||
"sessions.importing": {
|
||||
"defaultMessage": "A importar..."
|
||||
},
|
||||
"sessions.includeAcp": {
|
||||
"defaultMessage": "Incluir sessões ACP"
|
||||
},
|
||||
@@ -3911,12 +3893,6 @@
|
||||
"sessions.searchPlaceholder": {
|
||||
"defaultMessage": "Pesquisar no histórico..."
|
||||
},
|
||||
"sessions.shareNostr.description": {
|
||||
"defaultMessage": "Qualquer pessoa com este link pode obter e descriptografar a sessão. Trate-o como um segredo."
|
||||
},
|
||||
"sessions.shareNostr.title": {
|
||||
"defaultMessage": "Link de Partilha Nostr Criptografado"
|
||||
},
|
||||
"sessions.toast.copied": {
|
||||
"defaultMessage": "Copiado para a área de transferência"
|
||||
},
|
||||
@@ -3944,12 +3920,6 @@
|
||||
"sessions.toast.imported": {
|
||||
"defaultMessage": "Sessão importada com êxito"
|
||||
},
|
||||
"sessions.toast.shareNostr": {
|
||||
"defaultMessage": "Link de partilha Nostr criptografado criado"
|
||||
},
|
||||
"sessions.toast.shareNostrFailed": {
|
||||
"defaultMessage": "Falha ao criar o link de partilha Nostr: {error}"
|
||||
},
|
||||
"sessions.toast.updateFailed": {
|
||||
"defaultMessage": "Falha ao atualizar a descrição da sessão: {error}"
|
||||
},
|
||||
|
||||
@@ -3827,9 +3827,6 @@
|
||||
"sessions.action.openNewWindow": {
|
||||
"defaultMessage": "Открыть в новом окне"
|
||||
},
|
||||
"sessions.action.shareNostr": {
|
||||
"defaultMessage": "Поделиться зашифрованной ссылкой Nostr"
|
||||
},
|
||||
"sessions.cancel": {
|
||||
"defaultMessage": "Отмена"
|
||||
},
|
||||
@@ -3869,21 +3866,6 @@
|
||||
"sessions.import": {
|
||||
"defaultMessage": "Импортировать сеанс"
|
||||
},
|
||||
"sessions.importNostr": {
|
||||
"defaultMessage": "Импортировать ссылку"
|
||||
},
|
||||
"sessions.importNostr.description": {
|
||||
"defaultMessage": "Вставьте ссылку общего доступа Goose Nostr, чтобы получить, расшифровать и импортировать сеанс."
|
||||
},
|
||||
"sessions.importNostr.placeholder": {
|
||||
"defaultMessage": "goose://sessions/nostr?nevent=...&key=..."
|
||||
},
|
||||
"sessions.importNostr.title": {
|
||||
"defaultMessage": "Импортировать сеанс Nostr"
|
||||
},
|
||||
"sessions.importing": {
|
||||
"defaultMessage": "Импорт..."
|
||||
},
|
||||
"sessions.includeAcp": {
|
||||
"defaultMessage": "Включить сессии ACP"
|
||||
},
|
||||
@@ -3911,12 +3893,6 @@
|
||||
"sessions.searchPlaceholder": {
|
||||
"defaultMessage": "Поиск по истории..."
|
||||
},
|
||||
"sessions.shareNostr.description": {
|
||||
"defaultMessage": "Любой, у кого есть эта ссылка, сможет получить и расшифровать ваш сеанс. Обращайтесь с ней как с секретом."
|
||||
},
|
||||
"sessions.shareNostr.title": {
|
||||
"defaultMessage": "Зашифрованная ссылка общего доступа Nostr"
|
||||
},
|
||||
"sessions.toast.copied": {
|
||||
"defaultMessage": "Скопировано в буфер обмена"
|
||||
},
|
||||
@@ -3944,12 +3920,6 @@
|
||||
"sessions.toast.imported": {
|
||||
"defaultMessage": "Сеанс успешно импортирован"
|
||||
},
|
||||
"sessions.toast.shareNostr": {
|
||||
"defaultMessage": "Зашифрованная ссылка Nostr создана"
|
||||
},
|
||||
"sessions.toast.shareNostrFailed": {
|
||||
"defaultMessage": "Не удалось создать ссылку Nostr: {error}"
|
||||
},
|
||||
"sessions.toast.updateFailed": {
|
||||
"defaultMessage": "Не удалось обновить описание сеанса: {error}"
|
||||
},
|
||||
|
||||
@@ -3827,9 +3827,6 @@
|
||||
"sessions.action.openNewWindow": {
|
||||
"defaultMessage": "Yeni pencerede aç"
|
||||
},
|
||||
"sessions.action.shareNostr": {
|
||||
"defaultMessage": "Şifrelenmiş Nostr bağlantısını paylaşın"
|
||||
},
|
||||
"sessions.cancel": {
|
||||
"defaultMessage": "İptal"
|
||||
},
|
||||
@@ -3869,21 +3866,6 @@
|
||||
"sessions.import": {
|
||||
"defaultMessage": "Oturumu İçe Aktar"
|
||||
},
|
||||
"sessions.importNostr": {
|
||||
"defaultMessage": "Bağlantıyı İçe Aktar"
|
||||
},
|
||||
"sessions.importNostr.description": {
|
||||
"defaultMessage": "Oturumu almak, şifresini çözmek ve içe aktarmak için bir Goose Nostr paylaşım bağlantısını yapıştırın."
|
||||
},
|
||||
"sessions.importNostr.placeholder": {
|
||||
"defaultMessage": "goose://sessions/nostr?nevent=...&key=..."
|
||||
},
|
||||
"sessions.importNostr.title": {
|
||||
"defaultMessage": "Nostr Oturumunu İçe Aktar"
|
||||
},
|
||||
"sessions.importing": {
|
||||
"defaultMessage": "İçe aktarılıyor..."
|
||||
},
|
||||
"sessions.includeAcp": {
|
||||
"defaultMessage": "ACP oturumlarını dahil et"
|
||||
},
|
||||
@@ -3911,12 +3893,6 @@
|
||||
"sessions.searchPlaceholder": {
|
||||
"defaultMessage": "Arama geçmişi..."
|
||||
},
|
||||
"sessions.shareNostr.description": {
|
||||
"defaultMessage": "Bu bağlantıya sahip olan herkes oturumu alıp şifresini çözebilir. Buna bir sırmış gibi davran."
|
||||
},
|
||||
"sessions.shareNostr.title": {
|
||||
"defaultMessage": "Şifreli Nostr Paylaşım Bağlantısı"
|
||||
},
|
||||
"sessions.toast.copied": {
|
||||
"defaultMessage": "Panoya kopyalandı"
|
||||
},
|
||||
@@ -3944,12 +3920,6 @@
|
||||
"sessions.toast.imported": {
|
||||
"defaultMessage": "Oturum başarıyla içe aktarıldı"
|
||||
},
|
||||
"sessions.toast.shareNostr": {
|
||||
"defaultMessage": "Şifrelenmiş Nostr paylaşım bağlantısı oluşturuldu"
|
||||
},
|
||||
"sessions.toast.shareNostrFailed": {
|
||||
"defaultMessage": "Nostr paylaşım bağlantısı oluşturulamadı: {error}"
|
||||
},
|
||||
"sessions.toast.updateFailed": {
|
||||
"defaultMessage": "Oturum açıklaması güncellenemedi: {error}"
|
||||
},
|
||||
|
||||
@@ -3827,9 +3827,6 @@
|
||||
"sessions.action.openNewWindow": {
|
||||
"defaultMessage": "Mở trong cửa sổ mới"
|
||||
},
|
||||
"sessions.action.shareNostr": {
|
||||
"defaultMessage": "Chia sẻ liên kết Nostr được mã hóa"
|
||||
},
|
||||
"sessions.cancel": {
|
||||
"defaultMessage": "Hủy"
|
||||
},
|
||||
@@ -3869,21 +3866,6 @@
|
||||
"sessions.import": {
|
||||
"defaultMessage": "Nhập phiên"
|
||||
},
|
||||
"sessions.importNostr": {
|
||||
"defaultMessage": "Nhập liên kết"
|
||||
},
|
||||
"sessions.importNostr.description": {
|
||||
"defaultMessage": "Dán một liên kết chia sẻ Nostr của Goose để tìm nạp, giải mã và nhập phiên."
|
||||
},
|
||||
"sessions.importNostr.placeholder": {
|
||||
"defaultMessage": "goose://sessions/nostr?nevent=...&key=..."
|
||||
},
|
||||
"sessions.importNostr.title": {
|
||||
"defaultMessage": "Nhập phiên Nostr"
|
||||
},
|
||||
"sessions.importing": {
|
||||
"defaultMessage": "Đang nhập..."
|
||||
},
|
||||
"sessions.includeAcp": {
|
||||
"defaultMessage": "Bao gồm phiên ACP"
|
||||
},
|
||||
@@ -3911,12 +3893,6 @@
|
||||
"sessions.searchPlaceholder": {
|
||||
"defaultMessage": "Tìm kiếm lịch sử..."
|
||||
},
|
||||
"sessions.shareNostr.description": {
|
||||
"defaultMessage": "Bất kỳ ai có liên kết này đều có thể tải về và giải mã phiên làm việc. Hãy coi nó như một bí mật."
|
||||
},
|
||||
"sessions.shareNostr.title": {
|
||||
"defaultMessage": "Liên kết chia sẻ Nostr được mã hóa"
|
||||
},
|
||||
"sessions.toast.copied": {
|
||||
"defaultMessage": "Đã sao chép vào bộ nhớ tạm"
|
||||
},
|
||||
@@ -3944,12 +3920,6 @@
|
||||
"sessions.toast.imported": {
|
||||
"defaultMessage": "Đã nhập phiên làm việc thành công"
|
||||
},
|
||||
"sessions.toast.shareNostr": {
|
||||
"defaultMessage": "Đã tạo liên kết chia sẻ Nostr được mã hóa"
|
||||
},
|
||||
"sessions.toast.shareNostrFailed": {
|
||||
"defaultMessage": "Không thể tạo liên kết chia sẻ Nostr: {error}"
|
||||
},
|
||||
"sessions.toast.updateFailed": {
|
||||
"defaultMessage": "Không thể cập nhật mô tả phiên làm việc: {error}"
|
||||
},
|
||||
|
||||
@@ -3827,9 +3827,6 @@
|
||||
"sessions.action.openNewWindow": {
|
||||
"defaultMessage": "在新窗口中打开"
|
||||
},
|
||||
"sessions.action.shareNostr": {
|
||||
"defaultMessage": "分享加密的 Nostr 链接"
|
||||
},
|
||||
"sessions.cancel": {
|
||||
"defaultMessage": "取消"
|
||||
},
|
||||
@@ -3869,21 +3866,6 @@
|
||||
"sessions.import": {
|
||||
"defaultMessage": "导入会话"
|
||||
},
|
||||
"sessions.importNostr": {
|
||||
"defaultMessage": "导入链接"
|
||||
},
|
||||
"sessions.importNostr.description": {
|
||||
"defaultMessage": "粘贴 Goose Nostr 分享链接以获取、解密并导入会话。"
|
||||
},
|
||||
"sessions.importNostr.placeholder": {
|
||||
"defaultMessage": "goose://sessions/nostr?nevent=...&key=..."
|
||||
},
|
||||
"sessions.importNostr.title": {
|
||||
"defaultMessage": "导入 Nostr 会话"
|
||||
},
|
||||
"sessions.importing": {
|
||||
"defaultMessage": "正在导入..."
|
||||
},
|
||||
"sessions.includeAcp": {
|
||||
"defaultMessage": "包含 ACP 会话"
|
||||
},
|
||||
@@ -3911,12 +3893,6 @@
|
||||
"sessions.searchPlaceholder": {
|
||||
"defaultMessage": "搜索历史…"
|
||||
},
|
||||
"sessions.shareNostr.description": {
|
||||
"defaultMessage": "任何拥有此链接的人都可以获取并解密该会话。请像对待密钥一样保护它。"
|
||||
},
|
||||
"sessions.shareNostr.title": {
|
||||
"defaultMessage": "加密的 Nostr 分享链接"
|
||||
},
|
||||
"sessions.toast.copied": {
|
||||
"defaultMessage": "已复制到剪贴板"
|
||||
},
|
||||
@@ -3944,12 +3920,6 @@
|
||||
"sessions.toast.imported": {
|
||||
"defaultMessage": "会话导入成功"
|
||||
},
|
||||
"sessions.toast.shareNostr": {
|
||||
"defaultMessage": "已创建加密的 Nostr 分享链接"
|
||||
},
|
||||
"sessions.toast.shareNostrFailed": {
|
||||
"defaultMessage": "创建 Nostr 分享链接失败:{error}"
|
||||
},
|
||||
"sessions.toast.updateFailed": {
|
||||
"defaultMessage": "更新会话描述失败:{error}"
|
||||
},
|
||||
|
||||
@@ -3827,9 +3827,6 @@
|
||||
"sessions.action.openNewWindow": {
|
||||
"defaultMessage": "在新視窗中開啟"
|
||||
},
|
||||
"sessions.action.shareNostr": {
|
||||
"defaultMessage": "分享加密的 Nostr 連結"
|
||||
},
|
||||
"sessions.cancel": {
|
||||
"defaultMessage": "取消"
|
||||
},
|
||||
@@ -3869,21 +3866,6 @@
|
||||
"sessions.import": {
|
||||
"defaultMessage": "匯入工作階段"
|
||||
},
|
||||
"sessions.importNostr": {
|
||||
"defaultMessage": "匯入連結"
|
||||
},
|
||||
"sessions.importNostr.description": {
|
||||
"defaultMessage": "貼上 Goose Nostr 分享連結,以擷取、解密並匯入該工作階段。"
|
||||
},
|
||||
"sessions.importNostr.placeholder": {
|
||||
"defaultMessage": "goose://sessions/nostr?nevent=...&key=..."
|
||||
},
|
||||
"sessions.importNostr.title": {
|
||||
"defaultMessage": "匯入 Nostr 工作階段"
|
||||
},
|
||||
"sessions.importing": {
|
||||
"defaultMessage": "正在匯入…"
|
||||
},
|
||||
"sessions.includeAcp": {
|
||||
"defaultMessage": "包含 ACP 工作階段"
|
||||
},
|
||||
@@ -3911,12 +3893,6 @@
|
||||
"sessions.searchPlaceholder": {
|
||||
"defaultMessage": "搜尋記錄..."
|
||||
},
|
||||
"sessions.shareNostr.description": {
|
||||
"defaultMessage": "任何持有此連結的人都能擷取並解密該工作階段。請將其視為機密。"
|
||||
},
|
||||
"sessions.shareNostr.title": {
|
||||
"defaultMessage": "加密的 Nostr 分享連結"
|
||||
},
|
||||
"sessions.toast.copied": {
|
||||
"defaultMessage": "已複製到剪貼簿"
|
||||
},
|
||||
@@ -3944,12 +3920,6 @@
|
||||
"sessions.toast.imported": {
|
||||
"defaultMessage": "已成功匯入工作階段"
|
||||
},
|
||||
"sessions.toast.shareNostr": {
|
||||
"defaultMessage": "已建立加密的 Nostr 分享連結"
|
||||
},
|
||||
"sessions.toast.shareNostrFailed": {
|
||||
"defaultMessage": "無法建立 Nostr 分享連結:{error}"
|
||||
},
|
||||
"sessions.toast.updateFailed": {
|
||||
"defaultMessage": "無法更新工作階段描述:{error}"
|
||||
},
|
||||
|
||||
+5
-51
@@ -546,54 +546,13 @@ function queuePendingDeepLink(windowId: number, url: string): void {
|
||||
|
||||
const reactReadyWindows = new Set<number>();
|
||||
|
||||
const DEEPLINK_BURST_DEDUP_MS = 2000;
|
||||
const recentSessionDeepLinkSends = new Map<string, number>();
|
||||
|
||||
function pruneExpiredSessionDeepLinkSends(now: number): void {
|
||||
for (const [url, sentAt] of recentSessionDeepLinkSends) {
|
||||
if (now - sentAt >= DEEPLINK_BURST_DEDUP_MS) {
|
||||
recentSessionDeepLinkSends.delete(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function isBurstDuplicateSessionDeepLink(url: string): boolean {
|
||||
const now = Date.now();
|
||||
pruneExpiredSessionDeepLinkSends(now);
|
||||
const sentAt = recentSessionDeepLinkSends.get(url);
|
||||
return sentAt !== undefined && now - sentAt < DEEPLINK_BURST_DEDUP_MS;
|
||||
}
|
||||
|
||||
function recordSessionDeepLinkSend(url: string): void {
|
||||
const now = Date.now();
|
||||
recentSessionDeepLinkSends.set(url, now);
|
||||
pruneExpiredSessionDeepLinkSends(now);
|
||||
}
|
||||
|
||||
function sendOpenSharedSession(window: BrowserWindow, url: string): void {
|
||||
if (isBurstDuplicateSessionDeepLink(url)) {
|
||||
log.info('[Main] Ignoring burst duplicate session deep link');
|
||||
return;
|
||||
}
|
||||
recordSessionDeepLinkSend(url);
|
||||
window.webContents.send('open-shared-session', url);
|
||||
}
|
||||
|
||||
function deliverExtensionOrSessionDeepLink(
|
||||
url: string,
|
||||
parsedUrl: URL,
|
||||
targetWindow: BrowserWindow
|
||||
): void {
|
||||
function deliverExtensionDeepLink(url: string, targetWindow: BrowserWindow): void {
|
||||
if (!reactReadyWindows.has(targetWindow.id) || targetWindow.webContents.isLoadingMainFrame()) {
|
||||
queuePendingDeepLink(targetWindow.id, url);
|
||||
return;
|
||||
}
|
||||
|
||||
if (parsedUrl.hostname === 'extension') {
|
||||
targetWindow.webContents.send('add-extension', url);
|
||||
} else if (parsedUrl.hostname === 'sessions') {
|
||||
sendOpenSharedSession(targetWindow, url);
|
||||
}
|
||||
targetWindow.webContents.send('add-extension', url);
|
||||
}
|
||||
|
||||
function getResumeSessionId(parsedUrl: URL): string | null {
|
||||
@@ -670,8 +629,6 @@ async function processProtocolUrl(url: string, parsedUrl: URL, window: BrowserWi
|
||||
|
||||
if (parsedUrl.hostname === 'extension') {
|
||||
window.webContents.send('add-extension', url);
|
||||
} else if (parsedUrl.hostname === 'sessions') {
|
||||
sendOpenSharedSession(window, url);
|
||||
} else if (parsedUrl.hostname === 'bot' || parsedUrl.hostname === 'recipe') {
|
||||
const deeplinkData = parseRecipeDeeplink(url);
|
||||
const scheduledJobId = parsedUrl.searchParams.get('scheduledJob');
|
||||
@@ -740,14 +697,14 @@ app.on('open-url', async (_event, url) => {
|
||||
return;
|
||||
}
|
||||
|
||||
// For extension/session URLs, send to an existing regular window or open one
|
||||
// For extension URLs, send to an existing regular window or open one
|
||||
const regularWindows = getRegularWindows();
|
||||
if (regularWindows.length > 0) {
|
||||
const targetWindow = regularWindows[0];
|
||||
if (targetWindow.isMinimized()) targetWindow.restore();
|
||||
targetWindow.focus();
|
||||
if (parsedUrl.hostname === 'extension' || parsedUrl.hostname === 'sessions') {
|
||||
deliverExtensionOrSessionDeepLink(url, parsedUrl, targetWindow);
|
||||
if (parsedUrl.hostname === 'extension') {
|
||||
deliverExtensionDeepLink(url, targetWindow);
|
||||
}
|
||||
} else {
|
||||
openUrlHandledLaunch = true;
|
||||
@@ -982,7 +939,6 @@ let appConfig = {
|
||||
GOOSE_LOCALE: process.env.GOOSE_LOCALE || undefined,
|
||||
// If GOOSE_ALLOWLIST_WARNING env var is not set, defaults to false (strict blocking mode)
|
||||
GOOSE_ALLOWLIST_WARNING: process.env.GOOSE_ALLOWLIST_WARNING === 'true',
|
||||
GOOSE_DISABLE_NOSTR_SHARING: process.env.GOOSE_DISABLE_NOSTR_SHARING === 'true',
|
||||
};
|
||||
|
||||
const windowMap = new Map<number, BrowserWindow>();
|
||||
@@ -1918,8 +1874,6 @@ ipcMain.on('react-ready', (event) => {
|
||||
const parsedUrl = new URL(deepLinkUrl);
|
||||
if (parsedUrl.hostname === 'extension') {
|
||||
window.webContents.send('add-extension', deepLinkUrl);
|
||||
} else if (parsedUrl.hostname === 'sessions') {
|
||||
sendOpenSharedSession(window, deepLinkUrl);
|
||||
}
|
||||
} catch (error) {
|
||||
log.error('Error processing pending deep link:', error);
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import { acpImportSession } from './acp/sessions';
|
||||
|
||||
/**
|
||||
* Imports a session from an encrypted Nostr deep link.
|
||||
*/
|
||||
export async function importNostrSessionFromDeepLink(url: string): Promise<void> {
|
||||
await acpImportSession(url, 'nostr');
|
||||
}
|
||||
@@ -176,8 +176,6 @@ import type {
|
||||
SetSessionSystemPromptRequest_unstable,
|
||||
SetToolPermissionsRequest_unstable,
|
||||
SetToolPermissionsResponse_unstable,
|
||||
ShareSessionNostrRequest_unstable,
|
||||
ShareSessionNostrResponse_unstable,
|
||||
SteerSessionRequest_unstable,
|
||||
SteerSessionResponse_unstable,
|
||||
TruncateSessionConversationRequest_unstable,
|
||||
@@ -263,7 +261,6 @@ import {
|
||||
zSaveRecipeResponse_unstable,
|
||||
zScanRecipeResponse_unstable,
|
||||
zSetToolPermissionsResponse_unstable,
|
||||
zShareSessionNostrResponse_unstable,
|
||||
zSteerSessionResponse_unstable,
|
||||
zUpdateScheduleResponse_unstable,
|
||||
zUpdateSourceResponse_unstable,
|
||||
@@ -881,18 +878,6 @@ export class GooseExtClient {
|
||||
) as ImportSessionResponse_unstable;
|
||||
}
|
||||
|
||||
async sessionShareNostr_unstable(
|
||||
params: ShareSessionNostrRequest_unstable,
|
||||
): Promise<ShareSessionNostrResponse_unstable> {
|
||||
const raw = await this.conn.request(
|
||||
"_goose/unstable/session/share/nostr",
|
||||
params,
|
||||
);
|
||||
return zShareSessionNostrResponse_unstable.parse(
|
||||
raw,
|
||||
) as ShareSessionNostrResponse_unstable;
|
||||
}
|
||||
|
||||
async recipesEncode_unstable(
|
||||
params: EncodeRecipeRequest_unstable,
|
||||
): Promise<EncodeRecipeResponse_unstable> {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1538,15 +1538,12 @@ export type ExportSessionResponse_unstable = {
|
||||
};
|
||||
|
||||
/**
|
||||
* Import a session from a JSON string or share link.
|
||||
* Import a session from a serialized session JSON string.
|
||||
*/
|
||||
export type ImportSessionRequest_unstable = {
|
||||
input: string;
|
||||
source: SessionImportSource;
|
||||
};
|
||||
|
||||
export type SessionImportSource = 'auto' | 'json' | 'nostr';
|
||||
|
||||
/**
|
||||
* Import session response — metadata about the newly created session.
|
||||
*/
|
||||
@@ -1557,21 +1554,6 @@ export type ImportSessionResponse_unstable = {
|
||||
messageCount: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Share a session through Nostr and return its share links.
|
||||
*/
|
||||
export type ShareSessionNostrRequest_unstable = {
|
||||
sessionId: string;
|
||||
relays: Array<string>;
|
||||
};
|
||||
|
||||
export type ShareSessionNostrResponse_unstable = {
|
||||
deeplink: string;
|
||||
nevent: string;
|
||||
eventId: string;
|
||||
relays: Array<string>;
|
||||
};
|
||||
|
||||
/**
|
||||
* Encode a recipe as a goose deep link.
|
||||
*/
|
||||
@@ -2789,14 +2771,14 @@ export type RecipeParamsAction = 'submit' | 'cancel';
|
||||
export type ExtRequest = {
|
||||
id: string;
|
||||
method: string;
|
||||
params?: AddSessionExtensionRequest_unstable | RemoveSessionExtensionRequest_unstable | GetToolsRequest_unstable | SetToolPermissionsRequest_unstable | GooseToolCallRequest_unstable | ReadResourceRequest_unstable | AppsListRequest_unstable | AppsExportRequest_unstable | AppsImportRequest_unstable | AppsDeleteRequest_unstable | UpdateWorkingDirRequest_unstable | SetSessionSystemPromptRequest_unstable | SteerSessionRequest_unstable | LiveVoiceAvailabilityRequest_unstable | LiveVoiceStartRequest_unstable | LiveVoiceStopRequest_unstable | DiagnosticsGetRequest_unstable | ListPromptsRequest_unstable | GetPromptRequest_unstable | SavePromptRequest_unstable | ResetPromptRequest_unstable | GetConfigExtensionsRequest_unstable | AddConfigExtensionRequest_unstable | RemoveConfigExtensionRequest_unstable | SetConfigExtensionEnabledRequest_unstable | GetSessionExtensionsRequest_unstable | ListProvidersRequest_unstable | ProviderSupportedModelsListRequest_unstable | ProviderCatalogListRequest_unstable | ProviderSetupCatalogListRequest_unstable | ProviderCatalogTemplateRequest_unstable | CustomProviderCreateRequest_unstable | CustomProviderReadRequest_unstable | CustomProviderUpdateRequest_unstable | CustomProviderDeleteRequest_unstable | RefreshProviderInventoryRequest_unstable | ProviderReadinessCheckRequest_unstable | ProviderConfigReadRequest_unstable | ProviderConfigStatusRequest_unstable | ProviderConfigSaveRequest_unstable | ProviderConfigDeleteRequest_unstable | ProviderConfigAuthenticateRequest_unstable | ProviderSecretsListRequest_unstable | ProviderSecretDeleteRequest_unstable | CanonicalModelInfoRequest_unstable | PreferencesReadRequest_unstable | PreferencesSaveRequest_unstable | ConfigReadRequest_unstable | ConfigUpsertRequest_unstable | ConfigRemoveRequest_unstable | ConfigReadAllRequest_unstable | DefaultsReadRequest_unstable | DefaultsSaveRequest_unstable | DefaultsClearRequest_unstable | OnboardingImportScanRequest_unstable | OnboardingImportApplyRequest_unstable | ExportSessionRequest_unstable | ImportSessionRequest_unstable | ShareSessionNostrRequest_unstable | EncodeRecipeRequest_unstable | DecodeRecipeRequest_unstable | ScanRecipeRequest_unstable | ListRecipesRequest_unstable | DeleteRecipeRequest_unstable | ScheduleRecipeRequest_unstable | SetRecipeSlashCommandRequest_unstable | SaveRecipeRequest_unstable | ParseRecipeRequest_unstable | RecipeToYamlRequest_unstable | ListSchedulesRequest_unstable | ListScheduleSessionsRequest_unstable | CreateScheduleRequest_unstable | DeleteScheduleRequest_unstable | PauseScheduleRequest_unstable | UnpauseScheduleRequest_unstable | UpdateScheduleRequest_unstable | RunScheduleNowRequest_unstable | KillRunningJobRequest_unstable | InspectRunningJobRequest_unstable | GetSessionInfoRequest_unstable | TruncateSessionConversationRequest_unstable | UpdateSessionProjectRequest_unstable | RenameSessionRequest_unstable | ArchiveSessionRequest_unstable | UnarchiveSessionRequest_unstable | CreateSourceRequest_unstable | ListSourcesRequest_unstable | ListAgentMentionsRequest_unstable | ListSlashCommandsRequest_unstable | UpdateSourceRequest_unstable | DeleteSourceRequest_unstable | ExportSourceRequest_unstable | ImportSourcesRequest_unstable | DictationTranscribeRequest_unstable | DictationConfigRequest_unstable | DictationModelsListRequest_unstable | DictationModelDownloadRequest_unstable | DictationModelDownloadProgressRequest_unstable | DictationModelCancelRequest_unstable | DictationModelDeleteRequest_unstable | LocalInferenceModelsListRequest_unstable | LocalInferenceModelDownloadRequest_unstable | LocalInferenceModelDownloadProgressRequest_unstable | LocalInferenceModelDownloadCancelRequest_unstable | LocalInferenceModelDeleteRequest_unstable | LocalInferenceModelEvictRequest_unstable | LocalInferenceModelSettingsReadRequest_unstable | LocalInferenceModelSettingsUpdateRequest_unstable | LocalInferenceHuggingFaceSearchRequest_unstable | LocalInferenceHuggingFaceRepoVariantsRequest_unstable | LocalInferenceBuiltinChatTemplatesListRequest_unstable | {
|
||||
params?: AddSessionExtensionRequest_unstable | RemoveSessionExtensionRequest_unstable | GetToolsRequest_unstable | SetToolPermissionsRequest_unstable | GooseToolCallRequest_unstable | ReadResourceRequest_unstable | AppsListRequest_unstable | AppsExportRequest_unstable | AppsImportRequest_unstable | AppsDeleteRequest_unstable | UpdateWorkingDirRequest_unstable | SetSessionSystemPromptRequest_unstable | SteerSessionRequest_unstable | LiveVoiceAvailabilityRequest_unstable | LiveVoiceStartRequest_unstable | LiveVoiceStopRequest_unstable | DiagnosticsGetRequest_unstable | ListPromptsRequest_unstable | GetPromptRequest_unstable | SavePromptRequest_unstable | ResetPromptRequest_unstable | GetConfigExtensionsRequest_unstable | AddConfigExtensionRequest_unstable | RemoveConfigExtensionRequest_unstable | SetConfigExtensionEnabledRequest_unstable | GetSessionExtensionsRequest_unstable | ListProvidersRequest_unstable | ProviderSupportedModelsListRequest_unstable | ProviderCatalogListRequest_unstable | ProviderSetupCatalogListRequest_unstable | ProviderCatalogTemplateRequest_unstable | CustomProviderCreateRequest_unstable | CustomProviderReadRequest_unstable | CustomProviderUpdateRequest_unstable | CustomProviderDeleteRequest_unstable | RefreshProviderInventoryRequest_unstable | ProviderReadinessCheckRequest_unstable | ProviderConfigReadRequest_unstable | ProviderConfigStatusRequest_unstable | ProviderConfigSaveRequest_unstable | ProviderConfigDeleteRequest_unstable | ProviderConfigAuthenticateRequest_unstable | ProviderSecretsListRequest_unstable | ProviderSecretDeleteRequest_unstable | CanonicalModelInfoRequest_unstable | PreferencesReadRequest_unstable | PreferencesSaveRequest_unstable | ConfigReadRequest_unstable | ConfigUpsertRequest_unstable | ConfigRemoveRequest_unstable | ConfigReadAllRequest_unstable | DefaultsReadRequest_unstable | DefaultsSaveRequest_unstable | DefaultsClearRequest_unstable | OnboardingImportScanRequest_unstable | OnboardingImportApplyRequest_unstable | ExportSessionRequest_unstable | ImportSessionRequest_unstable | EncodeRecipeRequest_unstable | DecodeRecipeRequest_unstable | ScanRecipeRequest_unstable | ListRecipesRequest_unstable | DeleteRecipeRequest_unstable | ScheduleRecipeRequest_unstable | SetRecipeSlashCommandRequest_unstable | SaveRecipeRequest_unstable | ParseRecipeRequest_unstable | RecipeToYamlRequest_unstable | ListSchedulesRequest_unstable | ListScheduleSessionsRequest_unstable | CreateScheduleRequest_unstable | DeleteScheduleRequest_unstable | PauseScheduleRequest_unstable | UnpauseScheduleRequest_unstable | UpdateScheduleRequest_unstable | RunScheduleNowRequest_unstable | KillRunningJobRequest_unstable | InspectRunningJobRequest_unstable | GetSessionInfoRequest_unstable | TruncateSessionConversationRequest_unstable | UpdateSessionProjectRequest_unstable | RenameSessionRequest_unstable | ArchiveSessionRequest_unstable | UnarchiveSessionRequest_unstable | CreateSourceRequest_unstable | ListSourcesRequest_unstable | ListAgentMentionsRequest_unstable | ListSlashCommandsRequest_unstable | UpdateSourceRequest_unstable | DeleteSourceRequest_unstable | ExportSourceRequest_unstable | ImportSourcesRequest_unstable | DictationTranscribeRequest_unstable | DictationConfigRequest_unstable | DictationModelsListRequest_unstable | DictationModelDownloadRequest_unstable | DictationModelDownloadProgressRequest_unstable | DictationModelCancelRequest_unstable | DictationModelDeleteRequest_unstable | LocalInferenceModelsListRequest_unstable | LocalInferenceModelDownloadRequest_unstable | LocalInferenceModelDownloadProgressRequest_unstable | LocalInferenceModelDownloadCancelRequest_unstable | LocalInferenceModelDeleteRequest_unstable | LocalInferenceModelEvictRequest_unstable | LocalInferenceModelSettingsReadRequest_unstable | LocalInferenceModelSettingsUpdateRequest_unstable | LocalInferenceHuggingFaceSearchRequest_unstable | LocalInferenceHuggingFaceRepoVariantsRequest_unstable | LocalInferenceBuiltinChatTemplatesListRequest_unstable | {
|
||||
[key: string]: unknown;
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type ExtResponse = {
|
||||
id: string;
|
||||
result?: EmptyResponse | GetToolsResponse_unstable | SetToolPermissionsResponse_unstable | GooseToolCallResponse_unstable | ReadResourceResponse_unstable | AppsListResponse_unstable | AppsExportResponse_unstable | AppsImportResponse_unstable | AppsDeleteResponse_unstable | SteerSessionResponse_unstable | LiveVoiceAvailabilityResponse_unstable | LiveVoiceStartResponse_unstable | DiagnosticsGetResponse_unstable | ListPromptsResponse_unstable | GetPromptResponse_unstable | PromptOperationResponse_unstable | GetConfigExtensionsResponse_unstable | GetSessionExtensionsResponse_unstable | ListProvidersResponse_unstable | ProviderSupportedModelsListResponse_unstable | ProviderCatalogListResponse_unstable | ProviderSetupCatalogListResponse_unstable | ProviderCatalogTemplateResponse_unstable | CustomProviderCreateResponse_unstable | CustomProviderReadResponse_unstable | CustomProviderUpdateResponse_unstable | CustomProviderDeleteResponse_unstable | RefreshProviderInventoryResponse_unstable | ProviderReadinessCheckResponse_unstable | ProviderConfigReadResponse_unstable | ProviderConfigStatusResponse_unstable | ProviderConfigChangeResponse_unstable | ProviderSecretsListResponse_unstable | CanonicalModelInfoResponse_unstable | PreferencesReadResponse_unstable | ConfigReadResponse_unstable | ConfigReadAllResponse_unstable | DefaultsReadResponse_unstable | OnboardingImportScanResponse_unstable | OnboardingImportApplyResponse_unstable | ExportSessionResponse_unstable | ImportSessionResponse_unstable | ShareSessionNostrResponse_unstable | EncodeRecipeResponse_unstable | DecodeRecipeResponse_unstable | ScanRecipeResponse_unstable | ListRecipesResponse_unstable | SaveRecipeResponse_unstable | ParseRecipeResponse_unstable | RecipeToYamlResponse_unstable | ListSchedulesResponse_unstable | ListScheduleSessionsResponse_unstable | CreateScheduleResponse_unstable | UpdateScheduleResponse_unstable | RunScheduleNowResponse_unstable | KillRunningJobResponse_unstable | InspectRunningJobResponse_unstable | GetSessionInfoResponse_unstable | CreateSourceResponse_unstable | ListSourcesResponse_unstable | ListAgentMentionsResponse_unstable | ListSlashCommandsResponse_unstable | UpdateSourceResponse_unstable | ExportSourceResponse_unstable | ImportSourcesResponse_unstable | DictationTranscribeResponse_unstable | DictationConfigResponse_unstable | DictationModelsListResponse_unstable | DictationModelDownloadProgressResponse_unstable | LocalInferenceModelsListResponse_unstable | LocalInferenceModelDownloadResponse_unstable | LocalInferenceModelDownloadProgressResponse_unstable | LocalInferenceModelSettingsReadResponse_unstable | LocalInferenceModelSettingsUpdateResponse_unstable | LocalInferenceHuggingFaceSearchResponse_unstable | LocalInferenceHuggingFaceRepoVariantsResponse_unstable | LocalInferenceBuiltinChatTemplatesListResponse_unstable | unknown;
|
||||
result?: EmptyResponse | GetToolsResponse_unstable | SetToolPermissionsResponse_unstable | GooseToolCallResponse_unstable | ReadResourceResponse_unstable | AppsListResponse_unstable | AppsExportResponse_unstable | AppsImportResponse_unstable | AppsDeleteResponse_unstable | SteerSessionResponse_unstable | LiveVoiceAvailabilityResponse_unstable | LiveVoiceStartResponse_unstable | DiagnosticsGetResponse_unstable | ListPromptsResponse_unstable | GetPromptResponse_unstable | PromptOperationResponse_unstable | GetConfigExtensionsResponse_unstable | GetSessionExtensionsResponse_unstable | ListProvidersResponse_unstable | ProviderSupportedModelsListResponse_unstable | ProviderCatalogListResponse_unstable | ProviderSetupCatalogListResponse_unstable | ProviderCatalogTemplateResponse_unstable | CustomProviderCreateResponse_unstable | CustomProviderReadResponse_unstable | CustomProviderUpdateResponse_unstable | CustomProviderDeleteResponse_unstable | RefreshProviderInventoryResponse_unstable | ProviderReadinessCheckResponse_unstable | ProviderConfigReadResponse_unstable | ProviderConfigStatusResponse_unstable | ProviderConfigChangeResponse_unstable | ProviderSecretsListResponse_unstable | CanonicalModelInfoResponse_unstable | PreferencesReadResponse_unstable | ConfigReadResponse_unstable | ConfigReadAllResponse_unstable | DefaultsReadResponse_unstable | OnboardingImportScanResponse_unstable | OnboardingImportApplyResponse_unstable | ExportSessionResponse_unstable | ImportSessionResponse_unstable | EncodeRecipeResponse_unstable | DecodeRecipeResponse_unstable | ScanRecipeResponse_unstable | ListRecipesResponse_unstable | SaveRecipeResponse_unstable | ParseRecipeResponse_unstable | RecipeToYamlResponse_unstable | ListSchedulesResponse_unstable | ListScheduleSessionsResponse_unstable | CreateScheduleResponse_unstable | UpdateScheduleResponse_unstable | RunScheduleNowResponse_unstable | KillRunningJobResponse_unstable | InspectRunningJobResponse_unstable | GetSessionInfoResponse_unstable | CreateSourceResponse_unstable | ListSourcesResponse_unstable | ListAgentMentionsResponse_unstable | ListSlashCommandsResponse_unstable | UpdateSourceResponse_unstable | ExportSourceResponse_unstable | ImportSourcesResponse_unstable | DictationTranscribeResponse_unstable | DictationConfigResponse_unstable | DictationModelsListResponse_unstable | DictationModelDownloadProgressResponse_unstable | LocalInferenceModelsListResponse_unstable | LocalInferenceModelDownloadResponse_unstable | LocalInferenceModelDownloadProgressResponse_unstable | LocalInferenceModelSettingsReadResponse_unstable | LocalInferenceModelSettingsUpdateResponse_unstable | LocalInferenceHuggingFaceSearchResponse_unstable | LocalInferenceHuggingFaceRepoVariantsResponse_unstable | LocalInferenceBuiltinChatTemplatesListResponse_unstable | unknown;
|
||||
} | {
|
||||
error: {
|
||||
code: number;
|
||||
|
||||
@@ -1185,18 +1185,11 @@ export const zExportSessionResponse_unstable = z.object({
|
||||
data: z.string()
|
||||
});
|
||||
|
||||
export const zSessionImportSource = z.enum([
|
||||
'auto',
|
||||
'json',
|
||||
'nostr'
|
||||
]);
|
||||
|
||||
/**
|
||||
* Import a session from a JSON string or share link.
|
||||
* Import a session from a serialized session JSON string.
|
||||
*/
|
||||
export const zImportSessionRequest_unstable = z.object({
|
||||
input: z.string(),
|
||||
source: zSessionImportSource
|
||||
input: z.string()
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -1209,21 +1202,6 @@ export const zImportSessionResponse_unstable = z.object({
|
||||
messageCount: z.int().gte(0)
|
||||
});
|
||||
|
||||
/**
|
||||
* Share a session through Nostr and return its share links.
|
||||
*/
|
||||
export const zShareSessionNostrRequest_unstable = z.object({
|
||||
sessionId: z.string(),
|
||||
relays: z.array(z.string())
|
||||
});
|
||||
|
||||
export const zShareSessionNostrResponse_unstable = z.object({
|
||||
deeplink: z.string(),
|
||||
nevent: z.string(),
|
||||
eventId: z.string(),
|
||||
relays: z.array(z.string())
|
||||
});
|
||||
|
||||
export const zRecipeExtensionDto = z.union([
|
||||
z.object({
|
||||
name: z.string(),
|
||||
@@ -2387,7 +2365,6 @@ export const zExtRequest = z.object({
|
||||
zOnboardingImportApplyRequest_unstable,
|
||||
zExportSessionRequest_unstable,
|
||||
zImportSessionRequest_unstable,
|
||||
zShareSessionNostrRequest_unstable,
|
||||
zEncodeRecipeRequest_unstable,
|
||||
zDecodeRecipeRequest_unstable,
|
||||
zScanRecipeRequest_unstable,
|
||||
@@ -2492,7 +2469,6 @@ export const zExtResponse = z.union([
|
||||
zOnboardingImportApplyResponse_unstable,
|
||||
zExportSessionResponse_unstable,
|
||||
zImportSessionResponse_unstable,
|
||||
zShareSessionNostrResponse_unstable,
|
||||
zEncodeRecipeResponse_unstable,
|
||||
zDecodeRecipeResponse_unstable,
|
||||
zScanRecipeResponse_unstable,
|
||||
|
||||
Reference in New Issue
Block a user