From 774e4d3a97cf8d144f8e1bf73f4aa4cb31d964b2 Mon Sep 17 00:00:00 2001 From: WFH Brian Date: Mon, 6 May 2024 15:57:43 -0400 Subject: [PATCH] making moves monday --- build/compile.js | 2 +- build/views.json | 18 ++-- src/default_settings.js | 2 + src/index.js | 54 +++++++--- src/sc_chats_ui.js | 46 +++++++++ src/sc_settings.js | 21 +--- src/sc_settings_tab.js | 14 +++ src/smart_chat_settings.js | 8 +- src/styles.css | 26 +++++ src/views/smart_chat_settings.ejs | 2 +- src/views/smart_settings.ejs | 160 ++++++++++++++++++++---------- 11 files changed, 254 insertions(+), 99 deletions(-) create mode 100644 src/sc_settings_tab.js diff --git a/build/compile.js b/build/compile.js index cee4ba22..961027fa 100644 --- a/build/compile.js +++ b/build/compile.js @@ -11,7 +11,7 @@ const swagger_jsdoc = require('swagger-jsdoc'); return; } files.forEach(file => { - if(path.extname(file) !== '.ejs') return; + if(!['.ejs', '.md'].includes(path.extname(file))) return; const file_path = path.join(templates_dir, file); const content = fs.readFileSync(file_path, 'utf8'); views[path.basename(file, path.extname(file))] = content; diff --git a/build/views.json b/build/views.json index 659a5c44..80a58b36 100644 --- a/build/views.json +++ b/build/views.json @@ -1,11 +1,11 @@ { - "attribution": "
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n

Smart Connections

\r\n
", - "sc_change": "
\r\n
\r\n \r\n \r\n \r\n \r\n
Time saved: <%= time_saved %>
\r\n <%- this.attribution %>\r\n
\r\n
\r\n
\r\n
\r\n\r\n", - "smart_chat": "
\r\n
\r\n
\r\n \" placeholder=\"Chat Name\">\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n Hi there, welcome to the Smart Chat. Ask me a question about your notes and I'll try to answer it.\r\n \r\n
\r\n
\r\n <%- messages %>\r\n
\r\n
\r\n
\r\n
\r\n <%- this.get_icon('square') %>\r\n \r\n
\r\n
\r\n
\r\n
\r\n <%- this.attribution %>\r\n
", - "smart_chat_msg": "
\">\r\n
\">\r\n <%= content %>\r\n <%- this.get_icon('copy') %>\r\n \r\n \r\n
\r\n
", - "smart_chat_settings": "
`data-option-${i + 1}=\"${platform.key}|${platform.description}\"`).join('\\n') %>\r\n data-callback=\"changed_smart_chat_model\"\r\n>
\r\n<% if(chat_platform.fetch_models) { %>\r\n <% if(settings[settings.chat_model_platform_key]?.api_key) { %>\r\n
.model_name\"\r\n data-callback=\"changed_smart_chat_model\"\r\n <%- platform_chat_models.map((model, i) => `data-option-${i}=\"${model.key}|${model.model_name} (${model.description})\"`).join('\\n') %>\r\n >
\r\n <% } %>\r\n <% if(!platform_chat_models.length) { %>\r\n
\r\n <% } %>\r\n
API Key\"\r\n data-type=\"text\"\r\n data-setting=\"<%= settings.chat_model_platform_key %>.api_key\"\r\n <% if(chat_platform.signup_url) { %>\r\n data-description=\"Get API Key for <%= chat_platform.description %>.\"\r\n <% } else { %>\r\n data-description=\"API Key for <%= chat_platform.description %>.\"\r\n <% } %>\r\n data-placeholder=\"Enter an API Key\"\r\n data-button=\"Save\"\r\n data-callback=\"test_chat_api_key\"\r\n >
\r\n<% } %>\r\n<% if (settings.chat_model_platform_key.startsWith('custom_local')) { %>\r\n

Custom Local Model

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n<% } else if(settings.chat_model_platform_key.startsWith('custom_api')) { %>\r\n

Custom Server

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n<% } %>", - "smart_chat_system_msg": "
\">\r\n
\">\r\n <%= content %>\r\n
\r\n
", - "smart_connections": "
\r\n

\r\n <%- current_path %>\r\n <%- this.notes %> (<%- this.blocks %>)\r\n

\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n <% for (let result of results) { %>\r\n
\" data-path=\"<%- result.path %>\">\r\n \r\n <%- this.get_icon('right-triangle') %>\r\n \" draggable=\"true\">\r\n <%- [result.score?.toFixed(2), result.name].join(' | ') %>\r\n \r\n \r\n
    \r\n
  • \" data-collection=\"<%= result.collection_name %>\">
  • \r\n
\r\n
\r\n <% } %>\r\n
\r\n
\r\n<%- this.attribution %>", - "smart_embed_settings": "
`data-option-${i + 1}=\"${model.key}|${model.name} (${model.description})\"`).join('\\n') %>\r\n data-callback=\"restart_plugin\"\r\n>
\r\n
`data-option-${i + 1}=\"${model.key}|${model.name} (${model.description})\"`).join('\\n') %>\r\n data-callback=\"restart_plugin\"\r\n>
\r\n
\r\n<% if(!settings.smart_notes_embed_model.includes('/') || !settings.smart_blocks_embed_model.includes('/')) { %>\r\n
\r\n<% } %>\r\n<% if(settings.smart_notes_embed_model.includes('/') || settings.smart_blocks_embed_model.includes('/')) { %>\r\n
\r\n\r\n
Smart Connect is free to use for faster local embeddings.\"\r\n data-type=\"button\"\r\n data-callback=\"connect_to_smart_connect\"\r\n>
\r\n<% } %>\r\n
", - "smart_settings": "

