aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/scrapbook
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-06-11 12:15:39 -0400
committerbobzel <zzzman@gmail.com>2025-06-11 12:15:39 -0400
commit6c011f502118e5246aabd29a30494c669d917fb1 (patch)
treecddfc37733433e182e801a9a4a31c64fb106eb77 /src/client/views/nodes/scrapbook
parentbf33580a66c1f8ce87e85bea701415788a887401 (diff)
don't autoTag text docs until they're dropped onto a scrapbook. don't re-tag a text box that has not changed.
Diffstat (limited to 'src/client/views/nodes/scrapbook')
-rw-r--r--src/client/views/nodes/scrapbook/ScrapbookBox.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/nodes/scrapbook/ScrapbookBox.tsx b/src/client/views/nodes/scrapbook/ScrapbookBox.tsx
index fcb82a6ba..94522c979 100644
--- a/src/client/views/nodes/scrapbook/ScrapbookBox.tsx
+++ b/src/client/views/nodes/scrapbook/ScrapbookBox.tsx
@@ -57,7 +57,10 @@ export function buildPlaceholdersFromConfigs(configs: ScrapbookItemConfig[]) {
return createMessagePlaceholder(cfg);
});
}
-export function slotRealDocIntoPlaceholders(realDoc: Doc, placeholders: Doc[]): boolean {
+export async function slotRealDocIntoPlaceholders(realDoc: Doc, placeholders: Doc[]) {
+ if (!realDoc.$tags_chart) {
+ await DocumentView.getFirstDocumentView(realDoc)?.ComponentView?.autoTag?.();
+ }
const realTags = new Set<string>(StrListCast(realDoc.$tags_chat).map(t => t.toLowerCase?.() ?? ''));
// Find placeholder with most matching tags