Skip to content

Commit b1292e6

Browse files
committed
- Standardize button and header text capitalization in env_settings.js, smart_blocks.js, smart_embed_model.js, and related adapter files for consistency and improved readability.
- Update descriptions in settings_config across various files to enhance clarity and provide more detailed information about their functionality. - Maintain existing comments and methods unrelated to the changes.
1 parent 8086897 commit b1292e6

8 files changed

Lines changed: 30 additions & 37 deletions

File tree

obsidian-smart-env/components/env_settings.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ export async function build_html(env, opts = {}) {
1616

1717
// Buttons to add new folder or file
1818
const addExcludedFolderBtn = `
19-
<button class="sc-add-excluded-folder-btn" type="button">Add Excluded Folder</button>
19+
<button class="sc-add-excluded-folder-btn" type="button">Add excluded folder</button>
2020
`;
2121
const addExcludedFileBtn = `
22-
<button class="sc-add-excluded-file-btn" type="button">Add Excluded File</button>
22+
<button class="sc-add-excluded-file-btn" type="button">Add excluded file</button>
2323
`;
2424

2525
// We'll show the current lists of excluded folders/files in simple blocks
@@ -36,27 +36,27 @@ export async function build_html(env, opts = {}) {
3636
<div class="sc-env-settings-container">
3737
<div class="smart-env-settings-header">
3838
<h2>Smart Environment</h2>
39-
<button class="sc-collection-stats-btn" type="button">Show Stats</button>
40-
<button class="smart-env_reload-sources-btn" type="button">Reload Sources</button>
39+
<button class="sc-collection-stats-btn" type="button">Show stats</button>
40+
<button class="smart-env_reload-sources-btn" type="button">Reload sources</button>
4141
</div>
4242
${env_settings_html}
4343
4444
<div class="smart-env-settings-header">
45-
<h2>Excluded Folders</h2>
45+
<h2>Excluded folders</h2>
4646
${addExcludedFolderBtn}
4747
</div>
4848
<div>
4949
${excludedFoldersList}
5050
</div>
5151
5252
<div class="smart-env-settings-header">
53-
<h2>Excluded Files</h2>
53+
<h2>Excluded files</h2>
5454
${addExcludedFileBtn}
5555
</div>
5656
<div>
5757
${excludedFilesList}
5858
</div>
59-
<button class="sc-excluded-sources-btn" type="button">Show Excluded</button>
59+
<button class="sc-excluded-sources-btn" type="button">Show excluded</button>
6060
6161
<div data-smart-settings="smart_sources"></div>
6262
<div data-smart-settings="smart_blocks"></div>

smart-blocks/smart_blocks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ export class SmartBlocks extends SmartEntities {
5050
get settings_config() {
5151
return this.process_settings_config({
5252
"embed_blocks": {
53-
name: 'Embed Blocks',
53+
name: 'Utilize Smart Blocks',
5454
type: "toggle",
55-
description: "Embed blocks using the embedding model.",
55+
description: "Creates more granular embeddings by splitting sources into smaller chunks. This may improve search results especially for large documents that have well-defined sections.",
5656
default: true,
5757
},
5858
...super.settings_config,

smart-embed-model/adapters/_adapter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class SmartEmbedAdapter extends SmartModelAdapter {
6969
get settings_config() {
7070
return {
7171
"[ADAPTER].model_key": {
72-
name: 'Embedding Model',
72+
name: 'Embedding model',
7373
type: "dropdown",
7474
description: "Select an embedding model.",
7575
options_callback: 'adapter.get_models_as_options',

smart-embed-model/adapters/openai.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ export class SmartEmbedOpenAIAdapter extends SmartEmbedModelApiAdapter {
121121
return {
122122
...super.settings_config,
123123
"[ADAPTER].api_key": {
124-
name: "OpenAI API Key for embeddings",
124+
name: "OpenAI API key for embeddings",
125125
type: "password",
126-
description: "Required for OpenAI embedding models",
127-
placeholder: "Enter OpenAI API Key",
126+
description: "Required for OpenAI embedding models.",
127+
placeholder: "Enter OpenAI API key",
128128
},
129129
};
130130
}

smart-embed-model/adapters/transformers.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,15 +284,15 @@ export const transformers_models = {
284284
*/
285285
export const transformers_settings_config = {
286286
"[ADAPTER].gpu_batch_size": {
287-
name: 'GPU Batch Size',
287+
name: 'GPU batch size',
288288
type: "number",
289289
description: "Number of embeddings to process per batch on GPU. Use 0 to disable GPU.",
290290
placeholder: "Enter number ex. 10",
291291
},
292292
"[ADAPTER].legacy_transformers": {
293-
name: 'Legacy Transformers (no GPU)',
293+
name: 'Legacy transformers (no GPU)',
294294
type: "toggle",
295-
description: "Use legacy transformers (v2) instead of v3.",
295+
description: "Use legacy transformers (v2) instead of v3. This may resolve issues if the local embedding isn't working.",
296296
callback: 'embed_model_changed',
297297
default: true,
298298
},

smart-embed-model/smart_embed_model.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ export class SmartEmbedModel extends SmartModel {
125125
get settings_config() {
126126
const _settings_config = {
127127
adapter: {
128-
name: 'Embedding Model Platform',
128+
name: 'Embedding model platform',
129129
type: "dropdown",
130-
description: "Select an embedding model platform.",
130+
description: "Select an embedding model platform. The default 'transformers' utilizes built-in local models.",
131131
options_callback: 'get_platforms_as_options',
132132
callback: 'adapter_changed',
133133
default: this.constructor.defaults.adapter,

smart-entities/smart_entities.js

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -386,46 +386,39 @@ export const settings_config = {
386386

387387
export const connections_filter_config = {
388388
"smart_view_filter.show_full_path": {
389-
"name": "Show Full Path",
389+
"name": "Show full path",
390390
"type": "toggle",
391391
"description": "Show full path in view.",
392-
"callback": "re_render"
393392
},
394393
"smart_view_filter.render_markdown": {
395-
"name": "Render Markdown",
394+
"name": "Render markdown",
396395
"type": "toggle",
397396
"description": "Render markdown in results.",
398-
"callback": "re_render"
399397
},
400398
"smart_view_filter.results_limit": {
401-
"name": "Results Limit",
399+
"name": "Results limit",
402400
"type": "number",
403401
"description": "Limit the number of results.",
404402
"default": 20,
405-
"callback": "re_render"
406403
},
407404
"smart_view_filter.exclude_inlinks": {
408-
"name": "Exclude Inlinks",
405+
"name": "Exclude inlinks (backlinks)",
409406
"type": "toggle",
410-
"description": "Exclude inlinks.",
411-
"callback": "re_render_settings"
407+
"description": "Exclude notes that link to the current note.",
412408
},
413409
"smart_view_filter.exclude_outlinks": {
414-
"name": "Exclude Outlinks",
410+
"name": "Exclude outlinks",
415411
"type": "toggle",
416-
"description": "Exclude outlinks.",
417-
"callback": "re_render_settings"
412+
"description": "Exclude links already in the current document.",
418413
},
419414
"smart_view_filter.include_filter": {
420-
"name": "Include Filter",
415+
"name": "Include filter",
421416
"type": "text",
422-
"description": "Require that results match this value.",
423-
"callback": "re_render"
417+
"description": "Require that result file path matches this value.",
424418
},
425419
"smart_view_filter.exclude_filter": {
426-
"name": "Exclude Filter",
420+
"name": "Exclude filter",
427421
"type": "text",
428-
"description": "Exclude results that match this value.",
429-
"callback": "re_render"
422+
"description": "Exclude results with file path that matches this value.",
430423
}
431424
};

smart-sources/smart_sources.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ export class SmartSources extends SmartEntities {
432432
"conditional": () => this.loaded && this.collection_key === 'smart_sources',
433433
},
434434
"clear_all": {
435-
"name": "Clear All",
435+
"name": "Clear all",
436436
"description": "Clear all data and reimport sources.",
437437
"type": "button_with_confirm",
438438
"callback": "run_clear_all",

0 commit comments

Comments
 (0)