You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/architecture/preview-controller.md
+16-7Lines changed: 16 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,12 +45,21 @@ See also: [Settings Manager](./settings.md)
45
45
```mermaid
46
46
sequenceDiagram
47
47
participant User as User
48
-
participant Tree as Workspace Wiki Tree
49
-
participant Controller as Preview/Open Controller
50
-
participant Editor as VS Code Editor
51
-
User->>Tree: Click file
52
-
Tree->>Controller: Request open (preview/editor)
53
-
Controller->>Editor: Open file (preview or editor)
48
+
participant Tree as Tree View
49
+
participant Handler as handleFileClick
50
+
participant Command as VS Code
51
+
User->>Tree: Single Click
52
+
Tree->>Handler: Trigger Click Handler
53
+
activate Handler
54
+
Handler->>Handler: Check Click Time
55
+
alt Single Click (< 500ms)
56
+
Handler->>Command: Execute Default Command
57
+
Command->>User: Open Preview
58
+
else Double Click (< 500ms apart)
59
+
Handler->>Command: Execute vscode.open
60
+
Command->>User: Open in Editor
61
+
end
62
+
deactivate Handler
54
63
```
55
64
56
-
This diagram shows how user actions in the tree trigger file opening in preview or editor mode.
65
+
This diagram shows the double-click detection flow: single clicks open files in preview mode (using the configured `openWith` command), while double clicks within 500ms open files in the full editor.
Copy file name to clipboardExpand all lines: docs/architecture/settings.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,25 +8,25 @@ The Settings Manager reads and applies user configuration for the Workspace Wiki
8
8
9
9
-`workspaceWiki.supportedExtensions`: File types to scan (default: `md`, `markdown`, `txt`).
10
10
- If `md` or `markdown` is included, files named `README` (no extension, case-insensitive) are also included and treated as Markdown.
11
-
-`workspaceWiki.excludeGlobs`: Patterns to exclude (e.g.,`**/node_modules/**`).
12
-
-`workspaceWiki.maxSearchDepth`: Limit scan depth for large repos.
13
-
-`workspaceWiki.showIgnoredFiles`: Show files listed in .gitignore and excludeGlobs(default: false).
14
-
-`workspaceWiki.showHiddenFiles`: Show hidden files/folders starting with a dot (default: false).
11
+
-`workspaceWiki.excludeGlobs`: Glob patterns to exclude files and folders (default:`**/node_modules/**`, `**/.git/**`).
12
+
-`workspaceWiki.maxSearchDepth`: Maximum directory depth to search for documentation files (default: `10`).
13
+
-`workspaceWiki.showIgnoredFiles`: Show files listed in `.gitignore` and matched by `excludeGlobs` patterns (default: `false`).
14
+
-`workspaceWiki.showHiddenFiles`: Show hidden files and folders starting with a dot (e.g., `.github`, `.env`) (default: `false`).
15
15
16
16
### File Opening & Display
17
17
18
-
-`workspaceWiki.defaultOpenMode`: `preview` or `editor`.
19
-
-`workspaceWiki.openWith`: Commands to use for opening different file types.
20
-
-`workspaceWiki.directorySort`: How to sort files and folders(default: "files-first").
18
+
-`workspaceWiki.defaultOpenMode`: `preview` or `editor` (default: `preview`).
19
+
-`workspaceWiki.openWith`: Commands to use for opening different file types (default: `markdown.showPreview` for `.md`/`.markdown`, `vscode.open` for `.txt`).
20
+
-`workspaceWiki.directorySort`: How to sort files and folders: `files-first`, `folders-first`, or `alphabetical`(default: `files-first`).
21
21
22
22
### Title Formatting
23
23
24
-
-`workspaceWiki.acronymCasing`: Acronyms to preserve proper casing in file titles.
Copy file name to clipboardExpand all lines: docs/architecture/sync.md
+23-7Lines changed: 23 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,12 +79,28 @@ See also: [Tree Data Provider](./tree-data-provider.md), [Settings](./settings.m
79
79
80
80
```mermaid
81
81
sequenceDiagram
82
-
participant VSCode as VS Code
83
-
participant User as User
84
-
participant Tree as Workspace Wiki Tree
85
-
User->>VSCode: Change active editor
86
-
VSCode->>Tree: Notify active file
87
-
Tree->>Tree: Reveal file in tree
82
+
participant VSCode as VS Code Editor
83
+
participant Listener as Editor Change Listener
84
+
participant Config as Config Manager
85
+
participant Tree as Tree Provider
86
+
participant View as Tree View
87
+
VSCode->>Listener: onDidChangeActiveTextEditor
88
+
activate Listener
89
+
Listener->>Config: Get autoReveal Setting
90
+
alt autoReveal disabled
91
+
Listener-->>VSCode: Return
92
+
else autoReveal enabled
93
+
Listener->>Config: Get autoRevealDelay
94
+
alt autoRevealDelay > 0
95
+
Listener->>Listener: Wait (setTimeout)
96
+
end
97
+
Listener->>Tree: findNodeByPath
98
+
alt Node Found & Tree Visible
99
+
Listener->>View: reveal(node)
100
+
View->>VSCode: Highlight & Expand
101
+
end
102
+
end
103
+
deactivate Listener
88
104
```
89
105
90
-
This diagram shows how the sync module listens for editor changesand reveals the corresponding file in the tree.
106
+
This diagram shows how the sync module listens for active editor changes, checks configuration, and reveals the corresponding file in the tree with optional delay.
Copy file name to clipboardExpand all lines: docs/architecture/tree-data-provider.md
+20-12Lines changed: 20 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,20 +91,28 @@ Workspace Wiki
91
91
92
92
See also: [Scanner/Indexer](./scanner.md)
93
93
94
-
## TreeDataProvider Ordering Logic
94
+
## Ordering Logic
95
95
96
96
```mermaid
97
97
flowchart TD
98
-
A[All Files] --> B{Is Root?}
99
-
B -->|Yes| C[README.md First]
100
-
B -->|No| D[Folder Node]
101
-
C --> E[Other Root Docs A-Z]
102
-
D --> F{index.md Exists?}
103
-
F -->|Yes| G[Folder Named by index.md]
104
-
F -->|No| H[Folder Name]
105
-
G --> I[README.md in Folder]
106
-
G --> J[Other Files A-Z]
107
-
H --> J
98
+
A[All Nodes] --> B{Is README?}
99
+
B -->|Yes| C[Rank First]
100
+
B -->|No| D{Root Level?}
101
+
D -->|Yes| E[Apply Sort Mode]
102
+
D -->|No| F[Subfolder Node]
103
+
E -->|Get directorySort| G{Sort Mode}
104
+
G -->|files-first| H[Files before Folders]
105
+
G -->|folders-first| I[Folders before Files]
106
+
G -->|alphabetical| J[Alphabetical Order]
107
+
H --> K[Then Alphabetical]
108
+
I --> K
109
+
J --> K
110
+
K --> L[Final Sorted List]
111
+
F -->|index.md Exists| M[Folder Named by index]
112
+
F -->|No index.md| N[Use Folder Name]
113
+
M --> O[Children Sorted]
114
+
N --> O
115
+
O --> L
108
116
```
109
117
110
-
This diagram shows how files are ordered and displayed in the tree.
118
+
This diagram shows the node ordering logic: README files rank first, then root-level files/folders are sorted according to `directorySort` setting, then alphabetically by title within each type.
Copy file name to clipboardExpand all lines: docs/usage/setup.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,11 +18,13 @@ The extension works out-of-the-box, but you can customize it via settings:
18
18
19
19
-`workspaceWiki.supportedExtensions`: File types to include (default: `md`, `markdown`, `txt`).
20
20
-`workspaceWiki.excludeGlobs`: Glob patterns to exclude (e.g., `**/node_modules/**`).
21
-
-`workspaceWiki.defaultOpenMode`: `preview` or `editor`.
21
+
-`workspaceWiki.directorySort`: How to sort files and folders (default: `files-first`).
22
+
-`workspaceWiki.openWith`: Commands to use for opening different file types.
23
+
-`workspaceWiki.maxSearchDepth`: Maximum directory depth to search (default: `10`).
22
24
-`workspaceWiki.autoReveal`: Auto-reveal active file in tree (default: `true`).
23
25
-`workspaceWiki.autoRevealDelay`: Delay before revealing active file in milliseconds (default: `500`).
24
-
-`workspaceWiki.showIgnoredFiles`: Show files/folders listed in .gitignore and excludeGlobs (default: false).
25
-
-`workspaceWiki.showHiddenFiles`: **Show hidden files and folders** (those starting with a dot, e.g. `.github`, `.env`) in the Workspace Wiki tree, unless excluded by .gitignore or excludeGlobs. Default is false (hidden files are not shown).
26
+
-`workspaceWiki.showIgnoredFiles`: Show files/folders listed in .gitignore and excludeGlobs (default: `false`).
27
+
-`workspaceWiki.showHiddenFiles`: Show hidden files and folders (those starting with a dot, e.g. `.github`, `.env`) in the Workspace Wiki tree, unless excluded by .gitignore or excludeGlobs (default: `false`).
0 commit comments