fix: fixed behaviour of bundled app for decrypt and ai chat

This commit is contained in:
2026-05-31 17:26:50 +02:00
parent 040b5db37b
commit 5e99cb7a09
16 changed files with 189 additions and 49 deletions

View File

@@ -4,7 +4,9 @@ config :bds,
ecto_repos: [BDS.Repo]
config :bds, BDS.Repo,
database: Path.expand("../priv/data/bds_dev.db", __DIR__),
database:
System.get_env("BDS_DATABASE_PATH") ||
Path.expand("~/Library/Application Support/BDS2/bds_dev.db"),
pool_size: 5,
journal_mode: :wal,
busy_timeout: 15_000,
@@ -21,6 +23,9 @@ config :bds, :desktop,
title: "Blogging Desktop Server",
secret_key_base: "bds_desktop_shell_secret_key_base_64_chars_minimum_seed_value_001"
config :bds, :ai_secret_key,
"bds_desktop_shell_secret_key_base_64_chars_minimum_seed_value_001"
config :bds, BDS.Desktop.Endpoint,
url: [host: "127.0.0.1"],
adapter: Bandit.PhoenixAdapter,
@@ -80,7 +85,9 @@ config :bds, :embeddings,
# Cache downloaded model files under the app data directory so they persist
# across sessions (ModelCaching invariant). Overridden at runtime in prod.
config :bumblebee, :cache_dir, Path.expand("../priv/data/models", __DIR__)
config :bumblebee, :cache_dir,
System.get_env("BDS_MODEL_CACHE_DIR") ||
Path.expand("~/Library/Application Support/BDS2/models")
config :logger, :console,
format: "$time $metadata[$level] $message\n",

View File

@@ -1,7 +1,6 @@
import Config
config :bds, BDS.Repo,
database: Path.expand("../priv/data/bds_prod.db", __DIR__),
pool_size: 5,
stacktrace: false,
show_sensitive_data_on_connection_error: false

View File

@@ -3,7 +3,9 @@ import Config
if config_env() == :prod do
database_path =
System.get_env("BDS_DATABASE_PATH") ||
Path.expand("../priv/data/bds_prod.db", __DIR__)
Path.expand("~/Library/Application Support/BDS2/bds.db")
File.mkdir_p!(Path.dirname(database_path))
config :bds, BDS.Repo,
database: database_path,