aicq-chat-plugin 2.5.3 → 2.5.4
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/cli.js +10 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/postinstall.js +8 -0
package/cli.js
CHANGED
|
@@ -123,6 +123,7 @@ function findOpenClawWorkspace() {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
// Try to find workspace from clawhub or common locations
|
|
126
|
+
// Prefer directories that already have a skills/ directory
|
|
126
127
|
const home = os.homedir();
|
|
127
128
|
const candidates = [
|
|
128
129
|
// Current working directory (most common for clawhub)
|
|
@@ -133,7 +134,7 @@ function findOpenClawWorkspace() {
|
|
|
133
134
|
path.join(home, '.openclaw'),
|
|
134
135
|
];
|
|
135
136
|
|
|
136
|
-
// Check if any candidate has a skills/ directory
|
|
137
|
+
// Check if any candidate has a skills/ directory (existing)
|
|
137
138
|
for (const dir of candidates) {
|
|
138
139
|
const skillsDir = path.join(dir, 'skills');
|
|
139
140
|
if (fs.existsSync(skillsDir)) {
|
|
@@ -151,6 +152,14 @@ function findOpenClawWorkspace() {
|
|
|
151
152
|
current = path.dirname(current);
|
|
152
153
|
}
|
|
153
154
|
|
|
155
|
+
// If no existing skills/ found, fall back to the OpenClaw directory itself.
|
|
156
|
+
// This handles the case where ~/.openclaw/ exists but has no skills/ yet.
|
|
157
|
+
// We'll auto-create skills/ inside it during installation.
|
|
158
|
+
const openclawDir = findOpenClawDir();
|
|
159
|
+
if (openclawDir) {
|
|
160
|
+
return openclawDir;
|
|
161
|
+
}
|
|
162
|
+
|
|
154
163
|
return null;
|
|
155
164
|
}
|
|
156
165
|
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
package/postinstall.js
CHANGED
|
@@ -125,6 +125,14 @@ function findOpenClawWorkspace() {
|
|
|
125
125
|
current = path.dirname(current);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
// If no existing skills/ found, fall back to the OpenClaw directory itself.
|
|
129
|
+
// This handles the case where ~/.openclaw/ exists but has no skills/ yet.
|
|
130
|
+
// We'll auto-create skills/ inside it during installation.
|
|
131
|
+
const openclawDir = findOpenClawDir();
|
|
132
|
+
if (openclawDir) {
|
|
133
|
+
return openclawDir;
|
|
134
|
+
}
|
|
135
|
+
|
|
128
136
|
return null;
|
|
129
137
|
}
|
|
130
138
|
|