mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-25 22:41:36 +08:00
fix ai_settings TPL location
This commit is contained in:
parent
2f573d4464
commit
d1cd0a8817
@ -1,3 +0,0 @@
|
|||||||
import AiSettingsWidget from "./ai_settings.ts";
|
|
||||||
|
|
||||||
export default AiSettingsWidget;
|
|
@ -60,6 +60,7 @@ interface OpenAIModelResponse {
|
|||||||
}>;
|
}>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// After all interfaces, before class definition, add the TPL constant
|
||||||
interface AnthropicModelResponse {
|
interface AnthropicModelResponse {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
chatModels: Array<{
|
chatModels: Array<{
|
||||||
@ -74,13 +75,7 @@ interface AnthropicModelResponse {
|
|||||||
}>;
|
}>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class AiSettingsWidget extends OptionsWidget {
|
const TPL = `
|
||||||
private statsRefreshInterval: NodeJS.Timeout | null = null;
|
|
||||||
private indexRebuildRefreshInterval: NodeJS.Timeout | null = null;
|
|
||||||
private readonly STATS_REFRESH_INTERVAL = 5000; // 5 seconds
|
|
||||||
|
|
||||||
doRender() {
|
|
||||||
this.$widget = $(`
|
|
||||||
<div class="options-section">
|
<div class="options-section">
|
||||||
<h4>${t("ai_llm.title")}</h4>
|
<h4>${t("ai_llm.title")}</h4>
|
||||||
|
|
||||||
@ -434,7 +429,15 @@ export default class AiSettingsWidget extends OptionsWidget {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>`);
|
</div>`;
|
||||||
|
|
||||||
|
export default class AiSettingsWidget extends OptionsWidget {
|
||||||
|
private statsRefreshInterval: NodeJS.Timeout | null = null;
|
||||||
|
private indexRebuildRefreshInterval: NodeJS.Timeout | null = null;
|
||||||
|
private readonly STATS_REFRESH_INTERVAL = 5000; // 5 seconds
|
||||||
|
|
||||||
|
doRender() {
|
||||||
|
this.$widget = $(TPL);
|
||||||
|
|
||||||
const $aiEnabled = this.$widget.find('.ai-enabled');
|
const $aiEnabled = this.$widget.find('.ai-enabled');
|
||||||
$aiEnabled.on('change', async () => {
|
$aiEnabled.on('change', async () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user