generated from nhcarrigan/template
feat: expose prompt caching TTL setting in UI (#273)
Adds a dropdown to select ENABLE_PROMPT_CACHING_1H or FORCE_PROMPT_CACHING_5M env vars when starting Claude Code sessions. Requires Claude Code v2.1.108+.
This commit is contained in:
@@ -79,6 +79,7 @@
|
||||
task_loop_commit_prefix: "feat",
|
||||
task_loop_include_summary: false,
|
||||
effort_level: null,
|
||||
prompt_caching_ttl: null,
|
||||
});
|
||||
|
||||
let showCustomThemeEditor = $state(false);
|
||||
@@ -740,6 +741,26 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Prompt Caching TTL -->
|
||||
<div class="mb-4">
|
||||
<label class="block text-sm text-[var(--text-primary)] mb-1" for="prompt-caching-ttl"
|
||||
>Prompt caching TTL</label
|
||||
>
|
||||
<select
|
||||
id="prompt-caching-ttl"
|
||||
bind:value={config.prompt_caching_ttl}
|
||||
class="w-full px-3 py-2 rounded border border-[var(--border-color)] bg-[var(--bg-primary)] text-[var(--text-primary)] text-sm focus:outline-none focus:ring-1 focus:ring-[var(--accent-primary)]"
|
||||
>
|
||||
<option value={null}>Default (CLI decides)</option>
|
||||
<option value="1h">1-hour TTL (reduces cost for long sessions)</option>
|
||||
<option value="5m">Force 5-minute TTL</option>
|
||||
</select>
|
||||
<p class="text-xs text-[var(--text-tertiary)] mt-1">
|
||||
Sets <code class="font-mono">ENABLE_PROMPT_CACHING_1H</code> or
|
||||
<code class="font-mono">FORCE_PROMPT_CACHING_5M</code>. Requires Claude Code v2.1.108+.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Bare Mode -->
|
||||
<div class="mb-4">
|
||||
<label class="flex items-center gap-3 cursor-pointer">
|
||||
|
||||
Reference in New Issue
Block a user