Smart Connections

\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n

User Agreement: By using Smart Connections you agree to share how it helps you with at least one other person\r\n 😊🌴

\r\n
\r\n
\r\n
\r\n
\r\n

Supporter Features

\r\n

As a Smart Connections \"Supporter\", fast-track your PKM journey with priority perks and pioneering innovations.

\r\n\r\n
\r\n
\r\n
\r\n

Smart View & Embeddings

\r\n

Notes about embedding models:

\r\n\r\n<%- smart_embed_settings %>\r\n

Smart Chat

\r\n<%- smart_chat_settings %>\r\n

System Prompts

\r\n
\r\n
\r\nCurrent: my, I, me, mine, our, ours, us, we\r\n

Exclusions

\r\n

Included files: <%= included_files %> / Total files: <%= total_files %>

\r\n
\r\n
\r\n
\r\n
\r\n

Data Management

\r\n
\r\n
\r\n
\r\n
\r\n

Force Refresh

\r\n
\r\n\r\n\r\n

Muted Notices

\r\n<% if(muted_notices && Object.keys(muted_notices).length) { %>\r\n <% for(const notice in muted_notices) { %>\r\n
\"\r\n data-setting=\"muted_notices.<%= notice %>\"\r\n data-type=\"button\"\r\n data-btn-text=\"Unmute\"\r\n data-callback=\"unmute_notice\"\r\n >
\r\n <% } %>\r\n<% } else { %>\r\n

No muted notices.

\r\n<% } %>\r\n
\r\n
The Original Smart Connections GPT
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n

This will be removed in a future version. Please use the Smart Connect - Obsidian GPT for more advanced features like creating notes and embedding search.

\r\n
\r\n
\r\n

This GPT can browser folders and read notes. It requires manually synchronization for your notes to be accessible by ChatGPT.

\r\n
\r\n
" + "attribution": "
\n \n \n \n \n \n \n \n \n \n

Smart Connections

