Skip to content

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

:art: Add .cs file to assets search index https://github.com/siyuan-note/siyuan/issues/14983

Daniel084ddfd38923
diff --git a/app/src/constants.ts b/app/src/constants.ts
index b028cb476c..677b6131ab 100644
--- a/app/src/constants.ts
+++ b/app/src/constants.ts
@@ -701,7 +701,7 @@ export abstract class Constants {
public static readonly SIYUAN_ASSETS_EXTS: string[] = [".pdf"].concat(Constants.SIYUAN_ASSETS_IMAGE).concat(Constants.SIYUAN_ASSETS_AUDIO).concat(Constants.SIYUAN_ASSETS_VIDEO);
public static readonly SIYUAN_ASSETS_SEARCH: string[] = [".txt", ".md", ".markdown", ".docx", ".xlsx", ".pptx", ".pdf", ".json", ".log", ".sql", ".html", ".xml", ".java", ".h", ".c",
".cpp", ".go", ".rs", ".swift", ".kt", ".py", ".php", ".js", ".css", ".ts", ".sh", ".bat", ".cmd", ".ini", ".yaml",
- ".rst", ".adoc", ".textile", ".opml", ".org", ".wiki", ".epub"];
+ ".rst", ".adoc", ".textile", ".opml", ".org", ".wiki", ".epub", ".cs"];
// protyle
public static readonly SIYUAN_CONFIG_APPEARANCE_DARK_CODE: string[] = ["a11y-dark", "agate", "an-old-hope", "androidstudio",
diff --git a/kernel/model/asset_content.go b/kernel/model/asset_content.go
index ab52f6a7a3..b6ad30f5ca 100644
--- a/kernel/model/asset_content.go
+++ b/kernel/model/asset_content.go
@@ -475,6 +475,7 @@ func NewAssetsSearcher() *AssetsSearcher {
".opml": txtAssetParser,
".org": txtAssetParser,
".wiki": txtAssetParser,
+ ".cs": txtAssetParser,
".docx": &DocxAssetParser{},
".pptx": &PptxAssetParser{},
".xlsx": &XlsxAssetParser{},