aboutsummaryrefslogtreecommitdiffstats
path: root/llamachat/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'llamachat/config.py')
-rw-r--r--llamachat/config.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/llamachat/config.py b/llamachat/config.py
index f7dab5d..cfcda57 100644
--- a/llamachat/config.py
+++ b/llamachat/config.py
@@ -36,6 +36,9 @@ DEFAULTS = {
"attach_ctx_fraction": 0.5,
# Rough chars-per-token used to turn a ctx-size into a char budget.
"chars_per_token": 3.5,
+ # Toolbar button glyph size in pixels. The icons are drawn, not loaded,
+ # so this is the only knob for their on-screen size.
+ "icon_size": 28,
# Named prompt selected for new conversations. Empty means the global
# default.md, and "none" means no system prompt at all.
"default_prompt": "",
@@ -86,6 +89,7 @@ class Config:
request_timeout: int
attach_ctx_fraction: float
chars_per_token: float
+ icon_size: int
default_prompt: str
prompts_dir: Path
state_path: Path
@@ -157,6 +161,7 @@ def load(path: Path = CONFIG_PATH) -> Config:
request_timeout=int(values["request_timeout"]),
attach_ctx_fraction=float(values["attach_ctx_fraction"]),
chars_per_token=float(values["chars_per_token"]),
+ icon_size=int(values["icon_size"]),
default_prompt=str(values["default_prompt"]),
prompts_dir=path.parent / "prompts",
# Window layout, remembered between runs. Not user-editable config,
@@ -211,6 +216,9 @@ def write_default(path: Path = CONFIG_PATH) -> Path:
f'attach_ctx_fraction = {DEFAULTS["attach_ctx_fraction"]}\n'
f'chars_per_token = {DEFAULTS["chars_per_token"]}\n'
'\n'
+ '# Toolbar button icon size in pixels.\n'
+ f'icon_size = {DEFAULTS["icon_size"]}\n'
+ '\n'
'# Web search through SearXNG. The model decides when to search; it\n'
'# is offered a web_search tool and calls it when a question needs\n'
'# current information. Both search_enabled and search_url are\n'