\n
", + "sc_change": "
\n
\n \n \n \n \n
Time saved: <%= time_saved %>
\n <%- this.attribution %>\n
\n
\n
\n
\n\n", + "smart_chat": "
\n
\n
\n \" placeholder=\"Chat Name\">\n \n \n \n \n
\n
\n
\n
\n
\n \n Hi there, welcome to the Smart Chat. Ask me a question about your notes and I'll try to answer it.\n \n
\n
\n <%- messages %>\n
\n
\n
\n
\n <%- this.get_icon('square') %>\n \n
\n
\n
\n
\n <%- this.attribution %>\n
", + "smart_chat_msg": "
\">\n
\">\n <%= content %>\n <%- this.get_icon('copy') %>\n \n \n
\n
", + "smart_chat_settings": "
`data-option-${i + 1}=\"${platform.key}|${platform.description}\"`).join('\\n') %>\n data-callback=\"changed_smart_chat_model\"\n>
\n<% if(chat_platform?.fetch_models) { %>\n <% if(settings[settings.chat_model_platform_key]?.api_key) { %>\n
.model_name\"\n data-callback=\"changed_smart_chat_model\"\n <%- platform_chat_models.map((model, i) => `data-option-${i}=\"${model.key}|${model.model_name} (${model.description})\"`).join('\\n') %>\n >
\n <% } %>\n <% if(!platform_chat_models.length) { %>\n
\n <% } %>\n
API Key\"\n data-type=\"text\"\n data-setting=\"<%= settings.chat_model_platform_key %>.api_key\"\n <% if(chat_platform.signup_url) { %>\n data-description=\"Get API Key for <%= chat_platform.description %>.\"\n <% } else { %>\n data-description=\"API Key for <%= chat_platform.description %>.\"\n <% } %>\n data-placeholder=\"Enter an API Key\"\n data-button=\"Save\"\n data-callback=\"test_chat_api_key\"\n >
\n<% } %>\n<% if (settings.chat_model_platform_key.startsWith('custom_local')) { %>\n

Custom Local Model

\n
\n
\n
\n
\n
\n
\n
\n<% } else if(settings.chat_model_platform_key.startsWith('custom_api')) { %>\n

Custom Server

\n
\n
\n
\n
\n
\n
\n
\n<% } %>", + "smart_chat_system_msg": "
\">\n
\">\n <%= content %>\n
\n
", + "smart_connections": "
\n

\n <%- current_path %>\n <%- this.notes %> (<%- this.blocks %>)\n

\n \n \n \n \n
\n
\n <% for (let result of results) { %>\n
\" data-path=\"<%- result.path %>\">\n \n <%- this.get_icon('right-triangle') %>\n \" draggable=\"true\">\n <%- [result.score?.toFixed(2), result.name].join(' | ') %>\n \n \n
    \n
  • \" data-collection=\"<%= result.collection_name %>\">
  • \n
\n
\n <% } %>\n
\n
\n<%- this.attribution %>", + "smart_embed_settings": "
`data-option-${i + 1}=\"${model.key}|${model.name} (${model.description})\"`).join('\\n') %>\n data-callback=\"restart_plugin\"\n>
\n
`data-option-${i + 1}=\"${model.key}|${model.name} (${model.description})\"`).join('\\n') %>\n data-callback=\"restart_plugin\"\n>
\n
\n<% if(!settings.smart_notes_embed_model.includes('/') || !settings.smart_blocks_embed_model.includes('/')) { %>\n
\n<% } %>\n<% if(settings.smart_notes_embed_model.includes('/') || settings.smart_blocks_embed_model.includes('/')) { %>\n
\n\n
Smart Connect is free to use for faster local embeddings.\"\n data-type=\"button\"\n data-callback=\"connect_to_smart_connect\"\n>
\n<% } %>\n
", + "smart_settings": "

Smart Connections

\n<% if(this.env.plugin.EARLY_ACCESS && this.env.plugin.obsidian.Platform.isMobile && !this.env.plugin.settings.enable_mobile) { %>\n
Mobile is DISABLED.
\n

Toggle \"Enable mobile\" setting to activate mobile.

\n
\n<% } %>\n
\n
\n
\n \n \n \n
\n
\n
\n

User Agreement: By using Smart Connections you agree to share how it helps you with at least one other person\n 😊🌴

\n
\n
\n
\n
\n
\n

Supporter Community

\n <% if(!this.env.plugin.EARLY_ACCESS){ %>\n

The success of Smart Connections is a direct result of our community of supporters who generously fund and evaluate new features. Their unwavering commitment to our privacy-focused, open-source software benefits all. Together, we can continue to innovate and make a positive impact on the world.

\n

Supporter benefits include:

\n \n <% } %>\n
\n
\n
\n data-setting=\"enable_mobile\"\n data-callback=\"toggle_mobile\"\n >
\n
\n <% if(!this.env.plugin.EARLY_ACCESS){ %>\n
\n
\n <% } %>\n
\n

