File tree Expand file tree Collapse file tree 6 files changed +16
-9
lines changed Expand file tree Collapse file tree 6 files changed +16
-9
lines changed Original file line number Diff line number Diff line change
1
+ kg-data /
2
+
1
3
# dependencies (bun install)
2
4
node_modules
3
5
.vscode
Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ docker-compose up -d
66
66
本项目采用 [ GAPLv3] ( LICENSE ) 许可证。如需许可证外其他用途,请联系 Wechat SOVLOOKUP。
67
67
68
68
<!-- 下一步-->
69
+ <!-- TODO 插件管理 API -->
70
+ <!-- TODO 插件变动重新触发扫描 -->
69
71
<!-- TODO 添加全部 llmjs 支持的文件类型 -->
70
72
<!-- TODO 制作宣传视频发 bilibili -->
71
73
@@ -74,8 +76,6 @@ docker-compose up -d
74
76
<!-- TODO 打点日志 -->
75
77
76
78
<!-- 功能 -->
77
- <!-- TODO 插件管理 API -->
78
- <!-- TODO 插件变动重新触发扫描 -->
79
79
<!-- TODO 客户端版 -->
80
80
<!-- TODO 文件加载器、分割器支持自定义向量 -->
81
81
<!-- TODO 前端 i8n -->
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " docbase" ,
3
- "version" : " 0.1.4 " ,
3
+ "version" : " 0.1.5 " ,
4
4
"type" : " module" ,
5
5
"workspaces" : [
6
6
" packages/*"
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ export class DocBase {
63
63
this . #watcherTaskCache. entries ( ) . map ( async ( [ path , type ] ) => {
64
64
if ( type === "upsert" ) {
65
65
await this . #docManager. upsertDoc ( path ) ;
66
+ console . log ( `[embeded] ${ path } ` ) ;
66
67
} else if ( type === "remove" ) {
67
68
await this . #docManager. deleteDocByPath ( path ) ;
68
69
}
Original file line number Diff line number Diff line change @@ -51,10 +51,16 @@ export const defaultDocLoaderPlugin: DocLoaderPlugin = {
51
51
const ext = getExtFromPath ( path ) ;
52
52
53
53
if ( ext === "docx" && ! basename ( path ) . startsWith ( "~$" ) ) {
54
- return {
55
- // @ts -ignore
56
- content : ( await mammoth . convertToMarkdown ( { path } ) ) . value ,
57
- } ;
54
+ // @ts -ignore
55
+ const content = ( await mammoth . convertToMarkdown ( { path } ) ) . value ;
56
+
57
+ if ( content ) {
58
+ return {
59
+ content,
60
+ } ;
61
+ } else {
62
+ return false ;
63
+ }
58
64
}
59
65
60
66
if ( ext === "md" ) {
Original file line number Diff line number Diff line change @@ -471,8 +471,6 @@ export class DocManager {
471
471
localDoc,
472
472
getDocSyncContent,
473
473
} ) ;
474
-
475
- console . log ( `[embeded] ${ path } ` ) ;
476
474
}
477
475
}
478
476
} ;
You can’t perform that action at this time.
0 commit comments