feat(settings): add includeGitInstructions toggle

Adds an 'Include git instructions' toggle to the Agent Settings panel.
When disabled, sets CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS=1 on the Claude
process to remove built-in commit and PR workflow guidance from its
system prompt. Resolves #209.
This commit is contained in:
2026-03-11 18:09:24 -07:00
committed by Naomi Carrigan
parent 665f74e3bf
commit 1e9f641db0
12 changed files with 56 additions and 0 deletions
+1
View File
@@ -65,6 +65,7 @@ vi.mock("$lib/stores/config", () => ({
use_worktree: false,
disable_1m_context: false,
max_output_tokens: null,
include_git_instructions: true,
}),
},
}));
+2
View File
@@ -66,6 +66,7 @@ async function changeDirectory(path: string): Promise<void> {
use_worktree: config.use_worktree ?? false,
disable_1m_context: config.disable_1m_context ?? false,
max_output_tokens: config.max_output_tokens ?? null,
include_git_instructions: config.include_git_instructions ?? true,
},
});
@@ -143,6 +144,7 @@ async function startNewConversation(): Promise<void> {
use_worktree: config.use_worktree ?? false,
disable_1m_context: config.disable_1m_context ?? false,
max_output_tokens: config.max_output_tokens ?? null,
include_git_instructions: config.include_git_instructions ?? true,
},
});
+17
View File
@@ -59,6 +59,7 @@
use_worktree: false,
disable_1m_context: false,
disable_cron: false,
include_git_instructions: true,
max_output_tokens: null,
trusted_workspaces: [],
background_image_path: null,
@@ -566,6 +567,22 @@
</p>
</div>
<!-- Include Git Instructions -->
<div class="mb-4">
<label class="flex items-center gap-3 cursor-pointer">
<input
type="checkbox"
bind:checked={config.include_git_instructions}
class="w-4 h-4 rounded border-[var(--border-color)] bg-[var(--bg-primary)] text-[var(--accent-primary)] focus:ring-[var(--accent-primary)]"
/>
<span class="text-sm text-[var(--text-primary)]">Include git instructions</span>
</label>
<p class="text-xs text-[var(--text-tertiary)] mt-1 ml-7">
When disabled, sets <code class="font-mono">CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS=1</code> to
remove Claude's built-in commit and PR workflow guidance from its system prompt
</p>
</div>
<!-- Max Output Tokens -->
<div class="mb-4">
<label class="block text-sm text-[var(--text-primary)] mb-1" for="max-output-tokens">
+1
View File
@@ -402,6 +402,7 @@ User: ${formattedMessage}`;
allowed_tools: allAllowedTools,
use_worktree: config.use_worktree ?? false,
disable_1m_context: config.disable_1m_context ?? false,
include_git_instructions: config.include_git_instructions ?? true,
},
});
@@ -89,6 +89,7 @@
allowed_tools: [...new Set([...newGrantedTools, ...config.auto_granted_tools])],
use_worktree: config.use_worktree ?? false,
disable_1m_context: config.disable_1m_context ?? false,
include_git_instructions: config.include_git_instructions ?? true,
},
});
+2
View File
@@ -168,6 +168,7 @@
use_worktree: currentConfig.use_worktree ?? false,
disable_1m_context: currentConfig.disable_1m_context ?? false,
max_output_tokens: currentConfig.max_output_tokens ?? null,
include_git_instructions: currentConfig.include_git_instructions ?? true,
},
});
@@ -325,6 +326,7 @@
use_worktree: currentConfig.use_worktree ?? false,
disable_1m_context: currentConfig.disable_1m_context ?? false,
max_output_tokens: currentConfig.max_output_tokens ?? null,
include_git_instructions: currentConfig.include_git_instructions ?? true,
},
});
+1
View File
@@ -218,6 +218,7 @@
use_worktree: cfg.use_worktree ?? false,
disable_1m_context: cfg.disable_1m_context ?? false,
max_output_tokens: cfg.max_output_tokens ?? null,
include_git_instructions: cfg.include_git_instructions ?? true,
},
});
} catch (error) {
@@ -108,6 +108,7 @@
allowed_tools: grantedToolsList,
use_worktree: config.use_worktree ?? false,
disable_1m_context: config.disable_1m_context ?? false,
include_git_instructions: config.include_git_instructions ?? true,
},
});
+3
View File
@@ -220,6 +220,7 @@ describe("config store", () => {
task_loop_auto_commit: false,
task_loop_commit_prefix: "feat",
task_loop_include_summary: false,
include_git_instructions: true,
};
expect(config.model).toBe("claude-sonnet-4");
@@ -279,6 +280,7 @@ describe("config store", () => {
task_loop_auto_commit: false,
task_loop_commit_prefix: "feat",
task_loop_include_summary: false,
include_git_instructions: true,
};
expect(config.model).toBeNull();
@@ -893,6 +895,7 @@ describe("config store", () => {
task_loop_auto_commit: false,
task_loop_commit_prefix: "feat",
task_loop_include_summary: false,
include_git_instructions: true,
};
const mockInvokeImpl = vi.mocked(invoke);
+3
View File
@@ -81,6 +81,8 @@ export interface HikariConfig {
task_loop_auto_commit: boolean;
task_loop_commit_prefix: string;
task_loop_include_summary: boolean;
// Git instructions setting
include_git_instructions: boolean;
}
const defaultConfig: HikariConfig = {
@@ -134,6 +136,7 @@ const defaultConfig: HikariConfig = {
task_loop_auto_commit: false,
task_loop_commit_prefix: "feat",
task_loop_include_summary: false,
include_git_instructions: true,
};
function createConfigStore() {