Smart View & Embeddings

\n

Notes about embedding models:

\n\n<%- smart_embed_settings %>\n

Smart Chat

\n<%- smart_chat_settings %>\n

System Prompts

\n
\n
\nCurrent: my, I, me, mine, our, ours, us, we\n

Exclusions

\n

Included files: <%= included_files %> / Total files: <%= total_files %>

\n
\n
\n
\n
\n

Data Management

\n
\n
\n
\n
\n

Force Refresh

\n
\n

Muted Notices

\n<% if(muted_notices && Object.keys(muted_notices).length) { %>\n <% for(const notice in muted_notices) { %>\n
\"\n data-setting=\"muted_notices.<%= notice %>\"\n data-type=\"button\"\n data-btn-text=\"Unmute\"\n data-callback=\"unmute_notice\"\n >
\n <% } %>\n<% } else { %>\n

No muted notices.

\n<% } %>\n
\n
The Original Smart Connections GPT
\n
\n
\n
\n \n \n \n
\n

This will be removed in a future version. Please use the Smart Connect - Obsidian GPT for more advanced features like creating notes and embedding search.

\n
\n
\n

This GPT can browser folders and read notes. It requires manually synchronization for your notes to be accessible by ChatGPT.

\n
\n
\n
\n<% if(this.env.plugin.EARLY_ACCESS){ %>\n
\n<% } %>\n" } \ No newline at end of file diff --git a/src/default_settings.js b/src/default_settings.js index 37bb45ab..56d30c48 100644 --- a/src/default_settings.js +++ b/src/default_settings.js @@ -17,6 +17,8 @@ function default_settings() { // Smart Blocks Settings (chunking) embed_input_min_chars: 50, multi_heading_blocks: true, + // v2.2 + enable_mobile: true, // V1 api_key: "", excluded_headings: "", diff --git a/src/index.js b/src/index.js index 0c81d30a..b0665dce 100644 --- a/src/index.js +++ b/src/index.js @@ -19,7 +19,8 @@ const { SmartSearch } = require("./smart_search.js"); // rename to sc_search.js const { SmartNotices } = require("./smart_notices.js"); // rename to sc_notices.js (extract smart_notices.js as standard structure first) // v2.1 const { ScChatView } = require("./sc_chat_view.js"); -const { ScSettingsTab } = require("./sc_settings.js"); +const { ScSettings } = require("./sc_settings.js"); +const { ScSettingsTab } = require("./sc_settings_tab.js"); const embed_models = require('smart-embed-model/models.json'); const { ScActionsUx } = require("./sc_actions_ux.js"); const { open_note } = require("./open_note.js"); @@ -31,8 +32,10 @@ class SmartConnectionsPlugin extends Plugin { ScChatView, } } + get ScSettings() { return ScSettings }; async open_note(target_path, event=null) { await open_note(this, target_path, event); } async load_settings() { + Object.assign(this, this.constructor.defaults); Object.assign(this.settings, await this.loadData()); this.handle_deprecated_settings(); // HANDLE DEPRECATED SETTINGS } @@ -46,7 +49,6 @@ class SmartConnectionsPlugin extends Plugin { } async initialize() { console.log("Loading Smart Connections v2..."); - Object.assign(this, this.constructor.defaults); await this.load_settings(); this.smart_connections_view = null; this.add_commands(); // add commands @@ -136,7 +138,7 @@ class SmartConnectionsPlugin extends Plugin { await window.app.plugins.enablePlugin(id); console.log("plugin restarted", id); }; - window.restart_plugin(this.manifest.id); + await window.restart_plugin(this.manifest.id); } add_commands() { @@ -241,14 +243,19 @@ class SmartConnectionsPlugin extends Plugin { get chat_view() { return ScChatView.get_view(this.app.workspace); } // get folders, traverse non-hidden sub-folders async get_folders(path = "/") { - const folders = (await this.app.vault.adapter.list(path)).folders; - let folder_list = []; - for (let i = 0; i < folders.length; i++) { - if (folders[i].startsWith(".")) continue; - folder_list.push(folders[i]); - folder_list = folder_list.concat(await this.get_folders(folders[i] + "/")); + try { + const folders = (await this.app.vault.adapter.list(path)).folders; + let folder_list = []; + for (let i = 0; i < folders.length; i++) { + if (folders[i].startsWith(".")) continue; + folder_list.push(folders[i]); + folder_list = folder_list.concat(await this.get_folders(folders[i] + "/")); + } + return folder_list; + } catch (error) { + console.warn("Error getting folders", error); + return []; } - return folder_list; } // SUPPORTERS async sync_notes() { @@ -352,9 +359,30 @@ class SmartConnectionsPlugin extends Plugin { // update chat history conversation folder this.env.chats.folder = this.settings.smart_chat_folder; } - // is smart view open - // is_smart_view_open() { return ScSmartView.is_open(this.app.workspace); } - // backwards compatibility + + async update_early_access() { + // // if license key is not set, return + if(!this.settings.license_key) return this.show_notice("Supporter license key required for early access update"); + const v2 = await this.obsidian.requestUrl({ + url: "https://sync.smartconnections.app/download_v2", + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + license_key: this.settings.license_key, + }) + }); + if(v2.status !== 200) return console.error("Error downloading early access update", v2); + console.log(v2.json); + await this.app.vault.adapter.write(".obsidian/plugins/smart-connections/main.js", v2.json.main); // add new + await this.app.vault.adapter.write(".obsidian/plugins/smart-connections/manifest.json", v2.json.manifest); // add new + await this.app.vault.adapter.write(".obsidian/plugins/smart-connections/styles.css", v2.json.styles); // add new + await window.app.plugins.loadManifests(); + await this.restart_plugin(); + } + + // BEGIN BACKWARD COMPATIBILITY (DEPRECATED: remove before 2.2 stable release) async handle_deprecated_settings() { // move api keys (api_key_PLATFORM) to PLATFORM.api_key Object.entries(this.settings).forEach(([key, value]) => { diff --git a/src/sc_chats_ui.js b/src/sc_chats_ui.js index 14468cf4..9c9c817d 100644 --- a/src/sc_chats_ui.js +++ b/src/sc_chats_ui.js @@ -120,6 +120,52 @@ class ScChatsUI extends SmartChatsUI { if (!this.system_prompt_selector) this.system_prompt_selector = new ScSystemPromptSelectModal(this.env.plugin.app, this.env); this.system_prompt_selector.open(); } + add_chat_input_listeners(){ + // register default events in super + super.add_chat_input_listeners(); + // register custom events + const chat_input = this.container.querySelector(".sc-chat-form"); + this.brackets_ct = 0; + this.prevent_input = false; + chat_input.addEventListener("keyup", this.key_up_handler.bind(this)); + } + key_up_handler(e){ + const textarea = this.container.querySelector(".sc-chat-form textarea"); + if(!["/", "@", "["].includes(e.key)) return; + const caret_pos = textarea.selectionStart; + // if key is open square bracket + if (e.key === "[") { + // if previous char is [ + if (textarea.value[caret_pos - 2] === "[") { + // open file suggestion modal + this.open_file_suggestion_modal(); + return; + } + } else { + this.brackets_ct = 0; + } + // if / is pressed + if (e.key === "/") { + // get caret position + // if this is first char or previous char is space + if (textarea.value.length === 1 || textarea.value[caret_pos - 2] === " ") { + // open folder suggestion modal + this.open_folder_suggestion_modal(); + return; + } + } + // if @ is pressed + if (e.key === "@") { + // console.log("caret_pos", caret_pos); + // get caret position + // if this is first char or previous char is space + if (textarea.value.length === 1 || textarea.value[caret_pos - 2] === " ") { + // open system prompt suggestion modal + this.open_system_prompt_modal(); + return; + } + } + } } exports.ScChatsUI = ScChatsUI; diff --git a/src/sc_settings.js b/src/sc_settings.js index 514c454a..ae29426a 100644 --- a/src/sc_settings.js +++ b/src/sc_settings.js @@ -1,22 +1,8 @@ const { SmartSettings } = require("./smart_settings"); const smart_embed_models = require("smart-embed-model/models.json"); -const { PluginSettingTab } = require("obsidian"); const { SmartChatSettings } = require("./smart_chat_settings"); const { SmartEmbedSettings } = require("./smart_embed_settings"); -class ScSettingsTab extends PluginSettingTab { - constructor(app, plugin) { - super(app, plugin); - this.plugin = plugin; - this.config = plugin.settings; - } - display() { - this.smart_settings = new ScSettings(this.plugin.env, this.containerEl); - return this.smart_settings.render(); - } -} -exports.ScSettingsTab = ScSettingsTab; - // Smart Connections Specific Settings class ScSettings extends SmartSettings { constructor(env, container, template_name = "smart_settings") { @@ -86,10 +72,9 @@ class ScSettings extends SmartSettings { this.update("muted_notices", this.plugin.settings.muted_notices); this.render(); // re-render settings } - - // DO: REMOVE FROM STABLE RELEASE - revert_to_v20() { - this.plugin.revert_to_v20(); + // upgrade to early access + async upgrade_to_early_access() { + await this.plugin.update_early_access(); } } exports.ScSettings = ScSettings; diff --git a/src/sc_settings_tab.js b/src/sc_settings_tab.js new file mode 100644 index 00000000..f67d6659 --- /dev/null +++ b/src/sc_settings_tab.js @@ -0,0 +1,14 @@ +const { PluginSettingTab } = require("obsidian"); + +class ScSettingsTab extends PluginSettingTab { + constructor(app, plugin) { + super(app, plugin); + this.plugin = plugin; + this.config = plugin.settings; + } + display() { + this.smart_settings = new this.plugin.ScSettings(this.plugin.env, this.containerEl); + return this.smart_settings.render(); + } +} +exports.ScSettingsTab = ScSettingsTab; diff --git a/src/smart_chat_settings.js b/src/smart_chat_settings.js index 57fe842d..e431867a 100644 --- a/src/smart_chat_settings.js +++ b/src/smart_chat_settings.js @@ -34,14 +34,12 @@ class SmartChatSettings extends SmartSettings { async get_view_data() { const view_data = { settings: this.plugin.settings, - chat_platform: this.env.chat_model.platforms[this.plugin.settings.chat_model_platform_key], + chat_platform: this.env.chat_model?.platforms[this.plugin.settings.chat_model_platform_key], chat_platforms: this.env.chat_model?.platforms ? Object.keys(this.env.chat_model.platforms).map(platform_key => ({ key: platform_key, ...(this.env.chat_model?.platforms[platform_key] || {}) })) : [], }; - view_data.platform_chat_models = await this.plugin.env.chat_model.get_models(); + view_data.platform_chat_models = await this.plugin.env.chat_model?.get_models(); view_data.smart_chat_settings = this.ejs.render(this.template, view_data); return view_data; } } -exports.SmartChatSettings = SmartChatSettings; - - +exports.SmartChatSettings = SmartChatSettings; \ No newline at end of file diff --git a/src/styles.css b/src/styles.css index 51583e24..90587205 100644 --- a/src/styles.css +++ b/src/styles.css @@ -217,6 +217,7 @@ div[data-type="smart-connections-view"] > .view-content { border-radius: 10px; resize: none; height: auto; + min-height: 4lh; max-height: 100%; border: 1px solid var(--blockquote-border-color); } @@ -316,3 +317,28 @@ div[data-type="smart-connections-view"] > .view-content { } } +.sc-supporters{ + max-height: 37ch; + border: 1px solid var(--h1-color); + border-radius: 10px; + padding: 10px; + margin-left: -10px; + box-shadow: 0 1px 0 1px var(--shadow-300); + overflow: auto; + text-wrap: balance; + + > p{ + margin-top: 0; + margin-bottom: 5px; + } + + > ul { + margin-top: 5px; + } + + > * li { + margin-top: 0.37em; + } + +} + diff --git a/src/views/smart_chat_settings.ejs b/src/views/smart_chat_settings.ejs index c8e70e9c..2797052a 100644 --- a/src/views/smart_chat_settings.ejs +++ b/src/views/smart_chat_settings.ejs @@ -6,7 +6,7 @@ <%- chat_platforms.map((platform, i) => `data-option-${i + 1}="${platform.key}|${platform.description}"`).join('\n') %> data-callback="changed_smart_chat_model" > -<% if(chat_platform.fetch_models) { %> +<% if(chat_platform?.fetch_models) { %> <% if(settings[settings.chat_model_platform_key]?.api_key) { %>
Smart Connections +<% if(this.env.plugin.EARLY_ACCESS && this.env.plugin.obsidian.Platform.isMobile && !this.env.plugin.settings.enable_mobile) { %> +
Mobile is DISABLED.
+

Toggle "Enable mobile" setting to activate mobile.

+
+<% } %>
-

