Skip to content

Build your personal knowledge base with Trilium Notes

Merge branch 'develop' into ai-llm-integration

perf3ct9f84a84f966a
diff --cc src/public/app/widgets/type_widgets/content_widget.ts
index 35c616cd53,b3408d1291..7cf7fb1237
--- a/src/public/app/widgets/type_widgets/content_widget.ts
+++ b/src/public/app/widgets/type_widgets/content_widget.ts
@@@ -37,9 -37,10 +37,11 @@@ import LocalizationOptions from "./opti
import CodeBlockOptions from "./options/appearance/code_block.js";
import EditorOptions from "./options/text_notes/editor.js";
import ShareSettingsOptions from "./options/other/share_settings.js";
+import AiSettingsOptions from "./options/ai_settings.js";
import type FNote from "../../entities/fnote.js";
import type NoteContextAwareWidget from "../note_context_aware_widget.js";
+ import { t } from "i18next";
+ import LanguageOptions from "./options/i18n/language.js";
const TPL = `<div class="note-detail-content-widget note-detail-printable">
<style>
diff --cc src/public/stylesheets/style.css
index b68239fa61,6e6a70a3cc..a585134f6c
--- a/src/public/stylesheets/style.css
+++ b/src/public/stylesheets/style.css
@@@ -1696,184 -1706,3 +1706,184 @@@ footer.file-footer
footer.file-footer button {
margin: 5px;
}
+
+/* AI Chat Widget Styles */
+.chat-widget {
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ overflow: hidden;
+}
+
+.chat-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 10px 15px;
+ border-bottom: 1px solid var(--main-border-color);
+ background-color: var(--accented-background-color);
+}
+
+.chat-title {
+ font-weight: bold;
+ flex-grow: 1;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.chat-actions {
+ display: flex;
+ gap: 5px;
+}
+
+.chat-messages {
+ flex-grow: 1;
+ overflow-y: auto;
+ padding: 15px;
+ display: flex;
+ flex-direction: column;
+ gap: 15px;
+}
+
+.chat-message {
+ display: flex;
+ gap: 10px;
+ max-width: 85%;
+}
+
+.chat-message-user {
+ align-self: flex-end;
+ flex-direction: row-reverse;
+}
+
+.chat-message-assistant {
+ align-self: flex-start;
+}
+
+.chat-message-avatar {
+ flex-shrink: 0;
+ width: 30px;
+ height: 30px;
+ border-radius: 50%;
+ background-color: var(--accented-background-color);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.chat-message-user .chat-message-avatar {
+ background-color: var(--primary-color);
+ color: white;
+}
+
+.chat-message-assistant .chat-message-avatar {
+ background-color: var(--muted-text-color);
+ color: white;
+}
+
+.chat-message-content {
+ flex-grow: 1;
+ padding: 10px 15px;
+ border-radius: 12px;
+ background-color: var(--accented-background-color);
+ overflow-wrap: break-word;
+ word-break: break-word;
+}
+
+.chat-message-user .chat-message-content {
+ background-color: var(--primary-color);
+ color: white;
+}
+
+.chat-message-content pre {
+ background-color: var(--main-background-color);
+ border-radius: 5px;
+ padding: 10px;
+ overflow-x: auto;
+ margin: 10px 0;
+}
+
+.chat-message-user .chat-message-content pre {
+ background-color: rgba(255, 255, 255, 0.2);
+}
+
+.chat-message-content code {
+ font-family: monospace;
+ background-color: var(--main-background-color);
+ padding: 2px 4px;
+ border-radius: 3px;
+}
+
+.chat-message-user .chat-message-content code {
+ background-color: rgba(255, 255, 255, 0.2);
+}
+
+.chat-controls {
+ display: flex;
+ flex-direction: column;
+ padding: 15px;
+ gap: 10px;
+ border-top: 1px solid var(--main-border-color);
+}
+
+.chat-input-container {
+ position: relative;
+}
+
+.chat-input {
+ width: 100%;
+ resize: none;
+ padding-right: 40px;
+}
+
+.chat-buttons {
+ display: flex;
+ justify-content: space-between;
+}
+
+.chat-loading {
+ animation: chat-loading 1s infinite;
+ letter-spacing: 3px;
+}
+
+@keyframes chat-loading {
+ 0% { opacity: 0.3; }
+ 50% { opacity: 1; }
+ 100% { opacity: 0.3; }
+}
+
+/* Right Pane Tab Styles */
+#right-pane-tab-container {
+ display: flex;
+ gap: 10px;
+}
+
+.right-pane-tab {
+ padding: 5px 10px;
+ cursor: pointer;
+ border-radius: 5px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ transition: background-color 0.2s ease;
+}
+
+.right-pane-tab:hover {
+ background-color: var(--hover-item-background-color);
+}
+
+.right-pane-tab.active {
+ background-color: var(--primary-color);
+ color: white;
+}
+
+.right-pane-tab .tab-title {
+ display: flex;
+ align-items: center;
+ gap: 5px;
+}
+
+.right-pane-tab .tab-title .bx {
+ font-size: 1.1em;
- }
++}
diff --cc src/services/hidden_subtree.ts
index 050ac88da6,79c80f29e0..d936d36a95
--- a/src/services/hidden_subtree.ts
+++ b/src/services/hidden_subtree.ts
@@@ -274,8 -274,8 +274,9 @@@ function buildHiddenSubtreeDefinition(h
{ id: "_optionsEtapi", title: t("hidden-subtree.etapi-title"), type: "contentWidget", icon: "bx-extension" },
{ id: "_optionsBackup", title: t("hidden-subtree.backup-title"), type: "contentWidget", icon: "bx-data" },
{ id: "_optionsSync", title: t("hidden-subtree.sync-title"), type: "contentWidget", icon: "bx-wifi" },
+ { id: "_optionsAi", title: t("hidden-subtree.ai-llm-title"), type: "contentWidget", icon: "bx-bot" },
{ id: "_optionsOther", title: t("hidden-subtree.other"), type: "contentWidget", icon: "bx-dots-horizontal" },
+ { id: "_optionsLocalization", title: t("hidden-subtree.localization"), type: "contentWidget", icon: "bx-world" },
{ id: "_optionsAdvanced", title: t("hidden-subtree.advanced-title"), type: "contentWidget" }
]
},