i18 cleanup
This commit is contained in:
@@ -109,10 +109,10 @@
|
||||
},
|
||||
};
|
||||
await requestApi('/settings/consolidated', 'PATCH', payload);
|
||||
addToast($t.settings?.save_success || 'Settings saved', 'success');
|
||||
addToast($t.settings?.save_success , 'success');
|
||||
} catch (err) {
|
||||
console.error('[LLMSettingsPage][Coherence:Failed] Failed to save llm settings', err);
|
||||
addToast($t.settings?.save_failed || 'Failed to save settings', 'error');
|
||||
addToast($t.settings?.save_failed , 'error');
|
||||
} finally {
|
||||
savingPrompts = false;
|
||||
}
|
||||
@@ -123,9 +123,10 @@
|
||||
|
||||
<div class="max-w-4xl mx-auto py-8 px-4">
|
||||
<div class="mb-8">
|
||||
<h1 class="text-3xl font-bold text-gray-900">LLM Settings</h1>
|
||||
<h1 class="text-3xl font-bold text-gray-900">{$t.settings?.llm }</h1>
|
||||
<p class="mt-2 text-gray-600">
|
||||
Configure LLM providers for dashboard validation, documentation generation, and git assistance.
|
||||
{$t.settings?.llm_description ||
|
||||
"Configure LLM providers for dashboard validation, documentation generation, and git assistance."}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -138,7 +139,7 @@
|
||||
|
||||
<div class="mt-6 rounded-lg border border-gray-200 bg-white p-4">
|
||||
<h2 class="text-lg font-semibold text-gray-900">
|
||||
{$t.settings?.llm_chatbot_settings_title || 'Chatbot Planner Settings'}
|
||||
{$t.settings?.llm_chatbot_settings_title }
|
||||
</h2>
|
||||
<p class="mt-1 text-sm text-gray-600">
|
||||
{$t.settings?.llm_chatbot_settings_description ||
|
||||
@@ -148,14 +149,14 @@
|
||||
<div class="mt-4 grid grid-cols-1 gap-4 md:grid-cols-2">
|
||||
<div>
|
||||
<label for="admin-planner-provider" class="block text-sm font-medium text-gray-700">
|
||||
{$t.settings?.llm_chatbot_provider || 'Chatbot Provider'}
|
||||
{$t.settings?.llm_chatbot_provider }
|
||||
</label>
|
||||
<select
|
||||
id="admin-planner-provider"
|
||||
bind:value={plannerProvider}
|
||||
class="mt-1 block w-full rounded-md border border-gray-300 p-2 text-sm"
|
||||
>
|
||||
<option value="">{$t.dashboard?.use_default || 'Use Default'}</option>
|
||||
<option value="">{$t.dashboard?.use_default }</option>
|
||||
{#each providers as provider}
|
||||
<option value={provider.id}>
|
||||
{provider.name} ({provider.default_model})
|
||||
@@ -166,13 +167,13 @@
|
||||
|
||||
<div>
|
||||
<label for="admin-planner-model" class="block text-sm font-medium text-gray-700">
|
||||
{$t.settings?.llm_chatbot_model || 'Chatbot Model Override'}
|
||||
{$t.settings?.llm_chatbot_model }
|
||||
</label>
|
||||
<input
|
||||
id="admin-planner-model"
|
||||
type="text"
|
||||
bind:value={plannerModel}
|
||||
placeholder={$t.settings?.llm_chatbot_model_placeholder || 'Optional, e.g. gpt-4.1-mini'}
|
||||
placeholder={$t.settings?.llm_chatbot_model_placeholder }
|
||||
class="mt-1 block w-full rounded-md border border-gray-300 p-2 text-sm"
|
||||
/>
|
||||
</div>
|
||||
@@ -181,7 +182,7 @@
|
||||
|
||||
<div class="mt-6 rounded-lg border border-gray-200 bg-white p-4">
|
||||
<h2 class="text-lg font-semibold text-gray-900">
|
||||
{$t.settings?.llm_provider_bindings_title || 'Provider Bindings by Task'}
|
||||
{$t.settings?.llm_provider_bindings_title }
|
||||
</h2>
|
||||
<p class="mt-1 text-sm text-gray-600">
|
||||
{$t.settings?.llm_provider_bindings_description ||
|
||||
@@ -191,14 +192,14 @@
|
||||
<div class="mt-4 grid grid-cols-1 gap-4 md:grid-cols-2">
|
||||
<div>
|
||||
<label for="admin-binding-dashboard-validation" class="block text-sm font-medium text-gray-700">
|
||||
{$t.settings?.llm_binding_dashboard_validation || 'Dashboard Validation Provider'}
|
||||
{$t.settings?.llm_binding_dashboard_validation }
|
||||
</label>
|
||||
<select
|
||||
id="admin-binding-dashboard-validation"
|
||||
bind:value={bindings.dashboard_validation}
|
||||
class="mt-1 block w-full rounded-md border border-gray-300 p-2 text-sm"
|
||||
>
|
||||
<option value="">{$t.dashboard?.use_default || 'Use Default'}</option>
|
||||
<option value="">{$t.dashboard?.use_default }</option>
|
||||
{#each providers as provider}
|
||||
<option value={provider.id}>
|
||||
{provider.name} ({provider.default_model})
|
||||
@@ -215,14 +216,14 @@
|
||||
|
||||
<div>
|
||||
<label for="admin-binding-documentation" class="block text-sm font-medium text-gray-700">
|
||||
{$t.settings?.llm_binding_documentation || 'Documentation Provider'}
|
||||
{$t.settings?.llm_binding_documentation }
|
||||
</label>
|
||||
<select
|
||||
id="admin-binding-documentation"
|
||||
bind:value={bindings.documentation}
|
||||
class="mt-1 block w-full rounded-md border border-gray-300 p-2 text-sm"
|
||||
>
|
||||
<option value="">{$t.dashboard?.use_default || 'Use Default'}</option>
|
||||
<option value="">{$t.dashboard?.use_default }</option>
|
||||
{#each providers as provider}
|
||||
<option value={provider.id}>
|
||||
{provider.name} ({provider.default_model})
|
||||
@@ -233,14 +234,14 @@
|
||||
|
||||
<div class="md:col-span-2">
|
||||
<label for="admin-binding-git-commit" class="block text-sm font-medium text-gray-700">
|
||||
{$t.settings?.llm_binding_git_commit || 'Git Commit Provider'}
|
||||
{$t.settings?.llm_binding_git_commit }
|
||||
</label>
|
||||
<select
|
||||
id="admin-binding-git-commit"
|
||||
bind:value={bindings.git_commit}
|
||||
class="mt-1 block w-full rounded-md border border-gray-300 p-2 text-sm"
|
||||
>
|
||||
<option value="">{$t.dashboard?.use_default || 'Use Default'}</option>
|
||||
<option value="">{$t.dashboard?.use_default }</option>
|
||||
{#each providers as provider}
|
||||
<option value={provider.id}>
|
||||
{provider.name} ({provider.default_model})
|
||||
@@ -253,7 +254,7 @@
|
||||
|
||||
<div class="mt-6 rounded-lg border border-gray-200 bg-gray-50 p-4">
|
||||
<h2 class="text-lg font-semibold text-gray-900">
|
||||
{$t.settings?.llm_prompts_title || 'LLM Prompt Templates'}
|
||||
{$t.settings?.llm_prompts_title }
|
||||
</h2>
|
||||
<p class="mt-1 text-sm text-gray-600">
|
||||
{$t.settings?.llm_prompts_description ||
|
||||
@@ -263,7 +264,7 @@
|
||||
<div class="mt-4 space-y-4">
|
||||
<div>
|
||||
<label for="admin-documentation-prompt" class="block text-sm font-medium text-gray-700">
|
||||
{$t.settings?.llm_prompt_documentation || 'Documentation Prompt'}
|
||||
{$t.settings?.llm_prompt_documentation }
|
||||
</label>
|
||||
<textarea
|
||||
id="admin-documentation-prompt"
|
||||
@@ -275,7 +276,7 @@
|
||||
|
||||
<div>
|
||||
<label for="admin-dashboard-validation-prompt" class="block text-sm font-medium text-gray-700">
|
||||
{$t.settings?.llm_prompt_dashboard_validation || 'Dashboard Validation Prompt'}
|
||||
{$t.settings?.llm_prompt_dashboard_validation }
|
||||
</label>
|
||||
<textarea
|
||||
id="admin-dashboard-validation-prompt"
|
||||
@@ -287,7 +288,7 @@
|
||||
|
||||
<div>
|
||||
<label for="admin-git-commit-prompt" class="block text-sm font-medium text-gray-700">
|
||||
{$t.settings?.llm_prompt_git_commit || 'Git Commit Prompt'}
|
||||
{$t.settings?.llm_prompt_git_commit }
|
||||
</label>
|
||||
<textarea
|
||||
id="admin-git-commit-prompt"
|
||||
@@ -304,7 +305,7 @@
|
||||
disabled={savingPrompts}
|
||||
on:click={saveSettings}
|
||||
>
|
||||
{savingPrompts ? '...' : ($t.settings?.save_llm_prompts || 'Save LLM Prompts')}
|
||||
{savingPrompts ? '...' : ($t.settings?.save_llm_prompts )}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user