Supporter Features

-

As a Smart Connections "Supporter", fast-track your PKM journey with priority perks and pioneering innovations.

-
    -
  • Access to the supporter-only private chat: -
      -
    • Swift, top-priority support.
    • -
    • Learn about the latest features and improvements before they are released.
    • -
    • Opportunity to influence the future of Smart Connections.
    • -
    • Ask questions and share your insights with other supporters.
    • -
    -
  • -
  • Early access to new & experimental features: -
      -
    • Coming soon in v2.2: Multi-modal Smart Chat
    • -
    • Coming soon in v2.2: Re-ranking in the Smart View
    • -
    • Coming soon in v2.2: Actions in the Smart Chat
    • -
    • Coming soon in v2.2: Advanced filters in the Smart View
    • -
    -
  • -
  • For a limited time: Early access to Smart Connect: Use ChatGPT with your notes without uploading your notes to the cloud using Smart Connect - Obsidian GPT.
  • -
-
-
-
+
+

Supporter Community

+ <% if(!this.env.plugin.EARLY_ACCESS){ %> +

The success of Smart Connections is a direct result of our community of supporters who generously fund and evaluate new features. Their unwavering commitment to our privacy-focused, open-source software benefits all. Together, we can continue to innovate and make a positive impact on the world.

+

Supporter benefits include:

+
    +
  • Early access to new & experimental features: +
      +
    • Early access to new versions enables supporters to help ensure new features are ready for the broader community.
    • +
    • Available in v2.2 (Early Release):
        +
      • 🖼️ Multimodal Smart Chat (images)
      • +
      • 📲 Mobile compatibility
      • +
    • +
    • Coming soon:
        +
      • Re-ranking in the Smart View
      • +
      • Actions in the Smart Chat
      • +
      • Advanced filters in the Smart View
      • +
    • +
    +
  • +
  • Access to the supporter-only private chat: +
      +
    • Community: +
        +
      • Ask questions and share insights with other supporters.
      • +
      +
    • +
    • Help & Support (priority): + +
    • +
    • Feature Requests (priority): +
        +
      • Influence the future of Smart Connections with priority feature requests in the Supporter Chat.
      • +
      +
    • +
    • Insider Updates: +
        +
      • Learn about the latest features & improvements before they are announced.
      • +
      +
    • +
    +
  • +
  • For a very limited time: Early access to Smart Connect: Use ChatGPT with your notes without uploading your notes to the cloud using Smart Connect - Obsidian GPT.
  • +
+ <% } %> +
+
+
+ data-setting="enable_mobile" + data-callback="toggle_mobile" + >
+
+ <% if(!this.env.plugin.EARLY_ACCESS){ %> +
+
+ <% } %> +

Smart View & Embeddings

Notes about embedding models:

    @@ -160,16 +216,6 @@ data-type="button" data-callback="force_refresh" >
- -

Muted Notices

<% if(muted_notices && Object.keys(muted_notices).length) { %> <% for(const notice in muted_notices) { %> @@ -212,4 +258,14 @@ data-description='Chat with your notes in ChatGPT. Requires a ChatGPT Plus account.' data-type="button" data-href="https://chat.openai.com/g/g-SlDDp07bm-smart-connections-for-obsidian" ->
\ No newline at end of file +> +
+<% if(this.env.plugin.EARLY_ACCESS){ %> +
+<% } %>