project-knowledge 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_site/index.html +14 -4
- package/package.json +1 -1
package/_site/index.html
CHANGED
|
@@ -504,12 +504,12 @@
|
|
|
504
504
|
<div class="mt-5 grid gap-4">
|
|
505
505
|
<label class="grid gap-1 text-sm">
|
|
506
506
|
<span class="field-label">{{ t("defaultProfile") }} <span class="help-dot" :title="t('defaultProfileHelp')" tabindex="0">?</span></span>
|
|
507
|
-
<select v-model="aiConfig.defaultProfileId" class="input">
|
|
507
|
+
<select v-model="aiConfig.defaultProfileId" @change="markAiProfileDirty" class="input">
|
|
508
508
|
<option v-for="p in aiConfig.profiles" :key="p.id" :value="p.id" :disabled="p.enabled === false">{{ profileOptionLabel(p) }}</option>
|
|
509
509
|
</select>
|
|
510
510
|
</label>
|
|
511
511
|
|
|
512
|
-
<div class="panel2 rounded-xl border p-4">
|
|
512
|
+
<div class="panel2 rounded-xl border p-4" @input.capture="markAiProfileDirty" @change.capture="markAiProfileDirty">
|
|
513
513
|
<div class="mb-4 flex items-center justify-between gap-3">
|
|
514
514
|
<h3 class="font-medium">{{ t("profileEditor") }}</h3>
|
|
515
515
|
<div class="flex flex-wrap gap-2">
|
|
@@ -1534,6 +1534,7 @@ createApp({
|
|
|
1534
1534
|
const testPrompt = ref("what model are you?");
|
|
1535
1535
|
const testResult = ref("");
|
|
1536
1536
|
const testingProfile = ref(false);
|
|
1537
|
+
const aiProfileFormDirty = ref(false);
|
|
1537
1538
|
const selectedAiProfileId = ref("mock-agent");
|
|
1538
1539
|
const selectedKnowledgeLanguage = ref("zh-CN");
|
|
1539
1540
|
|
|
@@ -1783,7 +1784,10 @@ createApp({
|
|
|
1783
1784
|
if (state.logging) Object.assign(loggingConfig, state.logging);
|
|
1784
1785
|
lastRun.value = state.lastRun || lastRun.value;
|
|
1785
1786
|
if (!selectedSlug.value && projectList.value.length) selectProject(projectList.value[0].slug);
|
|
1786
|
-
|
|
1787
|
+
const aiProfileTask = activeView.value === "settings" && aiProfileFormDirty.value
|
|
1788
|
+
? Promise.resolve()
|
|
1789
|
+
: loadAiProfiles(false);
|
|
1790
|
+
await Promise.all([loadJobs(), aiProfileTask, loadIssues()]);
|
|
1787
1791
|
} catch (e) {
|
|
1788
1792
|
pollError.value = e.message;
|
|
1789
1793
|
} finally {
|
|
@@ -2300,6 +2304,11 @@ createApp({
|
|
|
2300
2304
|
timeoutMs: profile.timeoutMs != null ? Number(profile.timeoutMs) : 300000,
|
|
2301
2305
|
});
|
|
2302
2306
|
testResult.value = "";
|
|
2307
|
+
aiProfileFormDirty.value = false;
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
function markAiProfileDirty() {
|
|
2311
|
+
aiProfileFormDirty.value = true;
|
|
2303
2312
|
}
|
|
2304
2313
|
|
|
2305
2314
|
function normalizeProfileId(value) {
|
|
@@ -2402,6 +2411,7 @@ createApp({
|
|
|
2402
2411
|
const parsed = JSON.parse(aiProfilesText.value);
|
|
2403
2412
|
await api("PUT", "/api/ai-profiles", parsed);
|
|
2404
2413
|
aiMessage.value = "AI profiles saved.";
|
|
2414
|
+
aiProfileFormDirty.value = false;
|
|
2405
2415
|
await loadAiProfiles();
|
|
2406
2416
|
} catch (e) {
|
|
2407
2417
|
aiMessage.value = `Save failed: ${e.message}`;
|
|
@@ -2738,7 +2748,7 @@ createApp({
|
|
|
2738
2748
|
selectProject, isKbInit, isProjectRunning, repoStatusLevel, projectStatusClass, projectIssues,
|
|
2739
2749
|
kbUrl, goalUrl, displayProjectKbPath, formatTime, formatBytes,
|
|
2740
2750
|
profileOptionLabel,
|
|
2741
|
-
refreshAll, loadJobs, loadJobDetail, loadAiProfiles, loadProfileForm, addProfile, deleteCurrentProfile, saveAiProfiles, saveCurrentProfile, testCurrentProfile, setProjectAiProfile, saveProjectSettings,
|
|
2751
|
+
refreshAll, loadJobs, loadJobDetail, loadAiProfiles, loadProfileForm, markAiProfileDirty, addProfile, deleteCurrentProfile, saveAiProfiles, saveCurrentProfile, testCurrentProfile, setProjectAiProfile, saveProjectSettings,
|
|
2742
2752
|
openSummaryPanel, loadPendingCommits, loadIssues, loadStructuredLogs,
|
|
2743
2753
|
loadKnowledgeStoreConfig, saveKnowledgeStoreConfig, previewKnowledgeMigration, executeKnowledgeMigration, loadLoggingConfig, saveLoggingConfig,
|
|
2744
2754
|
validateGit, scanProject, validateKb, migrateV2, migrateV3, runKnowledgeUpdate, runImportPreflight, runJob, loadHookStatus, installHook, uninstallHook,
|
package/package.json
CHANGED