diff --git a/vite/package-lock.json b/vite/package-lock.json
index 8fb4065..8fdb990 100644
--- a/vite/package-lock.json
+++ b/vite/package-lock.json
@@ -11,6 +11,7 @@
"@tailwindcss/vite": "^4.1.8",
"@tauri-apps/plugin-fs": "^2.3.0",
"@tauri-apps/plugin-http": "^2.4.4",
+ "@tauri-apps/plugin-opener": "^2.4.0",
"gsap": "^3.13.0",
"moment": "^2.30.1",
"react": "^19.1.0",
@@ -1384,9 +1385,9 @@
}
},
"node_modules/@tauri-apps/api": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.5.0.tgz",
- "integrity": "sha512-Ldux4ip+HGAcPUmuLT8EIkk6yafl5vK0P0c0byzAKzxJh7vxelVtdPONjfgTm96PbN24yjZNESY8CKo8qniluA==",
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.6.0.tgz",
+ "integrity": "sha512-hRNcdercfgpzgFrMXWwNDBN0B7vNzOzRepy6ZAmhxi5mDLVPNrTpo9MGg2tN/F7JRugj4d2aF7E1rtPXAHaetg==",
"license": "Apache-2.0 OR MIT",
"funding": {
"type": "opencollective",
@@ -1616,6 +1617,15 @@
"@tauri-apps/api": "^2.0.0"
}
},
+ "node_modules/@tauri-apps/plugin-opener": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-opener/-/plugin-opener-2.4.0.tgz",
+ "integrity": "sha512-43VyN8JJtvKWJY72WI/KNZszTpDpzHULFxQs0CJBIYUdCRowQ6Q1feWTDb979N7nldqSuDOaBupZ6wz2nvuWwQ==",
+ "license": "MIT OR Apache-2.0",
+ "dependencies": {
+ "@tauri-apps/api": "^2.6.0"
+ }
+ },
"node_modules/@types/estree": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz",
@@ -3840,9 +3850,9 @@
}
},
"@tauri-apps/api": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.5.0.tgz",
- "integrity": "sha512-Ldux4ip+HGAcPUmuLT8EIkk6yafl5vK0P0c0byzAKzxJh7vxelVtdPONjfgTm96PbN24yjZNESY8CKo8qniluA=="
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.6.0.tgz",
+ "integrity": "sha512-hRNcdercfgpzgFrMXWwNDBN0B7vNzOzRepy6ZAmhxi5mDLVPNrTpo9MGg2tN/F7JRugj4d2aF7E1rtPXAHaetg=="
},
"@tauri-apps/cli": {
"version": "2.5.0",
@@ -3956,6 +3966,14 @@
"@tauri-apps/api": "^2.0.0"
}
},
+ "@tauri-apps/plugin-opener": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-opener/-/plugin-opener-2.4.0.tgz",
+ "integrity": "sha512-43VyN8JJtvKWJY72WI/KNZszTpDpzHULFxQs0CJBIYUdCRowQ6Q1feWTDb979N7nldqSuDOaBupZ6wz2nvuWwQ==",
+ "requires": {
+ "@tauri-apps/api": "^2.6.0"
+ }
+ },
"@types/estree": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz",
diff --git a/vite/package.json b/vite/package.json
index eaf2106..9a7b071 100644
--- a/vite/package.json
+++ b/vite/package.json
@@ -13,6 +13,7 @@
"@tailwindcss/vite": "^4.1.8",
"@tauri-apps/plugin-fs": "^2.3.0",
"@tauri-apps/plugin-http": "^2.4.4",
+ "@tauri-apps/plugin-opener": "^2.4.0",
"gsap": "^3.13.0",
"moment": "^2.30.1",
"react": "^19.1.0",
diff --git a/vite/public/cuelist_free.json b/vite/public/cuelist_free.json
index e18bdaa..f8a785a 100644
--- a/vite/public/cuelist_free.json
+++ b/vite/public/cuelist_free.json
@@ -16,7 +16,8 @@
"description": "Guide for drink",
"auto": true,
"audioFile": "assets/q2.mp3",
- "nextcue": 3
+ "nextcue": 3,
+ "status":"reset"
},
{
"id": 3,
@@ -44,7 +45,7 @@
"auto": true,
"audioFile": "assets/q4-1.mp3",
"nextcue": 4.2,
- "status":"go"
+ "status":"intro"
},
{
"id": 4.2,
@@ -53,7 +54,8 @@
"description": "chat",
"auto": true,
"nextcue": 4.3,
- "duration": 60
+ "duration": 90,
+ "status":"go"
},
{
"id": 4.3,
diff --git a/vite/public/default.json b/vite/public/default.json
index 8eac9cb..353cf97 100644
--- a/vite/public/default.json
+++ b/vite/public/default.json
@@ -9,6 +9,9 @@
"voice_prompt":"Use a calm and expressive voice, soft and poetic in feeling, but with steady, natural rhythm — not slow.",
"summary_prompt":"幫我把以下一段話整理成一段文字,以第一人稱視角作為當事人的文字紀念,文字內容 50 字以內:",
- "speech_idle_time":3000
+ "speech_idle_time":3000,
+ "sd_prompt_prefix":"a hazy memory of a {{ ",
+ "sd_prompt_suffix":" }}, seen through soft atmospheric blur, distant silhouettes and faded contours, pastel light and cinematic haze, (analog film texture), (shallow depth of field:1.3), shallow depth of field, memory fragment effect, light leak, subtle grain, chromatic aberration, surreal glow, in muted warm tones, cinematic framing,",
+ "sd_negative_propmt":"photorealism, digital art, sharp details, hard edges, CGI, anime, cartoon, studio light"
}
\ No newline at end of file
diff --git a/vite/src-tauri/2 b/vite/src-tauri/2
deleted file mode 100644
index 1619fe1..0000000
--- a/vite/src-tauri/2
+++ /dev/null
@@ -1,12 +0,0 @@
-
-added 1 package, and audited 148 packages in 3s
-
-35 packages are looking for funding
- run `npm fund` for details
-
-1 low severity vulnerability
-
-To address all issues, run:
- npm audit fix
-
-Run `npm audit` for details.
diff --git a/vite/src-tauri/Cargo.lock b/vite/src-tauri/Cargo.lock
index 9b75809..14f5f6e 100644
--- a/vite/src-tauri/Cargo.lock
+++ b/vite/src-tauri/Cargo.lock
@@ -104,6 +104,7 @@ dependencies = [
"tauri-plugin-fs",
"tauri-plugin-http",
"tauri-plugin-log",
+ "tauri-plugin-opener",
"tokio",
"webview2-com",
"windows",
@@ -115,6 +116,139 @@ version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
+[[package]]
+name = "async-broadcast"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532"
+dependencies = [
+ "event-listener",
+ "event-listener-strategy",
+ "futures-core",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "async-channel"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2"
+dependencies = [
+ "concurrent-queue",
+ "event-listener-strategy",
+ "futures-core",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "async-executor"
+version = "1.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb812ffb58524bdd10860d7d974e2f01cc0950c2438a74ee5ec2e2280c6c4ffa"
+dependencies = [
+ "async-task",
+ "concurrent-queue",
+ "fastrand",
+ "futures-lite",
+ "pin-project-lite",
+ "slab",
+]
+
+[[package]]
+name = "async-io"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1237c0ae75a0f3765f58910ff9cdd0a12eeb39ab2f4c7de23262f337f0aacbb3"
+dependencies = [
+ "async-lock",
+ "cfg-if",
+ "concurrent-queue",
+ "futures-io",
+ "futures-lite",
+ "parking",
+ "polling",
+ "rustix",
+ "slab",
+ "tracing",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "async-lock"
+version = "3.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18"
+dependencies = [
+ "event-listener",
+ "event-listener-strategy",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "async-process"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cde3f4e40e6021d7acffc90095cbd6dc54cb593903d1de5832f435eb274b85dc"
+dependencies = [
+ "async-channel",
+ "async-io",
+ "async-lock",
+ "async-signal",
+ "async-task",
+ "blocking",
+ "cfg-if",
+ "event-listener",
+ "futures-lite",
+ "rustix",
+ "tracing",
+]
+
+[[package]]
+name = "async-recursion"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.101",
+]
+
+[[package]]
+name = "async-signal"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7605a4e50d4b06df3898d5a70bf5fde51ed9059b0434b73105193bc27acce0d"
+dependencies = [
+ "async-io",
+ "async-lock",
+ "atomic-waker",
+ "cfg-if",
+ "futures-core",
+ "futures-io",
+ "rustix",
+ "signal-hook-registry",
+ "slab",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "async-task"
+version = "4.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
+
+[[package]]
+name = "async-trait"
+version = "0.1.88"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.101",
+]
+
[[package]]
name = "atk"
version = "0.18.2"
@@ -231,6 +365,19 @@ dependencies = [
"objc2 0.6.1",
]
+[[package]]
+name = "blocking"
+version = "1.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21"
+dependencies = [
+ "async-channel",
+ "async-task",
+ "futures-io",
+ "futures-lite",
+ "piper",
+]
+
[[package]]
name = "borsh"
version = "1.5.7"
@@ -473,6 +620,15 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "concurrent-queue"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973"
+dependencies = [
+ "crossbeam-utils",
+]
+
[[package]]
name = "convert_case"
version = "0.4.0"
@@ -863,6 +1019,33 @@ dependencies = [
"cfg-if",
]
+[[package]]
+name = "endi"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf"
+
+[[package]]
+name = "enumflags2"
+version = "0.7.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef"
+dependencies = [
+ "enumflags2_derive",
+ "serde",
+]
+
+[[package]]
+name = "enumflags2_derive"
+version = "0.7.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.101",
+]
+
[[package]]
name = "env_filter"
version = "0.1.3"
@@ -889,6 +1072,43 @@ dependencies = [
"typeid",
]
+[[package]]
+name = "errno"
+version = "0.3.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad"
+dependencies = [
+ "libc",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "event-listener"
+version = "5.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae"
+dependencies = [
+ "concurrent-queue",
+ "parking",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "event-listener-strategy"
+version = "0.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93"
+dependencies = [
+ "event-listener",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "fastrand"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
+
[[package]]
name = "fdeflate"
version = "0.3.7"
@@ -1017,6 +1237,19 @@ version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
+[[package]]
+name = "futures-lite"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532"
+dependencies = [
+ "fastrand",
+ "futures-core",
+ "futures-io",
+ "parking",
+ "pin-project-lite",
+]
+
[[package]]
name = "futures-macro"
version = "0.3.31"
@@ -1413,6 +1646,12 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+[[package]]
+name = "hermit-abi"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"
+
[[package]]
name = "hex"
version = "0.4.3"
@@ -1730,6 +1969,25 @@ dependencies = [
"serde",
]
+[[package]]
+name = "is-docker"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3"
+dependencies = [
+ "once_cell",
+]
+
+[[package]]
+name = "is-wsl"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5"
+dependencies = [
+ "is-docker",
+ "once_cell",
+]
+
[[package]]
name = "itoa"
version = "0.4.8"
@@ -1899,6 +2157,12 @@ dependencies = [
"libc",
]
+[[package]]
+name = "linux-raw-sys"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"
+
[[package]]
name = "litemap"
version = "0.8.0"
@@ -2067,6 +2331,19 @@ version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
+[[package]]
+name = "nix"
+version = "0.30.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6"
+dependencies = [
+ "bitflags 2.9.1",
+ "cfg-if",
+ "cfg_aliases",
+ "libc",
+ "memoffset",
+]
+
[[package]]
name = "nodrop"
version = "0.1.14"
@@ -2357,12 +2634,34 @@ version = "1.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
+[[package]]
+name = "open"
+version = "5.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2483562e62ea94312f3576a7aca397306df7990b8d89033e18766744377ef95"
+dependencies = [
+ "dunce",
+ "is-wsl",
+ "libc",
+ "pathdiff",
+]
+
[[package]]
name = "option-ext"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
+[[package]]
+name = "ordered-stream"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50"
+dependencies = [
+ "futures-core",
+ "pin-project-lite",
+]
+
[[package]]
name = "pango"
version = "0.18.3"
@@ -2388,6 +2687,12 @@ dependencies = [
"system-deps",
]
+[[package]]
+name = "parking"
+version = "2.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba"
+
[[package]]
name = "parking_lot"
version = "0.12.4"
@@ -2411,6 +2716,12 @@ dependencies = [
"windows-targets 0.52.6",
]
+[[package]]
+name = "pathdiff"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3"
+
[[package]]
name = "percent-encoding"
version = "2.3.1"
@@ -2563,6 +2874,17 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+[[package]]
+name = "piper"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066"
+dependencies = [
+ "atomic-waker",
+ "fastrand",
+ "futures-io",
+]
+
[[package]]
name = "pkg-config"
version = "0.3.32"
@@ -2595,6 +2917,21 @@ dependencies = [
"miniz_oxide",
]
+[[package]]
+name = "polling"
+version = "3.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b53a684391ad002dd6a596ceb6c74fd004fdce75f4be2e3f615068abbea5fd50"
+dependencies = [
+ "cfg-if",
+ "concurrent-queue",
+ "hermit-abi",
+ "pin-project-lite",
+ "rustix",
+ "tracing",
+ "windows-sys 0.59.0",
+]
+
[[package]]
name = "potential_utf"
version = "0.1.2"
@@ -3126,6 +3463,19 @@ dependencies = [
"semver",
]
+[[package]]
+name = "rustix"
+version = "1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8"
+dependencies = [
+ "bitflags 2.9.1",
+ "errno",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys 0.59.0",
+]
+
[[package]]
name = "rustls"
version = "0.23.27"
@@ -3415,6 +3765,15 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+[[package]]
+name = "signal-hook-registry"
+version = "1.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "simd-adler32"
version = "0.3.7"
@@ -3518,6 +3877,12 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
+[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
[[package]]
name = "string_cache"
version = "0.8.9"
@@ -3903,6 +4268,28 @@ dependencies = [
"time",
]
+[[package]]
+name = "tauri-plugin-opener"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b53b70b2c37c0183927f77b76ae2c4d3e0543b3c10f9fb4b3cd3b0c3f55ac542"
+dependencies = [
+ "dunce",
+ "glob",
+ "objc2-app-kit",
+ "objc2-foundation 0.3.1",
+ "open",
+ "schemars",
+ "serde",
+ "serde_json",
+ "tauri",
+ "tauri-plugin",
+ "thiserror 2.0.12",
+ "url",
+ "windows",
+ "zbus",
+]
+
[[package]]
name = "tauri-runtime"
version = "2.6.0"
@@ -4001,6 +4388,19 @@ dependencies = [
"toml",
]
+[[package]]
+name = "tempfile"
+version = "3.20.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1"
+dependencies = [
+ "fastrand",
+ "getrandom 0.3.3",
+ "once_cell",
+ "rustix",
+ "windows-sys 0.59.0",
+]
+
[[package]]
name = "tendril"
version = "0.4.3"
@@ -4281,9 +4681,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
dependencies = [
"pin-project-lite",
+ "tracing-attributes",
"tracing-core",
]
+[[package]]
+name = "tracing-attributes"
+version = "0.1.30"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.101",
+]
+
[[package]]
name = "tracing-core"
version = "0.1.33"
@@ -4333,6 +4745,17 @@ version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
+[[package]]
+name = "uds_windows"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9"
+dependencies = [
+ "memoffset",
+ "tempfile",
+ "winapi",
+]
+
[[package]]
name = "unic-char-property"
version = "0.9.0"
@@ -5183,6 +5606,66 @@ dependencies = [
"synstructure",
]
+[[package]]
+name = "zbus"
+version = "5.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4bb4f9a464286d42851d18a605f7193b8febaf5b0919d71c6399b7b26e5b0aad"
+dependencies = [
+ "async-broadcast",
+ "async-executor",
+ "async-io",
+ "async-lock",
+ "async-process",
+ "async-recursion",
+ "async-task",
+ "async-trait",
+ "blocking",
+ "enumflags2",
+ "event-listener",
+ "futures-core",
+ "futures-lite",
+ "hex",
+ "nix",
+ "ordered-stream",
+ "serde",
+ "serde_repr",
+ "tracing",
+ "uds_windows",
+ "windows-sys 0.59.0",
+ "winnow 0.7.10",
+ "zbus_macros",
+ "zbus_names",
+ "zvariant",
+]
+
+[[package]]
+name = "zbus_macros"
+version = "5.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef9859f68ee0c4ee2e8cde84737c78e3f4c54f946f2a38645d0d4c7a95327659"
+dependencies = [
+ "proc-macro-crate 3.3.0",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.101",
+ "zbus_names",
+ "zvariant",
+ "zvariant_utils",
+]
+
+[[package]]
+name = "zbus_names"
+version = "4.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97"
+dependencies = [
+ "serde",
+ "static_assertions",
+ "winnow 0.7.10",
+ "zvariant",
+]
+
[[package]]
name = "zerocopy"
version = "0.8.25"
@@ -5262,3 +5745,44 @@ dependencies = [
"quote",
"syn 2.0.101",
]
+
+[[package]]
+name = "zvariant"
+version = "5.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d91b3680bb339216abd84714172b5138a4edac677e641ef17e1d8cb1b3ca6e6f"
+dependencies = [
+ "endi",
+ "enumflags2",
+ "serde",
+ "winnow 0.7.10",
+ "zvariant_derive",
+ "zvariant_utils",
+]
+
+[[package]]
+name = "zvariant_derive"
+version = "5.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a8c68501be459a8dbfffbe5d792acdd23b4959940fc87785fb013b32edbc208"
+dependencies = [
+ "proc-macro-crate 3.3.0",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.101",
+ "zvariant_utils",
+]
+
+[[package]]
+name = "zvariant_utils"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e16edfee43e5d7b553b77872d99bc36afdda75c223ca7ad5e3fbecd82ca5fc34"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "serde",
+ "static_assertions",
+ "syn 2.0.101",
+ "winnow 0.7.10",
+]
diff --git a/vite/src-tauri/Cargo.toml b/vite/src-tauri/Cargo.toml
index fe1c674..e83b68e 100644
--- a/vite/src-tauri/Cargo.toml
+++ b/vite/src-tauri/Cargo.toml
@@ -30,3 +30,4 @@ tokio = { version = "1.45.1", features = ["net"] }
webview2-com = "0.37.0"
windows = "0.61.1"
tauri-plugin-fs = "2"
+tauri-plugin-opener = "2"
diff --git a/vite/src-tauri/capabilities/default.json b/vite/src-tauri/capabilities/default.json
index efeb1ce..738b924 100644
--- a/vite/src-tauri/capabilities/default.json
+++ b/vite/src-tauri/capabilities/default.json
@@ -11,25 +11,45 @@
"core:app:default",
"core:resources:default",
"core:webview:default",
-
{
"identifier": "http:default",
"allow": [
{
"url": "https://*.openai.com"
- },{
- "url":"http://localhost:34800"
+ },
+ {
+ "url": "http://localhost:34800"
+ }
+ ]
+ },
+ "opener:allow-open-path",
+ {
+ "identifier": "opener:allow-open-path",
+ "allow": [
+ {
+ "path": "$APPDATA"
+ },
+ {
+ "path": "$APPDATA/**/*"
}
]
- },
+ },
"fs:write-files",
"fs:allow-create",
"fs:allow-appdata-write",
- "fs:allow-appdata-read",
+ "fs:allow-appdata-read",
"fs:allow-exists",
{
"identifier": "fs:scope",
- "allow": [{ "path": "$APPDATA" }, { "path": "$APPDATA/**/*" }]
- }
+ "allow": [
+ {
+ "path": "$APPDATA"
+ },
+ {
+ "path": "$APPDATA/**/*"
+ }
+ ]
+ },
+ "opener:default"
]
}
\ No newline at end of file
diff --git a/vite/src-tauri/src/lib.rs b/vite/src-tauri/src/lib.rs
index 027e46c..dbf6c6a 100644
--- a/vite/src-tauri/src/lib.rs
+++ b/vite/src-tauri/src/lib.rs
@@ -50,7 +50,6 @@ async fn send_osc_message(
Ok(())
}
-
#[tauri::command]
fn reset_permission(origin: &str, app: AppHandle) {
let webview = app.get_webview_window("main").unwrap();
@@ -81,6 +80,7 @@ pub fn run() {
dotenv().ok();
tauri::Builder::default()
+ .plugin(tauri_plugin_opener::init())
.plugin(tauri_plugin_fs::init())
.invoke_handler(tauri::generate_handler![
get_env,
diff --git a/vite/src-tauri/tauri.conf.json b/vite/src-tauri/tauri.conf.json
index d59ea4b..71211e8 100644
--- a/vite/src-tauri/tauri.conf.json
+++ b/vite/src-tauri/tauri.conf.json
@@ -13,8 +13,8 @@
"windows": [
{
"title": "theGreatTipsy",
- "width": 600,
- "height": 800,
+ "width": 1200,
+ "height": 600,
"resizable": true,
"fullscreen": false
}
diff --git a/vite/src/App.css b/vite/src/App.css
index 44ccbc2..117d13e 100644
--- a/vite/src/App.css
+++ b/vite/src/App.css
@@ -8,5 +8,5 @@
}
main{
- @apply flex-1 flex flex-col gap-4 justify-start p-8 overflow-y-auto;
+ @apply flex-1 grid grid-cols-2 gap-4 justify-start p-8 overflow-hidden;
}
\ No newline at end of file
diff --git a/vite/src/comps/debug.jsx b/vite/src/comps/debug.jsx
index f8bf88b..a25acbb 100644
--- a/vite/src/comps/debug.jsx
+++ b/vite/src/comps/debug.jsx
@@ -1,19 +1,28 @@
import { sendOsc, OSC_ADDRESS, updatePrompt } from "../util/osc"
-
+import { useData } from '../util/useData.jsx';
const TEST_PROMPT='a hazy memory of a {{ Scene }}, seen through soft atmospheric blur, distant silhouettes and faded contours, pastel light and cinematic haze, (analog film texture), (shallow depth of field:1.3), shallow depth of field, memory fragment effect, light leak, subtle grain, chromatic aberration, surreal glow, in muted warm tones, cinematic framing,';
export function DebugControl(){
+ const {data} = useData();
+
+ function sendPrompt(prompt_raw) {
+ console.log('Sending prompt:', prompt_raw);
+ const prompt = `${data?.sd_prompt_prefix || ''}${prompt_raw.replaceAll('"', '')}${data?.sd_prompt_suffix || ''}`;
+ updatePrompt(prompt);
+ }
+
return (
-
+
+
-
-
+
+
)
diff --git a/vite/src/pages/flow.jsx b/vite/src/pages/flow.jsx
index 5dcb2f7..ceb6a73 100644
--- a/vite/src/pages/flow.jsx
+++ b/vite/src/pages/flow.jsx
@@ -309,56 +309,57 @@ export function Flow(){
return (
-
-
-
-
- {refCurrentCue.current?.name}
+
+
+
+
+ {refCurrentCue.current?.name}
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
- {/* | ID | */}
- Name |
- Description |
- Type |
- Auto |
- Audio / Due |
- |
-
-
-
- {cuelist?.map(({id, name, description, type, auto, audioFile,...props}, index) => (
-
- {/* | {id} | */}
- {name} |
- {description} |
- {EmojiType[type]} |
- {auto ? '⤵️' : ''} |
- {audioFile || props.duration} {props.callback && `<${props.callback}>`} |
-
-
- |
+
+
+
+
+ {/* | ID | */}
+ Name |
+ Description |
+ Type |
+ Auto |
+ Audio / Due |
+ |
- ))}
-
-
-
-
+
+
+ {cuelist?.map(({id, name, description, type, auto, audioFile,...props}, index) => (
+
+ {/* | {id} | */}
+ {name} |
+ {description} |
+ {EmojiType[type]} |
+ {auto ? '⤵️' : ''} |
+ {audioFile || props.duration} {props.callback && `<${props.callback}>`} |
+
+
+ |
+
+ ))}
+
+
+
+
+
{history?.map((msg, index) => (
@@ -387,7 +388,7 @@ export function Flow(){
chat_status= {status}
-
+
);
}
\ No newline at end of file
diff --git a/vite/src/pages/flow_free.jsx b/vite/src/pages/flow_free.jsx
index 5f3f32f..a253d1a 100644
--- a/vite/src/pages/flow_free.jsx
+++ b/vite/src/pages/flow_free.jsx
@@ -53,6 +53,7 @@ export function FreeFlow(){
const { history, status, reset, sendMessage, setStatus, audioOutput, setAudioOutput, stop:stopChat, audioUrl, }=useChat();
+
const {
transcript,
finalTranscript,
@@ -61,6 +62,12 @@ export function FreeFlow(){
browserSupportsSpeechRecognition,
isMicrophoneAvailable,
}=useSpeechRecognition();
+
+
+ function resetData() {
+ setSummary(null);
+ reset();
+ }
function playAudio(url){
if(!url) return;
@@ -77,6 +84,7 @@ export function FreeFlow(){
console.error("Audio playback error:", error);
});
+
audio.onended = () => {
if(refCurrentCue.current?.type!='chat') onCueEnd();
else{
@@ -86,8 +94,11 @@ export function FreeFlow(){
refAudio.current = audio; // Store the new audio reference
audio.addEventListener("loadedmetadata", () => {
- if(refCurrentCue.current?.type!='chat')
+ if(refCurrentCue.current?.type!='chat' && refCurrentCue.current?.type!='user_input') {
refTimer.current?.restart(audio.duration*1000 || 0);
+ }else{
+ setChatStatus(()=>ChatStatus.System);
+ }
});
}
function playCue(cue) {
@@ -112,7 +123,8 @@ export function FreeFlow(){
resetTranscript();
console.log('Starting conversation...');
sendMessage();
- setChatWelcome(true);
+ setChatWelcome(true);
+ resetData(); // Reset data for new conversation
break;
case 'chat_end':
const message= refInput.current?.value?.trim();
@@ -135,6 +147,11 @@ export function FreeFlow(){
console.error('Error getting summary:', error);
});
break;
+ case 'user_input':
+ console.log('User input cue, setting chat status to User');
+ setChatStatus(ChatStatus.User); // Set chat status to User for user input cues
+ resetTranscript(); // Reset transcript for user input
+ break;
}
@@ -155,10 +172,10 @@ export function FreeFlow(){
if(cue.status){
sendOsc(OSC_ADDRESS.STATUS, cue.status); // Send OSC status message
}
- if(cue.type=='chat'){
- sendOsc(OSC_ADDRESS.COUNTDOWN, cue.duration || 0); // Send OSC countdown message
+ if(cue.type=='chat' || cue.type=='user_input') {
+ sendOsc(OSC_ADDRESS.COUNTDOWN, cue.duration || '0'); // Send OSC countdown message
}else{
- sendOsc(OSC_ADDRESS.COUNTDOWN, 0); // Reset countdown for non-chat cues
+ sendOsc(OSC_ADDRESS.COUNTDOWN, '0'); // Reset countdown for non-chat cues
}
}
@@ -321,56 +338,58 @@ export function FreeFlow(){
return (
-
-
-
-
- {refCurrentCue.current?.name}
+
+
+
+
+
+ {refCurrentCue.current?.name}
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
- {/* | ID | */}
- Name |
- Description |
- Type |
- Auto |
- Audio / Due |
- |
-
-
-
- {cuelist?.map(({id, name, description, type, auto, audioFile,...props}, index) => (
-
- {/* | {id} | */}
- {name} |
- {description} |
- {EmojiType[type]} |
- {auto ? '⤵️' : ''} |
- {audioFile || props.duration} {props.callback && `<${props.callback}>`} |
-
-
- |
+
+
+
+
+ {/* | ID | */}
+ Name |
+ Description |
+ Type |
+ Auto |
+ Audio / Due |
+ |
- ))}
-
-
-
-
+
+
+ {cuelist?.map(({id, name, description, type, auto, audioFile,...props}, index) => (
+
+ {/* | {id} | */}
+ {name} |
+ {description} |
+ {EmojiType[type]} |
+ {auto ? '⤵️' : ''} |
+ {audioFile || props.duration} {props.callback && `<${props.callback}>`} |
+
+
+ |
+
+ ))}
+
+
+
+
+
{history?.map((msg, index) => (
@@ -378,7 +397,7 @@ export function FreeFlow(){
{msg.prompt &&
{msg.prompt}
}
))}
- {summary &&
{JSON.stringify(summary)}
}
+ {summary &&
{summary?.result}
}
chat_status= {chatStatus}
-
+
);
}
\ No newline at end of file
diff --git a/vite/src/pages/settings.jsx b/vite/src/pages/settings.jsx
index 26fa39b..e34c875 100644
--- a/vite/src/pages/settings.jsx
+++ b/vite/src/pages/settings.jsx
@@ -1,8 +1,9 @@
import { useData } from '../util/useData.jsx';
+
export function Settings(){
- const {data, read, write} = useData();
+ const {data, read, write, openFile} = useData();
function onSubmit(e){
e.preventDefault();
@@ -17,27 +18,31 @@ export function Settings(){
write(towrite);
}
+
+
return (
-
+
);
}
\ No newline at end of file
diff --git a/vite/src/util/chat.js b/vite/src/util/chat.js
index 4ee14ae..a2adaae 100644
--- a/vite/src/util/chat.js
+++ b/vite/src/util/chat.js
@@ -4,6 +4,10 @@ import { sendOsc, OSC_ADDRESS, updatePrompt } from './osc';
import { invoke } from '@tauri-apps/api/core';
import { useData } from './useData';
+
+const DELAY_SEND_PROMPT = 1000; // Delay in milliseconds before sending the prompt
+
+
async function getOpenAIToken() {
return invoke('get_env',{name:'OPENAI_API_KEY'});
}
@@ -98,9 +102,16 @@ export async function sendChatMessage(messages, data, isLastMessage = false) {
const result=JSON.parse(choice.message.content);
// send to python & unity
- const prompt = result.prompt?.replaceAll('"', '');
- await updatePrompt(prompt);
- await sendOsc(OSC_ADDRESS.PROMPT, prompt);
+ const rawPrompt = result.prompt?.replaceAll('"', '');
+ if(rawPrompt && rawPrompt.trim() !== '') {
+
+ const prompt = `${data?.sd_prompt_prefix || ''}${rawPrompt}${data?.sd_prompt_suffix || ''}`;
+
+ setTimeout(async ()=>{
+ await updatePrompt(prompt);
+ await sendOsc(OSC_ADDRESS.PROMPT, prompt);
+ }, DELAY_SEND_PROMPT);
+ }
// TODO: send to python
diff --git a/vite/src/util/useData.jsx b/vite/src/util/useData.jsx
index c1de335..ef9daf6 100644
--- a/vite/src/util/useData.jsx
+++ b/vite/src/util/useData.jsx
@@ -2,6 +2,7 @@ import { createContext, useContext, useEffect, useState } from "react";
import { BaseDirectory, readTextFile, exists, writeTextFile, mkdir } from "@tauri-apps/plugin-fs";
import { ParamKeys } from "./system_prompt";
import { path } from '@tauri-apps/api';
+import { openPath } from '@tauri-apps/plugin-opener';
const dataContext=createContext();
@@ -83,7 +84,12 @@ export function DataProvider({children}) {
{
+ const folder = await path.appDataDir();
+ const file = await path.join(folder, filePath);
+ await openPath(file);
+ },
}}>
{children}