@aigne/doc-smith 0.9.1-beta → 0.9.2-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/agents/chat/index.mjs +1 -1
- package/agents/publish/publish-docs.mjs +10 -2
- package/package.json +1 -1
- package/utils/auth-utils.mjs +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.2-beta](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.9.1...v0.9.2-beta) (2025-11-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* handle nullable config in chat agent ([#298](https://github.com/AIGNE-io/aigne-doc-smith/issues/298)) ([dc1f206](https://github.com/AIGNE-io/aigne-doc-smith/commit/dc1f206c6aafd437732ae9ab17e8c1d8a29fb412))
|
|
9
|
+
|
|
10
|
+
## [0.9.1](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.9.1-beta...v0.9.1) (2025-11-12)
|
|
11
|
+
|
|
3
12
|
## [0.9.1-beta](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.9.0...v0.9.1-beta) (2025-11-12)
|
|
4
13
|
|
|
5
14
|
|
package/agents/chat/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ const config = await readFile(".aigne/doc-smith/config.yaml", "utf-8")
|
|
|
6
6
|
.then((raw) => parse(raw))
|
|
7
7
|
.catch(() => null);
|
|
8
8
|
|
|
9
|
-
const docsDir = config
|
|
9
|
+
const docsDir = config?.docsDir || ".aigne/doc-smith/docs";
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
12
|
type: "ai",
|
|
@@ -52,11 +52,19 @@ export default async function publishDocs(
|
|
|
52
52
|
|
|
53
53
|
// ----------------- main publish process flow -----------------------------
|
|
54
54
|
// Check if DOC_DISCUSS_KIT_URL is set in environment variables
|
|
55
|
-
const useEnvAppUrl = !!(
|
|
55
|
+
const useEnvAppUrl = !!(
|
|
56
|
+
process.env.DOC_SMITH_PUBLISH_URL ||
|
|
57
|
+
process.env.DOC_DISCUSS_KIT_URL ||
|
|
58
|
+
appUrl
|
|
59
|
+
);
|
|
56
60
|
|
|
57
61
|
// Check if appUrl is default and not saved in config (only when not using env variable)
|
|
58
62
|
const config = await loadConfigFromFile();
|
|
59
|
-
appUrl =
|
|
63
|
+
appUrl =
|
|
64
|
+
process.env.DOC_SMITH_PUBLISH_URL ||
|
|
65
|
+
process.env.DOC_DISCUSS_KIT_URL ||
|
|
66
|
+
appUrl ||
|
|
67
|
+
config?.appUrl;
|
|
60
68
|
const hasInputAppUrl = !!appUrl;
|
|
61
69
|
|
|
62
70
|
let shouldSyncBranding = void 0;
|
package/package.json
CHANGED
package/utils/auth-utils.mjs
CHANGED
|
@@ -37,7 +37,8 @@ export async function getAccessToken(appUrl, ltToken = "") {
|
|
|
37
37
|
const { hostname } = new URL(appUrl);
|
|
38
38
|
const DOC_SMITH_ENV_FILE = getDocSmithEnvFilePath();
|
|
39
39
|
|
|
40
|
-
let accessToken =
|
|
40
|
+
let accessToken =
|
|
41
|
+
process.env.DOC_SMITH_PUBLISH_ACCESS_TOKEN || process.env.DOC_DISCUSS_KIT_ACCESS_TOKEN;
|
|
41
42
|
|
|
42
43
|
// Check if access token exists in environment or config file
|
|
43
44
|
if (!accessToken) {
|
|
@@ -117,7 +118,7 @@ export async function getAccessToken(appUrl, ltToken = "") {
|
|
|
117
118
|
});
|
|
118
119
|
|
|
119
120
|
accessToken = result.accessKeySecret;
|
|
120
|
-
process.env.
|
|
121
|
+
process.env.DOC_SMITH_PUBLISH_ACCESS_TOKEN = accessToken;
|
|
121
122
|
|
|
122
123
|
// Save the access token to config file
|
|
123
124
|
const aigneDir = join(homedir(), ".aigne");
|