Skip to content

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

:sparkles: https://github.com/siyuan-note/siyuan/issues/8041

Vanessa5fdaecd22802
diff --git a/app/package.json b/app/package.json
index d56fef3268..157d4153d9 100644
--- a/app/package.json
+++ b/app/package.json
@@ -68,7 +68,6 @@
"safer-buffer": "^2.1.2",
"sass": "^1.53.0",
"sass-loader": "^12.6.0",
- "siyuan-petal": "^0.7.1",
"typescript": "^4.7.4",
"webpack": "^5.73.0",
"webpack-bundle-analyzer": "^4.5.0",
diff --git a/app/pnpm-lock.yaml b/app/pnpm-lock.yaml
index 82cde98b30..bb5fa98378 100644
--- a/app/pnpm-lock.yaml
+++ b/app/pnpm-lock.yaml
@@ -75,9 +75,6 @@ devDependencies:
sass-loader:
specifier: ^12.6.0
- siyuan-petal:
- specifier: ^0.7.1
- version: 0.7.1
typescript:
specifier: ^4.7.4
version: 4.7.4
@@ -3416,10 +3413,6 @@ packages:
totalist: 1.1.0
dev: true
- resolution: {integrity: sha512-jUxQrK83T2AMgADOQJe5W6rqbtkO3oHLGx/oaTec69JvyYfABVjARV0YxX4daKhgMl9lykdT1fLyYxg2YDV4Mw==}
- dev: true
-
resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==}
engines: {node: '>=8'}
diff --git a/app/src/API.ts b/app/src/API.ts
deleted file mode 100644
index dd0966624e..0000000000
--- a/app/src/API.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-class SiYuanAPI {
-
- static openFile() {
- // openFileById()
- }
-}
-
-export default SiYuanAPI;
diff --git a/app/webpack.api.js b/app/webpack.api.js
deleted file mode 100644
index d7b39366f1..0000000000
--- a/app/webpack.api.js
+++ /dev/null
@@ -1,72 +0,0 @@
-const path = require("path");
-const webpack = require("webpack");
-const pkg = require("./package.json");
-const {CleanWebpackPlugin} = require("clean-webpack-plugin");
-// const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
-const {EsbuildPlugin} = require("esbuild-loader");
-
-module.exports = (env, argv) => {
- return {
- mode: argv.mode || "development",
- watch: argv.mode !== "production",
- devtool: argv.mode !== "production" ? "eval" : false,
- output: {
- publicPath: "",
- filename: "[name].js",
- path: path.resolve(__dirname, "stage/build/api"),
- libraryTarget: "umd",
- library: "SiYuanAPI",
- libraryExport: "default",
- },
- entry: {
- "api": "./src/api.ts",
- },
- optimization: {
- minimize: true,
- minimizer: [
- new EsbuildPlugin({target: "es6"}),
- ],
- },
- resolve: {
- fallback: {
- "path": require.resolve("path-browserify"),
- },
- extensions: [".ts", ".js", ".scss"],
- },
- module: {
- rules: [
- {
- test: /\.ts(x?)$/,
- include: [path.resolve(__dirname, "src")],
- use: [
- {
- loader: "esbuild-loader",
- options: {
- target: "es6",
- }
- },
- {
- loader: "ifdef-loader",
- options: {
- "ifdef-verbose": false,
- BROWSER: true,
- MOBILE: true,
- },
- },
- ],
- }
- ],
- },
- plugins: [
- // new BundleAnalyzerPlugin(),
- new CleanWebpackPlugin({
- cleanOnceBeforeBuildPatterns: [
- path.join(__dirname, "stage/build/api")],
- }),
- new webpack.DefinePlugin({
- NODE_ENV: JSON.stringify(argv.mode),
- SIYUAN_VERSION: JSON.stringify(pkg.version),
- }),
- ],
- };
-};