feat(assistant): add multi-dialog UX, task-aware llm settings, and i18n cleanup

This commit is contained in:
2026-02-23 23:45:01 +03:00
parent ab1c87ffba
commit 7df7b4f98c
30 changed files with 1145 additions and 221 deletions

View File

@@ -14,6 +14,7 @@
import { onMount, createEventDispatcher } from "svelte";
import { gitService } from "../../services/gitService";
import { addToast as toast } from "../../lib/toasts.js";
import { t } from "../../lib/i18n";
// [/SECTION]
// [SECTION: PROPS]
@@ -55,7 +56,7 @@
);
} catch (e) {
console.error(`[DeploymentModal][Coherence:Failed] ${e.message}`);
toast("Failed to load environments", "error");
toast($t.migration?.loading_envs_failed || "Failed to load environments", "error");
} finally {
loading = false;
}
@@ -76,7 +77,7 @@
try {
const result = await gitService.deploy(dashboardId, selectedEnv);
toast(
result.message || "Deployment triggered successfully",
result.message || ($t.git?.deploy_success || "Deployment triggered successfully"),
"success",
);
dispatch("deploy");
@@ -98,26 +99,26 @@
class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"
>
<div class="bg-white p-6 rounded-lg shadow-xl w-96">
<h2 class="text-xl font-bold mb-4">Deploy Dashboard</h2>
<h2 class="text-xl font-bold mb-4">{$t.git?.deploy || "Deploy Dashboard"}</h2>
{#if loading}
<p class="text-gray-500">Loading environments...</p>
<p class="text-gray-500">{$t.migration?.loading_envs || "Loading environments..."}</p>
{:else if environments.length === 0}
<p class="text-red-500 mb-4">
No deployment environments configured.
{$t.git?.no_deploy_envs || "No deployment environments configured."}
</p>
<div class="flex justify-end">
<button
onclick={() => (show = false)}
class="px-4 py-2 bg-gray-200 text-gray-800 rounded hover:bg-gray-300"
>
Close
{$t.common?.close || "Close"}
</button>
</div>
{:else}
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-2"
>Select Target Environment</label
>{$t.migration?.target_env || "Select Target Environment"}</label
>
<select
bind:value={selectedEnv}
@@ -136,7 +137,7 @@
onclick={() => (show = false)}
class="px-4 py-2 text-gray-600 hover:bg-gray-100 rounded"
>
Cancel
{$t.common?.cancel || "Cancel"}
</button>
<button
onclick={handleDeploy}
@@ -164,9 +165,9 @@
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
></path>
</svg>
Deploying...
{$t.git?.deploying || "Deploying..."}
{:else}
Deploy
{$t.git?.deploy || "Deploy"}
{/if}
</button>
</div>