-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.toml.example
More file actions
213 lines (183 loc) · 9.98 KB
/
Copy pathconfig.toml.example
File metadata and controls
213 lines (183 loc) · 9.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# forge 配置示例
# 复制到 ~/.config/forge/config.toml,或用 forge --config PATH 指定文件。
# 修改后会自动热重载;也可按 Ctrl+Shift+R 手动重载。
# 运行 `forge --check-config` 可在启动 GUI 前检查语法和取值。
# 基础 -----------------------------------------------------------------------
# "block":结构化命令块视图(默认);"vte":传统兼容终端;
# "unified":实验模式——同一套 OSC 133 生命周期,但只有一块常驻全屏 VTE,
# 不生成任何命令块外壳(完成的命令仅记录为内存中的 zone)。
# 三种模式均支持分屏;新 pane 继承被分屏 pane 的后端,与 anvil 一致。
terminal_mode = "block"
opacity = 0.95 # 0.01 .. 1.0
scrollback = 5000 # 0 .. 1000000
font = "Monospace 14"
font_scale = 1.0 # 0.1 .. 10.0
# default, light, solarized-dark, solarized-light, gruvbox-dark,
# gruvbox-light, dracula, nord
theme = "default"
# 可选:显式 shell 路径。默认依次寻找 jsh、bash、sh。
# shell = "/bin/bash"
# 兼容格式:按 ", " 分隔并依次写入新 shell。
# startup_commands = "cd ~/projects, nix develop"
# 何时检查 jsh 是否有新版本:"startup" 每次启动都联网;"daily"(默认)复用
# 安装器缓存,同机多个终端共享一次请求;"never" 关闭检查。
# 检查只决定是否显示提示条,安装始终需要显式点击(或命令面板的
# "Install or update jsh")。
jsh_update_check = "daily"
# 布局 -----------------------------------------------------------------------
tab_placement = "sidebar" # "sidebar" 或 "top"
sidebar_view = "tabs" # "tabs" 或 "files"
# 可选;省略时 sidebar 布局默认打开,top 布局默认关闭。运行时开关会自动保存。
# sidebar_visible = true
sidebar_width = 220 # 120 .. 800
tab_width = 180 # 顶部 tab 宽度;拖动右缘调整,80 .. 480
# 窗口底部状态栏:cwd、git 分支、上一条命令结果、终端网格、标签页序号。
# 四个 jterm 使用同一个键名。
bottom_bar = true
# 在支持 shell capability handshake 的本地 Block prompt 中,单击可移动编辑光标。
click_moves_cursor = true
# Block 模式 -----------------------------------------------------------------
max_visible_blocks = 200
lazy_load_threshold = 1000
truncation_threshold_lines = 50000
finished_block_viewport_rows = 24
finished_block_max_expanded_rows = 5000
max_collapsed_output_lines = 25
virtual_scroll_margin = 1
block_compact = false
# 实验性、完全本地且无 LLM 的 ASCII organism。仅显示在新建的 Block pane;
# 修改后请新建 pane 或重启 Forge。临时覆盖:FORGE_ASCII_ORGANISM_ENABLED=1。
# 连续状态与 repo/day 统计保存到 XDG state 目录;不保存命令或输出。
ascii_organism_enabled = false
# 身体动效等级:"full"(动画+游走+行走过渡)、"calm"(只在行为边界换姿,
# 无游走/摆动/帧交替)、"static"(只保留 prompt 上方的 inline 卡片)。
# 未设置时跟随桌面动画偏好(gtk-enable-animations 关闭时自动 calm)。
# ascii_organism_motion = "full"
# 可选持久化历史。路径必须为绝对路径或以 ~/ 开头;父目录会自动创建。
# ~/ 需要 HOME 存在且为绝对路径,否则会安全停用该历史路径。
# block_history_path = "~/.local/share/forge/block-history.bin"
block_history_compress = true
preserve_live_scrollback = false
# 轻量命令历史只保存命令、cwd、退出码和完成时间,不保存终端输出。
command_history_enabled = true
# 默认:$XDG_STATE_HOME/forge/history.jsonl。自定义值必须为绝对路径或以 ~/ 开头。
# command_history_path = "~/.local/state/forge/history.jsonl"
command_history_max_entries = 10000 # 100 .. 1000000
# 终端协议与安全 -------------------------------------------------------------
mouse_reporting_enabled = true
scroll_reporting_enabled = true
focus_reporting_enabled = true
# OSC 52 可让终端程序改写系统剪贴板;远程内容不可信时应保持 false。
allow_remote_clipboard_write = false
# 长命令通知与 Git 状态 ------------------------------------------------------
notify_long_blocks = true
notify_long_block_threshold_ms = 10000
# AI / Agent(密钥内容不会写入此文件) -------------------------------------
# provider: anthropic | openai-compatible | ollama
# Anthropic: export ANTHROPIC_API_KEY=...
# OpenAI-compatible: export OPENAI_API_KEY=...
# 明确无需鉴权的兼容服务可不设置 Key。
# 所有 provider 的 loopback endpoint 可使用明文 HTTP;远程 endpoint 必须使用 HTTPS。
# Settings 中输入的 Key 会写入独立私有文件,不会写入此 TOML。
# 也可手工配置密钥文件(必须为当前用户所有,权限不超过 0600):
# ai_api_key_file = "~/.config/forge/ai.key"
# 环境 Key 优先于文件。路径可由 FORGE_AI_API_KEY_FILE 覆盖。
# 通用覆盖:FORGE_AI_ENABLED、FORGE_AGENT_ENABLED、FORGE_AGENT_MAX_TURNS、
# FORGE_AGENT_AUTO_APPROVE_READONLY、
# FORGE_COMMAND_CORRECTION_ENABLED、FORGE_AI_API_KEY、
# FORGE_AI_API_KEY_FILE、FORGE_AI_PROVIDER、FORGE_AI_MODEL、
# FORGE_AI_BASE_URL、FORGE_AI_MAX_TOKENS、FORGE_AI_STREAM、
# FORGE_AI_REDACT_SECRETS
ai_enabled = true
agent_enabled = true # Ctrl+Alt+G;仅绑定当前 Block pane
agent_max_turns = 20 # 1 .. 100;每条命令可编辑且始终需要单独批准
agent_auto_approve_readonly = false # 已停用的兼容键;所有 proposal 现在都必须逐条批准
command_correction_enabled = true # typo-like Block 命令失败后提供可审阅的 AI/本地纠正
ai_provider = "anthropic"
ai_base_url = "https://api.anthropic.com"
ai_panel_visible = false
ai_panel_width = 360 # 240 .. 1200;拖动 AI 分隔条后自动更新
ai_model = "claude-sonnet-4-6"
ai_max_tokens = 1024 # 64 .. 32768
# 可选采样温度;0.0 .. 2.0。省略时使用 provider 默认值。
# ai_temperature = 0.7
ai_stream = true # 聊天回复边生成边显示;关闭则等完整回复后一次性显示
ai_redact_secrets = true
# 自定义颜色(可选;取消注释后覆盖主题对应颜色) ----------------------------
# [colors]
# foreground = "#f8f7e9"
# background = "#121616"
# cursor = "#7fb80e"
# cursor_foreground = "#1b315e"
# 快捷键 ---------------------------------------------------------------------
# 值可为快捷键字符串;false、"none"、"disabled" 或 "unbind" 可解除绑定。
# 完整 action 名称可在命令面板(Ctrl+Shift+P)中查看。
# [keybindings]
# new_tab = "Ctrl+Shift+T"
# close_pane_or_tab = "Ctrl+Shift+W"
# copy = "Ctrl+Shift+C"
# paste = "Ctrl+Shift+V"
# font_increase = "Ctrl+="
# font_decrease = "Ctrl+minus"
# font_reset = "Ctrl+0"
# opacity_increase = "Ctrl+Alt+="
# opacity_decrease = "Ctrl+Alt+minus"
# toggle_search = "Ctrl+Shift+F"
# toggle_command_palette = "Ctrl+Shift+P"
# reload_config = "Ctrl+Shift+R"
# show_remote_picker = "Ctrl+Shift+S"
# connect_remote_1 = "F4" # 直连第 1 个 [[remote_hosts]];同理支持 1..9
# select_all_blocks = "Ctrl+Shift+A"
# reinput_selected_commands = "Ctrl+Shift+I"
# clear_blocks = "Ctrl+Shift+K"
# undo_clear_blocks = "Ctrl+Shift+U"
# collapse_all_blocks = "Ctrl+Shift+Left"
# expand_all_blocks = "Ctrl+Shift+Right"
# toggle_block_collapsed = "Ctrl+Shift+Slash"
# jump_to_prev_failed = "Ctrl+Shift+Alt+Up"
# jump_to_next_failed = "Ctrl+Shift+Alt+Down"
# toggle_tab_placement = "Ctrl+Alt+B"
# Pane 焦点/尺寸默认同时绑定方向键和 vim 字母键两套 chord:
# Ctrl+Alt+方向键 / Ctrl+Alt+H/J/K/L(GNOME 等桌面会抢占 Ctrl+Alt+方向键
# 用于工作区切换,此时用字母键;在此覆写则只保留你指定的一个 chord)。
# focus_pane_left = "Ctrl+Alt+Left"
# focus_pane_right = "Ctrl+Alt+Right"
# focus_pane_up = "Ctrl+Alt+Up"
# focus_pane_down = "Ctrl+Alt+Down"
# resize_pane_left = "Ctrl+Shift+Alt+Left"
# resize_pane_right = "Ctrl+Shift+Alt+Right"
# resize_pane_up = "Ctrl+Shift+Alt+Up"
# resize_pane_down = "Ctrl+Shift+Alt+Down"
# toggle_ai_panel = "Ctrl+Shift+Alt+A"
# open_agent = "Ctrl+Alt+G"
# 会话导出默认不占用 chord(在命令面板中直接执行);如需快捷键,可用
# export_session_markdown / export_session_json 这两个 key 自行绑定。
# 远程主机(可重复;默认不会注入任何个人地址) ------------------------------
# 设置面板(Ctrl+Shift+O → Remote Hosts)可以添加、编辑和删除主机;
# ssh_args、session、deploy_artifact 等进阶字段仍只能在这里编辑。
# 例一:SSH 主机——用 ssh -t 连接 dev.example.com 并部署 jsh。
# [[remote_hosts]]
# name = "dev"
# host = "dev.example.com"
# user = "alice"
# ssh_args = ["-p", "22"]
# deploy = "persist"
# 例二:Docker 容器——host 是**正在运行的**容器名,走 docker exec 而不是 ssh。
# [[remote_hosts]]
# name = "build 容器"
# host = "my-service"
# docker = true
# deploy = "persist"
# 其余字段及默认值:remote_shell = "jsh"、session(重连恢复用的稳定 id)、
# login_shell = true、multiplex = true(ControlMaster 连接复用)。
#
# deploy —— 远端没有装 jsh 时怎么办。块、cwd 跟踪、退出码和命令时间线都来自
# jsh,所以远端只有 bash 的话,这些能力会静默消失。
# "off"(默认) 照旧:用 ssh 跑 remote_shell,远端有什么就用什么
# "persist" 会话期间把一份校验过的静态 jsh 放到远端并在结束后移除;
# jsh 自己的点文件和二进制缓存留在该账号的 $HOME 下,
# 历史得以保留,之后开 tab 不再重复传输
# "incognito" 同上,但 HOME 指向一个退出即删的沙箱;远端真实 $HOME
# 一个字节都不写——共享账号该用这个
# 两种模式都不修改远端的 .bashrc/.profile/登录 shell,也不需要 root。
# 开启 deploy 后 remote_shell 会被忽略:选哪个 shell 是启动器的事。