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: TECHNICAL.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1592,7 +1592,16 @@ If `resolveAlias(oldPageName)` returns the same page whose filename is `oldPageN
1592
1592
1593
1593
**Workspace-wide link update:**
1594
1594
1595
-
`updateLinksInWorkspace()` finds all `.md` and `.markdown` files, parses each for wikilinks, and creates a `WorkspaceEdit` that replaces every `[[oldPageName]]` with `[[newPageName]]`. After applying the edit, it saves modified files.
1595
+
`updateLinksInWorkspace()` finds all `.md` and `.markdown` files, parses each for wikilinks, and now uses a split write strategy:
1596
+
1597
+
1. **Already-open documents** are updated through a `WorkspaceEdit` so their live editor buffers stay authoritative.
1598
+
2. **Closed documents** are rewritten directly on disk using `workspace.fs.writeFile()` after a raw `fs.readFile()` pass.
1599
+
1600
+
This avoids VS Code opening newly-dirty tabs for files that were closed before the rename, which in turn avoids working-copy save conflicts on those reference files.
1601
+
1602
+
**Index-driven candidate narrowing:**
1603
+
1604
+
Rename refactors no longer have to discover rewrite candidates by scanning the entire workspace up front. `IndexService.findPagesLinkingToPageNames(...)` queries the `links` table for distinct source pages whose indexed `page_name` matches one of the renamed targets. `updateLinksInWorkspace()` now accepts those candidate URIs and only opens that bounded set of files when a candidate set is provided. The actual rewrite still parses the real file text before editing, so the index narrows the search space but does not become the edit source of truth.
1596
1605
1597
1606
**Notification progress:**
1598
1607
@@ -1631,9 +1640,13 @@ This selection logic is isolated in `WikilinkExplorerMergeService.ts` so the amb
1631
1640
The user-confirmed refactor work that follows explorer renames is now extracted into `WikilinkExplorerRenameRefactorService.ts`. That helper applies the same notification UX as in-editor renames:
1632
1641
1633
1642
1. Accepted merge operations show `AS Notes: Applying rename updates` while the merge, delete, and target re-index complete.
1634
-
2. Accepted workspace-wide reference updates show `AS Notes: Updating wikilink references` while link replacement and stale-scan refresh complete.
1643
+
2. Accepted workspace-wide reference updates show `AS Notes: Updating wikilink references` while index-driven candidate rewrite and targeted file re-indexing complete.
1635
1644
3. Declined explorer prompts do not show progress notifications.
1636
1645
1646
+
For explorer renames, the old broad `staleScan()` follow-up has been replaced with targeted re-indexing of the files actually edited by the refactor. That removes a second whole-tree pass from the common rename path.
1647
+
1648
+
`updateLinksInWorkspace()` no longer auto-saves affected open editors after applying workspace edits. Instead, both the in-editor and explorer rename flows now use `reindexWorkspaceUri(...)`: if an affected file is currently open, it is re-indexed from the live editor buffer via `indexFileContent(...)`; otherwise it falls back to `indexScanner.indexFile(...)`. `WikilinkRenameTracker` still re-indexes the initiating document from `document.getText()` when its URI is stable, and remaps any old source candidate URI to the post-rename or post-merge target before follow-up indexing. Combined with the direct-to-disk rewrite path for closed files, this avoids save conflicts on both open reference files and files that were previously closed, as well as attempts to reopen a source file that has just been renamed or deleted.
1649
+
1637
1650
### Re-entrancy guard
1638
1651
1639
1652
The `isProcessing` flag prevents document-change events fired by the rename operation itself (file renames, workspace edits) from being treated as new user edits. It is set to `true` before any rename work begins and cleared in the `finally` block.
Copy file name to clipboardExpand all lines: docs-src/docs/Backlinks.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ order: 3
4
4
5
5
# Backlinks
6
6
7
-
The Backlinks panel shows every note in your workspace that links to a given page. It is one of the most powerful navigation tools in AS Notes — use it to understand how ideas connect across your knowledge base.
7
+
The Backlinks panel shows every note in your workspace that links to a given page. Use it to understand how ideas connect across your knowledge base.
8
8
9
9
## Opening the Panel
10
10
@@ -24,7 +24,7 @@ For example, if `Project.md` contains:
24
24
- [[NGINX]]
25
25
```
26
26
27
-
…then the backlink chain for `NGINX` from `Project.md` would be:
27
+
…then the backlink chain for `NGINX` from `Project.md` would be:
Copy file name to clipboardExpand all lines: docs-src/docs/Getting Started.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ This page gets you from zero to a working AS Notes workspace in a few minutes.
8
8
9
9
## 1. Install the Extension
10
10
11
-
Install **AS Notes** from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=appsoftwareltd.as-notes).
11
+
Install **AS Notes** from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=appsoftwareltd.as-notes) / [Open VSX](https://open-vsx.org/extension/appsoftwareltd/as-notes)
12
12
13
13
Open VS Code, go to the Extensions view (`Ctrl+Shift+X`), search for **AS Notes**, and click **Install**.
14
14
@@ -33,9 +33,9 @@ Look for the AS Notes sidebar icon to view Search, Calendar, Kanban Boards and T
33
33
34
34
## 4. Write Your First Note
35
35
36
-
Create a new `.md` file and start writing. Type `[[` anywhere to trigger [[Wikilinks]] autocomplete - a list of all your pages appears immediately.
36
+
Create a new `.md` file and start writing. Type `[[` anywhere to trigger [[Wikilinks]] autocomplete - a list of all your pages appears immediately (unless this is your first page and wikilink, in which case it will be added too the index ready for referencing).
37
37
38
-
Try adding a task `- [ ] task text` and try toggling the task state from the task management side panel.
38
+
Next, try adding a task `- [ ] task text`(`Ctrl+Shift+Enter` / `Cmd+Shift+Enter`) and try toggling the task state from the task management side panel or by clicking the check box or by cycling the keyboard shortcut.
39
39
40
40
## Excluding Files from the Index
41
41
@@ -62,8 +62,8 @@ If the index ever becomes stale or corrupted, run **AS Notes: Rebuild Index** fr
62
62
63
63
## Cleaning the Workspace
64
64
65
-
If the extension is in a bad state (e.g. persistent errors after a crash), run**AS Notes: Clean Workspace** to remove the `.asnotes/` directory and reset all in-memory state. Your `.asnotesignore` file is preserved. Run **AS Notes: Initialise Workspace** afterwards to start fresh.
65
+
Run**AS Notes: Clean Workspace** to remove the `.asnotes/` directory and reset all in-memory state. Your `.asnotesignore` file is preserved. Run **AS Notes: Initialise Workspace** afterwards to start fresh.
66
66
67
67
## Compatibility With Other Tools
68
68
69
-
AS Notes workspaces are plain markdown files in plain folders - they are compatible with Obsidian and Logseq due to similar file structures. Be aware there are format and behavioural differences, but you can use the same notes folder with multiple tools.
69
+
AS Notes workspaces are plain markdown files in plain folders - they are largely compatible with Obsidian and Logseq due to similar file structures. Be aware there are format and behavioural differences, but you can use the same notes folder with multiple tools.
Copy file name to clipboardExpand all lines: docs-src/docs/index.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,10 @@ AS Notes brings markdown and [[wikilink]] editing for notes, documentation, blog
8
8
9
9
**Capture ideas, link concepts, write, and stay focused - without ever leaving your editor.**
10
10
11
-
> **This documentation was written and generated using AS Notes. See [[Publishing a Static Site]] for how you can use AS Notes for your docs, including deploying to GitHub Pages**.
11
+
> **This documentation was written and generated using AS Notes. See [[Publishing a Static Site]] for how you can use AS Notes for your docs, including deploying to GitHub Pages, Cloudflare and More**.
0 commit comments