Vectrum
Sign In

Settings for worktree branch naming, worktree location and composer context

Fields the composer and worktree work read: how new worktree branches are
named (static prefix, semantic prefix or custom instructions), where new
worktrees go, whether the branch strip stays under the composer after a
thread starts, plan mode as a Build/Plan toggle, and the context meter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JjohannSocommitted 1 parent 6e630d5commit77537cc

Showing 1 changed file with 36 additions and 0 deletions.

+36−0src/settings.rsView File
@@ -28,6 +28,19 @@ pub enum Submodules {
2828 Recursive,
2929 }
3030
31+ /// How a new worktree's branch is named from the thread's first message.
32+ #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
33+ #[serde(rename_all = "snake_case")]
34+ pub enum BranchNaming {
35+ /// `branch_prefix` plus a few words the text model picks: `vectrum/add-search`.
36+ #[default]
37+ Static,
38+ /// The model picks a prefix that describes the work: `feat/add-search`.
39+ Semantic,
40+ /// `branch_instructions` tell the model the whole name.
41+ Custom,
42+ }
43+
3144 /// What Ctrl+Q takes.
3245 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
3346 #[serde(rename_all = "snake_case")]
@@ -213,6 +226,22 @@ pub struct Settings {
213226 pub submodules: Submodules,
214227 /// Base new worktrees on the branch as origin has it.
215228 pub start_from_origin: bool,
229+ /// How new worktree branches are named.
230+ pub branch_naming: BranchNaming,
231+ /// The prefix static branch names start with; empty for none.
232+ pub branch_prefix: String,
233+ /// What custom branch naming tells the model.
234+ pub branch_instructions: String,
235+ /// Where new worktrees go; empty is the app's data folder.
236+ pub worktrees_dir: String,
237+ /// Keep the branch and worktree strip under the composer once a thread
238+ /// has started, not only on new threads.
239+ pub composer_context: bool,
240+ /// Claude's plan mode as a Build/Plan toggle in the composer, with
241+ /// Shift+Tab to switch.
242+ pub plan_mode: bool,
243+ /// The ring showing how full the context window is.
244+ pub context_meter: bool,
216245 /// Where the Add project browser opens; empty is the home folder.
217246 pub add_project_dir: String,
218247
@@ -326,6 +355,13 @@ impl Default for Settings {
326355 workspace: WorkspaceMode::Local,
327356 submodules: Submodules::Recursive,
328357 start_from_origin: false,
358+ branch_naming: BranchNaming::Static,
359+ branch_prefix: "vectrum".into(),
360+ branch_instructions: String::new(),
361+ worktrees_dir: String::new(),
362+ composer_context: false,
363+ plan_mode: false,
364+ context_meter: false,
329365 add_project_dir: String::new(),
330366 text_model: "claude:haiku".into(),
331367 text_reasoning: Some("low".into()),