mirror of
https://github.com/taskgenius/taskgenius-plugin.git
synced 2026-07-22 06:40:25 +00:00
refactor(settings): consolidate dataflowEnabled into enableIndexer
Remove duplicate dataflowEnabled setting and update all references to use the existing enableIndexer setting. This eliminates confusion from having two settings controlling the same indexer functionality. Changes: - Remove dataflowEnabled from TaskProgressBarSettings interface - Remove dataflowEnabled from DEFAULT_SETTINGS - Update IndexSettingsTab to use enableIndexer - Update createDataflow.ts isDataflowEnabled() to check enableIndexer - Update index.ts refresh commands to check enableIndexer - Update McpServer.ts to check enableIndexer
This commit is contained in:
parent
ac54fdb0bb
commit
e599302be2
5 changed files with 5 additions and 11 deletions
|
|
@ -601,9 +601,6 @@ export interface McpServerConfig {
|
|||
|
||||
/** Define the main settings structure */
|
||||
export interface TaskProgressBarSettings {
|
||||
// Core Architecture Settings
|
||||
dataflowEnabled: boolean;
|
||||
|
||||
// General Settings (Example)
|
||||
progressBarDisplayMode: "none" | "graphical" | "text" | "both";
|
||||
supportHoverToShowProgressInfo: boolean;
|
||||
|
|
@ -776,9 +773,6 @@ export interface TaskProgressBarSettings {
|
|||
|
||||
/** Define the default settings */
|
||||
export const DEFAULT_SETTINGS: TaskProgressBarSettings = {
|
||||
// Core Architecture Defaults
|
||||
dataflowEnabled: true,
|
||||
|
||||
// General Defaults
|
||||
progressBarDisplayMode: "both",
|
||||
supportHoverToShowProgressInfo: false,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export function renderIndexSettingsTab(
|
|||
new Setting(containerEl)
|
||||
.setName(t("Enable Indexer"))
|
||||
.addToggle((toggle) => {
|
||||
toggle.setValue(settingTab.plugin.settings.dataflowEnabled ?? true);
|
||||
toggle.setValue(settingTab.plugin.settings.enableIndexer ?? true);
|
||||
toggle.onChange(async (value) => {
|
||||
settingTab.plugin.settings.enableIndexer = value;
|
||||
settingTab.applySettingsUpdate();
|
||||
|
|
|
|||
|
|
@ -46,5 +46,5 @@ export async function createDataflow(
|
|||
* Check if dataflow is enabled in settings
|
||||
*/
|
||||
export function isDataflowEnabled(plugin: TaskProgressBarPlugin): boolean {
|
||||
return plugin.settings.dataflowEnabled ?? true;
|
||||
return plugin.settings.enableIndexer ?? true;
|
||||
}
|
||||
|
|
@ -743,7 +743,7 @@ export default class TaskProgressBarPlugin extends Plugin {
|
|||
|
||||
// Check if dataflow is enabled
|
||||
if (
|
||||
this.settings?.dataflowEnabled &&
|
||||
this.settings?.enableIndexer &&
|
||||
this.dataflowOrchestrator
|
||||
) {
|
||||
// Use dataflow orchestrator for refresh
|
||||
|
|
@ -803,7 +803,7 @@ export default class TaskProgressBarPlugin extends Plugin {
|
|||
try {
|
||||
// Check if dataflow is enabled
|
||||
if (
|
||||
this.settings?.dataflowEnabled &&
|
||||
this.settings?.enableIndexer &&
|
||||
this.dataflowOrchestrator
|
||||
) {
|
||||
// Use dataflow orchestrator for force reindex
|
||||
|
|
|
|||
|
|
@ -608,7 +608,7 @@ export class McpServer {
|
|||
private async executeTool(toolName: string, args: any): Promise<any> {
|
||||
try {
|
||||
// Ensure data source is available before executing tools
|
||||
if (this.plugin.settings?.dataflowEnabled) {
|
||||
if (this.plugin.settings?.enableIndexer) {
|
||||
const queryAPI = new (require("../dataflow/api/QueryAPI").QueryAPI)(this.plugin.app, this.plugin.app.vault, this.plugin.app.metadataCache);
|
||||
// Rebind bridge if it's not initialized yet
|
||||
if (!this.taskBridge) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue