Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/16051

Vanessab98e40fb07d6
diff --git a/app/src/search/getDefault.ts b/app/src/search/getDefault.ts
index 2136e86a1e..5a8874fc13 100644
--- a/app/src/search/getDefault.ts
+++ b/app/src/search/getDefault.ts
@@ -14,6 +14,7 @@ export const getDefaultType = () => {
mathBlock: window.siyuan.config.search.mathBlock,
table: window.siyuan.config.search.table,
blockquote: window.siyuan.config.search.blockquote,
+ callout: window.siyuan.config.search.callout,
superBlock: window.siyuan.config.search.superBlock,
paragraph: window.siyuan.config.search.paragraph,
embedBlock: window.siyuan.config.search.embedBlock,
diff --git a/app/src/search/menu.ts b/app/src/search/menu.ts
index ef5dfcb276..8b36276753 100644
--- a/app/src/search/menu.ts
+++ b/app/src/search/menu.ts
@@ -130,6 +130,15 @@ export const filterMenu = (config: Config.IUILayoutTabSearchConfig, cb: () => vo
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" data-type="blockquote" type="checkbox"${config.types.blockquote ? " checked" : ""}>
</label>
+ <label class="fn__flex b3-label">
+ <svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconCallout"></use></svg>
+ <span class="fn__space"></span>
+ <div class="fn__flex-1 fn__flex-center">
+ ${window.siyuan.languages.callout} <sup>[1]</sup>
+ </div>
+ <span class="fn__space"></span>
+ <input class="b3-switch fn__flex-center" data-type="callout" type="checkbox"${config.types.callout ? " checked" : ""}>
+ </label>
<label class="fn__flex b3-label">
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconSuper"></use></svg>
<span class="fn__space"></span>
diff --git a/app/src/types/config.d.ts b/app/src/types/config.d.ts
index 86c034e6b2..69dd4ca75c 100644
--- a/app/src/types/config.d.ts
+++ b/app/src/types/config.d.ts
@@ -1216,6 +1216,10 @@ declare namespace Config {
* Whether to search quote blocks
*/
blockquote: boolean;
+ /**
+ * Whether to search callout
+ */
+ callout: boolean;
/**
* Whether to distinguish between uppercase and lowercase letters when searching
*/
@@ -2302,6 +2306,11 @@ declare namespace Config {
* @default false
*/
blockquote: boolean;
+ /**
+ * Search results contain callout blocks
+ * @default false
+ */
+ callout: boolean;
/**
* Search results contain code blocks
* @default false