2026-01-15 11:34:29 +01:00
|
|
|
export interface MindnetSettings {
|
|
|
|
|
edgeVocabularyPath: string; // vault-relativ
|
|
|
|
|
graphSchemaPath: string; // vault-relativ (später)
|
|
|
|
|
maxHops: number;
|
|
|
|
|
strictMode: boolean;
|
2026-01-15 12:27:16 +01:00
|
|
|
showCanonicalHints: boolean;
|
|
|
|
|
chainDirection: "forward" | "backward" | "both";
|
2026-01-16 12:27:44 +01:00
|
|
|
interviewConfigPath: string; // vault-relativ
|
|
|
|
|
autoStartInterviewOnCreate: boolean;
|
|
|
|
|
interceptUnresolvedLinkClicks: boolean;
|
2026-01-17 10:07:07 +01:00
|
|
|
autoStartOnUnresolvedClick: boolean; // Auto-start interview when creating note from unresolved link
|
|
|
|
|
bypassModifier: "Alt" | "Ctrl" | "Shift" | "None"; // Modifier key to bypass intercept (Reading View)
|
|
|
|
|
editorFollowModifier: "Alt" | "Ctrl" | "Shift" | "None"; // Modifier key required for editor intercept (Live Preview/Source)
|
|
|
|
|
waitForFirstModifyAfterCreate: boolean; // Wait for Templater to modify file before starting wizard
|
|
|
|
|
waitForModifyTimeoutMs: number; // Timeout in ms for waiting for modify event
|
|
|
|
|
debugLogging: boolean; // Enable debug logging for unresolved link handling
|
|
|
|
|
adoptNewNotesInEditor: boolean; // Auto-adopt newly created notes in editor
|
|
|
|
|
adoptMaxChars: number; // Max content length to consider note as adopt-candidate
|
2026-01-17 10:11:30 +01:00
|
|
|
adoptConfirmMode: "always" | "onlyLowConfidence" | "never"; // When to show adoption confirmation
|
|
|
|
|
highConfidenceWindowMs: number; // Time window in ms for high-confidence adoption
|
2026-01-17 07:27:11 +01:00
|
|
|
// Semantic mapping builder settings
|
|
|
|
|
mappingWrapperCalloutType: string; // default: "abstract"
|
|
|
|
|
mappingWrapperTitle: string; // default: "🕸️ Semantic Mapping"
|
|
|
|
|
mappingWrapperFolded: boolean; // default: true
|
|
|
|
|
defaultEdgeType: string; // default: ""
|
|
|
|
|
unassignedHandling: "prompt" | "none" | "defaultType" | "advisor"; // default: "prompt"
|
|
|
|
|
allowOverwriteExistingMappings: boolean; // default: false
|
2026-01-17 08:01:04 +01:00
|
|
|
defaultNotesFolder: string; // default: "" (vault root)
|
2026-01-17 11:54:14 +01:00
|
|
|
// Inline micro edge suggester settings
|
|
|
|
|
inlineMicroEnabled: boolean; // default: true
|
|
|
|
|
inlineMaxAlternatives: number; // default: 6
|
|
|
|
|
inlineCancelBehavior: "keep_link"; // default: "keep_link" (future: "revert")
|
2026-01-15 11:34:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const DEFAULT_SETTINGS: MindnetSettings = {
|
|
|
|
|
edgeVocabularyPath: "_system/dictionary/edge_vocabulary.md",
|
|
|
|
|
graphSchemaPath: "_system/dictionary/graph_schema.md",
|
|
|
|
|
maxHops: 3,
|
|
|
|
|
strictMode: false,
|
2026-01-15 12:27:16 +01:00
|
|
|
showCanonicalHints: false,
|
|
|
|
|
chainDirection: "forward",
|
2026-01-16 12:27:44 +01:00
|
|
|
interviewConfigPath: "_system/dictionary/interview_config.yaml",
|
|
|
|
|
autoStartInterviewOnCreate: false,
|
|
|
|
|
interceptUnresolvedLinkClicks: true,
|
2026-01-17 10:07:07 +01:00
|
|
|
autoStartOnUnresolvedClick: true,
|
|
|
|
|
bypassModifier: "Alt",
|
|
|
|
|
editorFollowModifier: "Ctrl",
|
|
|
|
|
waitForFirstModifyAfterCreate: true,
|
|
|
|
|
waitForModifyTimeoutMs: 1200,
|
|
|
|
|
debugLogging: false,
|
|
|
|
|
adoptNewNotesInEditor: true,
|
|
|
|
|
adoptMaxChars: 200,
|
2026-01-17 10:11:30 +01:00
|
|
|
adoptConfirmMode: "onlyLowConfidence",
|
|
|
|
|
highConfidenceWindowMs: 3000,
|
2026-01-17 07:27:11 +01:00
|
|
|
mappingWrapperCalloutType: "abstract",
|
|
|
|
|
mappingWrapperTitle: "🕸️ Semantic Mapping",
|
|
|
|
|
mappingWrapperFolded: true,
|
|
|
|
|
defaultEdgeType: "",
|
|
|
|
|
unassignedHandling: "prompt",
|
|
|
|
|
allowOverwriteExistingMappings: false,
|
2026-01-17 08:01:04 +01:00
|
|
|
defaultNotesFolder: "",
|
2026-01-17 11:54:14 +01:00
|
|
|
inlineMicroEnabled: true,
|
|
|
|
|
inlineMaxAlternatives: 6,
|
|
|
|
|
inlineCancelBehavior: "keep_link",
|
2026-01-15 11:34:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Optional helper: normalize to Obsidian vault paths (forward slashes).
|
|
|
|
|
*/
|
|
|
|
|
export function normalizeVaultPath(p: string): string {
|
|
|
|
|
return (p || "").trim().replace(/\\/g, "/");
|
|
|
|
|
}
|
|
|
|
|
|